aclocal.m4 revision 024581f2
17322289dSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 27322289dSmrg 37322289dSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 41d54945dSmrg 51d54945dSmrg# This file is free software; the Free Software Foundation 61d54945dSmrg# gives unlimited permission to copy and/or distribute it, 71d54945dSmrg# with or without modifications, as long as this notice is preserved. 81d54945dSmrg 91d54945dSmrg# This program is distributed in the hope that it will be useful, 101d54945dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 111d54945dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 121d54945dSmrg# PARTICULAR PURPOSE. 131d54945dSmrg 147322289dSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 177322289dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 187322289dSmrg[m4_warning([this file was generated for autoconf 2.69. 19ba85709eSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ba85709eSmrgIf you have problems, you may need to regenerate the build system entirely. 217322289dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ba85709eSmrg 231d54945dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24d769e936Smrg# 257322289dSmrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26d769e936Smrg# Written by Gordon Matzigkeit, 1996 27d769e936Smrg# 28d769e936Smrg# This file is free software; the Free Software Foundation gives 29d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 30d769e936Smrg# modifications, as long as this notice is preserved. 31d769e936Smrg 32d769e936Smrgm4_define([_LT_COPYING], [dnl 337322289dSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 347322289dSmrg# This is free software; see the source for copying conditions. There is NO 357322289dSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 367322289dSmrg 377322289dSmrg# GNU Libtool is free software; you can redistribute it and/or modify 387322289dSmrg# it under the terms of the GNU General Public License as published by 397322289dSmrg# the Free Software Foundation; either version 2 of of the License, or 407322289dSmrg# (at your option) any later version. 41d769e936Smrg# 427322289dSmrg# As a special exception to the GNU General Public License, if you 437322289dSmrg# distribute this file as part of a program or library that is built 447322289dSmrg# using GNU Libtool, you may include this file under the same 457322289dSmrg# distribution terms that you use for the rest of that program. 46d769e936Smrg# 477322289dSmrg# GNU Libtool is distributed in the hope that it will be useful, but 487322289dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49d769e936Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50d769e936Smrg# GNU General Public License for more details. 51d769e936Smrg# 52d769e936Smrg# You should have received a copy of the GNU General Public License 537322289dSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54d769e936Smrg]) 551d54945dSmrg 567322289dSmrg# serial 58 LT_INIT 571d54945dSmrg 581d54945dSmrg 59d769e936Smrg# LT_PREREQ(VERSION) 60d769e936Smrg# ------------------ 61d769e936Smrg# Complain and exit if this libtool version is less that VERSION. 62d769e936Smrgm4_defun([LT_PREREQ], 63d769e936Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64d769e936Smrg [m4_default([$3], 65d769e936Smrg [m4_fatal([Libtool version $1 or higher is required], 66d769e936Smrg 63)])], 67d769e936Smrg [$2])]) 68786a6f21Smrg 69786a6f21Smrg 70d769e936Smrg# _LT_CHECK_BUILDDIR 71d769e936Smrg# ------------------ 72d769e936Smrg# Complain if the absolute build directory name contains unusual characters 73d769e936Smrgm4_defun([_LT_CHECK_BUILDDIR], 74d769e936Smrg[case `pwd` in 75d769e936Smrg *\ * | *\ *) 76d769e936Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77d769e936Smrgesac 78d769e936Smrg]) 79d769e936Smrg 80d769e936Smrg 81d769e936Smrg# LT_INIT([OPTIONS]) 82d769e936Smrg# ------------------ 83d769e936SmrgAC_DEFUN([LT_INIT], 847322289dSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85d769e936SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86d769e936SmrgAC_BEFORE([$0], [LT_LANG])dnl 87d769e936SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88d769e936SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89d769e936Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 90d769e936Smrg 91d769e936Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92d769e936Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93d769e936Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94d769e936Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95d769e936Smrgdnl unless we require an AC_DEFUNed macro: 96d769e936SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97d769e936SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98d769e936SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99d769e936SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100d769e936Smrgm4_require([_LT_PROG_LTMAIN])dnl 101d769e936Smrg 102d769e936Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103d769e936Smrg 104d769e936Smrgdnl Parse OPTIONS 105d769e936Smrg_LT_SET_OPTIONS([$0], [$1]) 1061d54945dSmrg 1071d54945dSmrg# This can be used to rebuild libtool when needed 1087322289dSmrgLIBTOOL_DEPS=$ltmain 1091d54945dSmrg 1101d54945dSmrg# Always use our own libtool. 1111d54945dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1121d54945dSmrgAC_SUBST(LIBTOOL)dnl 1131d54945dSmrg 114d769e936Smrg_LT_SETUP 115786a6f21Smrg 116d769e936Smrg# Only expand once: 117d769e936Smrgm4_define([LT_INIT]) 118d769e936Smrg])# LT_INIT 119786a6f21Smrg 120d769e936Smrg# Old names: 121d769e936SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122d769e936SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123d769e936Smrgdnl aclocal-1.4 backwards compatibility: 124d769e936Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125d769e936Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126d769e936Smrg 127d769e936Smrg 1287322289dSmrg# _LT_PREPARE_CC_BASENAME 1297322289dSmrg# ----------------------- 1307322289dSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1317322289dSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1327322289dSmrgfunc_cc_basename () 1337322289dSmrg{ 1347322289dSmrg for cc_temp in @S|@*""; do 1357322289dSmrg case $cc_temp in 1367322289dSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1377322289dSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1387322289dSmrg \-*) ;; 1397322289dSmrg *) break;; 1407322289dSmrg esac 1417322289dSmrg done 1427322289dSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1437322289dSmrg} 1447322289dSmrg])# _LT_PREPARE_CC_BASENAME 1457322289dSmrg 1467322289dSmrg 147d769e936Smrg# _LT_CC_BASENAME(CC) 148d769e936Smrg# ------------------- 1497322289dSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1507322289dSmrg# but that macro is also expanded into generated libtool script, which 1517322289dSmrg# arranges for $SED and $ECHO to be set by different means. 152d769e936Smrgm4_defun([_LT_CC_BASENAME], 1537322289dSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1547322289dSmrgAC_REQUIRE([_LT_DECL_SED])dnl 1557322289dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1567322289dSmrgfunc_cc_basename $1 1577322289dSmrgcc_basename=$func_cc_basename_result 158d769e936Smrg]) 159d769e936Smrg 160d769e936Smrg 161d769e936Smrg# _LT_FILEUTILS_DEFAULTS 162d769e936Smrg# ---------------------- 163d769e936Smrg# It is okay to use these file commands and assume they have been set 1647322289dSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165d769e936Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166d769e936Smrg[: ${CP="cp -f"} 167d769e936Smrg: ${MV="mv -f"} 168d769e936Smrg: ${RM="rm -f"} 169d769e936Smrg])# _LT_FILEUTILS_DEFAULTS 170d769e936Smrg 171d769e936Smrg 172d769e936Smrg# _LT_SETUP 173d769e936Smrg# --------- 174d769e936Smrgm4_defun([_LT_SETUP], 175d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1761d54945dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177d769e936SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178d769e936SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179ec713c28Smrg 180d769e936Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181d769e936Smrgdnl 182d769e936Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183d769e936Smrg_LT_DECL([], [host], [0])dnl 184d769e936Smrg_LT_DECL([], [host_os], [0])dnl 185d769e936Smrgdnl 186d769e936Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187d769e936Smrg_LT_DECL([], [build], [0])dnl 188d769e936Smrg_LT_DECL([], [build_os], [0])dnl 189d769e936Smrgdnl 190d769e936SmrgAC_REQUIRE([AC_PROG_CC])dnl 191d769e936SmrgAC_REQUIRE([LT_PATH_LD])dnl 192d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 193d769e936Smrgdnl 1941d54945dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195d769e936Smrgtest -z "$LN_S" && LN_S="ln -s" 196d769e936Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197786a6f21Smrgdnl 198d769e936SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199d769e936Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200d769e936Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201d769e936Smrgdnl 202d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203d769e936Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204d769e936Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205d769e936Smrgm4_require([_LT_CMD_RELOAD])dnl 206d769e936Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207d769e936Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208d769e936Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209d769e936Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210d769e936Smrgm4_require([_LT_WITH_SYSROOT])dnl 2117322289dSmrgm4_require([_LT_CMD_TRUNCATE])dnl 212d769e936Smrg 213d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([ 2147322289dSmrg# See if we are running on zsh, and set the options that allow our 215d769e936Smrg# commands through without removal of \ escapes INIT. 2167322289dSmrgif test -n "\${ZSH_VERSION+set}"; then 217d769e936Smrg setopt NO_GLOB_SUBST 218d769e936Smrgfi 219d769e936Smrg]) 2207322289dSmrgif test -n "${ZSH_VERSION+set}"; then 221d769e936Smrg setopt NO_GLOB_SUBST 222d769e936Smrgfi 223786a6f21Smrg 224d769e936Smrg_LT_CHECK_OBJDIR 225d769e936Smrg 226d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 2271d54945dSmrg 2281d54945dSmrgcase $host_os in 2291d54945dSmrgaix3*) 2301d54945dSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2311d54945dSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2321d54945dSmrg # vanish in a puff of smoke. 2337322289dSmrg if test set != "${COLLECT_NAMES+set}"; then 2341d54945dSmrg COLLECT_NAMES= 2351d54945dSmrg export COLLECT_NAMES 2361d54945dSmrg fi 2371d54945dSmrg ;; 2381d54945dSmrgesac 2391d54945dSmrg 2401d54945dSmrg# Global variables: 241d769e936Smrgofile=libtool 2421d54945dSmrgcan_build_shared=yes 2431d54945dSmrg 2447322289dSmrg# All known linkers require a '.a' archive for static linking (except MSVC, 2451d54945dSmrg# which needs '.lib'). 2461d54945dSmrglibext=a 2471d54945dSmrg 2487322289dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249ec713c28Smrg 2507322289dSmrgold_CC=$CC 2517322289dSmrgold_CFLAGS=$CFLAGS 2521d54945dSmrg 2531d54945dSmrg# Set sane defaults for various variables 2541d54945dSmrgtest -z "$CC" && CC=cc 2551d54945dSmrgtest -z "$LTCC" && LTCC=$CC 2561d54945dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2571d54945dSmrgtest -z "$LD" && LD=ld 2581d54945dSmrgtest -z "$ac_objext" && ac_objext=o 2591d54945dSmrg 2601d54945dSmrg_LT_CC_BASENAME([$compiler]) 2611d54945dSmrg 2621d54945dSmrg# Only perform the check for file, if the check method requires it 263d769e936Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2641d54945dSmrgcase $deplibs_check_method in 2651d54945dSmrgfile_magic*) 2661d54945dSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267d769e936Smrg _LT_PATH_MAGIC 2681d54945dSmrg fi 2691d54945dSmrg ;; 2701d54945dSmrgesac 2711d54945dSmrg 272d769e936Smrg# Use C for the default configuration in the libtool script 273d769e936SmrgLT_SUPPORTED_TAG([CC]) 274d769e936Smrg_LT_LANG_C_CONFIG 275d769e936Smrg_LT_LANG_DEFAULT_CONFIG 276d769e936Smrg_LT_CONFIG_COMMANDS 277d769e936Smrg])# _LT_SETUP 278786a6f21Smrg 279786a6f21Smrg 280d769e936Smrg# _LT_PREPARE_SED_QUOTE_VARS 281d769e936Smrg# -------------------------- 282d769e936Smrg# Define a few sed substitution that help us do robust quoting. 283d769e936Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284d769e936Smrg[# Backslashify metacharacters that are still active within 285d769e936Smrg# double-quoted strings. 286d769e936Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287786a6f21Smrg 288d769e936Smrg# Same as above, but do not quote variable references. 289d769e936Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290786a6f21Smrg 291d769e936Smrg# Sed substitution to delay expansion of an escaped shell variable in a 292d769e936Smrg# double_quote_subst'ed string. 293d769e936Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294786a6f21Smrg 295d769e936Smrg# Sed substitution to delay expansion of an escaped single quote. 296d769e936Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297786a6f21Smrg 298d769e936Smrg# Sed substitution to avoid accidental globbing in evaled expressions 299d769e936Smrgno_glob_subst='s/\*/\\\*/g' 300d769e936Smrg]) 3011d54945dSmrg 302d769e936Smrg# _LT_PROG_LTMAIN 303d769e936Smrg# --------------- 3047322289dSmrg# Note that this code is called both from 'configure', and 'config.status' 305d769e936Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3067322289dSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307d769e936Smrg# so we pass a copy along to make sure it has a sensible value anyway. 308d769e936Smrgm4_defun([_LT_PROG_LTMAIN], 309d769e936Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3117322289dSmrgltmain=$ac_aux_dir/ltmain.sh 312d769e936Smrg])# _LT_PROG_LTMAIN 3131d54945dSmrg 3141d54945dSmrg 315ec713c28Smrg 316d769e936Smrg# So that we can recreate a full libtool script including additional 317d769e936Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3187322289dSmrg# in macros and then make a single call at the end using the 'libtool' 319d769e936Smrg# label. 320ec713c28Smrg 3211d54945dSmrg 322d769e936Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323d769e936Smrg# ---------------------------------------- 324d769e936Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325d769e936Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326d769e936Smrg[m4_ifval([$1], 327d769e936Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328d769e936Smrg [$1 329d769e936Smrg])])]) 3301d54945dSmrg 331d769e936Smrg# Initialize. 332d769e936Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3331d54945dSmrg 3341d54945dSmrg 335d769e936Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336d769e936Smrg# ------------------------------ 337d769e936Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338d769e936Smrgm4_define([_LT_CONFIG_LIBTOOL], 339d769e936Smrg[m4_ifval([$1], 340d769e936Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341d769e936Smrg [$1 342d769e936Smrg])])]) 343d769e936Smrg 344d769e936Smrg# Initialize. 345d769e936Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346d769e936Smrg 347d769e936Smrg 348d769e936Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349d769e936Smrg# ----------------------------------------------------- 350d769e936Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351d769e936Smrg[_LT_CONFIG_LIBTOOL([$1]) 352d769e936Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353d769e936Smrg]) 3541d54945dSmrg 355ba85709eSmrg 356d769e936Smrg# _LT_FORMAT_COMMENT([COMMENT]) 357d769e936Smrg# ----------------------------- 358d769e936Smrg# Add leading comment marks to the start of each line, and a trailing 359d769e936Smrg# full-stop to the whole comment if one is not present already. 360d769e936Smrgm4_define([_LT_FORMAT_COMMENT], 361d769e936Smrg[m4_ifval([$1], [ 362d769e936Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363d769e936Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364d769e936Smrg)]) 365d769e936Smrg 366d769e936Smrg 367d769e936Smrg 368d769e936Smrg 369d769e936Smrg 370d769e936Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371d769e936Smrg# ------------------------------------------------------------------- 372d769e936Smrg# CONFIGNAME is the name given to the value in the libtool script. 373d769e936Smrg# VARNAME is the (base) name used in the configure script. 374d769e936Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375d769e936Smrg# VARNAME. Any other value will be used directly. 376d769e936Smrgm4_define([_LT_DECL], 377d769e936Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378d769e936Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379d769e936Smrg [m4_ifval([$1], [$1], [$2])]) 380d769e936Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381d769e936Smrg m4_ifval([$4], 382d769e936Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383d769e936Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 384d769e936Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385ba85709eSmrg]) 3861d54945dSmrg 3871d54945dSmrg 388d769e936Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389d769e936Smrg# -------------------------------------------------------- 390d769e936Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3911d54945dSmrg 3921d54945dSmrg 393d769e936Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394d769e936Smrg# ------------------------------------------------ 395d769e936Smrgm4_define([lt_decl_tag_varnames], 396d769e936Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3971d54945dSmrg 3981d54945dSmrg 399d769e936Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400d769e936Smrg# --------------------------------------------------------- 401d769e936Smrgm4_define([_lt_decl_filter], 402d769e936Smrg[m4_case([$#], 403d769e936Smrg [0], [m4_fatal([$0: too few arguments: $#])], 404d769e936Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405d769e936Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406d769e936Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407d769e936Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408d769e936Smrg]) 4091d54945dSmrg 4101d54945dSmrg 411d769e936Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412d769e936Smrg# -------------------------------------------------- 413d769e936Smrgm4_define([lt_decl_quote_varnames], 414d769e936Smrg[_lt_decl_filter([value], [1], $@)]) 4151d54945dSmrg 4161d54945dSmrg 417d769e936Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418d769e936Smrg# --------------------------------------------------- 419d769e936Smrgm4_define([lt_decl_dquote_varnames], 420d769e936Smrg[_lt_decl_filter([value], [2], $@)]) 4211d54945dSmrg 4221d54945dSmrg 423d769e936Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424d769e936Smrg# --------------------------------------------------- 425d769e936Smrgm4_define([lt_decl_varnames_tagged], 426d769e936Smrg[m4_assert([$# <= 2])dnl 427d769e936Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 428d769e936Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429d769e936Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430d769e936Smrgm4_define([_lt_decl_varnames_tagged], 431d769e936Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4321d54945dSmrg 433ec713c28Smrg 434d769e936Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435d769e936Smrg# ------------------------------------------------ 436d769e936Smrgm4_define([lt_decl_all_varnames], 437d769e936Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438d769e936Smrg m4_if([$2], [], 439d769e936Smrg m4_quote(lt_decl_varnames), 440d769e936Smrg m4_quote(m4_shift($@))))[]dnl 441d769e936Smrg]) 442d769e936Smrgm4_define([_lt_decl_all_varnames], 443d769e936Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 444d769e936Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445d769e936Smrg]) 4461d54945dSmrg 4471d54945dSmrg 448d769e936Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449d769e936Smrg# ------------------------------------ 4507322289dSmrg# Quote a variable value, and forward it to 'config.status' so that its 4517322289dSmrg# declaration there will have the same value as in 'configure'. VARNAME 452d769e936Smrg# must have a single quote delimited value for this to work. 453d769e936Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454d769e936Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4551d54945dSmrg 4561d54945dSmrg 457d769e936Smrg# _LT_CONFIG_STATUS_DECLARATIONS 458d769e936Smrg# ------------------------------ 459d769e936Smrg# We delimit libtool config variables with single quotes, so when 460d769e936Smrg# we write them to config.status, we have to be sure to quote all 461d769e936Smrg# embedded single quotes properly. In configure, this macro expands 462d769e936Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463d769e936Smrg# 464d769e936Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465d769e936Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466d769e936Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467d769e936Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4681d54945dSmrg 469d769e936Smrg 470d769e936Smrg# _LT_LIBTOOL_TAGS 471d769e936Smrg# ---------------- 472d769e936Smrg# Output comment and list of tags supported by the script 473d769e936Smrgm4_defun([_LT_LIBTOOL_TAGS], 474d769e936Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4757322289dSmrgavailable_tags='_LT_TAGS'dnl 476d769e936Smrg]) 477d769e936Smrg 478d769e936Smrg 479d769e936Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480d769e936Smrg# ----------------------------------- 481d769e936Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482d769e936Smrg# expand to a commented shell variable setting: 483d769e936Smrg# 484d769e936Smrg# # Some comment about what VAR is for. 485d769e936Smrg# visible_name=$lt_internal_name 486d769e936Smrgm4_define([_LT_LIBTOOL_DECLARE], 487d769e936Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488d769e936Smrg [description])))[]dnl 489d769e936Smrgm4_pushdef([_libtool_name], 490d769e936Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491d769e936Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492d769e936Smrg [0], [_libtool_name=[$]$1], 493d769e936Smrg [1], [_libtool_name=$lt_[]$1], 494d769e936Smrg [2], [_libtool_name=$lt_[]$1], 495d769e936Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496d769e936Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497d769e936Smrg]) 498d769e936Smrg 499d769e936Smrg 500d769e936Smrg# _LT_LIBTOOL_CONFIG_VARS 501d769e936Smrg# ----------------------- 502d769e936Smrg# Produce commented declarations of non-tagged libtool config variables 5037322289dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504d769e936Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505d769e936Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506d769e936Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507d769e936Smrg[m4_foreach([_lt_var], 508d769e936Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509d769e936Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510d769e936Smrg 511d769e936Smrg 512d769e936Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 513d769e936Smrg# ------------------------- 514d769e936Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 515d769e936Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516d769e936Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517d769e936Smrg 518d769e936Smrg 519d769e936Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520d769e936Smrg# ------------------------------ 521d769e936Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522d769e936Smrg 523d769e936Smrg 524d769e936Smrg# _LT_CONFIG_COMMANDS 525d769e936Smrg# ------------------- 526d769e936Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527d769e936Smrg# variables for single and double quote escaping we saved from calls 528d769e936Smrg# to _LT_DECL, we can put quote escaped variables declarations 5297322289dSmrg# into 'config.status', and then the shell code to quote escape them in 5307322289dSmrg# for loops in 'config.status'. Finally, any additional code accumulated 531d769e936Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532d769e936Smrgm4_defun([_LT_CONFIG_COMMANDS], 533d769e936Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534d769e936Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535d769e936Smrg dnl instead of duplicating it all over again into config.status, 536d769e936Smrg dnl then we will have config.status run $CONFIG_LT later, so it 537d769e936Smrg dnl needs to know what name is stored there: 538d769e936Smrg [AC_CONFIG_COMMANDS([libtool], 539d769e936Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540d769e936Smrg dnl If the libtool generation code is destined for config.status, 541d769e936Smrg dnl expand the accumulated commands and init code now: 542d769e936Smrg [AC_CONFIG_COMMANDS([libtool], 543d769e936Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544d769e936Smrg])#_LT_CONFIG_COMMANDS 545d769e936Smrg 546d769e936Smrg 547d769e936Smrg# Initialize. 548d769e936Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549d769e936Smrg[ 550d769e936Smrg 551d769e936Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552d769e936Smrg# if CDPATH is set. 553d769e936Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554d769e936Smrg 555d769e936Smrgsed_quote_subst='$sed_quote_subst' 556d769e936Smrgdouble_quote_subst='$double_quote_subst' 557d769e936Smrgdelay_variable_subst='$delay_variable_subst' 558d769e936Smrg_LT_CONFIG_STATUS_DECLARATIONS 559d769e936SmrgLTCC='$LTCC' 560d769e936SmrgLTCFLAGS='$LTCFLAGS' 561d769e936Smrgcompiler='$compiler_DEFAULT' 562d769e936Smrg 563d769e936Smrg# A function that is used when there is no print builtin or printf. 564d769e936Smrgfunc_fallback_echo () 565d769e936Smrg{ 566d769e936Smrg eval 'cat <<_LTECHO_EOF 567d769e936Smrg\$[]1 568d769e936Smrg_LTECHO_EOF' 569d769e936Smrg} 570d769e936Smrg 571d769e936Smrg# Quote evaled strings. 572d769e936Smrgfor var in lt_decl_all_varnames([[ \ 573d769e936Smrg]], lt_decl_quote_varnames); do 574d769e936Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575d769e936Smrg *[[\\\\\\\`\\"\\\$]]*) 5767322289dSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577ec713c28Smrg ;; 578d769e936Smrg *) 579d769e936Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580ec713c28Smrg ;; 581ec713c28Smrg esac 582d769e936Smrgdone 5831d54945dSmrg 584d769e936Smrg# Double-quote double-evaled strings. 585d769e936Smrgfor var in lt_decl_all_varnames([[ \ 586d769e936Smrg]], lt_decl_dquote_varnames); do 587d769e936Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588d769e936Smrg *[[\\\\\\\`\\"\\\$]]*) 5897322289dSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590ec713c28Smrg ;; 591d769e936Smrg *) 592d769e936Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593ec713c28Smrg ;; 5941d54945dSmrg esac 595d769e936Smrgdone 5961d54945dSmrg 597d769e936Smrg_LT_OUTPUT_LIBTOOL_INIT 598d769e936Smrg]) 599ec713c28Smrg 600d769e936Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601d769e936Smrg# ------------------------------------ 602d769e936Smrg# Generate a child script FILE with all initialization necessary to 603d769e936Smrg# reuse the environment learned by the parent script, and make the 604d769e936Smrg# file executable. If COMMENT is supplied, it is inserted after the 6057322289dSmrg# '#!' sequence but before initialization text begins. After this 606d769e936Smrg# macro, additional text can be appended to FILE to form the body of 607d769e936Smrg# the child script. The macro ends with non-zero status if the 608d769e936Smrg# file could not be fully written (such as if the disk is full). 609d769e936Smrgm4_ifdef([AS_INIT_GENERATED], 610d769e936Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611d769e936Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 612d769e936Smrg[m4_require([AS_PREPARE])]dnl 613d769e936Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614d769e936Smrg[lt_write_fail=0 615d769e936Smrgcat >$1 <<_ASEOF || lt_write_fail=1 616d769e936Smrg#! $SHELL 617d769e936Smrg# Generated by $as_me. 618d769e936Smrg$2 619d769e936SmrgSHELL=\${CONFIG_SHELL-$SHELL} 620d769e936Smrgexport SHELL 621d769e936Smrg_ASEOF 622d769e936Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623d769e936SmrgAS_SHELL_SANITIZE 624d769e936Smrg_AS_PREPARE 625d769e936Smrgexec AS_MESSAGE_FD>&1 626d769e936Smrg_ASEOF 6277322289dSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628d769e936Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629d769e936Smrg 630d769e936Smrg# LT_OUTPUT 631d769e936Smrg# --------- 632d769e936Smrg# This macro allows early generation of the libtool script (before 633d769e936Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 634d769e936Smrg# tests. 635d769e936SmrgAC_DEFUN([LT_OUTPUT], 636d769e936Smrg[: ${CONFIG_LT=./config.lt} 637d769e936SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638d769e936Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639d769e936Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 640d769e936Smrg 641d769e936Smrgcat >>"$CONFIG_LT" <<\_LTEOF 642d769e936Smrglt_cl_silent=false 643d769e936Smrgexec AS_MESSAGE_LOG_FD>>config.log 644d769e936Smrg{ 645d769e936Smrg echo 646d769e936Smrg AS_BOX([Running $as_me.]) 647d769e936Smrg} >&AS_MESSAGE_LOG_FD 6481d54945dSmrg 649d769e936Smrglt_cl_help="\ 6507322289dSmrg'$as_me' creates a local libtool stub from the current configuration, 651d769e936Smrgfor use in further configure time tests before the real libtool is 652d769e936Smrggenerated. 653786a6f21Smrg 654d769e936SmrgUsage: $[0] [[OPTIONS]] 6551d54945dSmrg 656d769e936Smrg -h, --help print this help, then exit 657d769e936Smrg -V, --version print version number, then exit 658d769e936Smrg -q, --quiet do not print progress messages 659d769e936Smrg -d, --debug don't remove temporary files 6601d54945dSmrg 661d769e936SmrgReport bugs to <bug-libtool@gnu.org>." 6621d54945dSmrg 663d769e936Smrglt_cl_version="\ 664d769e936Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665d769e936Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666d769e936Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6671d54945dSmrg 668d769e936SmrgCopyright (C) 2011 Free Software Foundation, Inc. 669d769e936SmrgThis config.lt script is free software; the Free Software Foundation 670d769e936Smrggives unlimited permision to copy, distribute and modify it." 671786a6f21Smrg 6727322289dSmrgwhile test 0 != $[#] 673d769e936Smrgdo 674d769e936Smrg case $[1] in 675d769e936Smrg --version | --v* | -V ) 676d769e936Smrg echo "$lt_cl_version"; exit 0 ;; 677d769e936Smrg --help | --h* | -h ) 678d769e936Smrg echo "$lt_cl_help"; exit 0 ;; 679d769e936Smrg --debug | --d* | -d ) 680d769e936Smrg debug=: ;; 681d769e936Smrg --quiet | --q* | --silent | --s* | -q ) 682d769e936Smrg lt_cl_silent=: ;; 683d769e936Smrg 684d769e936Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6857322289dSmrgTry '$[0] --help' for more information.]) ;; 686d769e936Smrg 687d769e936Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6887322289dSmrgTry '$[0] --help' for more information.]) ;; 689d769e936Smrg esac 690d769e936Smrg shift 691d769e936Smrgdone 6921d54945dSmrg 693d769e936Smrgif $lt_cl_silent; then 694d769e936Smrg exec AS_MESSAGE_FD>/dev/null 6951d54945dSmrgfi 696d769e936Smrg_LTEOF 697d769e936Smrg 698d769e936Smrgcat >>"$CONFIG_LT" <<_LTEOF 699d769e936Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700d769e936Smrg_LTEOF 701d769e936Smrg 702d769e936Smrgcat >>"$CONFIG_LT" <<\_LTEOF 703d769e936SmrgAC_MSG_NOTICE([creating $ofile]) 704d769e936Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 705d769e936SmrgAS_EXIT(0) 706d769e936Smrg_LTEOF 707d769e936Smrgchmod +x "$CONFIG_LT" 708d769e936Smrg 709d769e936Smrg# configure is writing to config.log, but config.lt does its own redirection, 710d769e936Smrg# appending to config.log, which fails on DOS, as config.log is still kept 711d769e936Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712d769e936Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713d769e936Smrglt_cl_success=: 7147322289dSmrgtest yes = "$silent" && 715d769e936Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 716d769e936Smrgexec AS_MESSAGE_LOG_FD>/dev/null 717d769e936Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718d769e936Smrgexec AS_MESSAGE_LOG_FD>>config.log 719d769e936Smrg$lt_cl_success || AS_EXIT(1) 720d769e936Smrg])# LT_OUTPUT 721d769e936Smrg 722d769e936Smrg 723d769e936Smrg# _LT_CONFIG(TAG) 724d769e936Smrg# --------------- 725d769e936Smrg# If TAG is the built-in tag, create an initial libtool script with a 726d769e936Smrg# default configuration from the untagged config vars. Otherwise add code 727d769e936Smrg# to config.status for appending the configuration named by TAG from the 728d769e936Smrg# matching tagged config vars. 729d769e936Smrgm4_defun([_LT_CONFIG], 730d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731d769e936Smrg_LT_CONFIG_SAVE_COMMANDS([ 732d769e936Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733d769e936Smrg m4_if(_LT_TAG, [C], [ 7347322289dSmrg # See if we are running on zsh, and set the options that allow our 735d769e936Smrg # commands through without removal of \ escapes. 7367322289dSmrg if test -n "${ZSH_VERSION+set}"; then 737d769e936Smrg setopt NO_GLOB_SUBST 738d769e936Smrg fi 7391d54945dSmrg 7407322289dSmrg cfgfile=${ofile}T 741d769e936Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742d769e936Smrg $RM "$cfgfile" 7431d54945dSmrg 744d769e936Smrg cat <<_LT_EOF >> "$cfgfile" 745d769e936Smrg#! $SHELL 7467322289dSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747d769e936Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748d769e936Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7497322289dSmrg 7507322289dSmrg# Provide generalized library-building support services. 7517322289dSmrg# Written by Gordon Matzigkeit, 1996 7527322289dSmrg 753d769e936Smrg_LT_COPYING 754d769e936Smrg_LT_LIBTOOL_TAGS 7551d54945dSmrg 7567322289dSmrg# Configured defaults for sys_lib_dlsearch_path munging. 7577322289dSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7587322289dSmrg 759d769e936Smrg# ### BEGIN LIBTOOL CONFIG 760d769e936Smrg_LT_LIBTOOL_CONFIG_VARS 761d769e936Smrg_LT_LIBTOOL_TAG_VARS 762d769e936Smrg# ### END LIBTOOL CONFIG 7631d54945dSmrg 7647322289dSmrg_LT_EOF 7657322289dSmrg 7667322289dSmrg cat <<'_LT_EOF' >> "$cfgfile" 7677322289dSmrg 7687322289dSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7697322289dSmrg 7707322289dSmrg_LT_PREPARE_MUNGE_PATH_LIST 7717322289dSmrg_LT_PREPARE_CC_BASENAME 7727322289dSmrg 7737322289dSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7747322289dSmrg 775d769e936Smrg_LT_EOF 7761d54945dSmrg 777d769e936Smrg case $host_os in 778d769e936Smrg aix3*) 779d769e936Smrg cat <<\_LT_EOF >> "$cfgfile" 780d769e936Smrg# AIX sometimes has problems with the GCC collect2 program. For some 781d769e936Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782d769e936Smrg# vanish in a puff of smoke. 7837322289dSmrgif test set != "${COLLECT_NAMES+set}"; then 784d769e936Smrg COLLECT_NAMES= 785d769e936Smrg export COLLECT_NAMES 786d769e936Smrgfi 787d769e936Smrg_LT_EOF 7881d54945dSmrg ;; 789d769e936Smrg esac 7901d54945dSmrg 791d769e936Smrg _LT_PROG_LTMAIN 7921d54945dSmrg 793d769e936Smrg # We use sed instead of cat because bash on DJGPP gets confused if 794d769e936Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795d769e936Smrg # text mode, it properly converts lines to CR/LF. This bash problem 796d769e936Smrg # is reportedly fixed, but why not run on old versions too? 797d769e936Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 798d769e936Smrg || (rm -f "$cfgfile"; exit 1) 799d769e936Smrg 800d769e936Smrg mv -f "$cfgfile" "$ofile" || 801d769e936Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802d769e936Smrg chmod +x "$ofile" 803d769e936Smrg], 804d769e936Smrg[cat <<_LT_EOF >> "$ofile" 805d769e936Smrg 806d769e936Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807d769e936Smrgdnl in a comment (ie after a #). 808d769e936Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809d769e936Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810d769e936Smrg# ### END LIBTOOL TAG CONFIG: $1 811d769e936Smrg_LT_EOF 812d769e936Smrg])dnl /m4_if 813d769e936Smrg], 814d769e936Smrg[m4_if([$1], [], [ 815d769e936Smrg PACKAGE='$PACKAGE' 816d769e936Smrg VERSION='$VERSION' 817d769e936Smrg RM='$RM' 818d769e936Smrg ofile='$ofile'], []) 819d769e936Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820d769e936Smrg])# _LT_CONFIG 8211d54945dSmrg 822d769e936Smrg 823d769e936Smrg# LT_SUPPORTED_TAG(TAG) 824d769e936Smrg# --------------------- 825d769e936Smrg# Trace this macro to discover what tags are supported by the libtool 826d769e936Smrg# --tag option, using: 827d769e936Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828d769e936SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829d769e936Smrg 830d769e936Smrg 831d769e936Smrg# C support is built-in for now 832d769e936Smrgm4_define([_LT_LANG_C_enabled], []) 833d769e936Smrgm4_define([_LT_TAGS], []) 8341d54945dSmrg 8351d54945dSmrg 836d769e936Smrg# LT_LANG(LANG) 837d769e936Smrg# ------------- 838d769e936Smrg# Enable libtool support for the given language if not already enabled. 839d769e936SmrgAC_DEFUN([LT_LANG], 840d769e936Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841d769e936Smrgm4_case([$1], 842d769e936Smrg [C], [_LT_LANG(C)], 843d769e936Smrg [C++], [_LT_LANG(CXX)], 844d769e936Smrg [Go], [_LT_LANG(GO)], 845d769e936Smrg [Java], [_LT_LANG(GCJ)], 846d769e936Smrg [Fortran 77], [_LT_LANG(F77)], 847d769e936Smrg [Fortran], [_LT_LANG(FC)], 848d769e936Smrg [Windows Resource], [_LT_LANG(RC)], 849d769e936Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850d769e936Smrg [_LT_LANG($1)], 851d769e936Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852d769e936Smrg])# LT_LANG 853d769e936Smrg 854d769e936Smrg 855d769e936Smrg# _LT_LANG(LANGNAME) 856ec713c28Smrg# ------------------ 857d769e936Smrgm4_defun([_LT_LANG], 858d769e936Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859d769e936Smrg [LT_SUPPORTED_TAG([$1])dnl 860d769e936Smrg m4_append([_LT_TAGS], [$1 ])dnl 861d769e936Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862d769e936Smrg _LT_LANG_$1_CONFIG($1)])dnl 863d769e936Smrg])# _LT_LANG 8641d54945dSmrg 8651d54945dSmrg 866d769e936Smrgm4_ifndef([AC_PROG_GO], [ 867d769e936Smrg# NOTE: This macro has been submitted for inclusion into # 868d769e936Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869d769e936Smrg# a released version of Autoconf we should remove this # 870d769e936Smrg# macro and use it instead. # 871d769e936Smrgm4_defun([AC_PROG_GO], 872d769e936Smrg[AC_LANG_PUSH(Go)dnl 873d769e936SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874d769e936SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875d769e936Smrg_AC_ARG_VAR_LDFLAGS()dnl 876d769e936SmrgAC_CHECK_TOOL(GOC, gccgo) 877d769e936Smrgif test -z "$GOC"; then 878d769e936Smrg if test -n "$ac_tool_prefix"; then 879d769e936Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880d769e936Smrg fi 881d769e936Smrgfi 882d769e936Smrgif test -z "$GOC"; then 883d769e936Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884d769e936Smrgfi 885d769e936Smrg])#m4_defun 886d769e936Smrg])#m4_ifndef 8871d54945dSmrg 8881d54945dSmrg 889d769e936Smrg# _LT_LANG_DEFAULT_CONFIG 890d769e936Smrg# ----------------------- 891d769e936Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892d769e936Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893d769e936Smrg [LT_LANG(CXX)], 894d769e936Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895d769e936Smrg 896d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897d769e936Smrg [LT_LANG(F77)], 898d769e936Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899d769e936Smrg 900d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901d769e936Smrg [LT_LANG(FC)], 902d769e936Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903d769e936Smrg 904d769e936Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905d769e936Smrgdnl pulling things in needlessly. 906d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907d769e936Smrg [LT_LANG(GCJ)], 908d769e936Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909d769e936Smrg [LT_LANG(GCJ)], 910d769e936Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911d769e936Smrg [LT_LANG(GCJ)], 912d769e936Smrg [m4_ifdef([AC_PROG_GCJ], 913d769e936Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914d769e936Smrg m4_ifdef([A][M_PROG_GCJ], 915d769e936Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916d769e936Smrg m4_ifdef([LT_PROG_GCJ], 917d769e936Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918d769e936Smrg 919d769e936SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920d769e936Smrg [LT_LANG(GO)], 921d769e936Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922d769e936Smrg 923d769e936SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924d769e936Smrg [LT_LANG(RC)], 925d769e936Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926d769e936Smrg])# _LT_LANG_DEFAULT_CONFIG 927d769e936Smrg 928d769e936Smrg# Obsolete macros: 929d769e936SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930d769e936SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931d769e936SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932d769e936SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933d769e936SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934d769e936Smrgdnl aclocal-1.4 backwards compatibility: 935d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940d769e936Smrg 941d769e936Smrg 942d769e936Smrg# _LT_TAG_COMPILER 943d769e936Smrg# ---------------- 944d769e936Smrgm4_defun([_LT_TAG_COMPILER], 945d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9461d54945dSmrg 947d769e936Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948d769e936Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949d769e936Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950d769e936Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9511d54945dSmrg 952d769e936Smrg# If no C compiler was specified, use CC. 953d769e936SmrgLTCC=${LTCC-"$CC"} 9541d54945dSmrg 955d769e936Smrg# If no C compiler flags were specified, use CFLAGS. 956d769e936SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957ec713c28Smrg 958d769e936Smrg# Allow CC to be a program name with arguments. 959d769e936Smrgcompiler=$CC 960d769e936Smrg])# _LT_TAG_COMPILER 9611d54945dSmrg 9621d54945dSmrg 963d769e936Smrg# _LT_COMPILER_BOILERPLATE 964d769e936Smrg# ------------------------ 965d769e936Smrg# Check for compiler boilerplate output or warnings with 966d769e936Smrg# the simple compiler test code. 967d769e936Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 968d769e936Smrg[m4_require([_LT_DECL_SED])dnl 969d769e936Smrgac_outfile=conftest.$ac_objext 970d769e936Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971d769e936Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972d769e936Smrg_lt_compiler_boilerplate=`cat conftest.err` 973d769e936Smrg$RM conftest* 974d769e936Smrg])# _LT_COMPILER_BOILERPLATE 9751d54945dSmrg 9761d54945dSmrg 977d769e936Smrg# _LT_LINKER_BOILERPLATE 978ec713c28Smrg# ---------------------- 979d769e936Smrg# Check for linker boilerplate output or warnings with 980d769e936Smrg# the simple link test code. 981d769e936Smrgm4_defun([_LT_LINKER_BOILERPLATE], 982d769e936Smrg[m4_require([_LT_DECL_SED])dnl 983d769e936Smrgac_outfile=conftest.$ac_objext 984d769e936Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985d769e936Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986d769e936Smrg_lt_linker_boilerplate=`cat conftest.err` 987d769e936Smrg$RM -r conftest* 988d769e936Smrg])# _LT_LINKER_BOILERPLATE 9891d54945dSmrg 990d769e936Smrg# _LT_REQUIRED_DARWIN_CHECKS 991d769e936Smrg# ------------------------- 992d769e936Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9931d54945dSmrg case $host_os in 994d769e936Smrg rhapsody* | darwin*) 995d769e936Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996d769e936Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997d769e936Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998d769e936Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999d769e936Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000d769e936Smrg _LT_DECL([], [DSYMUTIL], [1], 1001d769e936Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002d769e936Smrg _LT_DECL([], [NMEDIT], [1], 1003d769e936Smrg [Tool to change global to local symbols on Mac OS X]) 1004d769e936Smrg _LT_DECL([], [LIPO], [1], 1005d769e936Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006d769e936Smrg _LT_DECL([], [OTOOL], [1], 1007d769e936Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008d769e936Smrg _LT_DECL([], [OTOOL64], [1], 1009d769e936Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 10101d54945dSmrg 1011d769e936Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012d769e936Smrg [lt_cv_apple_cc_single_mod=no 10137322289dSmrg if test -z "$LT_MULTI_MODULE"; then 1014d769e936Smrg # By default we will add the -single_module flag. You can override 1015d769e936Smrg # by either setting the environment variable LT_MULTI_MODULE 1016d769e936Smrg # non-empty at configure time, or by adding -multi_module to the 1017d769e936Smrg # link flags. 1018d769e936Smrg rm -rf libconftest.dylib* 1019d769e936Smrg echo "int foo(void){return 1;}" > conftest.c 1020d769e936Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021d769e936Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022d769e936Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023d769e936Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024d769e936Smrg _lt_result=$? 1025d769e936Smrg # If there is a non-empty error log, and "single_module" 1026d769e936Smrg # appears in it, assume the flag caused a linker warning 1027d769e936Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1028d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029d769e936Smrg # Otherwise, if the output was created with a 0 exit code from 1030d769e936Smrg # the compiler, it worked. 10317322289dSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032d769e936Smrg lt_cv_apple_cc_single_mod=yes 1033d769e936Smrg else 1034d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035d769e936Smrg fi 1036d769e936Smrg rm -rf libconftest.dylib* 1037d769e936Smrg rm -f conftest.* 1038d769e936Smrg fi]) 10391d54945dSmrg 1040d769e936Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041d769e936Smrg [lt_cv_ld_exported_symbols_list], 1042d769e936Smrg [lt_cv_ld_exported_symbols_list=no 1043d769e936Smrg save_LDFLAGS=$LDFLAGS 1044d769e936Smrg echo "_main" > conftest.sym 1045d769e936Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047d769e936Smrg [lt_cv_ld_exported_symbols_list=yes], 1048d769e936Smrg [lt_cv_ld_exported_symbols_list=no]) 10497322289dSmrg LDFLAGS=$save_LDFLAGS 10501d54945dSmrg ]) 10511d54945dSmrg 1052d769e936Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053d769e936Smrg [lt_cv_ld_force_load=no 1054d769e936Smrg cat > conftest.c << _LT_EOF 1055d769e936Smrgint forced_loaded() { return 2;} 1056d769e936Smrg_LT_EOF 1057d769e936Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058d769e936Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059d769e936Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060d769e936Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061d769e936Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062d769e936Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063d769e936Smrg cat > conftest.c << _LT_EOF 1064d769e936Smrgint main() { return 0;} 1065d769e936Smrg_LT_EOF 1066d769e936Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067d769e936Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068d769e936Smrg _lt_result=$? 1069d769e936Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1070d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10717322289dSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072d769e936Smrg lt_cv_ld_force_load=yes 1073d769e936Smrg else 1074d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075d769e936Smrg fi 1076d769e936Smrg rm -f conftest.err libconftest.a conftest conftest.c 1077d769e936Smrg rm -rf conftest.dSYM 1078d769e936Smrg ]) 1079d769e936Smrg case $host_os in 1080d769e936Smrg rhapsody* | darwin1.[[012]]) 10817322289dSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082d769e936Smrg darwin1.*) 10837322289dSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084d769e936Smrg darwin*) # darwin 5.x on 1085d769e936Smrg # if running on 10.5 or later, the deployment target defaults 1086d769e936Smrg # to the OS version, if on x86, and 10.4, the deployment 1087d769e936Smrg # target defaults to 10.4. Don't you love it? 1088d769e936Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089d769e936Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10907322289dSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10917322289dSmrg 10.[[012]][[,.]]*) 10927322289dSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093d769e936Smrg 10.*) 10947322289dSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095d769e936Smrg esac 1096d769e936Smrg ;; 1097d769e936Smrg esac 10987322289dSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099d769e936Smrg _lt_dar_single_mod='$single_module' 1100d769e936Smrg fi 11017322289dSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 11027322289dSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103d769e936Smrg else 11047322289dSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105d769e936Smrg fi 11067322289dSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107d769e936Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108d769e936Smrg else 1109d769e936Smrg _lt_dsymutil= 1110d769e936Smrg fi 11111d54945dSmrg ;; 11121d54945dSmrg esac 1113d769e936Smrg]) 11141d54945dSmrg 1115d769e936Smrg 1116d769e936Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117d769e936Smrg# --------------------------------- 1118d769e936Smrg# Checks for linker and compiler features on darwin 1119d769e936Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120d769e936Smrg[ 1121d769e936Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1124d769e936Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11267322289dSmrg if test yes = "$lt_cv_ld_force_load"; then 11277322289dSmrg _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\"`' 1128d769e936Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129d769e936Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11301d54945dSmrg else 1131d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11321d54945dSmrg fi 1133d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11347322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135d769e936Smrg case $cc_basename in 11367322289dSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137d769e936Smrg *) _lt_dar_can_shared=$GCC ;; 1138d769e936Smrg esac 11397322289dSmrg if test yes = "$_lt_dar_can_shared"; then 1140d769e936Smrg output_verbose_link_cmd=func_echo_all 11417322289dSmrg _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" 11427322289dSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11437322289dSmrg _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" 11447322289dSmrg _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" 1145d769e936Smrg m4_if([$1], [CXX], 11467322289dSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11477322289dSmrg _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" 11487322289dSmrg _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" 1149d769e936Smrg fi 1150d769e936Smrg],[]) 1151d769e936Smrg else 1152d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1153d769e936Smrg fi 1154d769e936Smrg]) 11551d54945dSmrg 1156d769e936Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157d769e936Smrg# ---------------------------------- 1158d769e936Smrg# Links a minimal program and checks the executable 1159d769e936Smrg# for the system default hardcoded library path. In most cases, 1160d769e936Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161d769e936Smrg# the location of the communication and MPI libs are included too. 1162d769e936Smrg# If we don't find anything, use the default library path according 1163d769e936Smrg# to the aix ld manual. 1164d769e936Smrg# Store the results from the different compilers for each TAGNAME. 1165d769e936Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166d769e936Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167d769e936Smrg[m4_require([_LT_DECL_SED])dnl 11687322289dSmrgif test set = "${lt_cv_aix_libpath+set}"; then 1169d769e936Smrg aix_libpath=$lt_cv_aix_libpath 1170d769e936Smrgelse 1171d769e936Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172d769e936Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173d769e936Smrg lt_aix_libpath_sed='[ 1174d769e936Smrg /Import File Strings/,/^$/ { 1175d769e936Smrg /^0/ { 1176d769e936Smrg s/^0 *\([^ ]*\) *$/\1/ 1177d769e936Smrg p 1178d769e936Smrg } 1179d769e936Smrg }]' 1180d769e936Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181d769e936Smrg # Check for a 64-bit object if we didn't find anything. 1182d769e936Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183d769e936Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184d769e936Smrg fi],[]) 1185d769e936Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11867322289dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187d769e936Smrg fi 1188d769e936Smrg ]) 1189d769e936Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190d769e936Smrgfi 1191d769e936Smrg])# _LT_SYS_MODULE_PATH_AIX 11921d54945dSmrg 11931d54945dSmrg 1194d769e936Smrg# _LT_SHELL_INIT(ARG) 1195d769e936Smrg# ------------------- 1196d769e936Smrgm4_define([_LT_SHELL_INIT], 1197d769e936Smrg[m4_divert_text([M4SH-INIT], [$1 1198d769e936Smrg])])# _LT_SHELL_INIT 11991d54945dSmrg 1200d769e936Smrg 1201d769e936Smrg 1202d769e936Smrg# _LT_PROG_ECHO_BACKSLASH 1203d769e936Smrg# ----------------------- 1204d769e936Smrg# Find how we can fake an echo command that does not interpret backslash. 1205d769e936Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 12067322289dSmrg# of the generated configure script that will find a shell with a builtin 12077322289dSmrg# printf (that we can use as an echo command). 1208d769e936Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209d769e936Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210d769e936SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211d769e936SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212d769e936Smrg 1213d769e936SmrgAC_MSG_CHECKING([how to print strings]) 1214d769e936Smrg# Test print first, because it will be a builtin if present. 1215d769e936Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216d769e936Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217d769e936Smrg ECHO='print -r --' 1218d769e936Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219d769e936Smrg ECHO='printf %s\n' 1220d769e936Smrgelse 1221d769e936Smrg # Use this function as a fallback that always works. 1222d769e936Smrg func_fallback_echo () 1223d769e936Smrg { 1224d769e936Smrg eval 'cat <<_LTECHO_EOF 1225d769e936Smrg$[]1 1226d769e936Smrg_LTECHO_EOF' 1227d769e936Smrg } 1228d769e936Smrg ECHO='func_fallback_echo' 1229d769e936Smrgfi 1230d769e936Smrg 1231d769e936Smrg# func_echo_all arg... 1232d769e936Smrg# Invoke $ECHO with all args, space-separated. 1233d769e936Smrgfunc_echo_all () 1234d769e936Smrg{ 12357322289dSmrg $ECHO "$*" 1236d769e936Smrg} 1237d769e936Smrg 12387322289dSmrgcase $ECHO in 1239d769e936Smrg printf*) AC_MSG_RESULT([printf]) ;; 1240d769e936Smrg print*) AC_MSG_RESULT([print -r]) ;; 1241d769e936Smrg *) AC_MSG_RESULT([cat]) ;; 1242d769e936Smrgesac 1243d769e936Smrg 1244d769e936Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245d769e936Smrg[_AS_DETECT_SUGGESTED([ 1246d769e936Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247d769e936Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248d769e936Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249d769e936Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250d769e936Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1251d769e936Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252d769e936Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253d769e936Smrg 1254d769e936Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255d769e936Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256d769e936Smrg])# _LT_PROG_ECHO_BACKSLASH 1257d769e936Smrg 1258d769e936Smrg 1259d769e936Smrg# _LT_WITH_SYSROOT 1260d769e936Smrg# ---------------- 1261d769e936SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262d769e936Smrg[AC_MSG_CHECKING([for sysroot]) 1263d769e936SmrgAC_ARG_WITH([sysroot], 12647322289dSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12657322289dSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 12667322289dSmrg if not specified).])], 1267d769e936Smrg[], [with_sysroot=no]) 1268d769e936Smrg 1269d769e936Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270d769e936Smrgdnl in case the user passed a directory name. 1271d769e936Smrglt_sysroot= 12727322289dSmrgcase $with_sysroot in #( 1273d769e936Smrg yes) 12747322289dSmrg if test yes = "$GCC"; then 1275d769e936Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276d769e936Smrg fi 1277d769e936Smrg ;; #( 1278d769e936Smrg /*) 1279d769e936Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280d769e936Smrg ;; #( 1281d769e936Smrg no|'') 1282d769e936Smrg ;; #( 1283d769e936Smrg *) 12847322289dSmrg AC_MSG_RESULT([$with_sysroot]) 1285d769e936Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286d769e936Smrg ;; 1287d769e936Smrgesac 1288d769e936Smrg 1289d769e936Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290d769e936Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12917322289dSmrg[dependent libraries, and where our libraries should be installed.])]) 1292d769e936Smrg 1293d769e936Smrg# _LT_ENABLE_LOCK 1294d769e936Smrg# --------------- 1295d769e936Smrgm4_defun([_LT_ENABLE_LOCK], 1296d769e936Smrg[AC_ARG_ENABLE([libtool-lock], 1297d769e936Smrg [AS_HELP_STRING([--disable-libtool-lock], 1298d769e936Smrg [avoid locking (might break parallel builds)])]) 12997322289dSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300d769e936Smrg 1301d769e936Smrg# Some flags need to be propagated to the compiler or linker for good 1302d769e936Smrg# libtool support. 1303d769e936Smrgcase $host in 1304d769e936Smrgia64-*-hpux*) 13057322289dSmrg # Find out what ABI is being produced by ac_compile, and set mode 13067322289dSmrg # options accordingly. 1307d769e936Smrg echo 'int i;' > conftest.$ac_ext 1308d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1309d769e936Smrg case `/usr/bin/file conftest.$ac_objext` in 1310d769e936Smrg *ELF-32*) 13117322289dSmrg HPUX_IA64_MODE=32 1312d769e936Smrg ;; 1313d769e936Smrg *ELF-64*) 13147322289dSmrg HPUX_IA64_MODE=64 1315d769e936Smrg ;; 1316d769e936Smrg esac 1317d769e936Smrg fi 1318d769e936Smrg rm -rf conftest* 1319d769e936Smrg ;; 1320d769e936Smrg*-*-irix6*) 13217322289dSmrg # Find out what ABI is being produced by ac_compile, and set linker 13227322289dSmrg # options accordingly. 1323d769e936Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324d769e936Smrg if AC_TRY_EVAL(ac_compile); then 13257322289dSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326d769e936Smrg case `/usr/bin/file conftest.$ac_objext` in 1327d769e936Smrg *32-bit*) 1328d769e936Smrg LD="${LD-ld} -melf32bsmip" 1329d769e936Smrg ;; 1330d769e936Smrg *N32*) 1331d769e936Smrg LD="${LD-ld} -melf32bmipn32" 1332d769e936Smrg ;; 1333d769e936Smrg *64-bit*) 1334d769e936Smrg LD="${LD-ld} -melf64bmip" 1335d769e936Smrg ;; 1336d769e936Smrg esac 1337d769e936Smrg else 1338d769e936Smrg case `/usr/bin/file conftest.$ac_objext` in 1339d769e936Smrg *32-bit*) 1340d769e936Smrg LD="${LD-ld} -32" 1341d769e936Smrg ;; 1342d769e936Smrg *N32*) 1343d769e936Smrg LD="${LD-ld} -n32" 1344d769e936Smrg ;; 1345d769e936Smrg *64-bit*) 1346d769e936Smrg LD="${LD-ld} -64" 1347d769e936Smrg ;; 1348d769e936Smrg esac 13491d54945dSmrg fi 1350d769e936Smrg fi 1351d769e936Smrg rm -rf conftest* 1352d769e936Smrg ;; 13531d54945dSmrg 13547322289dSmrgmips64*-*linux*) 13557322289dSmrg # Find out what ABI is being produced by ac_compile, and set linker 13567322289dSmrg # options accordingly. 13577322289dSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13587322289dSmrg if AC_TRY_EVAL(ac_compile); then 13597322289dSmrg emul=elf 13607322289dSmrg case `/usr/bin/file conftest.$ac_objext` in 13617322289dSmrg *32-bit*) 13627322289dSmrg emul="${emul}32" 13637322289dSmrg ;; 13647322289dSmrg *64-bit*) 13657322289dSmrg emul="${emul}64" 13667322289dSmrg ;; 13677322289dSmrg esac 13687322289dSmrg case `/usr/bin/file conftest.$ac_objext` in 13697322289dSmrg *MSB*) 13707322289dSmrg emul="${emul}btsmip" 13717322289dSmrg ;; 13727322289dSmrg *LSB*) 13737322289dSmrg emul="${emul}ltsmip" 13747322289dSmrg ;; 13757322289dSmrg esac 13767322289dSmrg case `/usr/bin/file conftest.$ac_objext` in 13777322289dSmrg *N32*) 13787322289dSmrg emul="${emul}n32" 13797322289dSmrg ;; 13807322289dSmrg esac 13817322289dSmrg LD="${LD-ld} -m $emul" 13827322289dSmrg fi 13837322289dSmrg rm -rf conftest* 13847322289dSmrg ;; 13857322289dSmrg 13867322289dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387d769e936Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13887322289dSmrg # Find out what ABI is being produced by ac_compile, and set linker 13897322289dSmrg # options accordingly. Note that the listed cases only cover the 13907322289dSmrg # situations where additional linker options are needed (such as when 13917322289dSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13927322289dSmrg # vice versa); the common cases where no linker options are needed do 13937322289dSmrg # not appear in the list. 1394d769e936Smrg echo 'int i;' > conftest.$ac_ext 1395d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1396d769e936Smrg case `/usr/bin/file conftest.o` in 1397d769e936Smrg *32-bit*) 1398d769e936Smrg case $host in 1399d769e936Smrg x86_64-*kfreebsd*-gnu) 1400d769e936Smrg LD="${LD-ld} -m elf_i386_fbsd" 1401d769e936Smrg ;; 1402d769e936Smrg x86_64-*linux*) 14037322289dSmrg case `/usr/bin/file conftest.o` in 14047322289dSmrg *x86-64*) 14057322289dSmrg LD="${LD-ld} -m elf32_x86_64" 14067322289dSmrg ;; 14077322289dSmrg *) 14087322289dSmrg LD="${LD-ld} -m elf_i386" 14097322289dSmrg ;; 14107322289dSmrg esac 14117322289dSmrg ;; 14127322289dSmrg powerpc64le-*linux*) 14137322289dSmrg LD="${LD-ld} -m elf32lppclinux" 1414d769e936Smrg ;; 14157322289dSmrg powerpc64-*linux*) 1416d769e936Smrg LD="${LD-ld} -m elf32ppclinux" 1417d769e936Smrg ;; 1418d769e936Smrg s390x-*linux*) 1419d769e936Smrg LD="${LD-ld} -m elf_s390" 1420d769e936Smrg ;; 1421d769e936Smrg sparc64-*linux*) 1422d769e936Smrg LD="${LD-ld} -m elf32_sparc" 1423d769e936Smrg ;; 1424d769e936Smrg esac 1425d769e936Smrg ;; 1426d769e936Smrg *64-bit*) 1427d769e936Smrg case $host in 1428d769e936Smrg x86_64-*kfreebsd*-gnu) 1429d769e936Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430d769e936Smrg ;; 1431d769e936Smrg x86_64-*linux*) 1432d769e936Smrg LD="${LD-ld} -m elf_x86_64" 1433d769e936Smrg ;; 14347322289dSmrg powerpcle-*linux*) 14357322289dSmrg LD="${LD-ld} -m elf64lppc" 14367322289dSmrg ;; 14377322289dSmrg powerpc-*linux*) 1438d769e936Smrg LD="${LD-ld} -m elf64ppc" 1439d769e936Smrg ;; 1440d769e936Smrg s390*-*linux*|s390*-*tpf*) 1441d769e936Smrg LD="${LD-ld} -m elf64_s390" 1442d769e936Smrg ;; 1443d769e936Smrg sparc*-*linux*) 1444d769e936Smrg LD="${LD-ld} -m elf64_sparc" 1445d769e936Smrg ;; 1446d769e936Smrg esac 1447d769e936Smrg ;; 1448d769e936Smrg esac 1449d769e936Smrg fi 1450d769e936Smrg rm -rf conftest* 1451d769e936Smrg ;; 14521d54945dSmrg 1453d769e936Smrg*-*-sco3.2v5*) 1454d769e936Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14557322289dSmrg SAVE_CFLAGS=$CFLAGS 1456d769e936Smrg CFLAGS="$CFLAGS -belf" 1457d769e936Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458d769e936Smrg [AC_LANG_PUSH(C) 1459d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460d769e936Smrg AC_LANG_POP]) 14617322289dSmrg if test yes != "$lt_cv_cc_needs_belf"; then 1462d769e936Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14637322289dSmrg CFLAGS=$SAVE_CFLAGS 1464d769e936Smrg fi 1465d769e936Smrg ;; 1466d769e936Smrg*-*solaris*) 14677322289dSmrg # Find out what ABI is being produced by ac_compile, and set linker 14687322289dSmrg # options accordingly. 1469d769e936Smrg echo 'int i;' > conftest.$ac_ext 1470d769e936Smrg if AC_TRY_EVAL(ac_compile); then 1471d769e936Smrg case `/usr/bin/file conftest.o` in 1472d769e936Smrg *64-bit*) 1473d769e936Smrg case $lt_cv_prog_gnu_ld in 1474d769e936Smrg yes*) 1475d769e936Smrg case $host in 14767322289dSmrg i?86-*-solaris*|x86_64-*-solaris*) 1477d769e936Smrg LD="${LD-ld} -m elf_x86_64" 1478d769e936Smrg ;; 1479d769e936Smrg sparc*-*-solaris*) 1480d769e936Smrg LD="${LD-ld} -m elf64_sparc" 1481d769e936Smrg ;; 1482d769e936Smrg esac 1483d769e936Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484d769e936Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14857322289dSmrg LD=${LD-ld}_sol2 1486d769e936Smrg fi 1487d769e936Smrg ;; 1488d769e936Smrg *) 1489d769e936Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490d769e936Smrg LD="${LD-ld} -64" 1491d769e936Smrg fi 1492d769e936Smrg ;; 1493d769e936Smrg esac 1494d769e936Smrg ;; 1495d769e936Smrg esac 1496d769e936Smrg fi 1497d769e936Smrg rm -rf conftest* 1498d769e936Smrg ;; 1499d769e936Smrgesac 15001d54945dSmrg 15017322289dSmrgneed_locks=$enable_libtool_lock 1502d769e936Smrg])# _LT_ENABLE_LOCK 1503d769e936Smrg 1504d769e936Smrg 1505d769e936Smrg# _LT_PROG_AR 1506d769e936Smrg# ----------- 1507d769e936Smrgm4_defun([_LT_PROG_AR], 1508d769e936Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1509d769e936Smrg: ${AR=ar} 1510d769e936Smrg: ${AR_FLAGS=cru} 1511d769e936Smrg_LT_DECL([], [AR], [1], [The archiver]) 1512d769e936Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513d769e936Smrg 1514d769e936SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515d769e936Smrg [lt_cv_ar_at_file=no 1516d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517d769e936Smrg [echo conftest.$ac_objext > conftest.lst 1518d769e936Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519d769e936Smrg AC_TRY_EVAL([lt_ar_try]) 15207322289dSmrg if test 0 -eq "$ac_status"; then 1521d769e936Smrg # Ensure the archiver fails upon bogus file names. 1522d769e936Smrg rm -f conftest.$ac_objext libconftest.a 1523d769e936Smrg AC_TRY_EVAL([lt_ar_try]) 15247322289dSmrg if test 0 -ne "$ac_status"; then 1525d769e936Smrg lt_cv_ar_at_file=@ 1526d769e936Smrg fi 1527d769e936Smrg fi 1528d769e936Smrg rm -f conftest.* libconftest.a 1529d769e936Smrg ]) 1530d769e936Smrg ]) 1531d769e936Smrg 15327322289dSmrgif test no = "$lt_cv_ar_at_file"; then 1533d769e936Smrg archiver_list_spec= 1534d769e936Smrgelse 1535d769e936Smrg archiver_list_spec=$lt_cv_ar_at_file 1536d769e936Smrgfi 1537d769e936Smrg_LT_DECL([], [archiver_list_spec], [1], 1538d769e936Smrg [How to feed a file listing to the archiver]) 1539d769e936Smrg])# _LT_PROG_AR 1540d769e936Smrg 1541d769e936Smrg 1542d769e936Smrg# _LT_CMD_OLD_ARCHIVE 1543d769e936Smrg# ------------------- 1544d769e936Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545d769e936Smrg[_LT_PROG_AR 1546d769e936Smrg 1547d769e936SmrgAC_CHECK_TOOL(STRIP, strip, :) 1548d769e936Smrgtest -z "$STRIP" && STRIP=: 1549d769e936Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550d769e936Smrg 1551d769e936SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552d769e936Smrgtest -z "$RANLIB" && RANLIB=: 1553d769e936Smrg_LT_DECL([], [RANLIB], [1], 1554d769e936Smrg [Commands used to install an old-style archive]) 1555d769e936Smrg 1556d769e936Smrg# Determine commands to create old-style static archives. 1557d769e936Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558d769e936Smrgold_postinstall_cmds='chmod 644 $oldlib' 1559d769e936Smrgold_postuninstall_cmds= 1560d769e936Smrg 1561d769e936Smrgif test -n "$RANLIB"; then 1562d769e936Smrg case $host_os in 15637322289dSmrg bitrig* | openbsd*) 1564d769e936Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565d769e936Smrg ;; 1566d769e936Smrg *) 1567d769e936Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568d769e936Smrg ;; 15691d54945dSmrg esac 1570d769e936Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15711d54945dSmrgfi 1572d769e936Smrg 1573d769e936Smrgcase $host_os in 1574d769e936Smrg darwin*) 1575d769e936Smrg lock_old_archive_extraction=yes ;; 1576d769e936Smrg *) 1577d769e936Smrg lock_old_archive_extraction=no ;; 1578d769e936Smrgesac 1579d769e936Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580d769e936Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581d769e936Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582d769e936Smrg [Commands used to build an old-style archive]) 1583d769e936Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584d769e936Smrg [Whether to use a lock for old archive extraction]) 1585d769e936Smrg])# _LT_CMD_OLD_ARCHIVE 15861d54945dSmrg 1587786a6f21Smrg 1588d769e936Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589d769e936Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590d769e936Smrg# ---------------------------------------------------------------- 1591d769e936Smrg# Check whether the given compiler option works 1592d769e936SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1593d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594d769e936Smrgm4_require([_LT_DECL_SED])dnl 1595d769e936SmrgAC_CACHE_CHECK([$1], [$2], 1596d769e936Smrg [$2=no 1597d769e936Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598ba85709eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15997322289dSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16001d54945dSmrg # Insert the option either (1) after the last *FLAGS variable, or 16011d54945dSmrg # (2) before a word containing "conftest.", or (3) at the end. 16021d54945dSmrg # Note that $ac_compile itself does not contain backslashes and begins 16031d54945dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1604d769e936Smrg # The option is referenced via a variable to avoid confusing sed. 16051d54945dSmrg lt_compile=`echo "$ac_compile" | $SED \ 16061d54945dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16071d54945dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16081d54945dSmrg -e 's:$: $lt_compiler_flag:'` 1609d769e936Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610d769e936Smrg (eval "$lt_compile" 2>conftest.err) 16111d54945dSmrg ac_status=$? 1612d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613d769e936Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614d769e936Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16151d54945dSmrg # The compiler can only warn and ignore the option if not recognized 1616d769e936Smrg # So say no if there are warnings other than the usual output. 1617d769e936Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618d769e936Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619d769e936Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620d769e936Smrg $2=yes 16211d54945dSmrg fi 16221d54945dSmrg fi 1623d769e936Smrg $RM conftest* 16241d54945dSmrg]) 16251d54945dSmrg 16267322289dSmrgif test yes = "[$]$2"; then 1627d769e936Smrg m4_if([$5], , :, [$5]) 16281d54945dSmrgelse 1629d769e936Smrg m4_if([$6], , :, [$6]) 16301d54945dSmrgfi 1631d769e936Smrg])# _LT_COMPILER_OPTION 16321d54945dSmrg 1633d769e936Smrg# Old name: 1634d769e936SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1636d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16371d54945dSmrg 1638d769e936Smrg 1639d769e936Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640d769e936Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641d769e936Smrg# ---------------------------------------------------- 1642d769e936Smrg# Check whether the given linker option works 1643d769e936SmrgAC_DEFUN([_LT_LINKER_OPTION], 1644d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645d769e936Smrgm4_require([_LT_DECL_SED])dnl 1646d769e936SmrgAC_CACHE_CHECK([$1], [$2], 1647d769e936Smrg [$2=no 16487322289dSmrg save_LDFLAGS=$LDFLAGS 1649d769e936Smrg LDFLAGS="$LDFLAGS $3" 1650d769e936Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651d769e936Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652d769e936Smrg # The linker can only warn and ignore the option if not recognized 1653d769e936Smrg # So say no if there are warnings 1654d769e936Smrg if test -s conftest.err; then 1655d769e936Smrg # Append any errors to the config.log. 1656d769e936Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657d769e936Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658d769e936Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659d769e936Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1660d769e936Smrg $2=yes 1661d769e936Smrg fi 1662d769e936Smrg else 1663d769e936Smrg $2=yes 1664d769e936Smrg fi 1665d769e936Smrg fi 1666d769e936Smrg $RM -r conftest* 16677322289dSmrg LDFLAGS=$save_LDFLAGS 1668d769e936Smrg]) 1669d769e936Smrg 16707322289dSmrgif test yes = "[$]$2"; then 1671d769e936Smrg m4_if([$4], , :, [$4]) 1672d769e936Smrgelse 1673d769e936Smrg m4_if([$5], , :, [$5]) 1674d769e936Smrgfi 1675d769e936Smrg])# _LT_LINKER_OPTION 1676d769e936Smrg 1677d769e936Smrg# Old name: 1678d769e936SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1680d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681d769e936Smrg 1682d769e936Smrg 1683d769e936Smrg# LT_CMD_MAX_LEN 1684d769e936Smrg#--------------- 1685d769e936SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687d769e936Smrg# find the maximum length of command line arguments 1688d769e936SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1689d769e936SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690d769e936Smrg i=0 16917322289dSmrg teststring=ABCD 1692d769e936Smrg 1693d769e936Smrg case $build_os in 1694d769e936Smrg msdosdjgpp*) 1695d769e936Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1696d769e936Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1697d769e936Smrg # during glob expansion). Even if it were fixed, the result of this 1698d769e936Smrg # check would be larger than it should be. 1699d769e936Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700d769e936Smrg ;; 1701d769e936Smrg 1702d769e936Smrg gnu*) 1703d769e936Smrg # Under GNU Hurd, this test is not required because there is 1704d769e936Smrg # no limit to the length of command line arguments. 1705d769e936Smrg # Libtool will interpret -1 as no limit whatsoever 1706d769e936Smrg lt_cv_sys_max_cmd_len=-1; 1707d769e936Smrg ;; 1708d769e936Smrg 1709d769e936Smrg cygwin* | mingw* | cegcc*) 1710d769e936Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1711d769e936Smrg # about 5 minutes as the teststring grows exponentially. 1712d769e936Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1713d769e936Smrg # you end up with a "frozen" computer, even though with patience 1714d769e936Smrg # the test eventually succeeds (with a max line length of 256k). 1715d769e936Smrg # Instead, let's just punt: use the minimum linelength reported by 1716d769e936Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1717d769e936Smrg lt_cv_sys_max_cmd_len=8192; 1718d769e936Smrg ;; 1719d769e936Smrg 1720d769e936Smrg mint*) 1721d769e936Smrg # On MiNT this can take a long time and run out of memory. 1722d769e936Smrg lt_cv_sys_max_cmd_len=8192; 1723d769e936Smrg ;; 1724d769e936Smrg 1725d769e936Smrg amigaos*) 1726d769e936Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1727d769e936Smrg # So we just punt and use a minimum line length of 8192. 1728d769e936Smrg lt_cv_sys_max_cmd_len=8192; 1729d769e936Smrg ;; 1730d769e936Smrg 17317322289dSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732d769e936Smrg # This has been around since 386BSD, at least. Likely further. 1733d769e936Smrg if test -x /sbin/sysctl; then 1734d769e936Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735d769e936Smrg elif test -x /usr/sbin/sysctl; then 1736d769e936Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737d769e936Smrg else 1738d769e936Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739d769e936Smrg fi 1740d769e936Smrg # And add a safety zone 1741d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743d769e936Smrg ;; 1744d769e936Smrg 1745d769e936Smrg interix*) 1746d769e936Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747d769e936Smrg lt_cv_sys_max_cmd_len=196608 1748d769e936Smrg ;; 1749d769e936Smrg 1750d769e936Smrg os2*) 1751d769e936Smrg # The test takes a long time on OS/2. 1752d769e936Smrg lt_cv_sys_max_cmd_len=8192 1753d769e936Smrg ;; 1754d769e936Smrg 1755d769e936Smrg osf*) 1756d769e936Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757d769e936Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758d769e936Smrg # nice to cause kernel panics so lets avoid the loop below. 1759d769e936Smrg # First set a reasonable default. 1760d769e936Smrg lt_cv_sys_max_cmd_len=16384 1761d769e936Smrg # 1762d769e936Smrg if test -x /sbin/sysconfig; then 1763d769e936Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764d769e936Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765d769e936Smrg esac 1766d769e936Smrg fi 1767d769e936Smrg ;; 1768d769e936Smrg sco3.2v5*) 1769d769e936Smrg lt_cv_sys_max_cmd_len=102400 1770d769e936Smrg ;; 1771d769e936Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1772d769e936Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773d769e936Smrg if test -n "$kargmax"; then 1774d769e936Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775d769e936Smrg else 1776d769e936Smrg lt_cv_sys_max_cmd_len=32768 1777d769e936Smrg fi 1778d769e936Smrg ;; 1779d769e936Smrg *) 1780d769e936Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17817322289dSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17827322289dSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1783d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785d769e936Smrg else 1786d769e936Smrg # Make teststring a little bigger before we do anything with it. 1787d769e936Smrg # a 1K string should be a reasonable start. 17887322289dSmrg for i in 1 2 3 4 5 6 7 8; do 1789d769e936Smrg teststring=$teststring$teststring 1790d769e936Smrg done 1791d769e936Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792d769e936Smrg # If test is not a shell built-in, we'll probably end up computing a 1793d769e936Smrg # maximum length that is only half of the actual maximum length, but 1794d769e936Smrg # we can't tell. 17957322289dSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796d769e936Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17977322289dSmrg test 17 != "$i" # 1/2 MB should be enough 1798d769e936Smrg do 1799d769e936Smrg i=`expr $i + 1` 1800d769e936Smrg teststring=$teststring$teststring 1801d769e936Smrg done 1802d769e936Smrg # Only check the string length outside the loop. 1803d769e936Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804d769e936Smrg teststring= 1805d769e936Smrg # Add a significant safety factor because C++ compilers can tack on 1806d769e936Smrg # massive amounts of additional arguments before passing them to the 1807d769e936Smrg # linker. It appears as though 1/2 is a usable value. 1808d769e936Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809d769e936Smrg fi 1810d769e936Smrg ;; 1811d769e936Smrg esac 1812d769e936Smrg]) 18137322289dSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 1814d769e936Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815d769e936Smrgelse 1816d769e936Smrg AC_MSG_RESULT(none) 1817d769e936Smrgfi 1818d769e936Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819d769e936Smrg_LT_DECL([], [max_cmd_len], [0], 1820d769e936Smrg [What is the maximum length of a command?]) 1821d769e936Smrg])# LT_CMD_MAX_LEN 1822d769e936Smrg 1823d769e936Smrg# Old name: 1824d769e936SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825d769e936Smrgdnl aclocal-1.4 backwards compatibility: 1826d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827d769e936Smrg 1828d769e936Smrg 1829d769e936Smrg# _LT_HEADER_DLFCN 1830d769e936Smrg# ---------------- 1831d769e936Smrgm4_defun([_LT_HEADER_DLFCN], 1832d769e936Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833d769e936Smrg])# _LT_HEADER_DLFCN 1834d769e936Smrg 1835d769e936Smrg 1836d769e936Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837d769e936Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838d769e936Smrg# ---------------------------------------------------------------- 1839d769e936Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840d769e936Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18417322289dSmrgif test yes = "$cross_compiling"; then : 1842d769e936Smrg [$4] 1843d769e936Smrgelse 1844d769e936Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845d769e936Smrg lt_status=$lt_dlunknown 1846d769e936Smrg cat > conftest.$ac_ext <<_LT_EOF 1847d769e936Smrg[#line $LINENO "configure" 1848d769e936Smrg#include "confdefs.h" 1849d769e936Smrg 1850d769e936Smrg#if HAVE_DLFCN_H 1851d769e936Smrg#include <dlfcn.h> 1852d769e936Smrg#endif 1853d769e936Smrg 1854d769e936Smrg#include <stdio.h> 1855d769e936Smrg 1856d769e936Smrg#ifdef RTLD_GLOBAL 1857d769e936Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1858d769e936Smrg#else 1859d769e936Smrg# ifdef DL_GLOBAL 1860d769e936Smrg# define LT_DLGLOBAL DL_GLOBAL 1861d769e936Smrg# else 1862d769e936Smrg# define LT_DLGLOBAL 0 1863d769e936Smrg# endif 1864d769e936Smrg#endif 1865d769e936Smrg 1866d769e936Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867d769e936Smrg find out it does not work in some platform. */ 1868d769e936Smrg#ifndef LT_DLLAZY_OR_NOW 1869d769e936Smrg# ifdef RTLD_LAZY 1870d769e936Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871d769e936Smrg# else 1872d769e936Smrg# ifdef DL_LAZY 1873d769e936Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1874d769e936Smrg# else 1875d769e936Smrg# ifdef RTLD_NOW 1876d769e936Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1877d769e936Smrg# else 1878d769e936Smrg# ifdef DL_NOW 1879d769e936Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1880d769e936Smrg# else 1881d769e936Smrg# define LT_DLLAZY_OR_NOW 0 1882d769e936Smrg# endif 1883d769e936Smrg# endif 1884d769e936Smrg# endif 1885d769e936Smrg# endif 1886d769e936Smrg#endif 1887d769e936Smrg 18887322289dSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889d769e936Smrg correspondingly for the symbols needed. */ 18907322289dSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891d769e936Smrgint fnord () __attribute__((visibility("default"))); 1892d769e936Smrg#endif 1893d769e936Smrg 1894d769e936Smrgint fnord () { return 42; } 1895d769e936Smrgint main () 1896d769e936Smrg{ 1897d769e936Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898d769e936Smrg int status = $lt_dlunknown; 1899d769e936Smrg 1900d769e936Smrg if (self) 1901d769e936Smrg { 1902d769e936Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903d769e936Smrg else 1904d769e936Smrg { 1905d769e936Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906d769e936Smrg else puts (dlerror ()); 1907d769e936Smrg } 1908d769e936Smrg /* dlclose (self); */ 1909d769e936Smrg } 1910d769e936Smrg else 1911d769e936Smrg puts (dlerror ()); 1912d769e936Smrg 1913d769e936Smrg return status; 1914d769e936Smrg}] 1915d769e936Smrg_LT_EOF 19167322289dSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917d769e936Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918d769e936Smrg lt_status=$? 1919d769e936Smrg case x$lt_status in 1920d769e936Smrg x$lt_dlno_uscore) $1 ;; 1921d769e936Smrg x$lt_dlneed_uscore) $2 ;; 1922d769e936Smrg x$lt_dlunknown|x*) $3 ;; 1923d769e936Smrg esac 1924d769e936Smrg else : 1925d769e936Smrg # compilation failed 1926d769e936Smrg $3 1927d769e936Smrg fi 1928d769e936Smrgfi 1929d769e936Smrgrm -fr conftest* 1930d769e936Smrg])# _LT_TRY_DLOPEN_SELF 1931d769e936Smrg 1932d769e936Smrg 1933d769e936Smrg# LT_SYS_DLOPEN_SELF 1934d769e936Smrg# ------------------ 1935d769e936SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936d769e936Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19377322289dSmrgif test yes != "$enable_dlopen"; then 1938d769e936Smrg enable_dlopen=unknown 1939d769e936Smrg enable_dlopen_self=unknown 1940d769e936Smrg enable_dlopen_self_static=unknown 1941d769e936Smrgelse 1942d769e936Smrg lt_cv_dlopen=no 1943d769e936Smrg lt_cv_dlopen_libs= 1944d769e936Smrg 1945d769e936Smrg case $host_os in 1946d769e936Smrg beos*) 19477322289dSmrg lt_cv_dlopen=load_add_on 1948d769e936Smrg lt_cv_dlopen_libs= 1949d769e936Smrg lt_cv_dlopen_self=yes 1950d769e936Smrg ;; 1951d769e936Smrg 1952d769e936Smrg mingw* | pw32* | cegcc*) 19537322289dSmrg lt_cv_dlopen=LoadLibrary 1954d769e936Smrg lt_cv_dlopen_libs= 1955d769e936Smrg ;; 1956d769e936Smrg 1957d769e936Smrg cygwin*) 19587322289dSmrg lt_cv_dlopen=dlopen 1959d769e936Smrg lt_cv_dlopen_libs= 1960d769e936Smrg ;; 1961d769e936Smrg 1962d769e936Smrg darwin*) 19637322289dSmrg # if libdl is installed we need to link against it 1964d769e936Smrg AC_CHECK_LIB([dl], [dlopen], 19657322289dSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19667322289dSmrg lt_cv_dlopen=dyld 1967d769e936Smrg lt_cv_dlopen_libs= 1968d769e936Smrg lt_cv_dlopen_self=yes 1969d769e936Smrg ]) 1970d769e936Smrg ;; 1971d769e936Smrg 19727322289dSmrg tpf*) 19737322289dSmrg # Don't try to run any link tests for TPF. We know it's impossible 19747322289dSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 19757322289dSmrg lt_cv_dlopen=dlopen 19767322289dSmrg lt_cv_dlopen_libs= 19777322289dSmrg lt_cv_dlopen_self=no 19787322289dSmrg ;; 19797322289dSmrg 1980d769e936Smrg *) 1981d769e936Smrg AC_CHECK_FUNC([shl_load], 19827322289dSmrg [lt_cv_dlopen=shl_load], 1983d769e936Smrg [AC_CHECK_LIB([dld], [shl_load], 19847322289dSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985d769e936Smrg [AC_CHECK_FUNC([dlopen], 19867322289dSmrg [lt_cv_dlopen=dlopen], 1987d769e936Smrg [AC_CHECK_LIB([dl], [dlopen], 19887322289dSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989d769e936Smrg [AC_CHECK_LIB([svld], [dlopen], 19907322289dSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991d769e936Smrg [AC_CHECK_LIB([dld], [dld_link], 19927322289dSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993d769e936Smrg ]) 1994d769e936Smrg ]) 1995d769e936Smrg ]) 1996d769e936Smrg ]) 1997d769e936Smrg ]) 1998d769e936Smrg ;; 1999d769e936Smrg esac 2000d769e936Smrg 20017322289dSmrg if test no = "$lt_cv_dlopen"; then 2002d769e936Smrg enable_dlopen=no 20037322289dSmrg else 20047322289dSmrg enable_dlopen=yes 2005d769e936Smrg fi 2006d769e936Smrg 2007d769e936Smrg case $lt_cv_dlopen in 2008d769e936Smrg dlopen) 20097322289dSmrg save_CPPFLAGS=$CPPFLAGS 20107322289dSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011d769e936Smrg 20127322289dSmrg save_LDFLAGS=$LDFLAGS 2013d769e936Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014d769e936Smrg 20157322289dSmrg save_LIBS=$LIBS 2016d769e936Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017d769e936Smrg 2018d769e936Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 2019d769e936Smrg lt_cv_dlopen_self, [dnl 2020d769e936Smrg _LT_TRY_DLOPEN_SELF( 2021d769e936Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022d769e936Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023d769e936Smrg ]) 2024d769e936Smrg 20257322289dSmrg if test yes = "$lt_cv_dlopen_self"; then 2026d769e936Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027d769e936Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028d769e936Smrg lt_cv_dlopen_self_static, [dnl 2029d769e936Smrg _LT_TRY_DLOPEN_SELF( 2030d769e936Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031d769e936Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032d769e936Smrg ]) 2033d769e936Smrg fi 2034d769e936Smrg 20357322289dSmrg CPPFLAGS=$save_CPPFLAGS 20367322289dSmrg LDFLAGS=$save_LDFLAGS 20377322289dSmrg LIBS=$save_LIBS 2038d769e936Smrg ;; 2039d769e936Smrg esac 2040d769e936Smrg 2041d769e936Smrg case $lt_cv_dlopen_self in 2042d769e936Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043d769e936Smrg *) enable_dlopen_self=unknown ;; 2044d769e936Smrg esac 2045d769e936Smrg 2046d769e936Smrg case $lt_cv_dlopen_self_static in 2047d769e936Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048d769e936Smrg *) enable_dlopen_self_static=unknown ;; 2049d769e936Smrg esac 2050d769e936Smrgfi 2051d769e936Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052d769e936Smrg [Whether dlopen is supported]) 2053d769e936Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054d769e936Smrg [Whether dlopen of programs is supported]) 2055d769e936Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056d769e936Smrg [Whether dlopen of statically linked programs is supported]) 2057d769e936Smrg])# LT_SYS_DLOPEN_SELF 2058d769e936Smrg 2059d769e936Smrg# Old name: 2060d769e936SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061d769e936Smrgdnl aclocal-1.4 backwards compatibility: 2062d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063d769e936Smrg 2064d769e936Smrg 2065d769e936Smrg# _LT_COMPILER_C_O([TAGNAME]) 2066d769e936Smrg# --------------------------- 2067d769e936Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068d769e936Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069d769e936Smrgm4_defun([_LT_COMPILER_C_O], 2070d769e936Smrg[m4_require([_LT_DECL_SED])dnl 2071d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 2073d769e936SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076d769e936Smrg $RM -r conftest 2>/dev/null 2077d769e936Smrg mkdir conftest 2078d769e936Smrg cd conftest 2079d769e936Smrg mkdir out 2080d769e936Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081d769e936Smrg 2082d769e936Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2083d769e936Smrg # Insert the option either (1) after the last *FLAGS variable, or 2084d769e936Smrg # (2) before a word containing "conftest.", or (3) at the end. 2085d769e936Smrg # Note that $ac_compile itself does not contain backslashes and begins 2086d769e936Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2087d769e936Smrg lt_compile=`echo "$ac_compile" | $SED \ 2088d769e936Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089d769e936Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090d769e936Smrg -e 's:$: $lt_compiler_flag:'` 2091d769e936Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092d769e936Smrg (eval "$lt_compile" 2>out/conftest.err) 2093d769e936Smrg ac_status=$? 2094d769e936Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095d769e936Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096d769e936Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097d769e936Smrg then 2098d769e936Smrg # The compiler can only warn and ignore the option if not recognized 2099d769e936Smrg # So say no if there are warnings 2100d769e936Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101d769e936Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102d769e936Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104d769e936Smrg fi 2105d769e936Smrg fi 2106d769e936Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107d769e936Smrg $RM conftest* 2108d769e936Smrg # SGI C++ compiler will create directory out/ii_files/ for 2109d769e936Smrg # template instantiation 2110d769e936Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111d769e936Smrg $RM out/* && rmdir out 2112d769e936Smrg cd .. 2113d769e936Smrg $RM -r conftest 2114d769e936Smrg $RM conftest* 2115d769e936Smrg]) 2116d769e936Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117d769e936Smrg [Does compiler simultaneously support -c and -o options?]) 2118d769e936Smrg])# _LT_COMPILER_C_O 2119d769e936Smrg 2120d769e936Smrg 2121d769e936Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122d769e936Smrg# ---------------------------------- 2123d769e936Smrg# Check to see if we can do hard links to lock some files if needed 2124d769e936Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125d769e936Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2126d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127d769e936Smrg_LT_COMPILER_C_O([$1]) 2128d769e936Smrg 21297322289dSmrghard_links=nottested 21307322289dSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131d769e936Smrg # do not overwrite the value of need_locks provided by the user 2132d769e936Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2133d769e936Smrg hard_links=yes 2134d769e936Smrg $RM conftest* 2135d769e936Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136d769e936Smrg touch conftest.a 2137d769e936Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2138d769e936Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139d769e936Smrg AC_MSG_RESULT([$hard_links]) 21407322289dSmrg if test no = "$hard_links"; then 21417322289dSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142d769e936Smrg need_locks=warn 2143d769e936Smrg fi 2144d769e936Smrgelse 2145d769e936Smrg need_locks=no 2146d769e936Smrgfi 2147d769e936Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148d769e936Smrg])# _LT_COMPILER_FILE_LOCKS 2149d769e936Smrg 2150d769e936Smrg 2151d769e936Smrg# _LT_CHECK_OBJDIR 2152d769e936Smrg# ---------------- 2153d769e936Smrgm4_defun([_LT_CHECK_OBJDIR], 2154d769e936Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155d769e936Smrg[rm -f .libs 2>/dev/null 2156d769e936Smrgmkdir .libs 2>/dev/null 2157d769e936Smrgif test -d .libs; then 2158d769e936Smrg lt_cv_objdir=.libs 2159d769e936Smrgelse 2160d769e936Smrg # MS-DOS does not allow filenames that begin with a dot. 2161d769e936Smrg lt_cv_objdir=_libs 2162d769e936Smrgfi 21631d54945dSmrgrmdir .libs 2>/dev/null]) 21641d54945dSmrgobjdir=$lt_cv_objdir 2165d769e936Smrg_LT_DECL([], [objdir], [0], 2166d769e936Smrg [The name of the directory that contains temporary libtool files])dnl 2167d769e936Smrgm4_pattern_allow([LT_OBJDIR])dnl 21687322289dSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21697322289dSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170d769e936Smrg])# _LT_CHECK_OBJDIR 21711d54945dSmrg 21721d54945dSmrg 2173d769e936Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174d769e936Smrg# -------------------------------------- 21751d54945dSmrg# Check hardcoding attributes. 2176d769e936Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21771d54945dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178d769e936Smrg_LT_TAGVAR(hardcode_action, $1)= 2179d769e936Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180d769e936Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21817322289dSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21821d54945dSmrg 2183d769e936Smrg # We can hardcode non-existent directories. 21847322289dSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21851d54945dSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21861d54945dSmrg # have to relink, otherwise we might link with an installed library 21871d54945dSmrg # when we should be linking with a yet-to-be-installed one 21887322289dSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 21897322289dSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21901d54945dSmrg # Linking always hardcodes the temporary library directory. 2191d769e936Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21921d54945dSmrg else 21931d54945dSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194d769e936Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21951d54945dSmrg fi 21961d54945dSmrgelse 21971d54945dSmrg # We cannot hardcode anything, or else we can only hardcode existing 21981d54945dSmrg # directories. 2199d769e936Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22001d54945dSmrgfi 2201d769e936SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 22021d54945dSmrg 22037322289dSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22047322289dSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22051d54945dSmrg # Fast installation is not supported 22061d54945dSmrg enable_fast_install=no 22077322289dSmrgelif test yes = "$shlibpath_overrides_runpath" || 22087322289dSmrg test no = "$enable_shared"; then 22091d54945dSmrg # Fast installation is not necessary 22101d54945dSmrg enable_fast_install=needless 22111d54945dSmrgfi 2212d769e936Smrg_LT_TAGDECL([], [hardcode_action], [0], 2213d769e936Smrg [How to hardcode a shared library path into an executable]) 2214d769e936Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22151d54945dSmrg 22161d54945dSmrg 2217d769e936Smrg# _LT_CMD_STRIPLIB 2218d769e936Smrg# ---------------- 2219d769e936Smrgm4_defun([_LT_CMD_STRIPLIB], 2220d769e936Smrg[m4_require([_LT_DECL_EGREP]) 2221d769e936Smrgstriplib= 22221d54945dSmrgold_striplib= 22231d54945dSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224d769e936Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22251d54945dSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 22261d54945dSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 22271d54945dSmrg AC_MSG_RESULT([yes]) 22281d54945dSmrgelse 22291d54945dSmrg# FIXME - insert some real tests, host_os isn't really good enough 22301d54945dSmrg case $host_os in 2231d769e936Smrg darwin*) 22327322289dSmrg if test -n "$STRIP"; then 2233d769e936Smrg striplib="$STRIP -x" 2234d769e936Smrg old_striplib="$STRIP -S" 2235d769e936Smrg AC_MSG_RESULT([yes]) 2236d769e936Smrg else 2237d769e936Smrg AC_MSG_RESULT([no]) 2238d769e936Smrg fi 2239d769e936Smrg ;; 2240d769e936Smrg *) 2241d769e936Smrg AC_MSG_RESULT([no]) 2242d769e936Smrg ;; 2243d769e936Smrg esac 2244d769e936Smrgfi 2245d769e936Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246d769e936Smrg_LT_DECL([], [striplib], [1]) 2247d769e936Smrg])# _LT_CMD_STRIPLIB 2248d769e936Smrg 2249d769e936Smrg 22507322289dSmrg# _LT_PREPARE_MUNGE_PATH_LIST 22517322289dSmrg# --------------------------- 22527322289dSmrg# Make sure func_munge_path_list() is defined correctly. 22537322289dSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22547322289dSmrg[[# func_munge_path_list VARIABLE PATH 22557322289dSmrg# ----------------------------------- 22567322289dSmrg# VARIABLE is name of variable containing _space_ separated list of 22577322289dSmrg# directories to be munged by the contents of PATH, which is string 22587322289dSmrg# having a format: 22597322289dSmrg# "DIR[:DIR]:" 22607322289dSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 22617322289dSmrg# ":DIR[:DIR]" 22627322289dSmrg# string "DIR[ DIR]" will be appended to VARIABLE 22637322289dSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22647322289dSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22657322289dSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 22667322289dSmrg# "DIR[:DIR]" 22677322289dSmrg# VARIABLE will be replaced by "DIR[ DIR]" 22687322289dSmrgfunc_munge_path_list () 22697322289dSmrg{ 22707322289dSmrg case x@S|@2 in 22717322289dSmrg x) 22727322289dSmrg ;; 22737322289dSmrg *:) 22747322289dSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 22757322289dSmrg ;; 22767322289dSmrg x:*) 22777322289dSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 22787322289dSmrg ;; 22797322289dSmrg *::*) 22807322289dSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 22817322289dSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 22827322289dSmrg ;; 22837322289dSmrg *) 22847322289dSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 22857322289dSmrg ;; 22867322289dSmrg esac 22877322289dSmrg} 22887322289dSmrg]])# _LT_PREPARE_PATH_LIST 22897322289dSmrg 22907322289dSmrg 2291d769e936Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292d769e936Smrg# ----------------------------- 2293d769e936Smrg# PORTME Fill in your ld.so characteristics 2294d769e936Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 2297d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298d769e936Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2299d769e936Smrgm4_require([_LT_DECL_SED])dnl 2300d769e936Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23017322289dSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302d769e936SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303d769e936Smrgm4_if([$1], 2304d769e936Smrg [], [ 23057322289dSmrgif test yes = "$GCC"; then 2306ba85709eSmrg case $host_os in 23077322289dSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23087322289dSmrg *) lt_awk_arg='/^libraries:/' ;; 2309ba85709eSmrg esac 2310d769e936Smrg case $host_os in 23117322289dSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23127322289dSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313d769e936Smrg esac 2314d769e936Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315d769e936Smrg case $lt_search_path_spec in 2316d769e936Smrg *\;*) 23171d54945dSmrg # if the path contains ";" then we assume it to be the separator 23181d54945dSmrg # otherwise default to the standard path separator (i.e. ":") - it is 23191d54945dSmrg # assumed that no part of a normal pathname contains ";" but that should 23201d54945dSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2321d769e936Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322d769e936Smrg ;; 2323d769e936Smrg *) 2324d769e936Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325d769e936Smrg ;; 2326d769e936Smrg esac 2327ba85709eSmrg # Ok, now we have the path, separated by spaces, we can step through it 23287322289dSmrg # and add multilib dir if necessary... 2329ba85709eSmrg lt_tmp_lt_search_path_spec= 23307322289dSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23317322289dSmrg # ...but if some path component already ends with the multilib dir we assume 23327322289dSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23337322289dSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23347322289dSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23357322289dSmrg lt_multi_os_dir= 23367322289dSmrg ;; 23377322289dSmrg esac 2338ba85709eSmrg for lt_sys_path in $lt_search_path_spec; do 23397322289dSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23407322289dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23417322289dSmrg elif test -n "$lt_multi_os_dir"; then 2342ba85709eSmrg test -d "$lt_sys_path" && \ 2343ba85709eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344ba85709eSmrg fi 2345ba85709eSmrg done 2346d769e936Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23477322289dSmrgBEGIN {RS = " "; FS = "/|\n";} { 23487322289dSmrg lt_foo = ""; 23497322289dSmrg lt_count = 0; 2350ba85709eSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2351ba85709eSmrg if ($lt_i != "" && $lt_i != ".") { 2352ba85709eSmrg if ($lt_i == "..") { 2353ba85709eSmrg lt_count++; 2354ba85709eSmrg } else { 2355ba85709eSmrg if (lt_count == 0) { 23567322289dSmrg lt_foo = "/" $lt_i lt_foo; 2357ba85709eSmrg } else { 2358ba85709eSmrg lt_count--; 2359ba85709eSmrg } 2360ba85709eSmrg } 2361ba85709eSmrg } 2362ba85709eSmrg } 2363ba85709eSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364ba85709eSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365ba85709eSmrg}'` 2366d769e936Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367d769e936Smrg # for these hosts. 2368d769e936Smrg case $host_os in 2369d769e936Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23707322289dSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371d769e936Smrg esac 2372d769e936Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23731d54945dSmrgelse 23741d54945dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375ba85709eSmrgfi]) 2376d769e936Smrglibrary_names_spec= 2377d769e936Smrglibname_spec='lib$name' 2378d769e936Smrgsoname_spec= 23797322289dSmrgshrext_cmds=.so 2380d769e936Smrgpostinstall_cmds= 2381d769e936Smrgpostuninstall_cmds= 2382d769e936Smrgfinish_cmds= 2383d769e936Smrgfinish_eval= 2384d769e936Smrgshlibpath_var= 2385d769e936Smrgshlibpath_overrides_runpath=unknown 2386d769e936Smrgversion_type=none 2387d769e936Smrgdynamic_linker="$host_os ld.so" 2388d769e936Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23891d54945dSmrgneed_lib_prefix=unknown 23901d54945dSmrghardcode_into_libs=no 23911d54945dSmrg 23921d54945dSmrg# when you set need_version to no, make sure it does not cause -set_version 23931d54945dSmrg# flags to be left without arguments 23941d54945dSmrgneed_version=unknown 23951d54945dSmrg 23967322289dSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 23977322289dSmrg[User-defined run-time library search path.]) 23987322289dSmrg 23991d54945dSmrgcase $host_os in 24001d54945dSmrgaix3*) 2401d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 24027322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24031d54945dSmrg shlibpath_var=LIBPATH 24041d54945dSmrg 24051d54945dSmrg # AIX 3 has no versioning support, so we append a major version to the name. 24067322289dSmrg soname_spec='$libname$release$shared_ext$major' 24071d54945dSmrg ;; 24081d54945dSmrg 2409ba85709eSmrgaix[[4-9]]*) 2410d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 24111d54945dSmrg need_lib_prefix=no 24121d54945dSmrg need_version=no 24131d54945dSmrg hardcode_into_libs=yes 24147322289dSmrg if test ia64 = "$host_cpu"; then 24151d54945dSmrg # AIX 5 supports IA64 24167322289dSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24171d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 24181d54945dSmrg else 24191d54945dSmrg # With GCC up to 2.95.x, collect2 would create an import file 24201d54945dSmrg # for dependence libraries. The import file would start with 24217322289dSmrg # the line '#! .'. This would cause the generated library to 24227322289dSmrg # depend on '.', always an invalid library. This was fixed in 24231d54945dSmrg # development snapshots of GCC prior to 3.0. 24241d54945dSmrg case $host_os in 24251d54945dSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24261d54945dSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24271d54945dSmrg echo ' yes ' 24287322289dSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24291d54945dSmrg : 24301d54945dSmrg else 24311d54945dSmrg can_build_shared=no 24321d54945dSmrg fi 24331d54945dSmrg ;; 24341d54945dSmrg esac 24357322289dSmrg # Using Import Files as archive members, it is possible to support 24367322289dSmrg # filename-based versioning of shared library archives on AIX. While 24377322289dSmrg # this would work for both with and without runtime linking, it will 24387322289dSmrg # prevent static linking of such archives. So we do filename-based 24397322289dSmrg # shared library versioning with .so extension only, which is used 24407322289dSmrg # when both runtime linking and shared linking is enabled. 24417322289dSmrg # Unfortunately, runtime linking may impact performance, so we do 24427322289dSmrg # not want this to be the default eventually. Also, we use the 24437322289dSmrg # versioned .so libs for executables only if there is the -brtl 24447322289dSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24457322289dSmrg # To allow for filename-based versioning support, we need to create 24467322289dSmrg # libNAME.so.V as an archive file, containing: 24477322289dSmrg # *) an Import File, referring to the versioned filename of the 24487322289dSmrg # archive as well as the shared archive member, telling the 24497322289dSmrg # bitwidth (32 or 64) of that shared object, and providing the 24507322289dSmrg # list of exported symbols of that shared object, eventually 24517322289dSmrg # decorated with the 'weak' keyword 24527322289dSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24537322289dSmrg # it being seen by the linker. 24547322289dSmrg # At run time we better use the real file rather than another symlink, 24557322289dSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24567322289dSmrg 24577322289dSmrg case $with_aix_soname,$aix_use_runtimelinking in 24587322289dSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24591d54945dSmrg # soname into executable. Probably we can add versioning support to 24601d54945dSmrg # collect2, so additional links can be useful in future. 24617322289dSmrg aix,yes) # traditional libtool 24627322289dSmrg dynamic_linker='AIX unversionable lib.so' 24631d54945dSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24641d54945dSmrg # instead of lib<name>.a to let people know that these are not 24651d54945dSmrg # typical AIX shared libraries. 24667322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24677322289dSmrg ;; 24687322289dSmrg aix,no) # traditional AIX only 24697322289dSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24701d54945dSmrg # We preserve .a as extension for shared libraries through AIX4.2 24711d54945dSmrg # and later when we are not doing run time linking. 24727322289dSmrg library_names_spec='$libname$release.a $libname.a' 24737322289dSmrg soname_spec='$libname$release$shared_ext$major' 24747322289dSmrg ;; 24757322289dSmrg svr4,*) # full svr4 only 24767322289dSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 24777322289dSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24787322289dSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24797322289dSmrg shlibpath_overrides_runpath=yes 24807322289dSmrg ;; 24817322289dSmrg *,yes) # both, prefer svr4 24827322289dSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 24837322289dSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24847322289dSmrg # unpreferred sharedlib libNAME.a needs extra handling 24857322289dSmrg 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"' 24867322289dSmrg 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"' 24877322289dSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24887322289dSmrg shlibpath_overrides_runpath=yes 24897322289dSmrg ;; 24907322289dSmrg *,no) # both, prefer aix 24917322289dSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 24927322289dSmrg library_names_spec='$libname$release.a $libname.a' 24937322289dSmrg soname_spec='$libname$release$shared_ext$major' 24947322289dSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 24957322289dSmrg 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)' 24967322289dSmrg 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"' 24977322289dSmrg ;; 24987322289dSmrg esac 24991d54945dSmrg shlibpath_var=LIBPATH 25001d54945dSmrg fi 25011d54945dSmrg ;; 25021d54945dSmrg 25031d54945dSmrgamigaos*) 2504d769e936Smrg case $host_cpu in 2505d769e936Smrg powerpc) 2506d769e936Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507d769e936Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25087322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2509d769e936Smrg ;; 2510d769e936Smrg m68k) 2511d769e936Smrg library_names_spec='$libname.ixlibrary $libname.a' 2512d769e936Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25137322289dSmrg 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' 2514d769e936Smrg ;; 2515d769e936Smrg esac 25161d54945dSmrg ;; 25171d54945dSmrg 25181d54945dSmrgbeos*) 25197322289dSmrg library_names_spec='$libname$shared_ext' 25201d54945dSmrg dynamic_linker="$host_os ld.so" 25211d54945dSmrg shlibpath_var=LIBRARY_PATH 25221d54945dSmrg ;; 25231d54945dSmrg 25241d54945dSmrgbsdi[[45]]*) 2525d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 25261d54945dSmrg need_version=no 25277322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25287322289dSmrg soname_spec='$libname$release$shared_ext$major' 25291d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25301d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 25311d54945dSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25321d54945dSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25331d54945dSmrg # the default ld.so.conf also contains /usr/contrib/lib and 25341d54945dSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25351d54945dSmrg # libtool to hard-code these into programs 25361d54945dSmrg ;; 25371d54945dSmrg 2538d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 25391d54945dSmrg version_type=windows 25407322289dSmrg shrext_cmds=.dll 25411d54945dSmrg need_version=no 25421d54945dSmrg need_lib_prefix=no 25431d54945dSmrg 2544d769e936Smrg case $GCC,$cc_basename in 2545d769e936Smrg yes,*) 2546d769e936Smrg # gcc 25471d54945dSmrg library_names_spec='$libname.dll.a' 25481d54945dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25497322289dSmrg postinstall_cmds='base_file=`basename \$file`~ 25507322289dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25511d54945dSmrg dldir=$destdir/`dirname \$dlpath`~ 25521d54945dSmrg test -d \$dldir || mkdir -p \$dldir~ 25531d54945dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554d769e936Smrg chmod a+x \$dldir/$dlname~ 2555d769e936Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556d769e936Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557d769e936Smrg fi' 25581d54945dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25591d54945dSmrg dlpath=$dir/\$dldll~ 2560d769e936Smrg $RM \$dlpath' 25611d54945dSmrg shlibpath_overrides_runpath=yes 25621d54945dSmrg 25631d54945dSmrg case $host_os in 25641d54945dSmrg cygwin*) 25651d54945dSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 25667322289dSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567d769e936Smrgm4_if([$1], [],[ 2568d769e936Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25691d54945dSmrg ;; 2570d769e936Smrg mingw* | cegcc*) 25711d54945dSmrg # MinGW DLLs use traditional 'lib' prefix 25727322289dSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25731d54945dSmrg ;; 25741d54945dSmrg pw32*) 25751d54945dSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 25767322289dSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25771d54945dSmrg ;; 25781d54945dSmrg esac 2579d769e936Smrg dynamic_linker='Win32 ld.exe' 2580d769e936Smrg ;; 2581d769e936Smrg 2582d769e936Smrg *,cl*) 2583d769e936Smrg # Native MSVC 2584d769e936Smrg libname_spec='$name' 25857322289dSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25867322289dSmrg library_names_spec='$libname.dll.lib' 2587d769e936Smrg 2588d769e936Smrg case $build_os in 2589d769e936Smrg mingw*) 2590d769e936Smrg sys_lib_search_path_spec= 2591d769e936Smrg lt_save_ifs=$IFS 2592d769e936Smrg IFS=';' 2593d769e936Smrg for lt_path in $LIB 2594d769e936Smrg do 2595d769e936Smrg IFS=$lt_save_ifs 2596d769e936Smrg # Let DOS variable expansion print the short 8.3 style file name. 2597d769e936Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598d769e936Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599d769e936Smrg done 2600d769e936Smrg IFS=$lt_save_ifs 2601d769e936Smrg # Convert to MSYS style. 2602d769e936Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603d769e936Smrg ;; 2604d769e936Smrg cygwin*) 2605d769e936Smrg # Convert to unix form, then to dos form, then back to unix form 2606d769e936Smrg # but this time dos style (no spaces!) so that the unix form looks 2607d769e936Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608d769e936Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609d769e936Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610d769e936Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611d769e936Smrg ;; 2612d769e936Smrg *) 26137322289dSmrg sys_lib_search_path_spec=$LIB 2614d769e936Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615d769e936Smrg # It is most probably a Windows format PATH. 2616d769e936Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617d769e936Smrg else 2618d769e936Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619d769e936Smrg fi 2620d769e936Smrg # FIXME: find the short name or the path components, as spaces are 2621d769e936Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622d769e936Smrg ;; 2623d769e936Smrg esac 2624d769e936Smrg 2625d769e936Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26267322289dSmrg postinstall_cmds='base_file=`basename \$file`~ 26277322289dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628d769e936Smrg dldir=$destdir/`dirname \$dlpath`~ 2629d769e936Smrg test -d \$dldir || mkdir -p \$dldir~ 2630d769e936Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2631d769e936Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632d769e936Smrg dlpath=$dir/\$dldll~ 2633d769e936Smrg $RM \$dlpath' 2634d769e936Smrg shlibpath_overrides_runpath=yes 2635d769e936Smrg dynamic_linker='Win32 link.exe' 26361d54945dSmrg ;; 26371d54945dSmrg 26381d54945dSmrg *) 2639d769e936Smrg # Assume MSVC wrapper 26407322289dSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641d769e936Smrg dynamic_linker='Win32 ld.exe' 26421d54945dSmrg ;; 26431d54945dSmrg esac 26441d54945dSmrg # FIXME: first we should search . and the directory the executable is in 26451d54945dSmrg shlibpath_var=PATH 26461d54945dSmrg ;; 26471d54945dSmrg 26481d54945dSmrgdarwin* | rhapsody*) 26491d54945dSmrg dynamic_linker="$host_os dyld" 26501d54945dSmrg version_type=darwin 26511d54945dSmrg need_lib_prefix=no 26521d54945dSmrg need_version=no 26537322289dSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 26547322289dSmrg soname_spec='$libname$release$major$shared_ext' 26551d54945dSmrg shlibpath_overrides_runpath=yes 26561d54945dSmrg shlibpath_var=DYLD_LIBRARY_PATH 26571d54945dSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658d769e936Smrgm4_if([$1], [],[ 2659d769e936Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26601d54945dSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26611d54945dSmrg ;; 26621d54945dSmrg 26631d54945dSmrgdgux*) 2664d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 26651d54945dSmrg need_lib_prefix=no 26661d54945dSmrg need_version=no 26677322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26687322289dSmrg soname_spec='$libname$release$shared_ext$major' 26691d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 26701d54945dSmrg ;; 26711d54945dSmrg 26721d54945dSmrgfreebsd* | dragonfly*) 26731d54945dSmrg # DragonFly does not have aout. When/if they implement a new 26741d54945dSmrg # versioning mechanism, adjust this. 26751d54945dSmrg if test -x /usr/bin/objformat; then 26761d54945dSmrg objformat=`/usr/bin/objformat` 26771d54945dSmrg else 26781d54945dSmrg case $host_os in 2679d769e936Smrg freebsd[[23]].*) objformat=aout ;; 26801d54945dSmrg *) objformat=elf ;; 26811d54945dSmrg esac 26821d54945dSmrg fi 2683024581f2Smrg version_type=freebsd-$objformat 26841d54945dSmrg case $version_type in 26851d54945dSmrg freebsd-elf*) 26867322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26877322289dSmrg soname_spec='$libname$release$shared_ext$major' 26881d54945dSmrg need_version=no 26891d54945dSmrg need_lib_prefix=no 26901d54945dSmrg ;; 26911d54945dSmrg freebsd-*) 26927322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 26931d54945dSmrg need_version=yes 26941d54945dSmrg ;; 26951d54945dSmrg esac 26961d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 26971d54945dSmrg case $host_os in 2698d769e936Smrg freebsd2.*) 26991d54945dSmrg shlibpath_overrides_runpath=yes 27001d54945dSmrg ;; 27011d54945dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27021d54945dSmrg shlibpath_overrides_runpath=yes 27031d54945dSmrg hardcode_into_libs=yes 27041d54945dSmrg ;; 27051d54945dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27061d54945dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27071d54945dSmrg shlibpath_overrides_runpath=no 27081d54945dSmrg hardcode_into_libs=yes 27091d54945dSmrg ;; 2710ba85709eSmrg *) # from 4.6 on, and DragonFly 27111d54945dSmrg shlibpath_overrides_runpath=yes 27121d54945dSmrg hardcode_into_libs=yes 27131d54945dSmrg ;; 27141d54945dSmrg esac 27151d54945dSmrg ;; 27161d54945dSmrg 2717d769e936Smrghaiku*) 2718d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 2719d769e936Smrg need_lib_prefix=no 2720d769e936Smrg need_version=no 2721d769e936Smrg dynamic_linker="$host_os runtime_loader" 27227322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27237322289dSmrg soname_spec='$libname$release$shared_ext$major' 2724d769e936Smrg shlibpath_var=LIBRARY_PATH 27257322289dSmrg shlibpath_overrides_runpath=no 2726d769e936Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27271d54945dSmrg hardcode_into_libs=yes 27281d54945dSmrg ;; 27291d54945dSmrg 27301d54945dSmrghpux9* | hpux10* | hpux11*) 27311d54945dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 27321d54945dSmrg # link against other versions. 27331d54945dSmrg version_type=sunos 27341d54945dSmrg need_lib_prefix=no 27351d54945dSmrg need_version=no 27361d54945dSmrg case $host_cpu in 27371d54945dSmrg ia64*) 27381d54945dSmrg shrext_cmds='.so' 27391d54945dSmrg hardcode_into_libs=yes 27401d54945dSmrg dynamic_linker="$host_os dld.so" 27411d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27421d54945dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27437322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27447322289dSmrg soname_spec='$libname$release$shared_ext$major' 27457322289dSmrg if test 32 = "$HPUX_IA64_MODE"; then 27461d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27477322289dSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27481d54945dSmrg else 27491d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27507322289dSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27511d54945dSmrg fi 27521d54945dSmrg ;; 2753d769e936Smrg hppa*64*) 2754d769e936Smrg shrext_cmds='.sl' 2755d769e936Smrg hardcode_into_libs=yes 2756d769e936Smrg dynamic_linker="$host_os dld.sl" 2757d769e936Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2758d769e936Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27597322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27607322289dSmrg soname_spec='$libname$release$shared_ext$major' 2761d769e936Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2762d769e936Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2763d769e936Smrg ;; 2764d769e936Smrg *) 27651d54945dSmrg shrext_cmds='.sl' 27661d54945dSmrg dynamic_linker="$host_os dld.sl" 27671d54945dSmrg shlibpath_var=SHLIB_PATH 27681d54945dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27697322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27707322289dSmrg soname_spec='$libname$release$shared_ext$major' 27711d54945dSmrg ;; 27721d54945dSmrg esac 2773d769e936Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27741d54945dSmrg postinstall_cmds='chmod 555 $lib' 2775d769e936Smrg # or fails outright, so override atomically: 2776d769e936Smrg install_override_mode=555 27771d54945dSmrg ;; 27781d54945dSmrg 2779ba85709eSmrginterix[[3-9]]*) 2780d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 27811d54945dSmrg need_lib_prefix=no 27821d54945dSmrg need_version=no 27837322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27847322289dSmrg soname_spec='$libname$release$shared_ext$major' 27851d54945dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27861d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27871d54945dSmrg shlibpath_overrides_runpath=no 27881d54945dSmrg hardcode_into_libs=yes 27891d54945dSmrg ;; 27901d54945dSmrg 27911d54945dSmrgirix5* | irix6* | nonstopux*) 27921d54945dSmrg case $host_os in 27931d54945dSmrg nonstopux*) version_type=nonstopux ;; 27941d54945dSmrg *) 27957322289dSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 2796d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 27971d54945dSmrg else 27981d54945dSmrg version_type=irix 27991d54945dSmrg fi ;; 28001d54945dSmrg esac 28011d54945dSmrg need_lib_prefix=no 28021d54945dSmrg need_version=no 28037322289dSmrg soname_spec='$libname$release$shared_ext$major' 28047322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28051d54945dSmrg case $host_os in 28061d54945dSmrg irix5* | nonstopux*) 28071d54945dSmrg libsuff= shlibsuff= 28081d54945dSmrg ;; 28091d54945dSmrg *) 28101d54945dSmrg case $LD in # libtool.m4 will add one of these switches to LD 28111d54945dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28121d54945dSmrg libsuff= shlibsuff= libmagic=32-bit;; 28131d54945dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28141d54945dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28151d54945dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28161d54945dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28171d54945dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 28181d54945dSmrg esac 28191d54945dSmrg ;; 28201d54945dSmrg esac 28211d54945dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28221d54945dSmrg shlibpath_overrides_runpath=no 28237322289dSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28247322289dSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28251d54945dSmrg hardcode_into_libs=yes 28261d54945dSmrg ;; 28271d54945dSmrg 28281d54945dSmrg# No shared lib support for Linux oldld, aout, or coff. 28291d54945dSmrglinux*oldld* | linux*aout* | linux*coff*) 28301d54945dSmrg dynamic_linker=no 28311d54945dSmrg ;; 28321d54945dSmrg 28337322289dSmrglinux*android*) 28347322289dSmrg version_type=none # Android doesn't support versioned libraries. 28357322289dSmrg need_lib_prefix=no 28367322289dSmrg need_version=no 28377322289dSmrg library_names_spec='$libname$release$shared_ext' 28387322289dSmrg soname_spec='$libname$release$shared_ext' 28397322289dSmrg finish_cmds= 28407322289dSmrg shlibpath_var=LD_LIBRARY_PATH 28417322289dSmrg shlibpath_overrides_runpath=yes 28427322289dSmrg 28437322289dSmrg # This implies no fast_install, which is unacceptable. 28447322289dSmrg # Some rework will be needed to allow for fast_install 28457322289dSmrg # before this can be enabled. 28467322289dSmrg hardcode_into_libs=yes 28477322289dSmrg 28487322289dSmrg dynamic_linker='Android linker' 28497322289dSmrg # Don't embed -rpath directories since the linker doesn't support them. 28507322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28517322289dSmrg ;; 28527322289dSmrg 2853d769e936Smrg# This must be glibc/ELF. 28547322289dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2855d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 28561d54945dSmrg need_lib_prefix=no 28571d54945dSmrg need_version=no 28587322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28597322289dSmrg soname_spec='$libname$release$shared_ext$major' 28601d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28611d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28621d54945dSmrg shlibpath_overrides_runpath=no 2863d769e936Smrg 2864d769e936Smrg # Some binutils ld are patched to set DT_RUNPATH 2865d769e936Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2866d769e936Smrg [lt_cv_shlibpath_overrides_runpath=no 2867d769e936Smrg save_LDFLAGS=$LDFLAGS 2868d769e936Smrg save_libdir=$libdir 2869d769e936Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2870d769e936Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2871d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2872d769e936Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2873d769e936Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2874d769e936Smrg LDFLAGS=$save_LDFLAGS 2875d769e936Smrg libdir=$save_libdir 2876d769e936Smrg ]) 2877d769e936Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2878d769e936Smrg 28791d54945dSmrg # This implies no fast_install, which is unacceptable. 28801d54945dSmrg # Some rework will be needed to allow for fast_install 28811d54945dSmrg # before this can be enabled. 28821d54945dSmrg hardcode_into_libs=yes 2883d769e936Smrg 28847322289dSmrg # Ideally, we could use ldconfig to report *all* directores which are 28857322289dSmrg # searched for libraries, however this is still not possible. Aside from not 28867322289dSmrg # being certain /sbin/ldconfig is available, command 28877322289dSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 28887322289dSmrg # even though it is searched at run-time. Try to do the best guess by 28897322289dSmrg # appending ld.so.conf contents (and includes) to the search path. 28901d54945dSmrg if test -f /etc/ld.so.conf; then 2891d769e936Smrg 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' ' '` 28927322289dSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 28931d54945dSmrg fi 28941d54945dSmrg 28951d54945dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 28961d54945dSmrg # powerpc, because MkLinux only supported shared libraries with the 28971d54945dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 28981d54945dSmrg # most powerpc-linux boxes support dynamic linking these days and 28991d54945dSmrg # people can always --disable-shared, the test was removed, and we 29001d54945dSmrg # assume the GNU/Linux dynamic linker is in use. 29011d54945dSmrg dynamic_linker='GNU/Linux ld.so' 29021d54945dSmrg ;; 29031d54945dSmrg 2904024581f2Smrgnetbsdelf*-gnu) 2905024581f2Smrg version_type=linux 2906024581f2Smrg need_lib_prefix=no 2907024581f2Smrg need_version=no 2908024581f2Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2909024581f2Smrg soname_spec='${libname}${release}${shared_ext}$major' 2910024581f2Smrg shlibpath_var=LD_LIBRARY_PATH 2911024581f2Smrg shlibpath_overrides_runpath=no 2912024581f2Smrg hardcode_into_libs=yes 2913024581f2Smrg dynamic_linker='NetBSD ld.elf_so' 2914024581f2Smrg ;; 2915024581f2Smrg 29161d54945dSmrgnetbsd*) 29171d54945dSmrg version_type=sunos 29181d54945dSmrg need_lib_prefix=no 29191d54945dSmrg need_version=no 2920d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29217322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29221d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29231d54945dSmrg dynamic_linker='NetBSD (a.out) ld.so' 29241d54945dSmrg else 29257322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29267322289dSmrg soname_spec='$libname$release$shared_ext$major' 29271d54945dSmrg dynamic_linker='NetBSD ld.elf_so' 29281d54945dSmrg fi 29291d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 29301d54945dSmrg shlibpath_overrides_runpath=yes 29311d54945dSmrg hardcode_into_libs=yes 29321d54945dSmrg ;; 29331d54945dSmrg 29341d54945dSmrgnewsos6) 2935d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 29367322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29371d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 29381d54945dSmrg shlibpath_overrides_runpath=yes 29391d54945dSmrg ;; 29401d54945dSmrg 2941d769e936Smrg*nto* | *qnx*) 2942d769e936Smrg version_type=qnx 29431d54945dSmrg need_lib_prefix=no 29441d54945dSmrg need_version=no 29457322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29467322289dSmrg soname_spec='$libname$release$shared_ext$major' 29471d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 2948d769e936Smrg shlibpath_overrides_runpath=no 2949d769e936Smrg hardcode_into_libs=yes 2950d769e936Smrg dynamic_linker='ldqnx.so' 29511d54945dSmrg ;; 29521d54945dSmrg 29537322289dSmrgopenbsd* | bitrig*) 29541d54945dSmrg version_type=sunos 29557322289dSmrg sys_lib_dlsearch_path_spec=/usr/lib 29561d54945dSmrg need_lib_prefix=no 29577322289dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29587322289dSmrg need_version=no 29591d54945dSmrg else 29607322289dSmrg need_version=yes 29611d54945dSmrg fi 29627322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29637322289dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29647322289dSmrg shlibpath_var=LD_LIBRARY_PATH 29657322289dSmrg shlibpath_overrides_runpath=yes 29661d54945dSmrg ;; 29671d54945dSmrg 29681d54945dSmrgos2*) 29691d54945dSmrg libname_spec='$name' 29707322289dSmrg version_type=windows 29717322289dSmrg shrext_cmds=.dll 29727322289dSmrg need_version=no 29731d54945dSmrg need_lib_prefix=no 29747322289dSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29757322289dSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29767322289dSmrg v=$($ECHO $release$versuffix | tr -d .-); 29777322289dSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29787322289dSmrg $ECHO $n$v`$shared_ext' 29797322289dSmrg library_names_spec='${libname}_dll.$libext' 29801d54945dSmrg dynamic_linker='OS/2 ld.exe' 29817322289dSmrg shlibpath_var=BEGINLIBPATH 29827322289dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29837322289dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29847322289dSmrg postinstall_cmds='base_file=`basename \$file`~ 29857322289dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29867322289dSmrg dldir=$destdir/`dirname \$dlpath`~ 29877322289dSmrg test -d \$dldir || mkdir -p \$dldir~ 29887322289dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 29897322289dSmrg chmod a+x \$dldir/$dlname~ 29907322289dSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 29917322289dSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 29927322289dSmrg fi' 29937322289dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 29947322289dSmrg dlpath=$dir/\$dldll~ 29957322289dSmrg $RM \$dlpath' 29961d54945dSmrg ;; 29971d54945dSmrg 29981d54945dSmrgosf3* | osf4* | osf5*) 29991d54945dSmrg version_type=osf 30001d54945dSmrg need_lib_prefix=no 30011d54945dSmrg need_version=no 30027322289dSmrg soname_spec='$libname$release$shared_ext$major' 30037322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30041d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30051d54945dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30067322289dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30071d54945dSmrg ;; 30081d54945dSmrg 3009ba85709eSmrgrdos*) 3010ba85709eSmrg dynamic_linker=no 3011ba85709eSmrg ;; 3012ba85709eSmrg 30131d54945dSmrgsolaris*) 3014d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 30151d54945dSmrg need_lib_prefix=no 30161d54945dSmrg need_version=no 30177322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30187322289dSmrg soname_spec='$libname$release$shared_ext$major' 30191d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30201d54945dSmrg shlibpath_overrides_runpath=yes 30211d54945dSmrg hardcode_into_libs=yes 30221d54945dSmrg # ldd complains unless libraries are executable 30231d54945dSmrg postinstall_cmds='chmod +x $lib' 30241d54945dSmrg ;; 30251d54945dSmrg 30261d54945dSmrgsunos4*) 30271d54945dSmrg version_type=sunos 30287322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30291d54945dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30301d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30311d54945dSmrg shlibpath_overrides_runpath=yes 30327322289dSmrg if test yes = "$with_gnu_ld"; then 30331d54945dSmrg need_lib_prefix=no 30341d54945dSmrg fi 30351d54945dSmrg need_version=yes 30361d54945dSmrg ;; 30371d54945dSmrg 30381d54945dSmrgsysv4 | sysv4.3*) 3039d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 30407322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30417322289dSmrg soname_spec='$libname$release$shared_ext$major' 30421d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30431d54945dSmrg case $host_vendor in 30441d54945dSmrg sni) 30451d54945dSmrg shlibpath_overrides_runpath=no 30461d54945dSmrg need_lib_prefix=no 30471d54945dSmrg runpath_var=LD_RUN_PATH 30481d54945dSmrg ;; 30491d54945dSmrg siemens) 30501d54945dSmrg need_lib_prefix=no 30511d54945dSmrg ;; 30521d54945dSmrg motorola) 30531d54945dSmrg need_lib_prefix=no 30541d54945dSmrg need_version=no 30551d54945dSmrg shlibpath_overrides_runpath=no 30561d54945dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30571d54945dSmrg ;; 30581d54945dSmrg esac 30591d54945dSmrg ;; 30601d54945dSmrg 30611d54945dSmrgsysv4*MP*) 30627322289dSmrg if test -d /usr/nec; then 3063d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 30647322289dSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30657322289dSmrg soname_spec='$libname$shared_ext.$major' 30661d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30671d54945dSmrg fi 30681d54945dSmrg ;; 30691d54945dSmrg 30701d54945dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30717322289dSmrg version_type=sco 30721d54945dSmrg need_lib_prefix=no 30731d54945dSmrg need_version=no 30747322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30757322289dSmrg soname_spec='$libname$release$shared_ext$major' 30761d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 3077d769e936Smrg shlibpath_overrides_runpath=yes 30781d54945dSmrg hardcode_into_libs=yes 30797322289dSmrg if test yes = "$with_gnu_ld"; then 30801d54945dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30811d54945dSmrg else 30821d54945dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30831d54945dSmrg case $host_os in 30841d54945dSmrg sco3.2v5*) 30851d54945dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30861d54945dSmrg ;; 30871d54945dSmrg esac 30881d54945dSmrg fi 30891d54945dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 30901d54945dSmrg ;; 30911d54945dSmrg 3092d769e936Smrgtpf*) 3093d769e936Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3094d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 3095d769e936Smrg need_lib_prefix=no 3096d769e936Smrg need_version=no 30977322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3098d769e936Smrg shlibpath_var=LD_LIBRARY_PATH 3099d769e936Smrg shlibpath_overrides_runpath=no 3100d769e936Smrg hardcode_into_libs=yes 3101d769e936Smrg ;; 3102d769e936Smrg 31031d54945dSmrguts4*) 3104d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 31057322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31067322289dSmrg soname_spec='$libname$release$shared_ext$major' 31071d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 31081d54945dSmrg ;; 31091d54945dSmrg 31101d54945dSmrg*) 31111d54945dSmrg dynamic_linker=no 31121d54945dSmrg ;; 31131d54945dSmrgesac 31141d54945dSmrgAC_MSG_RESULT([$dynamic_linker]) 31157322289dSmrgtest no = "$dynamic_linker" && can_build_shared=no 31161d54945dSmrg 31171d54945dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31187322289dSmrgif test yes = "$GCC"; then 31191d54945dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31201d54945dSmrgfi 3121ec713c28Smrg 31227322289dSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31237322289dSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3124d769e936Smrgfi 31257322289dSmrg 31267322289dSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31277322289dSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3128ec713c28Smrgfi 3129ec713c28Smrg 31307322289dSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31317322289dSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31327322289dSmrg 31337322289dSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31347322289dSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31357322289dSmrg 31367322289dSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31377322289dSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31387322289dSmrg 3139d769e936Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3140d769e936Smrg [Variables whose values should be saved in libtool wrapper scripts and 3141d769e936Smrg restored at link time]) 3142d769e936Smrg_LT_DECL([], [need_lib_prefix], [0], 3143d769e936Smrg [Do we need the "lib" prefix for modules?]) 3144d769e936Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3145d769e936Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3146d769e936Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3147d769e936Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3148d769e936Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3149d769e936Smrg [Is shlibpath searched before the hard-coded library search path?]) 3150d769e936Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3151d769e936Smrg_LT_DECL([], [library_names_spec], [1], 3152d769e936Smrg [[List of archive names. First name is the real one, the rest are links. 3153d769e936Smrg The last name is the one that the linker finds with -lNAME]]) 3154d769e936Smrg_LT_DECL([], [soname_spec], [1], 3155d769e936Smrg [[The coded name of the library, if different from the real name]]) 3156d769e936Smrg_LT_DECL([], [install_override_mode], [1], 3157d769e936Smrg [Permission mode override for installation of shared libraries]) 3158d769e936Smrg_LT_DECL([], [postinstall_cmds], [2], 3159d769e936Smrg [Command to use after installation of a shared archive]) 3160d769e936Smrg_LT_DECL([], [postuninstall_cmds], [2], 3161d769e936Smrg [Command to use after uninstallation of a shared archive]) 3162d769e936Smrg_LT_DECL([], [finish_cmds], [2], 3163d769e936Smrg [Commands used to finish a libtool library installation in a directory]) 3164d769e936Smrg_LT_DECL([], [finish_eval], [1], 3165d769e936Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3166d769e936Smrg not shown]]) 3167d769e936Smrg_LT_DECL([], [hardcode_into_libs], [0], 3168d769e936Smrg [Whether we should hardcode library paths into libraries]) 3169d769e936Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3170d769e936Smrg [Compile-time system search path for libraries]) 31717322289dSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31727322289dSmrg [Detected run-time system search path for libraries]) 31737322289dSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31747322289dSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3175d769e936Smrg])# _LT_SYS_DYNAMIC_LINKER 3176d769e936Smrg 3177d769e936Smrg 3178d769e936Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3179ec713c28Smrg# -------------------------- 31807322289dSmrg# find a file program that can recognize shared library 3181d769e936SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3182d769e936Smrg[m4_require([_LT_DECL_EGREP])dnl 3183ec713c28SmrgAC_MSG_CHECKING([for $1]) 3184ec713c28SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3185ec713c28Smrg[case $MAGIC_CMD in 31861d54945dSmrg[[\\/*] | ?:[\\/]*]) 31877322289dSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31881d54945dSmrg ;; 31891d54945dSmrg*) 31907322289dSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 31917322289dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31921d54945dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 31931d54945dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 31941d54945dSmrgdnl not every word. This closes a longstanding sh security hole. 3195d769e936Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 31961d54945dSmrg for ac_dir in $ac_dummy; do 31977322289dSmrg IFS=$lt_save_ifs 31981d54945dSmrg test -z "$ac_dir" && ac_dir=. 31997322289dSmrg if test -f "$ac_dir/$1"; then 32007322289dSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32011d54945dSmrg if test -n "$file_magic_test_file"; then 32021d54945dSmrg case $deplibs_check_method in 32031d54945dSmrg "file_magic "*) 32041d54945dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32057322289dSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32061d54945dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32071d54945dSmrg $EGREP "$file_magic_regex" > /dev/null; then 32081d54945dSmrg : 32091d54945dSmrg else 3210d769e936Smrg cat <<_LT_EOF 1>&2 32111d54945dSmrg 32121d54945dSmrg*** Warning: the command libtool uses to detect shared libraries, 32131d54945dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32141d54945dSmrg*** The result is that libtool may fail to recognize shared libraries 32151d54945dSmrg*** as such. This will affect the creation of libtool libraries that 32161d54945dSmrg*** depend on shared libraries, but programs linked with such libtool 32171d54945dSmrg*** libraries will work regardless of this problem. Nevertheless, you 32181d54945dSmrg*** may want to report the problem to your system manager and/or to 32191d54945dSmrg*** bug-libtool@gnu.org 32201d54945dSmrg 3221d769e936Smrg_LT_EOF 32221d54945dSmrg fi ;; 32231d54945dSmrg esac 32241d54945dSmrg fi 32251d54945dSmrg break 32261d54945dSmrg fi 32271d54945dSmrg done 32287322289dSmrg IFS=$lt_save_ifs 32297322289dSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 32301d54945dSmrg ;; 32311d54945dSmrgesac]) 32327322289dSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32331d54945dSmrgif test -n "$MAGIC_CMD"; then 32341d54945dSmrg AC_MSG_RESULT($MAGIC_CMD) 32351d54945dSmrgelse 32361d54945dSmrg AC_MSG_RESULT(no) 32371d54945dSmrgfi 3238d769e936Smrg_LT_DECL([], [MAGIC_CMD], [0], 3239d769e936Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3240d769e936Smrg])# _LT_PATH_TOOL_PREFIX 32411d54945dSmrg 3242d769e936Smrg# Old name: 3243d769e936SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3244d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3245d769e936Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3246786a6f21Smrg 3247d769e936Smrg 3248d769e936Smrg# _LT_PATH_MAGIC 3249d769e936Smrg# -------------- 32507322289dSmrg# find a file program that can recognize a shared library 3251d769e936Smrgm4_defun([_LT_PATH_MAGIC], 3252d769e936Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32531d54945dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32541d54945dSmrg if test -n "$ac_tool_prefix"; then 3255d769e936Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32561d54945dSmrg else 32571d54945dSmrg MAGIC_CMD=: 32581d54945dSmrg fi 32591d54945dSmrgfi 3260d769e936Smrg])# _LT_PATH_MAGIC 32611d54945dSmrg 32621d54945dSmrg 3263d769e936Smrg# LT_PATH_LD 32641d54945dSmrg# ---------- 32651d54945dSmrg# find the pathname to the GNU or non-GNU linker 3266d769e936SmrgAC_DEFUN([LT_PATH_LD], 3267d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3268ec713c28SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3269ec713c28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3270d769e936Smrgm4_require([_LT_DECL_SED])dnl 3271d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 3272d769e936Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3273d769e936Smrg 3274d769e936SmrgAC_ARG_WITH([gnu-ld], 3275d769e936Smrg [AS_HELP_STRING([--with-gnu-ld], 3276d769e936Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32777322289dSmrg [test no = "$withval" || with_gnu_ld=yes], 3278d769e936Smrg [with_gnu_ld=no])dnl 3279d769e936Smrg 32801d54945dSmrgac_prog=ld 32817322289dSmrgif test yes = "$GCC"; then 32821d54945dSmrg # Check if gcc -print-prog-name=ld gives a path. 32831d54945dSmrg AC_MSG_CHECKING([for ld used by $CC]) 32841d54945dSmrg case $host in 32851d54945dSmrg *-*-mingw*) 32867322289dSmrg # gcc leaves a trailing carriage return, which upsets mingw 32871d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32881d54945dSmrg *) 32891d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32901d54945dSmrg esac 32911d54945dSmrg case $ac_prog in 32921d54945dSmrg # Accept absolute paths. 32931d54945dSmrg [[\\/]]* | ?:[[\\/]]*) 32941d54945dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 32951d54945dSmrg # Canonicalize the pathname of ld 3296d769e936Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3297d769e936Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3298d769e936Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 32991d54945dSmrg done 33007322289dSmrg test -z "$LD" && LD=$ac_prog 33011d54945dSmrg ;; 33021d54945dSmrg "") 33031d54945dSmrg # If it fails, then pretend we aren't using GCC. 33041d54945dSmrg ac_prog=ld 33051d54945dSmrg ;; 33061d54945dSmrg *) 33071d54945dSmrg # If it is relative, then search for the first ld in PATH. 33081d54945dSmrg with_gnu_ld=unknown 33091d54945dSmrg ;; 33101d54945dSmrg esac 33117322289dSmrgelif test yes = "$with_gnu_ld"; then 33121d54945dSmrg AC_MSG_CHECKING([for GNU ld]) 33131d54945dSmrgelse 33141d54945dSmrg AC_MSG_CHECKING([for non-GNU ld]) 33151d54945dSmrgfi 33161d54945dSmrgAC_CACHE_VAL(lt_cv_path_LD, 33171d54945dSmrg[if test -z "$LD"; then 33187322289dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33191d54945dSmrg for ac_dir in $PATH; do 33207322289dSmrg IFS=$lt_save_ifs 33211d54945dSmrg test -z "$ac_dir" && ac_dir=. 33221d54945dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33237322289dSmrg lt_cv_path_LD=$ac_dir/$ac_prog 33241d54945dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 33251d54945dSmrg # but apparently some variants of GNU ld only accept -v. 33261d54945dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 33271d54945dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33281d54945dSmrg *GNU* | *'with BFD'*) 33297322289dSmrg test no != "$with_gnu_ld" && break 33301d54945dSmrg ;; 33311d54945dSmrg *) 33327322289dSmrg test yes != "$with_gnu_ld" && break 33331d54945dSmrg ;; 33341d54945dSmrg esac 33351d54945dSmrg fi 33361d54945dSmrg done 33377322289dSmrg IFS=$lt_save_ifs 33381d54945dSmrgelse 33397322289dSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33401d54945dSmrgfi]) 33417322289dSmrgLD=$lt_cv_path_LD 33421d54945dSmrgif test -n "$LD"; then 33431d54945dSmrg AC_MSG_RESULT($LD) 33441d54945dSmrgelse 33451d54945dSmrg AC_MSG_RESULT(no) 33461d54945dSmrgfi 33471d54945dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3348d769e936Smrg_LT_PATH_LD_GNU 3349d769e936SmrgAC_SUBST([LD]) 33501d54945dSmrg 3351d769e936Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3352d769e936Smrg])# LT_PATH_LD 33531d54945dSmrg 3354d769e936Smrg# Old names: 3355d769e936SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3356d769e936SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3357d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3358d769e936Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3359d769e936Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3360d769e936Smrg 3361d769e936Smrg 3362d769e936Smrg# _LT_PATH_LD_GNU 3363d769e936Smrg#- -------------- 3364d769e936Smrgm4_defun([_LT_PATH_LD_GNU], 3365d769e936Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33661d54945dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33671d54945dSmrgcase `$LD -v 2>&1 </dev/null` in 33681d54945dSmrg*GNU* | *'with BFD'*) 33691d54945dSmrg lt_cv_prog_gnu_ld=yes 33701d54945dSmrg ;; 33711d54945dSmrg*) 33721d54945dSmrg lt_cv_prog_gnu_ld=no 33731d54945dSmrg ;; 33741d54945dSmrgesac]) 33751d54945dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3376d769e936Smrg])# _LT_PATH_LD_GNU 33771d54945dSmrg 33781d54945dSmrg 3379d769e936Smrg# _LT_CMD_RELOAD 3380d769e936Smrg# -------------- 33811d54945dSmrg# find reload flag for linker 33821d54945dSmrg# -- PORTME Some linkers may need a different reload flag. 3383d769e936Smrgm4_defun([_LT_CMD_RELOAD], 33841d54945dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 33851d54945dSmrg lt_cv_ld_reload_flag, 33861d54945dSmrg [lt_cv_ld_reload_flag='-r']) 33871d54945dSmrgreload_flag=$lt_cv_ld_reload_flag 33881d54945dSmrgcase $reload_flag in 33891d54945dSmrg"" | " "*) ;; 33901d54945dSmrg*) reload_flag=" $reload_flag" ;; 33911d54945dSmrgesac 33921d54945dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 33931d54945dSmrgcase $host_os in 3394d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 33957322289dSmrg if test yes != "$GCC"; then 3396d769e936Smrg reload_cmds=false 3397d769e936Smrg fi 3398d769e936Smrg ;; 33991d54945dSmrg darwin*) 34007322289dSmrg if test yes = "$GCC"; then 34017322289dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34021d54945dSmrg else 34031d54945dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34041d54945dSmrg fi 34051d54945dSmrg ;; 34061d54945dSmrgesac 3407d769e936Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3408d769e936Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3409d769e936Smrg])# _LT_CMD_RELOAD 34101d54945dSmrg 34111d54945dSmrg 34127322289dSmrg# _LT_PATH_DD 34137322289dSmrg# ----------- 34147322289dSmrg# find a working dd 34157322289dSmrgm4_defun([_LT_PATH_DD], 34167322289dSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34177322289dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34187322289dSmrgcat conftest.i conftest.i >conftest2.i 34197322289dSmrg: ${lt_DD:=$DD} 34207322289dSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34217322289dSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34227322289dSmrg cmp -s conftest.i conftest.out \ 34237322289dSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34247322289dSmrgfi]) 34257322289dSmrgrm -f conftest.i conftest2.i conftest.out]) 34267322289dSmrg])# _LT_PATH_DD 34277322289dSmrg 34287322289dSmrg 34297322289dSmrg# _LT_CMD_TRUNCATE 34307322289dSmrg# ---------------- 34317322289dSmrg# find command to truncate a binary pipe 34327322289dSmrgm4_defun([_LT_CMD_TRUNCATE], 34337322289dSmrg[m4_require([_LT_PATH_DD]) 34347322289dSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34357322289dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34367322289dSmrgcat conftest.i conftest.i >conftest2.i 34377322289dSmrglt_cv_truncate_bin= 34387322289dSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34397322289dSmrg cmp -s conftest.i conftest.out \ 34407322289dSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34417322289dSmrgfi 34427322289dSmrgrm -f conftest.i conftest2.i conftest.out 34437322289dSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34447322289dSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34457322289dSmrg [Command to truncate a binary pipe]) 34467322289dSmrg])# _LT_CMD_TRUNCATE 34477322289dSmrg 34487322289dSmrg 3449d769e936Smrg# _LT_CHECK_MAGIC_METHOD 3450d769e936Smrg# ---------------------- 34511d54945dSmrg# how to check for library dependencies 34521d54945dSmrg# -- PORTME fill in with the dynamic library characteristics 3453d769e936Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3454d769e936Smrg[m4_require([_LT_DECL_EGREP]) 3455d769e936Smrgm4_require([_LT_DECL_OBJDUMP]) 3456d769e936SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34571d54945dSmrglt_cv_deplibs_check_method, 34581d54945dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34591d54945dSmrglt_cv_file_magic_test_file= 34601d54945dSmrglt_cv_deplibs_check_method='unknown' 34611d54945dSmrg# Need to set the preceding variable on all platforms that support 34621d54945dSmrg# interlibrary dependencies. 34631d54945dSmrg# 'none' -- dependencies not supported. 34647322289dSmrg# 'unknown' -- same as none, but documents that we really don't know. 34651d54945dSmrg# 'pass_all' -- all dependencies passed with no checks. 34661d54945dSmrg# 'test_compile' -- check by making test program. 34671d54945dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 34687322289dSmrg# that responds to the $file_magic_cmd with a given extended regex. 34697322289dSmrg# If you have 'file' or equivalent on your system and you're not sure 34707322289dSmrg# whether 'pass_all' will *always* work, you probably want this one. 34711d54945dSmrg 34721d54945dSmrgcase $host_os in 3473ba85709eSmrgaix[[4-9]]*) 34741d54945dSmrg lt_cv_deplibs_check_method=pass_all 34751d54945dSmrg ;; 34761d54945dSmrg 34771d54945dSmrgbeos*) 34781d54945dSmrg lt_cv_deplibs_check_method=pass_all 34791d54945dSmrg ;; 34801d54945dSmrg 34811d54945dSmrgbsdi[[45]]*) 34821d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34831d54945dSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 34841d54945dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 34851d54945dSmrg ;; 34861d54945dSmrg 34871d54945dSmrgcygwin*) 34881d54945dSmrg # func_win32_libid is a shell function defined in ltmain.sh 34891d54945dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34901d54945dSmrg lt_cv_file_magic_cmd='func_win32_libid' 34911d54945dSmrg ;; 34921d54945dSmrg 34931d54945dSmrgmingw* | pw32*) 34941d54945dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3495ba85709eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3496ba85709eSmrg # unless we find 'file', for example because we are cross-compiling. 34977322289dSmrg if ( file / ) >/dev/null 2>&1; then 3498ba85709eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3499ba85709eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3500ba85709eSmrg else 3501d769e936Smrg # Keep this pattern in sync with the one in func_win32_libid. 3502d769e936Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3503ba85709eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3504ba85709eSmrg fi 35051d54945dSmrg ;; 35061d54945dSmrg 3507d769e936Smrgcegcc*) 3508d769e936Smrg # use the weaker test based on 'objdump'. See mingw*. 3509d769e936Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3510d769e936Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3511d769e936Smrg ;; 3512d769e936Smrg 35131d54945dSmrgdarwin* | rhapsody*) 35141d54945dSmrg lt_cv_deplibs_check_method=pass_all 35151d54945dSmrg ;; 35161d54945dSmrg 3517ba85709eSmrgfreebsd* | dragonfly*) 3518d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35191d54945dSmrg case $host_cpu in 35201d54945dSmrg i*86 ) 35211d54945dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 35221d54945dSmrg # Let's accept both of them until this is cleared up. 35231d54945dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35241d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 35251d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35261d54945dSmrg ;; 35271d54945dSmrg esac 35281d54945dSmrg else 35291d54945dSmrg lt_cv_deplibs_check_method=pass_all 35301d54945dSmrg fi 35311d54945dSmrg ;; 35321d54945dSmrg 3533d769e936Smrghaiku*) 3534d769e936Smrg lt_cv_deplibs_check_method=pass_all 3535d769e936Smrg ;; 3536d769e936Smrg 35371d54945dSmrghpux10.20* | hpux11*) 35381d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 35391d54945dSmrg case $host_cpu in 35401d54945dSmrg ia64*) 35411d54945dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35421d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35431d54945dSmrg ;; 35441d54945dSmrg hppa*64*) 3545d769e936Smrg [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]'] 35461d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35471d54945dSmrg ;; 35481d54945dSmrg *) 3549d769e936Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35501d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35511d54945dSmrg ;; 35521d54945dSmrg esac 35531d54945dSmrg ;; 35541d54945dSmrg 3555ba85709eSmrginterix[[3-9]]*) 35561d54945dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35571d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35581d54945dSmrg ;; 35591d54945dSmrg 35601d54945dSmrgirix5* | irix6* | nonstopux*) 35611d54945dSmrg case $LD in 35621d54945dSmrg *-32|*"-32 ") libmagic=32-bit;; 35631d54945dSmrg *-n32|*"-n32 ") libmagic=N32;; 35641d54945dSmrg *-64|*"-64 ") libmagic=64-bit;; 35651d54945dSmrg *) libmagic=never-match;; 35661d54945dSmrg esac 35671d54945dSmrg lt_cv_deplibs_check_method=pass_all 35681d54945dSmrg ;; 35691d54945dSmrg 3570d769e936Smrg# This must be glibc/ELF. 35717322289dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35721d54945dSmrg lt_cv_deplibs_check_method=pass_all 35731d54945dSmrg ;; 35741d54945dSmrg 3575024581f2Smrgnetbsd* | netbsdelf*-gnu) 3576d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35771d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35781d54945dSmrg else 35791d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35801d54945dSmrg fi 35811d54945dSmrg ;; 35821d54945dSmrg 35831d54945dSmrgnewos6*) 35841d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35851d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 35861d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35871d54945dSmrg ;; 35881d54945dSmrg 3589d769e936Smrg*nto* | *qnx*) 3590d769e936Smrg lt_cv_deplibs_check_method=pass_all 35911d54945dSmrg ;; 35921d54945dSmrg 35937322289dSmrgopenbsd* | bitrig*) 35947322289dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 35951d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35961d54945dSmrg else 35971d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35981d54945dSmrg fi 35991d54945dSmrg ;; 36001d54945dSmrg 36011d54945dSmrgosf3* | osf4* | osf5*) 36021d54945dSmrg lt_cv_deplibs_check_method=pass_all 36031d54945dSmrg ;; 36041d54945dSmrg 3605ba85709eSmrgrdos*) 3606ba85709eSmrg lt_cv_deplibs_check_method=pass_all 3607ba85709eSmrg ;; 3608ba85709eSmrg 36091d54945dSmrgsolaris*) 36101d54945dSmrg lt_cv_deplibs_check_method=pass_all 36111d54945dSmrg ;; 36121d54945dSmrg 3613d769e936Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3614d769e936Smrg lt_cv_deplibs_check_method=pass_all 3615d769e936Smrg ;; 3616d769e936Smrg 36171d54945dSmrgsysv4 | sysv4.3*) 36181d54945dSmrg case $host_vendor in 36191d54945dSmrg motorola) 36201d54945dSmrg 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]]' 36211d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36221d54945dSmrg ;; 36231d54945dSmrg ncr) 36241d54945dSmrg lt_cv_deplibs_check_method=pass_all 36251d54945dSmrg ;; 36261d54945dSmrg sequent) 36271d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 36281d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36291d54945dSmrg ;; 36301d54945dSmrg sni) 36311d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 36321d54945dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36331d54945dSmrg lt_cv_file_magic_test_file=/lib/libc.so 36341d54945dSmrg ;; 36351d54945dSmrg siemens) 36361d54945dSmrg lt_cv_deplibs_check_method=pass_all 36371d54945dSmrg ;; 36381d54945dSmrg pc) 36391d54945dSmrg lt_cv_deplibs_check_method=pass_all 36401d54945dSmrg ;; 36411d54945dSmrg esac 36421d54945dSmrg ;; 36431d54945dSmrg 3644d769e936Smrgtpf*) 36451d54945dSmrg lt_cv_deplibs_check_method=pass_all 36461d54945dSmrg ;; 36477322289dSmrgos2*) 36487322289dSmrg lt_cv_deplibs_check_method=pass_all 36497322289dSmrg ;; 36501d54945dSmrgesac 36511d54945dSmrg]) 3652d769e936Smrg 3653d769e936Smrgfile_magic_glob= 3654d769e936Smrgwant_nocaseglob=no 3655d769e936Smrgif test "$build" = "$host"; then 3656d769e936Smrg case $host_os in 3657d769e936Smrg mingw* | pw32*) 3658d769e936Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3659d769e936Smrg want_nocaseglob=yes 3660d769e936Smrg else 3661d769e936Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3662d769e936Smrg fi 3663d769e936Smrg ;; 3664d769e936Smrg esac 3665d769e936Smrgfi 3666d769e936Smrg 36671d54945dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 36681d54945dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 36691d54945dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36701d54945dSmrg 3671d769e936Smrg_LT_DECL([], [deplibs_check_method], [1], 3672d769e936Smrg [Method to check whether dependent libraries are shared objects]) 3673d769e936Smrg_LT_DECL([], [file_magic_cmd], [1], 3674d769e936Smrg [Command to use when deplibs_check_method = "file_magic"]) 3675d769e936Smrg_LT_DECL([], [file_magic_glob], [1], 3676d769e936Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3677d769e936Smrg_LT_DECL([], [want_nocaseglob], [1], 3678d769e936Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3679d769e936Smrg])# _LT_CHECK_MAGIC_METHOD 36801d54945dSmrg 3681d769e936Smrg 3682d769e936Smrg# LT_PATH_NM 36831d54945dSmrg# ---------- 3684d769e936Smrg# find the pathname to a BSD- or MS-compatible name lister 3685d769e936SmrgAC_DEFUN([LT_PATH_NM], 3686d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3687d769e936SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36881d54945dSmrg[if test -n "$NM"; then 36891d54945dSmrg # Let the user override the test. 36907322289dSmrg lt_cv_path_NM=$NM 36911d54945dSmrgelse 36927322289dSmrg lt_nm_to_check=${ac_tool_prefix}nm 3693ba85709eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36941d54945dSmrg lt_nm_to_check="$lt_nm_to_check nm" 36951d54945dSmrg fi 36961d54945dSmrg for lt_tmp_nm in $lt_nm_to_check; do 36977322289dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 36981d54945dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 36997322289dSmrg IFS=$lt_save_ifs 37001d54945dSmrg test -z "$ac_dir" && ac_dir=. 37017322289dSmrg tmp_nm=$ac_dir/$lt_tmp_nm 37027322289dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37031d54945dSmrg # Check to see if the nm accepts a BSD-compat flag. 37047322289dSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37051d54945dSmrg # nm: unknown option "B" ignored 37061d54945dSmrg # Tru64's nm complains that /dev/null is an invalid object file 37077322289dSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37087322289dSmrg case $build_os in 37097322289dSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37107322289dSmrg *) lt_bad_file=/dev/null ;; 37117322289dSmrg esac 37127322289dSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 37137322289dSmrg *$lt_bad_file* | *'Invalid file or object type'*) 37141d54945dSmrg lt_cv_path_NM="$tmp_nm -B" 37157322289dSmrg break 2 37161d54945dSmrg ;; 37171d54945dSmrg *) 37181d54945dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 37191d54945dSmrg */dev/null*) 37201d54945dSmrg lt_cv_path_NM="$tmp_nm -p" 37217322289dSmrg break 2 37221d54945dSmrg ;; 37231d54945dSmrg *) 37241d54945dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37251d54945dSmrg continue # so that we can try to find one that supports BSD flags 37261d54945dSmrg ;; 37271d54945dSmrg esac 37281d54945dSmrg ;; 37291d54945dSmrg esac 37301d54945dSmrg fi 37311d54945dSmrg done 37327322289dSmrg IFS=$lt_save_ifs 37331d54945dSmrg done 3734d769e936Smrg : ${lt_cv_path_NM=no} 37351d54945dSmrgfi]) 37367322289dSmrgif test no != "$lt_cv_path_NM"; then 37377322289dSmrg NM=$lt_cv_path_NM 3738d769e936Smrgelse 3739d769e936Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3740d769e936Smrg if test -n "$DUMPBIN"; then : 3741d769e936Smrg # Let the user override the test. 3742d769e936Smrg else 3743d769e936Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37447322289dSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3745d769e936Smrg *COFF*) 37467322289dSmrg DUMPBIN="$DUMPBIN -symbols -headers" 3747d769e936Smrg ;; 3748d769e936Smrg *) 3749d769e936Smrg DUMPBIN=: 3750d769e936Smrg ;; 3751d769e936Smrg esac 3752d769e936Smrg fi 3753d769e936Smrg AC_SUBST([DUMPBIN]) 37547322289dSmrg if test : != "$DUMPBIN"; then 37557322289dSmrg NM=$DUMPBIN 3756d769e936Smrg fi 3757d769e936Smrgfi 3758d769e936Smrgtest -z "$NM" && NM=nm 3759d769e936SmrgAC_SUBST([NM]) 3760d769e936Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3761d769e936Smrg 3762d769e936SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3763d769e936Smrg [lt_cv_nm_interface="BSD nm" 3764d769e936Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3765d769e936Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3766d769e936Smrg (eval "$ac_compile" 2>conftest.err) 3767d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3768d769e936Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3769d769e936Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3770d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3771d769e936Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3772d769e936Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3773d769e936Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3774d769e936Smrg lt_cv_nm_interface="MS dumpbin" 3775d769e936Smrg fi 3776d769e936Smrg rm -f conftest*]) 3777d769e936Smrg])# LT_PATH_NM 3778d769e936Smrg 3779d769e936Smrg# Old names: 3780d769e936SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3781d769e936SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3782d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3783d769e936Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3784d769e936Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3785d769e936Smrg 3786d769e936Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3787d769e936Smrg# -------------------------------- 3788d769e936Smrg# how to determine the name of the shared library 3789d769e936Smrg# associated with a specific link library. 3790d769e936Smrg# -- PORTME fill in with the dynamic library characteristics 3791d769e936Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3792d769e936Smrg[m4_require([_LT_DECL_EGREP]) 3793d769e936Smrgm4_require([_LT_DECL_OBJDUMP]) 3794d769e936Smrgm4_require([_LT_DECL_DLLTOOL]) 3795d769e936SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3796d769e936Smrglt_cv_sharedlib_from_linklib_cmd, 3797d769e936Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37981d54945dSmrg 3799d769e936Smrgcase $host_os in 3800d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 38017322289dSmrg # two different shell functions defined in ltmain.sh; 38027322289dSmrg # decide which one to use based on capabilities of $DLLTOOL 3803d769e936Smrg case `$DLLTOOL --help 2>&1` in 3804d769e936Smrg *--identify-strict*) 3805d769e936Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3806d769e936Smrg ;; 3807d769e936Smrg *) 3808d769e936Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3809d769e936Smrg ;; 3810d769e936Smrg esac 3811d769e936Smrg ;; 3812d769e936Smrg*) 3813d769e936Smrg # fallback: assume linklib IS sharedlib 38147322289dSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3815d769e936Smrg ;; 3816d769e936Smrgesac 3817d769e936Smrg]) 3818d769e936Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3819d769e936Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3820786a6f21Smrg 3821d769e936Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3822d769e936Smrg [Command to associate shared and link libraries]) 3823d769e936Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3824d769e936Smrg 3825d769e936Smrg 3826d769e936Smrg# _LT_PATH_MANIFEST_TOOL 3827d769e936Smrg# ---------------------- 3828d769e936Smrg# locate the manifest tool 3829d769e936Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3830d769e936Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3831d769e936Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3832d769e936SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3833d769e936Smrg [lt_cv_path_mainfest_tool=no 3834d769e936Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3835d769e936Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3836d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3837d769e936Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3838d769e936Smrg lt_cv_path_mainfest_tool=yes 3839d769e936Smrg fi 3840d769e936Smrg rm -f conftest*]) 38417322289dSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 3842d769e936Smrg MANIFEST_TOOL=: 3843d769e936Smrgfi 3844d769e936Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3845d769e936Smrg])# _LT_PATH_MANIFEST_TOOL 3846d769e936Smrg 3847d769e936Smrg 38487322289dSmrg# _LT_DLL_DEF_P([FILE]) 38497322289dSmrg# --------------------- 38507322289dSmrg# True iff FILE is a Windows DLL '.def' file. 38517322289dSmrg# Keep in sync with func_dll_def_p in the libtool script 38527322289dSmrgAC_DEFUN([_LT_DLL_DEF_P], 38537322289dSmrg[dnl 38547322289dSmrg test DEF = "`$SED -n dnl 38557322289dSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38567322289dSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38577322289dSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38587322289dSmrg -e q dnl Only consider the first "real" line 38597322289dSmrg $1`" dnl 38607322289dSmrg])# _LT_DLL_DEF_P 38617322289dSmrg 38627322289dSmrg 3863d769e936Smrg# LT_LIB_M 3864d769e936Smrg# -------- 38651d54945dSmrg# check for math library 3866d769e936SmrgAC_DEFUN([LT_LIB_M], 38671d54945dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38681d54945dSmrgLIBM= 38691d54945dSmrgcase $host in 3870d769e936Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38711d54945dSmrg # These system don't have libm, or don't need it 38721d54945dSmrg ;; 38731d54945dSmrg*-ncr-sysv4.3*) 38747322289dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38751d54945dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38761d54945dSmrg ;; 38771d54945dSmrg*) 38787322289dSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38791d54945dSmrg ;; 38801d54945dSmrgesac 3881d769e936SmrgAC_SUBST([LIBM]) 3882d769e936Smrg])# LT_LIB_M 38831d54945dSmrg 3884d769e936Smrg# Old name: 3885d769e936SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3886d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3887d769e936Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38881d54945dSmrg 38891d54945dSmrg 3890d769e936Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3891d769e936Smrg# ------------------------------- 3892d769e936Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3893d769e936Smrg[m4_require([_LT_TAG_COMPILER])dnl 38941d54945dSmrg 3895d769e936Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38961d54945dSmrg 38977322289dSmrgif test yes = "$GCC"; then 3898d769e936Smrg case $cc_basename in 3899d769e936Smrg nvcc*) 3900d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3901d769e936Smrg *) 3902d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3903d769e936Smrg esac 39041d54945dSmrg 3905d769e936Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3906d769e936Smrg lt_cv_prog_compiler_rtti_exceptions, 3907d769e936Smrg [-fno-rtti -fno-exceptions], [], 3908d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3909ec713c28Smrgfi 3910d769e936Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3911d769e936Smrg [Compiler flag to turn off builtin functions]) 3912d769e936Smrg])# _LT_COMPILER_NO_RTTI 39131d54945dSmrg 39141d54945dSmrg 3915d769e936Smrg# _LT_CMD_GLOBAL_SYMBOLS 3916d769e936Smrg# ---------------------- 3917d769e936Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3918d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3919d769e936SmrgAC_REQUIRE([AC_PROG_CC])dnl 3920d769e936SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3921d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 3922d769e936SmrgAC_REQUIRE([LT_PATH_LD])dnl 3923d769e936Smrgm4_require([_LT_DECL_SED])dnl 3924d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 3925d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 3926ec713c28Smrg 3927d769e936Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3928d769e936SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3929d769e936SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3930d769e936Smrg[ 3931d769e936Smrg# These are sane defaults that work on at least a few old systems. 3932d769e936Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3933ec713c28Smrg 3934d769e936Smrg# Character class describing NM global symbol codes. 3935d769e936Smrgsymcode='[[BCDEGRST]]' 3936ec713c28Smrg 3937d769e936Smrg# Regexp to match symbols that can be accessed directly from C. 3938d769e936Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3939ec713c28Smrg 3940d769e936Smrg# Define system-specific variables. 3941ec713c28Smrgcase $host_os in 3942d769e936Smrgaix*) 3943d769e936Smrg symcode='[[BCDT]]' 3944ec713c28Smrg ;; 3945d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 3946d769e936Smrg symcode='[[ABCDGISTW]]' 3947d769e936Smrg ;; 3948d769e936Smrghpux*) 39497322289dSmrg if test ia64 = "$host_cpu"; then 3950d769e936Smrg symcode='[[ABCDEGRST]]' 3951ec713c28Smrg fi 3952d769e936Smrg ;; 3953d769e936Smrgirix* | nonstopux*) 3954d769e936Smrg symcode='[[BCDEGRST]]' 3955d769e936Smrg ;; 3956d769e936Smrgosf*) 3957d769e936Smrg symcode='[[BCDEGQRST]]' 3958d769e936Smrg ;; 3959d769e936Smrgsolaris*) 3960d769e936Smrg symcode='[[BDRT]]' 3961d769e936Smrg ;; 3962d769e936Smrgsco3.2v5*) 3963d769e936Smrg symcode='[[DT]]' 3964d769e936Smrg ;; 3965d769e936Smrgsysv4.2uw2*) 3966d769e936Smrg symcode='[[DT]]' 3967d769e936Smrg ;; 3968d769e936Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3969d769e936Smrg symcode='[[ABDT]]' 3970d769e936Smrg ;; 3971d769e936Smrgsysv4) 3972d769e936Smrg symcode='[[DFNSTU]]' 3973d769e936Smrg ;; 3974ec713c28Smrgesac 3975ec713c28Smrg 3976d769e936Smrg# If we're using GNU nm, then use its standard symbol codes. 3977d769e936Smrgcase `$NM -V 2>&1` in 3978d769e936Smrg*GNU* | *'with BFD'*) 3979d769e936Smrg symcode='[[ABCDGIRSTW]]' ;; 3980d769e936Smrgesac 3981ec713c28Smrg 39827322289dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39837322289dSmrg # Gets list of data symbols to import. 39847322289dSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 39857322289dSmrg # Adjust the below global symbol transforms to fixup imported variables. 39867322289dSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39877322289dSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 39887322289dSmrg lt_c_name_lib_hook="\ 39897322289dSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 39907322289dSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39917322289dSmrgelse 39927322289dSmrg # Disable hooks by default. 39937322289dSmrg lt_cv_sys_global_symbol_to_import= 39947322289dSmrg lt_cdecl_hook= 39957322289dSmrg lt_c_name_hook= 39967322289dSmrg lt_c_name_lib_hook= 39977322289dSmrgfi 39987322289dSmrg 3999d769e936Smrg# Transform an extracted symbol line into a proper C declaration. 4000d769e936Smrg# Some systems (esp. on ia64) link data and code symbols differently, 4001d769e936Smrg# so use this general approach. 40027322289dSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 40037322289dSmrg$lt_cdecl_hook\ 40047322289dSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40057322289dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4006ec713c28Smrg 4007d769e936Smrg# Transform an extracted symbol line into symbol name and symbol address 40087322289dSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 40097322289dSmrg$lt_c_name_hook\ 40107322289dSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40117322289dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40127322289dSmrg 40137322289dSmrg# Transform an extracted symbol line into symbol name with lib prefix and 40147322289dSmrg# symbol address. 40157322289dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 40167322289dSmrg$lt_c_name_lib_hook\ 40177322289dSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40187322289dSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40197322289dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4020ec713c28Smrg 4021d769e936Smrg# Handle CRLF in mingw tool chain 4022d769e936Smrgopt_cr= 4023d769e936Smrgcase $build_os in 4024d769e936Smrgmingw*) 4025d769e936Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4026d769e936Smrg ;; 4027d769e936Smrgesac 4028ec713c28Smrg 4029d769e936Smrg# Try without a prefix underscore, then with it. 4030d769e936Smrgfor ac_symprfx in "" "_"; do 4031ec713c28Smrg 4032d769e936Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4033d769e936Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4034ec713c28Smrg 4035d769e936Smrg # Write the raw and C identifiers. 4036d769e936Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40377322289dSmrg # Fake it for dumpbin and say T for any non-static function, 40387322289dSmrg # D for any global variable and I for any imported variable. 4039d769e936Smrg # Also find C++ and __fastcall symbols from MSVC++, 4040d769e936Smrg # which start with @ or ?. 4041d769e936Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4042d769e936Smrg" {last_section=section; section=\$ 3};"\ 4043d769e936Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4044d769e936Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40457322289dSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40467322289dSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40477322289dSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4048d769e936Smrg" \$ 0!~/External *\|/{next};"\ 4049d769e936Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4050d769e936Smrg" {if(hide[section]) next};"\ 40517322289dSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40527322289dSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40537322289dSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40547322289dSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4055d769e936Smrg" ' prfx=^$ac_symprfx]" 4056d769e936Smrg else 4057d769e936Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4058d769e936Smrg fi 4059d769e936Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4060ec713c28Smrg 4061d769e936Smrg # Check to see that the pipe works correctly. 4062d769e936Smrg pipe_works=no 4063ec713c28Smrg 4064d769e936Smrg rm -f conftest* 4065d769e936Smrg cat > conftest.$ac_ext <<_LT_EOF 4066d769e936Smrg#ifdef __cplusplus 4067d769e936Smrgextern "C" { 4068d769e936Smrg#endif 4069d769e936Smrgchar nm_test_var; 4070d769e936Smrgvoid nm_test_func(void); 4071d769e936Smrgvoid nm_test_func(void){} 4072d769e936Smrg#ifdef __cplusplus 4073d769e936Smrg} 4074d769e936Smrg#endif 4075d769e936Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4076d769e936Smrg_LT_EOF 4077ec713c28Smrg 4078d769e936Smrg if AC_TRY_EVAL(ac_compile); then 4079d769e936Smrg # Now try to grab the symbols. 4080d769e936Smrg nlist=conftest.nm 4081d769e936Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4082d769e936Smrg # Try sorting and uniquifying the output. 4083d769e936Smrg if sort "$nlist" | uniq > "$nlist"T; then 4084d769e936Smrg mv -f "$nlist"T "$nlist" 4085d769e936Smrg else 4086d769e936Smrg rm -f "$nlist"T 4087d769e936Smrg fi 40881d54945dSmrg 4089d769e936Smrg # Make sure that we snagged all the symbols we need. 4090d769e936Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4091d769e936Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4092d769e936Smrg cat <<_LT_EOF > conftest.$ac_ext 4093d769e936Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 40947322289dSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 40957322289dSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4096d769e936Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4097d769e936Smrg# define LT@&t@_DLSYM_CONST 40987322289dSmrg#elif defined __osf__ 4099d769e936Smrg/* This system does not cope well with relocations in const data. */ 4100d769e936Smrg# define LT@&t@_DLSYM_CONST 4101d769e936Smrg#else 4102d769e936Smrg# define LT@&t@_DLSYM_CONST const 4103d769e936Smrg#endif 4104ec713c28Smrg 4105d769e936Smrg#ifdef __cplusplus 4106d769e936Smrgextern "C" { 4107d769e936Smrg#endif 41081d54945dSmrg 4109d769e936Smrg_LT_EOF 4110d769e936Smrg # Now generate the symbol file. 4111d769e936Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41121d54945dSmrg 4113d769e936Smrg cat <<_LT_EOF >> conftest.$ac_ext 41141d54945dSmrg 4115d769e936Smrg/* The mapping between symbol names and symbols. */ 4116d769e936SmrgLT@&t@_DLSYM_CONST struct { 4117d769e936Smrg const char *name; 4118d769e936Smrg void *address; 4119d769e936Smrg} 4120d769e936Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4121d769e936Smrg{ 4122d769e936Smrg { "@PROGRAM@", (void *) 0 }, 4123d769e936Smrg_LT_EOF 41247322289dSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4125d769e936Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4126d769e936Smrg {0, (void *) 0} 4127d769e936Smrg}; 41281d54945dSmrg 4129d769e936Smrg/* This works around a problem in FreeBSD linker */ 4130d769e936Smrg#ifdef FREEBSD_WORKAROUND 4131d769e936Smrgstatic const void *lt_preloaded_setup() { 4132d769e936Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4133d769e936Smrg} 4134d769e936Smrg#endif 41351d54945dSmrg 4136d769e936Smrg#ifdef __cplusplus 4137d769e936Smrg} 4138d769e936Smrg#endif 4139d769e936Smrg_LT_EOF 4140d769e936Smrg # Now try linking the two files. 4141d769e936Smrg mv conftest.$ac_objext conftstm.$ac_objext 4142d769e936Smrg lt_globsym_save_LIBS=$LIBS 4143d769e936Smrg lt_globsym_save_CFLAGS=$CFLAGS 41447322289dSmrg LIBS=conftstm.$ac_objext 4145d769e936Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41467322289dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4147d769e936Smrg pipe_works=yes 4148d769e936Smrg fi 4149d769e936Smrg LIBS=$lt_globsym_save_LIBS 4150d769e936Smrg CFLAGS=$lt_globsym_save_CFLAGS 4151ec713c28Smrg else 4152d769e936Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4153ec713c28Smrg fi 4154ec713c28Smrg else 4155d769e936Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4156ec713c28Smrg fi 4157ec713c28Smrg else 4158d769e936Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4159ec713c28Smrg fi 4160d769e936Smrg else 4161d769e936Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4162d769e936Smrg cat conftest.$ac_ext >&5 4163d769e936Smrg fi 4164d769e936Smrg rm -rf conftest* conftst* 4165ec713c28Smrg 4166d769e936Smrg # Do not use the global_symbol_pipe unless it works. 41677322289dSmrg if test yes = "$pipe_works"; then 4168d769e936Smrg break 4169d769e936Smrg else 4170d769e936Smrg lt_cv_sys_global_symbol_pipe= 4171d769e936Smrg fi 4172d769e936Smrgdone 4173d769e936Smrg]) 4174d769e936Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4175d769e936Smrg lt_cv_sys_global_symbol_to_cdecl= 4176d769e936Smrgfi 4177d769e936Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4178d769e936Smrg AC_MSG_RESULT(failed) 4179d769e936Smrgelse 4180d769e936Smrg AC_MSG_RESULT(ok) 4181d769e936Smrgfi 4182ec713c28Smrg 4183d769e936Smrg# Response file support. 4184d769e936Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4185d769e936Smrg nm_file_list_spec='@' 4186d769e936Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4187d769e936Smrg nm_file_list_spec='@' 4188d769e936Smrgfi 4189ec713c28Smrg 4190d769e936Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4191d769e936Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4192d769e936Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4193d769e936Smrg [Transform the output of nm in a proper C declaration]) 41947322289dSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 41957322289dSmrg [Transform the output of nm into a list of symbols to manually relocate]) 4196d769e936Smrg_LT_DECL([global_symbol_to_c_name_address], 4197d769e936Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4198d769e936Smrg [Transform the output of nm in a C name address pair]) 4199d769e936Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4200d769e936Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4201d769e936Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42027322289dSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42037322289dSmrg [The name lister interface]) 4204d769e936Smrg_LT_DECL([], [nm_file_list_spec], [1], 4205d769e936Smrg [Specify filename containing input files for $NM]) 4206d769e936Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4207d769e936Smrg 4208d769e936Smrg 4209d769e936Smrg# _LT_COMPILER_PIC([TAGNAME]) 4210d769e936Smrg# --------------------------- 4211d769e936Smrgm4_defun([_LT_COMPILER_PIC], 4212d769e936Smrg[m4_require([_LT_TAG_COMPILER])dnl 4213d769e936Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4214d769e936Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4215d769e936Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4216ec713c28Smrg 4217d769e936Smrgm4_if([$1], [CXX], [ 4218d769e936Smrg # C++ specific cases for pic, static, wl, etc. 42197322289dSmrg if test yes = "$GXX"; then 4220d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4221d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4222d769e936Smrg 4223d769e936Smrg case $host_os in 4224d769e936Smrg aix*) 4225d769e936Smrg # All AIX code is PIC. 42267322289dSmrg if test ia64 = "$host_cpu"; then 4227d769e936Smrg # AIX 5 now supports IA64 processor 4228d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42291d54945dSmrg fi 42307322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4231786a6f21Smrg ;; 42321d54945dSmrg 4233d769e936Smrg amigaos*) 4234786a6f21Smrg case $host_cpu in 4235d769e936Smrg powerpc) 4236d769e936Smrg # see comment about AmigaOS4 .so support 4237d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4238d769e936Smrg ;; 4239d769e936Smrg m68k) 4240d769e936Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42417322289dSmrg # adding the '-m68020' flag to GCC prevents building anything better, 42427322289dSmrg # like '-m68040'. 4243d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4244786a6f21Smrg ;; 4245786a6f21Smrg esac 4246ec713c28Smrg ;; 4247ec713c28Smrg 4248d769e936Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4249d769e936Smrg # PIC is the default for these OSes. 4250d769e936Smrg ;; 4251d769e936Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4252d769e936Smrg # This hack is so that the source file can tell whether it is being 4253d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4254d769e936Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4255d769e936Smrg # (--disable-auto-import) libraries 4256d769e936Smrg m4_if([$1], [GCJ], [], 4257d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42587322289dSmrg case $host_os in 42597322289dSmrg os2*) 42607322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42617322289dSmrg ;; 42627322289dSmrg esac 4263d769e936Smrg ;; 4264d769e936Smrg darwin* | rhapsody*) 4265d769e936Smrg # PIC is the default on this platform 4266d769e936Smrg # Common symbols not allowed in MH_DYLIB files 4267d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4268d769e936Smrg ;; 4269d769e936Smrg *djgpp*) 4270d769e936Smrg # DJGPP does not support shared libraries at all 4271d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4272d769e936Smrg ;; 4273d769e936Smrg haiku*) 4274d769e936Smrg # PIC is the default for Haiku. 4275d769e936Smrg # The "-static" flag exists, but is broken. 4276d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4277d769e936Smrg ;; 4278d769e936Smrg interix[[3-9]]*) 4279d769e936Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280d769e936Smrg # Instead, we relocate shared libraries at runtime. 4281d769e936Smrg ;; 4282d769e936Smrg sysv4*MP*) 4283d769e936Smrg if test -d /usr/nec; then 4284d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4285d769e936Smrg fi 4286d769e936Smrg ;; 4287d769e936Smrg hpux*) 4288d769e936Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4289d769e936Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4290d769e936Smrg # sets the default TLS model and affects inlining. 4291d769e936Smrg case $host_cpu in 4292d769e936Smrg hppa*64*) 42931d54945dSmrg ;; 4294ec713c28Smrg *) 4295d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42961d54945dSmrg ;; 4297d769e936Smrg esac 4298d769e936Smrg ;; 4299d769e936Smrg *qnx* | *nto*) 4300d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4301d769e936Smrg # it will coredump. 4302d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4303d769e936Smrg ;; 4304d769e936Smrg *) 4305d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4306d769e936Smrg ;; 4307d769e936Smrg esac 4308d769e936Smrg else 4309d769e936Smrg case $host_os in 4310d769e936Smrg aix[[4-9]]*) 4311d769e936Smrg # All AIX code is PIC. 43127322289dSmrg if test ia64 = "$host_cpu"; then 4313d769e936Smrg # AIX 5 now supports IA64 processor 4314d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4315d769e936Smrg else 4316d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4317d769e936Smrg fi 43181d54945dSmrg ;; 4319d769e936Smrg chorus*) 4320d769e936Smrg case $cc_basename in 4321d769e936Smrg cxch68*) 4322d769e936Smrg # Green Hills C++ Compiler 4323d769e936Smrg # _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" 4324d769e936Smrg ;; 4325d769e936Smrg esac 43261d54945dSmrg ;; 4327d769e936Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4328d769e936Smrg # This hack is so that the source file can tell whether it is being 4329d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4330d769e936Smrg m4_if([$1], [GCJ], [], 4331d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43321d54945dSmrg ;; 4333d769e936Smrg dgux*) 4334d769e936Smrg case $cc_basename in 4335d769e936Smrg ec++*) 4336d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4337d769e936Smrg ;; 4338d769e936Smrg ghcx*) 4339d769e936Smrg # Green Hills C++ Compiler 4340d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4341d769e936Smrg ;; 4342d769e936Smrg *) 4343d769e936Smrg ;; 4344d769e936Smrg esac 43451d54945dSmrg ;; 4346d769e936Smrg freebsd* | dragonfly*) 4347d769e936Smrg # FreeBSD uses GNU C++ 43481d54945dSmrg ;; 4349d769e936Smrg hpux9* | hpux10* | hpux11*) 4350d769e936Smrg case $cc_basename in 4351d769e936Smrg CC*) 4352d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43537322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43547322289dSmrg if test ia64 != "$host_cpu"; then 4355d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4356d769e936Smrg fi 4357d769e936Smrg ;; 4358d769e936Smrg aCC*) 4359d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43607322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4361d769e936Smrg case $host_cpu in 4362d769e936Smrg hppa*64*|ia64*) 4363d769e936Smrg # +Z the default 4364d769e936Smrg ;; 4365d769e936Smrg *) 4366d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4367d769e936Smrg ;; 4368d769e936Smrg esac 4369d769e936Smrg ;; 4370d769e936Smrg *) 4371d769e936Smrg ;; 4372d769e936Smrg esac 43731d54945dSmrg ;; 4374d769e936Smrg interix*) 4375d769e936Smrg # This is c89, which is MS Visual C++ (no shared libs) 4376d769e936Smrg # Anyone wants to do a port? 43771d54945dSmrg ;; 4378d769e936Smrg irix5* | irix6* | nonstopux*) 4379d769e936Smrg case $cc_basename in 4380d769e936Smrg CC*) 4381d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4382d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4383d769e936Smrg # CC pic flag -KPIC is the default. 4384d769e936Smrg ;; 4385d769e936Smrg *) 4386d769e936Smrg ;; 4387d769e936Smrg esac 4388ec713c28Smrg ;; 43897322289dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4390d769e936Smrg case $cc_basename in 4391d769e936Smrg KCC*) 4392d769e936Smrg # KAI C++ Compiler 4393d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4394d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4395d769e936Smrg ;; 4396d769e936Smrg ecpc* ) 43977322289dSmrg # old Intel C++ for x86_64, which still supported -KPIC. 4398d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4400d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4401d769e936Smrg ;; 4402d769e936Smrg icpc* ) 4403d769e936Smrg # Intel C++, used to be incompatible with GCC. 4404d769e936Smrg # ICC 10 doesn't accept -KPIC any more. 4405d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4406d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4407d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4408d769e936Smrg ;; 4409d769e936Smrg pgCC* | pgcpp*) 4410d769e936Smrg # Portland Group C++ compiler 4411d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4412d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4413d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414d769e936Smrg ;; 4415d769e936Smrg cxx*) 4416d769e936Smrg # Compaq C++ 4417d769e936Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4418d769e936Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4419d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4420d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4421d769e936Smrg ;; 4422d769e936Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4423d769e936Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4424d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4425d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4426d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4427d769e936Smrg ;; 4428d769e936Smrg *) 4429d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4430d769e936Smrg *Sun\ C*) 4431d769e936Smrg # Sun C++ 5.9 4432d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4433d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4434d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4435d769e936Smrg ;; 4436d769e936Smrg esac 4437d769e936Smrg ;; 4438d769e936Smrg esac 4439ec713c28Smrg ;; 4440d769e936Smrg lynxos*) 4441ec713c28Smrg ;; 4442d769e936Smrg m88k*) 4443ec713c28Smrg ;; 4444d769e936Smrg mvs*) 4445d769e936Smrg case $cc_basename in 4446d769e936Smrg cxx*) 4447d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4448d769e936Smrg ;; 4449786a6f21Smrg *) 4450786a6f21Smrg ;; 4451786a6f21Smrg esac 44521d54945dSmrg ;; 4453024581f2Smrg netbsd* | netbsdelf*-gnu) 44541d54945dSmrg ;; 4455d769e936Smrg *qnx* | *nto*) 4456d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4457d769e936Smrg # it will coredump. 4458d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4459d769e936Smrg ;; 4460d769e936Smrg osf3* | osf4* | osf5*) 4461d769e936Smrg case $cc_basename in 4462d769e936Smrg KCC*) 4463d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4464d769e936Smrg ;; 4465d769e936Smrg RCC*) 4466d769e936Smrg # Rational C++ 2.4.1 4467d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4468d769e936Smrg ;; 4469d769e936Smrg cxx*) 4470d769e936Smrg # Digital/Compaq C++ 4471d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4472d769e936Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4473d769e936Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4474d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4475d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4476d769e936Smrg ;; 4477ec713c28Smrg *) 4478ec713c28Smrg ;; 4479d769e936Smrg esac 4480ec713c28Smrg ;; 4481d769e936Smrg psos*) 4482786a6f21Smrg ;; 4483d769e936Smrg solaris*) 4484d769e936Smrg case $cc_basename in 4485d769e936Smrg CC* | sunCC*) 4486d769e936Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4487d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4488d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4489d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4490d769e936Smrg ;; 4491d769e936Smrg gcx*) 4492d769e936Smrg # Green Hills C++ Compiler 4493d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4494d769e936Smrg ;; 4495d769e936Smrg *) 4496d769e936Smrg ;; 4497d769e936Smrg esac 4498786a6f21Smrg ;; 4499d769e936Smrg sunos4*) 4500d769e936Smrg case $cc_basename in 4501d769e936Smrg CC*) 4502d769e936Smrg # Sun C++ 4.x 4503d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4504d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4505d769e936Smrg ;; 4506d769e936Smrg lcc*) 4507d769e936Smrg # Lucid 4508d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4509d769e936Smrg ;; 4510d769e936Smrg *) 4511d769e936Smrg ;; 4512d769e936Smrg esac 4513786a6f21Smrg ;; 4514d769e936Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4515d769e936Smrg case $cc_basename in 4516d769e936Smrg CC*) 4517d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4518d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4519d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4520d769e936Smrg ;; 4521d769e936Smrg esac 4522786a6f21Smrg ;; 4523d769e936Smrg tandem*) 4524d769e936Smrg case $cc_basename in 4525d769e936Smrg NCC*) 4526d769e936Smrg # NonStop-UX NCC 3.20 4527d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4528d769e936Smrg ;; 4529d769e936Smrg *) 4530d769e936Smrg ;; 4531d769e936Smrg esac 4532d769e936Smrg ;; 4533d769e936Smrg vxworks*) 4534786a6f21Smrg ;; 4535786a6f21Smrg *) 4536d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4537786a6f21Smrg ;; 4538ec713c28Smrg esac 4539d769e936Smrg fi 4540d769e936Smrg], 4541d769e936Smrg[ 45427322289dSmrg if test yes = "$GCC"; then 4543d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4544d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45451d54945dSmrg 4546d769e936Smrg case $host_os in 4547d769e936Smrg aix*) 4548d769e936Smrg # All AIX code is PIC. 45497322289dSmrg if test ia64 = "$host_cpu"; then 4550d769e936Smrg # AIX 5 now supports IA64 processor 4551d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4552d769e936Smrg fi 45537322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4554d769e936Smrg ;; 45551d54945dSmrg 4556d769e936Smrg amigaos*) 4557d769e936Smrg case $host_cpu in 4558d769e936Smrg powerpc) 4559d769e936Smrg # see comment about AmigaOS4 .so support 4560d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4561d769e936Smrg ;; 4562d769e936Smrg m68k) 4563d769e936Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45647322289dSmrg # adding the '-m68020' flag to GCC prevents building anything better, 45657322289dSmrg # like '-m68040'. 4566d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4567d769e936Smrg ;; 4568d769e936Smrg esac 4569d769e936Smrg ;; 45701d54945dSmrg 4571d769e936Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4572d769e936Smrg # PIC is the default for these OSes. 4573d769e936Smrg ;; 45741d54945dSmrg 4575d769e936Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4576d769e936Smrg # This hack is so that the source file can tell whether it is being 4577d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4578d769e936Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4579d769e936Smrg # (--disable-auto-import) libraries 4580d769e936Smrg m4_if([$1], [GCJ], [], 4581d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45827322289dSmrg case $host_os in 45837322289dSmrg os2*) 45847322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45857322289dSmrg ;; 45867322289dSmrg esac 4587d769e936Smrg ;; 45881d54945dSmrg 4589d769e936Smrg darwin* | rhapsody*) 4590d769e936Smrg # PIC is the default on this platform 4591d769e936Smrg # Common symbols not allowed in MH_DYLIB files 4592d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4593d769e936Smrg ;; 4594ec713c28Smrg 4595d769e936Smrg haiku*) 4596d769e936Smrg # PIC is the default for Haiku. 4597d769e936Smrg # The "-static" flag exists, but is broken. 4598d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4599d769e936Smrg ;; 46001d54945dSmrg 4601d769e936Smrg hpux*) 4602d769e936Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4603d769e936Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4604d769e936Smrg # sets the default TLS model and affects inlining. 4605d769e936Smrg case $host_cpu in 4606d769e936Smrg hppa*64*) 4607d769e936Smrg # +Z the default 4608d769e936Smrg ;; 4609d769e936Smrg *) 4610d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4611d769e936Smrg ;; 4612d769e936Smrg esac 4613d769e936Smrg ;; 46141d54945dSmrg 4615d769e936Smrg interix[[3-9]]*) 4616d769e936Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4617d769e936Smrg # Instead, we relocate shared libraries at runtime. 4618d769e936Smrg ;; 46191d54945dSmrg 4620d769e936Smrg msdosdjgpp*) 4621d769e936Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4622d769e936Smrg # on systems that don't support them. 4623d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4624d769e936Smrg enable_shared=no 4625d769e936Smrg ;; 46261d54945dSmrg 4627d769e936Smrg *nto* | *qnx*) 4628d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4629d769e936Smrg # it will coredump. 4630d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4631d769e936Smrg ;; 46321d54945dSmrg 4633d769e936Smrg sysv4*MP*) 4634d769e936Smrg if test -d /usr/nec; then 4635d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4636d769e936Smrg fi 4637d769e936Smrg ;; 4638ec713c28Smrg 4639d769e936Smrg *) 4640d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4641ec713c28Smrg ;; 4642ec713c28Smrg esac 46431d54945dSmrg 4644d769e936Smrg case $cc_basename in 4645d769e936Smrg nvcc*) # Cuda Compiler Driver 2.2 4646d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4647d769e936Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4648d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4649d769e936Smrg fi 4650ec713c28Smrg ;; 4651ec713c28Smrg esac 4652d769e936Smrg else 4653d769e936Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4654d769e936Smrg case $host_os in 4655d769e936Smrg aix*) 4656d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46577322289dSmrg if test ia64 = "$host_cpu"; then 4658d769e936Smrg # AIX 5 now supports IA64 processor 4659d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4660d769e936Smrg else 4661d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4662d769e936Smrg fi 4663d769e936Smrg ;; 4664ec713c28Smrg 46657322289dSmrg darwin* | rhapsody*) 46667322289dSmrg # PIC is the default on this platform 46677322289dSmrg # Common symbols not allowed in MH_DYLIB files 46687322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46697322289dSmrg case $cc_basename in 46707322289dSmrg nagfor*) 46717322289dSmrg # NAG Fortran compiler 46727322289dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46737322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46747322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46757322289dSmrg ;; 46767322289dSmrg esac 46777322289dSmrg ;; 46787322289dSmrg 4679d769e936Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4680d769e936Smrg # This hack is so that the source file can tell whether it is being 4681d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4682d769e936Smrg m4_if([$1], [GCJ], [], 4683d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46847322289dSmrg case $host_os in 46857322289dSmrg os2*) 46867322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46877322289dSmrg ;; 46887322289dSmrg esac 4689d769e936Smrg ;; 46901d54945dSmrg 4691d769e936Smrg hpux9* | hpux10* | hpux11*) 4692d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4693d769e936Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4694d769e936Smrg # not for PA HP-UX. 4695d769e936Smrg case $host_cpu in 4696d769e936Smrg hppa*64*|ia64*) 4697d769e936Smrg # +Z the default 4698d769e936Smrg ;; 4699d769e936Smrg *) 4700d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4701d769e936Smrg ;; 4702d769e936Smrg esac 4703d769e936Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47047322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4705d769e936Smrg ;; 47061d54945dSmrg 4707d769e936Smrg irix5* | irix6* | nonstopux*) 4708d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4709d769e936Smrg # PIC (with -KPIC) is the default. 4710d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4711d769e936Smrg ;; 47121d54945dSmrg 47137322289dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4714d769e936Smrg case $cc_basename in 47157322289dSmrg # old Intel for x86_64, which still supported -KPIC. 4716d769e936Smrg ecc*) 4717d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4718d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4719d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4720d769e936Smrg ;; 4721d769e936Smrg # icc used to be incompatible with GCC. 4722d769e936Smrg # ICC 10 doesn't accept -KPIC any more. 4723d769e936Smrg icc* | ifort*) 4724d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4725d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4726d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4727d769e936Smrg ;; 4728d769e936Smrg # Lahey Fortran 8.1. 4729d769e936Smrg lf95*) 4730d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4731d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4732d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4733d769e936Smrg ;; 4734d769e936Smrg nagfor*) 4735d769e936Smrg # NAG Fortran compiler 4736d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4737d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4738d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4739d769e936Smrg ;; 47407322289dSmrg tcc*) 47417322289dSmrg # Fabrice Bellard et al's Tiny C Compiler 47427322289dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47437322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47447322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47457322289dSmrg ;; 4746d769e936Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4747d769e936Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4748d769e936Smrg # which looks to be a dead project) 4749d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4750d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4751d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4752d769e936Smrg ;; 4753d769e936Smrg ccc*) 4754d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4755d769e936Smrg # All Alpha code is PIC. 4756d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4757d769e936Smrg ;; 4758d769e936Smrg xl* | bgxl* | bgf* | mpixl*) 4759d769e936Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4760d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4761d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4762d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4763d769e936Smrg ;; 4764d769e936Smrg *) 4765d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4766d769e936Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4767d769e936Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4768d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4769d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4770d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4771d769e936Smrg ;; 4772d769e936Smrg *Sun\ F* | *Sun*Fortran*) 4773d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4774d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4776d769e936Smrg ;; 4777d769e936Smrg *Sun\ C*) 4778d769e936Smrg # Sun C 5.9 4779d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4780d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4781d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4782d769e936Smrg ;; 4783d769e936Smrg *Intel*\ [[CF]]*Compiler*) 4784d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4785d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4786d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4787d769e936Smrg ;; 4788d769e936Smrg *Portland\ Group*) 4789d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4790d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4791d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4792d769e936Smrg ;; 4793d769e936Smrg esac 4794d769e936Smrg ;; 4795d769e936Smrg esac 4796d769e936Smrg ;; 47971d54945dSmrg 4798d769e936Smrg newsos6) 4799d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4800d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4801d769e936Smrg ;; 48021d54945dSmrg 4803d769e936Smrg *nto* | *qnx*) 4804d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4805d769e936Smrg # it will coredump. 4806d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4807d769e936Smrg ;; 48081d54945dSmrg 4809d769e936Smrg osf3* | osf4* | osf5*) 4810d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4811d769e936Smrg # All OSF/1 code is PIC. 4812d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4813d769e936Smrg ;; 48141d54945dSmrg 4815d769e936Smrg rdos*) 4816d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4817d769e936Smrg ;; 48181d54945dSmrg 4819d769e936Smrg solaris*) 4820d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4821d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4822d769e936Smrg case $cc_basename in 4823d769e936Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4824d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4825d769e936Smrg *) 4826d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4827d769e936Smrg esac 4828d769e936Smrg ;; 48291d54945dSmrg 4830d769e936Smrg sunos4*) 4831d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4832d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4833d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4834d769e936Smrg ;; 48351d54945dSmrg 4836d769e936Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4837d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4838d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4839d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4840d769e936Smrg ;; 48411d54945dSmrg 4842d769e936Smrg sysv4*MP*) 48437322289dSmrg if test -d /usr/nec; then 4844d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4845d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4846d769e936Smrg fi 4847d769e936Smrg ;; 48481d54945dSmrg 4849d769e936Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4850d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4851d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4852d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4853d769e936Smrg ;; 48541d54945dSmrg 4855d769e936Smrg unicos*) 4856d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4857d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4858d769e936Smrg ;; 48591d54945dSmrg 4860d769e936Smrg uts4*) 4861d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4862d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4863786a6f21Smrg ;; 4864d769e936Smrg 4865ec713c28Smrg *) 4866d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4867786a6f21Smrg ;; 4868ec713c28Smrg esac 4869d769e936Smrg fi 4870d769e936Smrg]) 4871d769e936Smrgcase $host_os in 48727322289dSmrg # For platforms that do not support PIC, -DPIC is meaningless: 4873d769e936Smrg *djgpp*) 4874d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4875ec713c28Smrg ;; 4876d769e936Smrg *) 4877d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4878d769e936Smrg ;; 4879d769e936Smrgesac 48801d54945dSmrg 4881d769e936SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4882d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4883d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4884d769e936Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48851d54945dSmrg 4886ec713c28Smrg# 4887d769e936Smrg# Check to make sure the PIC flag actually works. 4888ec713c28Smrg# 4889d769e936Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4890d769e936Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4891d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4892d769e936Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4893d769e936Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4894d769e936Smrg "" | " "*) ;; 4895d769e936Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4896d769e936Smrg esac], 4897d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4898d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4899d769e936Smrgfi 4900d769e936Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4901d769e936Smrg [Additional compiler flags for building library objects]) 4902d769e936Smrg 4903d769e936Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4904d769e936Smrg [How to pass a linker flag through the compiler]) 4905ec713c28Smrg# 4906d769e936Smrg# Check to make sure the static flag actually works. 4907ec713c28Smrg# 4908d769e936Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4909d769e936Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4910d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4911d769e936Smrg $lt_tmp_static_flag, 4912d769e936Smrg [], 4913d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4914d769e936Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4915d769e936Smrg [Compiler flag to prevent dynamic linking]) 4916d769e936Smrg])# _LT_COMPILER_PIC 49171d54945dSmrg 49181d54945dSmrg 4919d769e936Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4920d769e936Smrg# ---------------------------- 4921d769e936Smrg# See if the linker supports building shared libraries. 4922d769e936Smrgm4_defun([_LT_LINKER_SHLIBS], 4923d769e936Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4924d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 4925d769e936Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4926d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4927d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 4928d769e936Smrgm4_require([_LT_DECL_SED])dnl 4929d769e936Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4930d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 4931d769e936SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4932d769e936Smrgm4_if([$1], [CXX], [ 4933d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4934d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4935d769e936Smrg case $host_os in 4936d769e936Smrg aix[[4-9]]*) 4937d769e936Smrg # If we're using GNU nm, then we don't want the "-C" option. 49387322289dSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49397322289dSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49407322289dSmrg # weak defined symbols like other global defined symbols, whereas 49417322289dSmrg # GNU nm marks them as "W". 49427322289dSmrg # While the 'weak' keyword is ignored in the Export File, we need 49437322289dSmrg # it in the Import File for the 'aix-soname' feature, so we have 49447322289dSmrg # to replace the "-B" option with "-P" for AIX nm. 4945d769e936Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49467322289dSmrg _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' 4947d769e936Smrg else 49487322289dSmrg _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' 4949d769e936Smrg fi 4950d769e936Smrg ;; 4951d769e936Smrg pw32*) 49527322289dSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4953d769e936Smrg ;; 4954d769e936Smrg cygwin* | mingw* | cegcc*) 4955d769e936Smrg case $cc_basename in 4956d769e936Smrg cl*) 4957d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4958d769e936Smrg ;; 4959d769e936Smrg *) 4960d769e936Smrg _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' 4961d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4962d769e936Smrg ;; 4963d769e936Smrg esac 4964d769e936Smrg ;; 4965024581f2Smrg linux* | k*bsd*-gnu | gnu*) 4966024581f2Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 4967024581f2Smrg ;; 4968d769e936Smrg *) 4969d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4970d769e936Smrg ;; 4971d769e936Smrg esac 4972d769e936Smrg], [ 4973d769e936Smrg runpath_var= 4974d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4975d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4976d769e936Smrg _LT_TAGVAR(archive_cmds, $1)= 4977d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4978d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4979d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4980d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4981d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4982d769e936Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4983d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4984d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4985d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4986d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4987d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4988d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4989d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4990d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4991d769e936Smrg _LT_TAGVAR(module_cmds, $1)= 4992d769e936Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4993d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4994d769e936Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4995d769e936Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4996d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4997d769e936Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4998d769e936Smrg # included in the symbol list 4999d769e936Smrg _LT_TAGVAR(include_expsyms, $1)= 5000d769e936Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 50017322289dSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50027322289dSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50037322289dSmrg # as well as any symbol that contains 'd'. 5004d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5005d769e936Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5006d769e936Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5007d769e936Smrg # the symbol is explicitly referenced. Since portable code cannot 5008d769e936Smrg # rely on this symbol name, it's probably fine to never include it in 5009d769e936Smrg # preloaded symbol tables. 5010d769e936Smrg # Exclude shared library initialization/finalization symbols. 5011d769e936Smrgdnl Note also adjust exclude_expsyms for C++ above. 5012d769e936Smrg extract_expsyms_cmds= 50131d54945dSmrg 5014d769e936Smrg case $host_os in 5015d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5016d769e936Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5017d769e936Smrg # When not using gcc, we currently assume that we are using 5018d769e936Smrg # Microsoft Visual C++. 50197322289dSmrg if test yes != "$GCC"; then 5020d769e936Smrg with_gnu_ld=no 5021d769e936Smrg fi 5022d769e936Smrg ;; 5023d769e936Smrg interix*) 5024d769e936Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5025d769e936Smrg with_gnu_ld=yes 5026d769e936Smrg ;; 50277322289dSmrg openbsd* | bitrig*) 5028d769e936Smrg with_gnu_ld=no 5029d769e936Smrg ;; 5030024581f2Smrg linux* | k*bsd*-gnu | gnu*) 5031024581f2Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5032024581f2Smrg ;; 5033d769e936Smrg esac 50341d54945dSmrg 5035d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50361d54945dSmrg 5037d769e936Smrg # On some targets, GNU ld is compatible enough with the native linker 5038d769e936Smrg # that we're better off using the native interface for both. 5039d769e936Smrg lt_use_gnu_ld_interface=no 50407322289dSmrg if test yes = "$with_gnu_ld"; then 5041d769e936Smrg case $host_os in 5042d769e936Smrg aix*) 5043d769e936Smrg # The AIX port of GNU ld has always aspired to compatibility 5044d769e936Smrg # with the native linker. However, as the warning in the GNU ld 5045d769e936Smrg # block says, versions before 2.19.5* couldn't really create working 5046d769e936Smrg # shared libraries, regardless of the interface used. 5047d769e936Smrg case `$LD -v 2>&1` in 5048d769e936Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5049d769e936Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5050d769e936Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5051d769e936Smrg *) 5052d769e936Smrg lt_use_gnu_ld_interface=yes 5053d769e936Smrg ;; 5054d769e936Smrg esac 5055d769e936Smrg ;; 5056d769e936Smrg *) 5057d769e936Smrg lt_use_gnu_ld_interface=yes 5058d769e936Smrg ;; 5059d769e936Smrg esac 5060d769e936Smrg fi 50611d54945dSmrg 50627322289dSmrg if test yes = "$lt_use_gnu_ld_interface"; then 5063d769e936Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50647322289dSmrg wlarc='$wl' 50651d54945dSmrg 5066d769e936Smrg # Set some defaults for GNU ld with shared library support. These 5067d769e936Smrg # are reset later if shared libraries are not supported. Putting them 5068d769e936Smrg # here allows them to be overridden if necessary. 5069d769e936Smrg runpath_var=LD_RUN_PATH 50707322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50717322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5072d769e936Smrg # ancient GNU ld didn't support --whole-archive et. al. 5073d769e936Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50747322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5075d769e936Smrg else 5076d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5077d769e936Smrg fi 5078d769e936Smrg supports_anon_versioning=no 50797322289dSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5080d769e936Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5081d769e936Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5082d769e936Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5083d769e936Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5084d769e936Smrg *\ 2.11.*) ;; # other 2.11 versions 5085d769e936Smrg *) supports_anon_versioning=yes ;; 5086d769e936Smrg esac 50871d54945dSmrg 5088d769e936Smrg # See if GNU ld supports shared libraries. 5089d769e936Smrg case $host_os in 5090d769e936Smrg aix[[3-9]]*) 5091d769e936Smrg # On AIX/PPC, the GNU linker is very broken 50927322289dSmrg if test ia64 != "$host_cpu"; then 5093d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5094d769e936Smrg cat <<_LT_EOF 1>&2 50951d54945dSmrg 5096d769e936Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5097d769e936Smrg*** to be unable to reliably create shared libraries on AIX. 5098d769e936Smrg*** Therefore, libtool is disabling shared libraries support. If you 5099d769e936Smrg*** really care for shared libraries, you may want to install binutils 5100d769e936Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5101d769e936Smrg*** You will then need to restart the configuration process. 51021d54945dSmrg 5103d769e936Smrg_LT_EOF 5104d769e936Smrg fi 5105d769e936Smrg ;; 51061d54945dSmrg 5107d769e936Smrg amigaos*) 5108d769e936Smrg case $host_cpu in 5109d769e936Smrg powerpc) 5110d769e936Smrg # see comment about AmigaOS4 .so support 51117322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5112d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5113d769e936Smrg ;; 5114d769e936Smrg m68k) 5115d769e936Smrg _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)' 5116d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5117d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5118d769e936Smrg ;; 5119d769e936Smrg esac 5120d769e936Smrg ;; 51211d54945dSmrg 5122d769e936Smrg beos*) 5123d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5124d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5125d769e936Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5126d769e936Smrg # support --undefined. This deserves some investigation. FIXME 51277322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5128d769e936Smrg else 5129d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5130d769e936Smrg fi 5131d769e936Smrg ;; 51321d54945dSmrg 5133d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5134d769e936Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5135d769e936Smrg # as there is no search path for DLLs. 5136d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51377322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5138d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5139d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5140d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5141d769e936Smrg _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' 5142d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5143d769e936Smrg 5144d769e936Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51457322289dSmrg _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' 51467322289dSmrg # If the export-symbols file already is a .def file, use it as 51477322289dSmrg # is; otherwise, prepend EXPORTS... 51487322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51497322289dSmrg cp $export_symbols $output_objdir/$soname.def; 51507322289dSmrg else 51517322289dSmrg echo EXPORTS > $output_objdir/$soname.def; 51527322289dSmrg cat $export_symbols >> $output_objdir/$soname.def; 51537322289dSmrg fi~ 51547322289dSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5155d769e936Smrg else 5156d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5157d769e936Smrg fi 5158d769e936Smrg ;; 51591d54945dSmrg 5160d769e936Smrg haiku*) 51617322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5162d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5163d769e936Smrg ;; 51641d54945dSmrg 51657322289dSmrg os2*) 51667322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51677322289dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51687322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51697322289dSmrg shrext_cmds=.dll 51707322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51717322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51727322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51737322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51747322289dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51757322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51767322289dSmrg emximp -o $lib $output_objdir/$libname.def' 51777322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51787322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51797322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51807322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51817322289dSmrg prefix_cmds="$SED"~ 51827322289dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51837322289dSmrg prefix_cmds="$prefix_cmds -e 1d"; 51847322289dSmrg fi~ 51857322289dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51867322289dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51877322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51887322289dSmrg emximp -o $lib $output_objdir/$libname.def' 51897322289dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 51907322289dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51917322289dSmrg ;; 51927322289dSmrg 5193d769e936Smrg interix[[3-9]]*) 5194d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5195d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 51967322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 51977322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5198d769e936Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5199d769e936Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5200d769e936Smrg # default) and relocated if they conflict, which is a slow very memory 5201d769e936Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5202d769e936Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5203d769e936Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 52047322289dSmrg _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' 52057322289dSmrg _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' 5206d769e936Smrg ;; 52071d54945dSmrg 5208d769e936Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5209d769e936Smrg tmp_diet=no 52107322289dSmrg if test linux-dietlibc = "$host_os"; then 5211d769e936Smrg case $cc_basename in 5212d769e936Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5213d769e936Smrg esac 5214d769e936Smrg fi 5215d769e936Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52167322289dSmrg && test no = "$tmp_diet" 5217d769e936Smrg then 5218d769e936Smrg tmp_addflag=' $pic_flag' 5219d769e936Smrg tmp_sharedflag='-shared' 5220d769e936Smrg case $cc_basename,$host_cpu in 5221d769e936Smrg pgcc*) # Portland Group C compiler 52227322289dSmrg _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' 5223d769e936Smrg tmp_addflag=' $pic_flag' 5224d769e936Smrg ;; 5225d769e936Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 5226d769e936Smrg # Portland Group f77 and f90 compilers 52277322289dSmrg _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' 5228d769e936Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5229d769e936Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5230d769e936Smrg tmp_addflag=' -i_dynamic' ;; 5231d769e936Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5232d769e936Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5233d769e936Smrg ifc* | ifort*) # Intel Fortran compiler 5234d769e936Smrg tmp_addflag=' -nofor_main' ;; 5235d769e936Smrg lf95*) # Lahey Fortran 8.1 5236d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5237d769e936Smrg tmp_sharedflag='--shared' ;; 52387322289dSmrg nagfor*) # NAGFOR 5.3 52397322289dSmrg tmp_sharedflag='-Wl,-shared' ;; 5240d769e936Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5241d769e936Smrg tmp_sharedflag='-qmkshrobj' 5242d769e936Smrg tmp_addflag= ;; 5243d769e936Smrg nvcc*) # Cuda Compiler Driver 2.2 52447322289dSmrg _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' 5245d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5246d769e936Smrg ;; 5247d769e936Smrg esac 5248d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 5249d769e936Smrg *Sun\ C*) # Sun C 5.9 52507322289dSmrg _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' 5251d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5252d769e936Smrg tmp_sharedflag='-G' ;; 5253d769e936Smrg *Sun\ F*) # Sun Fortran 8.3 5254d769e936Smrg tmp_sharedflag='-G' ;; 5255d769e936Smrg esac 52567322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52571d54945dSmrg 52587322289dSmrg if test yes = "$supports_anon_versioning"; then 5259d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52607322289dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52617322289dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52627322289dSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5263d769e936Smrg fi 5264ba85709eSmrg 5265d769e936Smrg case $cc_basename in 52667322289dSmrg tcc*) 52677322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52687322289dSmrg ;; 5269d769e936Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5270d769e936Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5271d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52727322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5273d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52747322289dSmrg if test yes = "$supports_anon_versioning"; then 5275d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52767322289dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52777322289dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52787322289dSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5279d769e936Smrg fi 5280d769e936Smrg ;; 5281d769e936Smrg esac 5282d769e936Smrg else 5283d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5284d769e936Smrg fi 5285d769e936Smrg ;; 52861d54945dSmrg 5287024581f2Smrg netbsd* | netbsdelf*-gnu) 5288d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5289d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5290d769e936Smrg wlarc= 5291d769e936Smrg else 52927322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52937322289dSmrg _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' 5294d769e936Smrg fi 5295d769e936Smrg ;; 52961d54945dSmrg 5297d769e936Smrg solaris*) 5298d769e936Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5299d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5300d769e936Smrg cat <<_LT_EOF 1>&2 53011d54945dSmrg 5302d769e936Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5303d769e936Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5304d769e936Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5305d769e936Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5306d769e936Smrg*** your PATH or compiler configuration so that the native linker is 5307d769e936Smrg*** used, and then restart. 53081d54945dSmrg 5309d769e936Smrg_LT_EOF 5310d769e936Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53117322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53127322289dSmrg _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' 5313d769e936Smrg else 5314d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5315d769e936Smrg fi 5316d769e936Smrg ;; 53171d54945dSmrg 5318d769e936Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5319d769e936Smrg case `$LD -v 2>&1` in 5320d769e936Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5321d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5322d769e936Smrg cat <<_LT_EOF 1>&2 53231d54945dSmrg 53247322289dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5325d769e936Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5326d769e936Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5327d769e936Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5328d769e936Smrg*** your PATH or compiler configuration so that the native linker is 5329d769e936Smrg*** used, and then restart. 53301d54945dSmrg 5331d769e936Smrg_LT_EOF 5332d769e936Smrg ;; 5333d769e936Smrg *) 5334d769e936Smrg # For security reasons, it is highly recommended that you always 5335d769e936Smrg # use absolute paths for naming shared libraries, and exclude the 5336d769e936Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5337d769e936Smrg # requires that you compile everything twice, which is a pain. 5338d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53397322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53407322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53417322289dSmrg _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' 5342d769e936Smrg else 5343d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5344d769e936Smrg fi 5345d769e936Smrg ;; 5346d769e936Smrg esac 5347d769e936Smrg ;; 53481d54945dSmrg 5349d769e936Smrg sunos4*) 5350d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5351d769e936Smrg wlarc= 5352d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5353d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5354d769e936Smrg ;; 53551d54945dSmrg 5356d769e936Smrg *) 5357d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53587322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53597322289dSmrg _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' 5360d769e936Smrg else 5361d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5362d769e936Smrg fi 5363d769e936Smrg ;; 5364d769e936Smrg esac 53651d54945dSmrg 53667322289dSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5367d769e936Smrg runpath_var= 5368d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5370d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5371d769e936Smrg fi 5372d769e936Smrg else 5373d769e936Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5374d769e936Smrg case $host_os in 5375d769e936Smrg aix3*) 5376d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5377d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5378d769e936Smrg _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' 5379d769e936Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5380d769e936Smrg # are no directories specified by -L. 5381d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53827322289dSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5383d769e936Smrg # Neither direct hardcoding nor static linking is supported with a 5384d769e936Smrg # broken collect2. 5385d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5386d769e936Smrg fi 5387d769e936Smrg ;; 53881d54945dSmrg 5389d769e936Smrg aix[[4-9]]*) 53907322289dSmrg if test ia64 = "$host_cpu"; then 5391d769e936Smrg # On IA64, the linker does run time linking by default, so we don't 5392d769e936Smrg # have to do anything special. 5393d769e936Smrg aix_use_runtimelinking=no 5394d769e936Smrg exp_sym_flag='-Bexport' 53957322289dSmrg no_entry_flag= 5396d769e936Smrg else 5397d769e936Smrg # If we're using GNU nm, then we don't want the "-C" option. 53987322289dSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 53997322289dSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 54007322289dSmrg # weak defined symbols like other global defined symbols, whereas 54017322289dSmrg # GNU nm marks them as "W". 54027322289dSmrg # While the 'weak' keyword is ignored in the Export File, we need 54037322289dSmrg # it in the Import File for the 'aix-soname' feature, so we have 54047322289dSmrg # to replace the "-B" option with "-P" for AIX nm. 5405d769e936Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54067322289dSmrg _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' 5407d769e936Smrg else 54087322289dSmrg _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' 5409d769e936Smrg fi 5410d769e936Smrg aix_use_runtimelinking=no 54111d54945dSmrg 5412d769e936Smrg # Test if we are trying to use run time linking or normal 5413d769e936Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54147322289dSmrg # have runtime linking enabled, and use it for executables. 54157322289dSmrg # For shared libraries, we enable/disable runtime linking 54167322289dSmrg # depending on the kind of the shared library created - 54177322289dSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 54187322289dSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54197322289dSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 54207322289dSmrg # lib.a static archive 54217322289dSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54227322289dSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 54237322289dSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54247322289dSmrg # lib.a(lib.so.V) shared, rtl:no 54257322289dSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54267322289dSmrg # lib.a static archive 5427d769e936Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5428d769e936Smrg for ld_flag in $LDFLAGS; do 54297322289dSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5430d769e936Smrg aix_use_runtimelinking=yes 5431d769e936Smrg break 5432d769e936Smrg fi 5433d769e936Smrg done 54347322289dSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54357322289dSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54367322289dSmrg # so we don't have lib.a shared libs to link our executables. 54377322289dSmrg # We have to force runtime linking in this case. 54387322289dSmrg aix_use_runtimelinking=yes 54397322289dSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54407322289dSmrg fi 5441d769e936Smrg ;; 5442d769e936Smrg esac 54431d54945dSmrg 5444d769e936Smrg exp_sym_flag='-bexport' 5445d769e936Smrg no_entry_flag='-bnoentry' 5446d769e936Smrg fi 54471d54945dSmrg 5448d769e936Smrg # When large executables or shared objects are built, AIX ld can 5449d769e936Smrg # have problems creating the table of contents. If linking a library 5450d769e936Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5451d769e936Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5452d769e936Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54531d54945dSmrg 5454d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='' 5455d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5456d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5457d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5458d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54597322289dSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54607322289dSmrg case $with_aix_soname,$aix_use_runtimelinking in 54617322289dSmrg aix,*) ;; # traditional, no import file 54627322289dSmrg svr4,* | *,yes) # use import file 54637322289dSmrg # The Import File defines what to hardcode. 54647322289dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 54657322289dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54667322289dSmrg ;; 54677322289dSmrg esac 54681d54945dSmrg 54697322289dSmrg if test yes = "$GCC"; then 5470d769e936Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5471d769e936Smrg # We only want to do this on AIX 4.2 and lower, the check 5472d769e936Smrg # below for broken collect2 doesn't work under 4.3+ 54737322289dSmrg collect2name=`$CC -print-prog-name=collect2` 5474d769e936Smrg if test -f "$collect2name" && 5475d769e936Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5476d769e936Smrg then 5477d769e936Smrg # We have reworked collect2 5478d769e936Smrg : 5479d769e936Smrg else 5480d769e936Smrg # We have old collect2 5481d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5482d769e936Smrg # It fails to find uninstalled libraries when the uninstalled 5483d769e936Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5484d769e936Smrg # to unsupported forces relinking 5485d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5486d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5487d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5488d769e936Smrg fi 5489d769e936Smrg ;; 5490d769e936Smrg esac 5491d769e936Smrg shared_flag='-shared' 54927322289dSmrg if test yes = "$aix_use_runtimelinking"; then 54937322289dSmrg shared_flag="$shared_flag "'$wl-G' 5494d769e936Smrg fi 54957322289dSmrg # Need to ensure runtime linking is disabled for the traditional 54967322289dSmrg # shared library, or the linker may eventually find shared libraries 54977322289dSmrg # /with/ Import File - we do not want to mix them. 54987322289dSmrg shared_flag_aix='-shared' 54997322289dSmrg shared_flag_svr4='-shared $wl-G' 5500d769e936Smrg else 5501d769e936Smrg # not using gcc 55027322289dSmrg if test ia64 = "$host_cpu"; then 5503d769e936Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5504d769e936Smrg # chokes on -Wl,-G. The following line is correct: 5505d769e936Smrg shared_flag='-G' 5506d769e936Smrg else 55077322289dSmrg if test yes = "$aix_use_runtimelinking"; then 55087322289dSmrg shared_flag='$wl-G' 5509d769e936Smrg else 55107322289dSmrg shared_flag='$wl-bM:SRE' 5511d769e936Smrg fi 55127322289dSmrg shared_flag_aix='$wl-bM:SRE' 55137322289dSmrg shared_flag_svr4='$wl-G' 5514d769e936Smrg fi 5515d769e936Smrg fi 55161d54945dSmrg 55177322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5518d769e936Smrg # It seems that -bexpall does not export symbols beginning with 5519d769e936Smrg # underscore (_), so it is better to generate a list of symbols to export. 5520d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55217322289dSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5522d769e936Smrg # Warning - without using the other runtime loading flags (-brtl), 5523d769e936Smrg # -berok will link without error, but may produce a broken library. 5524d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5525d769e936Smrg # Determine the default libpath from the value encoded in an 5526d769e936Smrg # empty executable. 5527d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55287322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55297322289dSmrg _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 5530d769e936Smrg else 55317322289dSmrg if test ia64 = "$host_cpu"; then 55327322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5533d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55347322289dSmrg _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" 5535d769e936Smrg else 5536d769e936Smrg # Determine the default libpath from the value encoded in an 5537d769e936Smrg # empty executable. 5538d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55397322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5540d769e936Smrg # Warning - without using the other run time loading flags, 5541d769e936Smrg # -berok will link without error, but may produce a broken library. 55427322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55437322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55447322289dSmrg if test yes = "$with_gnu_ld"; then 5545d769e936Smrg # We only use this code for GNU lds that support --whole-archive. 55467322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5547d769e936Smrg else 5548d769e936Smrg # Exported symbols can be pulled into shared objects from archives 5549d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5550d769e936Smrg fi 5551d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55527322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55537322289dSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55547322289dSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55557322289dSmrg if test svr4 != "$with_aix_soname"; then 55567322289dSmrg # This is similar to how AIX traditionally builds its shared libraries. 55577322289dSmrg _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' 55587322289dSmrg fi 55597322289dSmrg if test aix != "$with_aix_soname"; then 55607322289dSmrg _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' 55617322289dSmrg else 55627322289dSmrg # used by -dlpreopen to get the symbols 55637322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55647322289dSmrg fi 55657322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5566d769e936Smrg fi 5567d769e936Smrg fi 5568d769e936Smrg ;; 55691d54945dSmrg 5570d769e936Smrg amigaos*) 5571d769e936Smrg case $host_cpu in 5572d769e936Smrg powerpc) 5573d769e936Smrg # see comment about AmigaOS4 .so support 55747322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5575d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5576d769e936Smrg ;; 5577d769e936Smrg m68k) 5578d769e936Smrg _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)' 5579d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5580d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5581d769e936Smrg ;; 5582d769e936Smrg esac 5583d769e936Smrg ;; 55841d54945dSmrg 5585d769e936Smrg bsdi[[45]]*) 5586d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5587d769e936Smrg ;; 55881d54945dSmrg 5589d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5590d769e936Smrg # When not using gcc, we currently assume that we are using 5591d769e936Smrg # Microsoft Visual C++. 5592d769e936Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5593d769e936Smrg # no search path for DLLs. 5594d769e936Smrg case $cc_basename in 5595d769e936Smrg cl*) 5596d769e936Smrg # Native MSVC 5597d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5598d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5599d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5600d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5601d769e936Smrg # Tell ltmain to make .lib files, not .a files. 5602d769e936Smrg libext=lib 5603d769e936Smrg # Tell ltmain to make .dll files, not .so files. 56047322289dSmrg shrext_cmds=.dll 5605d769e936Smrg # FIXME: Setting linknames here is a bad hack. 56067322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56077322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56087322289dSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 56097322289dSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56107322289dSmrg else 56117322289dSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56127322289dSmrg fi~ 56137322289dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56147322289dSmrg linknames=' 5615d769e936Smrg # The linker will not automatically build a static lib if we build a DLL. 5616d769e936Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5617d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5618d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5619d769e936Smrg _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' 5620d769e936Smrg # Don't use ranlib 5621d769e936Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5622d769e936Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56237322289dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56247322289dSmrg case $lt_outputfile in 56257322289dSmrg *.exe|*.EXE) ;; 56267322289dSmrg *) 56277322289dSmrg lt_outputfile=$lt_outputfile.exe 56287322289dSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 56297322289dSmrg ;; 56307322289dSmrg esac~ 56317322289dSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56327322289dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56337322289dSmrg $RM "$lt_outputfile.manifest"; 56347322289dSmrg fi' 5635d769e936Smrg ;; 5636d769e936Smrg *) 5637d769e936Smrg # Assume MSVC wrapper 5638d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5639d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5640d769e936Smrg # Tell ltmain to make .lib files, not .a files. 5641d769e936Smrg libext=lib 5642d769e936Smrg # Tell ltmain to make .dll files, not .so files. 56437322289dSmrg shrext_cmds=.dll 5644d769e936Smrg # FIXME: Setting linknames here is a bad hack. 5645d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5646d769e936Smrg # The linker will automatically build a .lib file if we build a DLL. 5647d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5648d769e936Smrg # FIXME: Should let the user specify the lib program. 5649d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5650d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5651d769e936Smrg ;; 5652d769e936Smrg esac 5653d769e936Smrg ;; 56541d54945dSmrg 5655d769e936Smrg darwin* | rhapsody*) 5656d769e936Smrg _LT_DARWIN_LINKER_FEATURES($1) 5657d769e936Smrg ;; 56581d54945dSmrg 5659d769e936Smrg dgux*) 5660d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5661d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5662d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5663d769e936Smrg ;; 56641d54945dSmrg 5665d769e936Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5666d769e936Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5667d769e936Smrg # does not break anything, and helps significantly (at the cost of a little 5668d769e936Smrg # extra space). 5669d769e936Smrg freebsd2.2*) 5670d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5671d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5672d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5673d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5674d769e936Smrg ;; 56751d54945dSmrg 5676d769e936Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5677d769e936Smrg freebsd2.*) 5678d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5679d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5680d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5681d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5682d769e936Smrg ;; 56831d54945dSmrg 5684d769e936Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5685d769e936Smrg freebsd* | dragonfly*) 5686d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5687d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5688d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5689d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5690d769e936Smrg ;; 56911d54945dSmrg 5692d769e936Smrg hpux9*) 56937322289dSmrg if test yes = "$GCC"; then 56947322289dSmrg _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' 5695d769e936Smrg else 56967322289dSmrg _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' 5697d769e936Smrg fi 56987322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5699d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5700d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57011d54945dSmrg 5702d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5703d769e936Smrg # but as the default location of the library. 5704d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57057322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5706d769e936Smrg ;; 57071d54945dSmrg 5708d769e936Smrg hpux10*) 57097322289dSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57107322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5711d769e936Smrg else 5712d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5713d769e936Smrg fi 57147322289dSmrg if test no = "$with_gnu_ld"; then 57157322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5716d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5717d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5718d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57197322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5720d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5721d769e936Smrg # but as the default location of the library. 5722d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5723d769e936Smrg fi 5724d769e936Smrg ;; 57251d54945dSmrg 5726d769e936Smrg hpux11*) 57277322289dSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5728d769e936Smrg case $host_cpu in 5729d769e936Smrg hppa*64*) 57307322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5731d769e936Smrg ;; 5732d769e936Smrg ia64*) 57337322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5734d769e936Smrg ;; 5735d769e936Smrg *) 57367322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5737d769e936Smrg ;; 5738d769e936Smrg esac 5739d769e936Smrg else 5740d769e936Smrg case $host_cpu in 5741d769e936Smrg hppa*64*) 57427322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5743d769e936Smrg ;; 5744d769e936Smrg ia64*) 57457322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5746d769e936Smrg ;; 5747d769e936Smrg *) 5748d769e936Smrg m4_if($1, [], [ 5749d769e936Smrg # Older versions of the 11.00 compiler do not understand -b yet 5750d769e936Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5751d769e936Smrg _LT_LINKER_OPTION([if $CC understands -b], 5752d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57537322289dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5754d769e936Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57557322289dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5756d769e936Smrg ;; 5757d769e936Smrg esac 5758d769e936Smrg fi 57597322289dSmrg if test no = "$with_gnu_ld"; then 57607322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5761d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57621d54945dSmrg 5763d769e936Smrg case $host_cpu in 5764d769e936Smrg hppa*64*|ia64*) 5765d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5766d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5767d769e936Smrg ;; 5768d769e936Smrg *) 5769d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5770d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57717322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57721d54945dSmrg 5773d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5774d769e936Smrg # but as the default location of the library. 5775d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5776d769e936Smrg ;; 5777d769e936Smrg esac 5778d769e936Smrg fi 5779d769e936Smrg ;; 57801d54945dSmrg 5781d769e936Smrg irix5* | irix6* | nonstopux*) 57827322289dSmrg if test yes = "$GCC"; then 57837322289dSmrg _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' 5784d769e936Smrg # Try to use the -exported_symbol ld option, if it does not 5785d769e936Smrg # work, assume that -exports_file does not work either and 5786d769e936Smrg # implicitly export all symbols. 5787d769e936Smrg # This should be the same for all languages, so no per-tag cache variable. 5788d769e936Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5789d769e936Smrg [lt_cv_irix_exported_symbol], 57907322289dSmrg [save_LDFLAGS=$LDFLAGS 57917322289dSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5792d769e936Smrg AC_LINK_IFELSE( 5793d769e936Smrg [AC_LANG_SOURCE( 5794d769e936Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5795d769e936Smrg [C++], [[int foo (void) { return 0; }]], 5796d769e936Smrg [Fortran 77], [[ 5797d769e936Smrg subroutine foo 5798d769e936Smrg end]], 5799d769e936Smrg [Fortran], [[ 5800d769e936Smrg subroutine foo 5801d769e936Smrg end]])])], 5802d769e936Smrg [lt_cv_irix_exported_symbol=yes], 5803d769e936Smrg [lt_cv_irix_exported_symbol=no]) 58047322289dSmrg LDFLAGS=$save_LDFLAGS]) 58057322289dSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 58067322289dSmrg _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' 5807d769e936Smrg fi 5808024581f2Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5809d769e936Smrg else 58107322289dSmrg _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' 58117322289dSmrg _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' 5812d769e936Smrg fi 5813d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58147322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5815d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5816d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5817d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5818d769e936Smrg ;; 58191d54945dSmrg 58207322289dSmrg linux*) 58217322289dSmrg case $cc_basename in 58227322289dSmrg tcc*) 58237322289dSmrg # Fabrice Bellard et al's Tiny C Compiler 58247322289dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 58257322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58267322289dSmrg ;; 58277322289dSmrg esac 58287322289dSmrg ;; 58297322289dSmrg 5830024581f2Smrg netbsd* | netbsdelf*-gnu) 5831d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5832d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5833d769e936Smrg else 5834d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5835d769e936Smrg fi 5836d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5837d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5838d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5839d769e936Smrg ;; 58401d54945dSmrg 5841d769e936Smrg newsos6) 5842d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5843d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58447322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5845d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5846d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5847d769e936Smrg ;; 58481d54945dSmrg 5849d769e936Smrg *nto* | *qnx*) 5850d769e936Smrg ;; 58511d54945dSmrg 58527322289dSmrg openbsd* | bitrig*) 5853d769e936Smrg if test -f /usr/libexec/ld.so; then 5854d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5855d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5856d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58577322289dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5858d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58597322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58607322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58617322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5862d769e936Smrg else 58637322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58647322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5865d769e936Smrg fi 5866d769e936Smrg else 5867d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5868d769e936Smrg fi 5869d769e936Smrg ;; 58701d54945dSmrg 5871d769e936Smrg os2*) 5872d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5873d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5874d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58757322289dSmrg shrext_cmds=.dll 58767322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58777322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58787322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58797322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58807322289dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58817322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58827322289dSmrg emximp -o $lib $output_objdir/$libname.def' 58837322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58847322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58857322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58867322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58877322289dSmrg prefix_cmds="$SED"~ 58887322289dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 58897322289dSmrg prefix_cmds="$prefix_cmds -e 1d"; 58907322289dSmrg fi~ 58917322289dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 58927322289dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 58937322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58947322289dSmrg emximp -o $lib $output_objdir/$libname.def' 58957322289dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 58967322289dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5897d769e936Smrg ;; 58981d54945dSmrg 5899d769e936Smrg osf3*) 59007322289dSmrg if test yes = "$GCC"; then 59017322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59027322289dSmrg _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' 5903d769e936Smrg else 5904d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59057322289dSmrg _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' 5906d769e936Smrg fi 5907d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59087322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5909d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5910d769e936Smrg ;; 59111d54945dSmrg 5912d769e936Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59137322289dSmrg if test yes = "$GCC"; then 59147322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59157322289dSmrg _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' 59167322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5917d769e936Smrg else 5918d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59197322289dSmrg _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' 5920d769e936Smrg _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~ 59217322289dSmrg $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' 59221d54945dSmrg 5923d769e936Smrg # Both c and cxx compiler support -rpath directly 5924d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5925d769e936Smrg fi 5926d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5927d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5928d769e936Smrg ;; 59291d54945dSmrg 5930d769e936Smrg solaris*) 5931d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59327322289dSmrg if test yes = "$GCC"; then 59337322289dSmrg wlarc='$wl' 59347322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5935d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59367322289dSmrg $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' 5937d769e936Smrg else 5938d769e936Smrg case `$CC -V 2>&1` in 5939d769e936Smrg *"Compilers 5.0"*) 5940d769e936Smrg wlarc='' 59417322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5942d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59437322289dSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5944d769e936Smrg ;; 5945d769e936Smrg *) 59467322289dSmrg wlarc='$wl' 59477322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5948d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59497322289dSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5950d769e936Smrg ;; 5951d769e936Smrg esac 5952d769e936Smrg fi 5953d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5954d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5955d769e936Smrg case $host_os in 5956d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5957d769e936Smrg *) 5958d769e936Smrg # The compiler driver will combine and reorder linker options, 59597322289dSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5960d769e936Smrg # but is careful enough not to reorder. 5961d769e936Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59627322289dSmrg if test yes = "$GCC"; then 59637322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5964d769e936Smrg else 5965d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5966d769e936Smrg fi 5967d769e936Smrg ;; 5968d769e936Smrg esac 5969d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5970d769e936Smrg ;; 59711d54945dSmrg 5972d769e936Smrg sunos4*) 59737322289dSmrg if test sequent = "$host_vendor"; then 5974d769e936Smrg # Use $CC to link under sequent, because it throws in some extra .o 5975d769e936Smrg # files that make .init and .fini sections work. 59767322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5977d769e936Smrg else 5978d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5979d769e936Smrg fi 5980d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5981d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5982d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5983d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5984d769e936Smrg ;; 59851d54945dSmrg 5986d769e936Smrg sysv4) 5987d769e936Smrg case $host_vendor in 5988d769e936Smrg sni) 5989d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5990d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5991d769e936Smrg ;; 5992d769e936Smrg siemens) 5993d769e936Smrg ## LD is ld it makes a PLAMLIB 5994d769e936Smrg ## CC just makes a GrossModule. 5995d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5996d769e936Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5997d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5998d769e936Smrg ;; 5999d769e936Smrg motorola) 6000d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6001d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6002d769e936Smrg ;; 6003d769e936Smrg esac 6004d769e936Smrg runpath_var='LD_RUN_PATH' 6005d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6006d769e936Smrg ;; 60071d54945dSmrg 6008d769e936Smrg sysv4.3*) 6009d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6010d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6011d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6012d769e936Smrg ;; 60131d54945dSmrg 6014d769e936Smrg sysv4*MP*) 6015d769e936Smrg if test -d /usr/nec; then 6016d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6017d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6018d769e936Smrg runpath_var=LD_RUN_PATH 6019d769e936Smrg hardcode_runpath_var=yes 6020d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6021d769e936Smrg fi 6022d769e936Smrg ;; 60231d54945dSmrg 6024d769e936Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60257322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6026d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6027d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6028d769e936Smrg runpath_var='LD_RUN_PATH' 60291d54945dSmrg 60307322289dSmrg if test yes = "$GCC"; then 60317322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60327322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6033d769e936Smrg else 60347322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60357322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6036d769e936Smrg fi 6037d769e936Smrg ;; 60381d54945dSmrg 6039d769e936Smrg sysv5* | sco3.2v5* | sco5v6*) 60407322289dSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 6041d769e936Smrg # link with -lc, and that would cause any symbols used from libc to 6042d769e936Smrg # always be unresolved, which means just about no library would 6043d769e936Smrg # ever link correctly. If we're not using GNU ld we use -z text 6044d769e936Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6045d769e936Smrg # as -z defs. 60467322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60477322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6048d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6049d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60507322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6051d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6052d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60537322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6054d769e936Smrg runpath_var='LD_RUN_PATH' 60551d54945dSmrg 60567322289dSmrg if test yes = "$GCC"; then 60577322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60587322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6059d769e936Smrg else 60607322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60617322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6062d769e936Smrg fi 6063d769e936Smrg ;; 60641d54945dSmrg 6065d769e936Smrg uts4*) 6066d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6067d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6068d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6069d769e936Smrg ;; 60701d54945dSmrg 6071d769e936Smrg *) 6072d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6073d769e936Smrg ;; 6074d769e936Smrg esac 60751d54945dSmrg 60767322289dSmrg if test sni = "$host_vendor"; then 6077d769e936Smrg case $host in 6078d769e936Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60797322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6080d769e936Smrg ;; 6081d769e936Smrg esac 6082d769e936Smrg fi 6083d769e936Smrg fi 6084d769e936Smrg]) 6085d769e936SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 60867322289dSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60871d54945dSmrg 6088d769e936Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60891d54945dSmrg 6090d769e936Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6091d769e936Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6092d769e936Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6093d769e936Smrg [The commands to extract the exported symbol list from a shared archive]) 60941d54945dSmrg 6095d769e936Smrg# 6096d769e936Smrg# Do we need to explicitly link libc? 6097d769e936Smrg# 6098d769e936Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6099d769e936Smrgx|xyes) 6100d769e936Smrg # Assume -lc should be added 6101d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61021d54945dSmrg 61037322289dSmrg if test yes,yes = "$GCC,$enable_shared"; then 6104d769e936Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6105d769e936Smrg *'~'*) 6106d769e936Smrg # FIXME: we may have to deal with multi-command sequences. 6107d769e936Smrg ;; 6108d769e936Smrg '$CC '*) 6109d769e936Smrg # Test whether the compiler implicitly links with -lc since on some 6110d769e936Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6111d769e936Smrg # to ld, don't add -lc before -lgcc. 6112d769e936Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6113d769e936Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6114d769e936Smrg [$RM conftest* 6115d769e936Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6116d769e936Smrg 6117d769e936Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6118d769e936Smrg soname=conftest 6119d769e936Smrg lib=conftest 6120d769e936Smrg libobjs=conftest.$ac_objext 6121d769e936Smrg deplibs= 6122d769e936Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6123d769e936Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6124d769e936Smrg compiler_flags=-v 6125d769e936Smrg linker_flags=-v 6126d769e936Smrg verstring= 6127d769e936Smrg output_objdir=. 6128d769e936Smrg libname=conftest 6129d769e936Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6130d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6131d769e936Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6132d769e936Smrg then 6133d769e936Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6134d769e936Smrg else 6135d769e936Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6136d769e936Smrg fi 6137d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6138d769e936Smrg else 6139d769e936Smrg cat conftest.err 1>&5 6140d769e936Smrg fi 6141d769e936Smrg $RM conftest* 6142d769e936Smrg ]) 6143d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6144d769e936Smrg ;; 6145d769e936Smrg esac 6146d769e936Smrg fi 6147d769e936Smrg ;; 6148d769e936Smrgesac 61491d54945dSmrg 6150d769e936Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6151d769e936Smrg [Whether or not to add -lc for building shared libraries]) 6152d769e936Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6153d769e936Smrg [enable_shared_with_static_runtimes], [0], 6154d769e936Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6155d769e936Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6156d769e936Smrg [Compiler flag to allow reflexive dlopens]) 6157d769e936Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6158d769e936Smrg [Compiler flag to generate shared objects directly from archives]) 6159d769e936Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6160d769e936Smrg [Whether the compiler copes with passing no objects directly]) 6161d769e936Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6162d769e936Smrg [Create an old-style archive from a shared archive]) 6163d769e936Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6164d769e936Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6165d769e936Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6166d769e936Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6167d769e936Smrg_LT_TAGDECL([], [module_cmds], [2], 6168d769e936Smrg [Commands used to build a loadable module if different from building 6169d769e936Smrg a shared archive.]) 6170d769e936Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6171d769e936Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6172d769e936Smrg [Whether we are building with GNU ld or not]) 6173d769e936Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6174d769e936Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6175d769e936Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6176d769e936Smrg [Flag that enforces no undefined symbols]) 6177d769e936Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6178d769e936Smrg [Flag to hardcode $libdir into a binary during linking. 6179d769e936Smrg This must work even if $libdir does not exist]) 6180d769e936Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6181d769e936Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6182d769e936Smrg_LT_TAGDECL([], [hardcode_direct], [0], 61837322289dSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6184d769e936Smrg DIR into the resulting binary]) 6185d769e936Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 61867322289dSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6187d769e936Smrg DIR into the resulting binary and the resulting library dependency is 61887322289dSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6189d769e936Smrg library is relocated]) 6190d769e936Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6191d769e936Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6192d769e936Smrg into the resulting binary]) 6193d769e936Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6194d769e936Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6195d769e936Smrg into the resulting binary]) 6196d769e936Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6197d769e936Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6198d769e936Smrg into the library and all subsequent libraries and executables linked 6199d769e936Smrg against it]) 6200d769e936Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6201d769e936Smrg [Set to yes if linker adds runtime paths of dependent libraries 6202d769e936Smrg to runtime path list]) 6203d769e936Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6204d769e936Smrg [Whether libtool must link a program against all its dependency libraries]) 6205d769e936Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6206d769e936Smrg [Set to "yes" if exported symbols are required]) 6207d769e936Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6208d769e936Smrg [The commands to list exported symbols]) 6209d769e936Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6210d769e936Smrg [Symbols that should not be listed in the preloaded symbols]) 6211d769e936Smrg_LT_TAGDECL([], [include_expsyms], [1], 6212d769e936Smrg [Symbols that must always be exported]) 6213d769e936Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6214d769e936Smrg [Commands necessary for linking programs (against libraries) with templates]) 6215d769e936Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6216d769e936Smrg [Commands necessary for finishing linking programs]) 6217d769e936Smrg_LT_TAGDECL([], [file_list_spec], [1], 6218d769e936Smrg [Specify filename containing input files]) 6219d769e936Smrgdnl FIXME: Not yet implemented 6220d769e936Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6221d769e936Smrgdnl [Compiler flag to generate thread safe objects]) 6222d769e936Smrg])# _LT_LINKER_SHLIBS 6223d769e936Smrg 6224d769e936Smrg 6225d769e936Smrg# _LT_LANG_C_CONFIG([TAG]) 6226d769e936Smrg# ------------------------ 6227d769e936Smrg# Ensure that the configuration variables for a C compiler are suitably 6228d769e936Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62297322289dSmrg# the compiler configuration to 'libtool'. 6230d769e936Smrgm4_defun([_LT_LANG_C_CONFIG], 6231d769e936Smrg[m4_require([_LT_DECL_EGREP])dnl 62327322289dSmrglt_save_CC=$CC 6233d769e936SmrgAC_LANG_PUSH(C) 62341d54945dSmrg 6235d769e936Smrg# Source file extension for C test sources. 6236d769e936Smrgac_ext=c 62371d54945dSmrg 6238d769e936Smrg# Object file extension for compiled C test sources. 6239d769e936Smrgobjext=o 6240d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 62411d54945dSmrg 6242d769e936Smrg# Code to be used in simple compile tests 6243d769e936Smrglt_simple_compile_test_code="int some_variable = 0;" 6244786a6f21Smrg 6245d769e936Smrg# Code to be used in simple link tests 6246d769e936Smrglt_simple_link_test_code='int main(){return(0);}' 6247786a6f21Smrg 6248d769e936Smrg_LT_TAG_COMPILER 6249d769e936Smrg# Save the default compiler, since it gets overwritten when the other 6250d769e936Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6251d769e936Smrgcompiler_DEFAULT=$CC 6252786a6f21Smrg 6253d769e936Smrg# save warnings/boilerplate of simple test code 6254d769e936Smrg_LT_COMPILER_BOILERPLATE 6255d769e936Smrg_LT_LINKER_BOILERPLATE 6256786a6f21Smrg 6257d769e936Smrgif test -n "$compiler"; then 6258d769e936Smrg _LT_COMPILER_NO_RTTI($1) 6259d769e936Smrg _LT_COMPILER_PIC($1) 6260d769e936Smrg _LT_COMPILER_C_O($1) 6261d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 6262d769e936Smrg _LT_LINKER_SHLIBS($1) 6263d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 6264d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6265d769e936Smrg LT_SYS_DLOPEN_SELF 6266d769e936Smrg _LT_CMD_STRIPLIB 6267d769e936Smrg 62687322289dSmrg # Report what library types will actually be built 6269d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6270d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 6271d769e936Smrg 6272d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62737322289dSmrg test no = "$can_build_shared" && enable_shared=no 6274d769e936Smrg 6275d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6276d769e936Smrg # are all built from PIC. 6277ec713c28Smrg case $host_os in 6278ec713c28Smrg aix3*) 62797322289dSmrg test yes = "$enable_shared" && enable_static=no 6280d769e936Smrg if test -n "$RANLIB"; then 6281d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6282d769e936Smrg postinstall_cmds='$RANLIB $lib' 6283d769e936Smrg fi 6284d769e936Smrg ;; 6285786a6f21Smrg 6286d769e936Smrg aix[[4-9]]*) 62877322289dSmrg if test ia64 != "$host_cpu"; then 62887322289dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 62897322289dSmrg yes,aix,yes) ;; # shared object as lib.so file only 62907322289dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 62917322289dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 62927322289dSmrg esac 6293d769e936Smrg fi 6294ec713c28Smrg ;; 6295ec713c28Smrg esac 6296d769e936Smrg AC_MSG_RESULT([$enable_shared]) 6297786a6f21Smrg 6298d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 6299d769e936Smrg # Make sure either enable_shared or enable_static is yes. 63007322289dSmrg test yes = "$enable_shared" || enable_static=yes 6301d769e936Smrg AC_MSG_RESULT([$enable_static]) 63021d54945dSmrg 6303d769e936Smrg _LT_CONFIG($1) 6304786a6f21Smrgfi 6305d769e936SmrgAC_LANG_POP 63067322289dSmrgCC=$lt_save_CC 6307d769e936Smrg])# _LT_LANG_C_CONFIG 6308786a6f21Smrg 6309786a6f21Smrg 6310d769e936Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6311d769e936Smrg# -------------------------- 6312d769e936Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6313d769e936Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63147322289dSmrg# the compiler configuration to 'libtool'. 6315d769e936Smrgm4_defun([_LT_LANG_CXX_CONFIG], 6316d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6317d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 6318d769e936Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63197322289dSmrgif test -n "$CXX" && ( test no != "$CXX" && 63207322289dSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63217322289dSmrg (test g++ != "$CXX"))); then 6322d769e936Smrg AC_PROG_CXXCPP 6323d769e936Smrgelse 6324d769e936Smrg _lt_caught_CXX_error=yes 6325d769e936Smrgfi 6326786a6f21Smrg 6327d769e936SmrgAC_LANG_PUSH(C++) 6328d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6329d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6330d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6331d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6332d769e936Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6333d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6334d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6335d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6336d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6337d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6338d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6339d769e936Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6340d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6341d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6342d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 6343d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6344d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6345d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6346d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6347d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6348d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6349d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6350d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6351786a6f21Smrg 6352d769e936Smrg# Source file extension for C++ test sources. 6353d769e936Smrgac_ext=cpp 63541d54945dSmrg 6355d769e936Smrg# Object file extension for compiled C++ test sources. 6356d769e936Smrgobjext=o 6357d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 6358d769e936Smrg 6359d769e936Smrg# No sense in running all these tests if we already determined that 6360d769e936Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6361d769e936Smrg# are currently assumed to apply to all compilers on this platform, 6362d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 63637322289dSmrgif test yes != "$_lt_caught_CXX_error"; then 6364d769e936Smrg # Code to be used in simple compile tests 6365d769e936Smrg lt_simple_compile_test_code="int some_variable = 0;" 6366d769e936Smrg 6367d769e936Smrg # Code to be used in simple link tests 6368d769e936Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6369d769e936Smrg 6370d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6371d769e936Smrg _LT_TAG_COMPILER 6372d769e936Smrg 6373d769e936Smrg # save warnings/boilerplate of simple test code 6374d769e936Smrg _LT_COMPILER_BOILERPLATE 6375d769e936Smrg _LT_LINKER_BOILERPLATE 6376d769e936Smrg 6377d769e936Smrg # Allow CC to be a program name with arguments. 6378d769e936Smrg lt_save_CC=$CC 6379d769e936Smrg lt_save_CFLAGS=$CFLAGS 6380d769e936Smrg lt_save_LD=$LD 6381d769e936Smrg lt_save_GCC=$GCC 6382d769e936Smrg GCC=$GXX 6383d769e936Smrg lt_save_with_gnu_ld=$with_gnu_ld 6384d769e936Smrg lt_save_path_LD=$lt_cv_path_LD 6385d769e936Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6386d769e936Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6387d769e936Smrg else 6388d769e936Smrg $as_unset lt_cv_prog_gnu_ld 6389d769e936Smrg fi 6390d769e936Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6391d769e936Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6392d769e936Smrg else 6393d769e936Smrg $as_unset lt_cv_path_LD 6394d769e936Smrg fi 6395d769e936Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6396d769e936Smrg CC=${CXX-"c++"} 6397d769e936Smrg CFLAGS=$CXXFLAGS 6398d769e936Smrg compiler=$CC 6399d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 6400d769e936Smrg _LT_CC_BASENAME([$compiler]) 6401786a6f21Smrg 6402d769e936Smrg if test -n "$compiler"; then 6403d769e936Smrg # We don't want -fno-exception when compiling C++ code, so set the 6404d769e936Smrg # no_builtin_flag separately 64057322289dSmrg if test yes = "$GXX"; then 6406d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6407d769e936Smrg else 6408d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6409d769e936Smrg fi 6410786a6f21Smrg 64117322289dSmrg if test yes = "$GXX"; then 6412d769e936Smrg # Set up default GNU C++ configuration 6413786a6f21Smrg 6414d769e936Smrg LT_PATH_LD 6415786a6f21Smrg 6416d769e936Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6417d769e936Smrg # archiving commands below assume that GNU ld is being used. 64187322289dSmrg if test yes = "$with_gnu_ld"; then 64197322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64207322289dSmrg _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' 6421786a6f21Smrg 64227322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64237322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6424786a6f21Smrg 6425d769e936Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6426d769e936Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6427d769e936Smrg # investigate it a little bit more. (MM) 64287322289dSmrg wlarc='$wl' 6429786a6f21Smrg 6430d769e936Smrg # ancient GNU ld didn't support --whole-archive et. al. 6431d769e936Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6432d769e936Smrg $GREP 'no-whole-archive' > /dev/null; then 64337322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6434d769e936Smrg else 6435d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6436d769e936Smrg fi 6437ec713c28Smrg else 6438d769e936Smrg with_gnu_ld=no 6439d769e936Smrg wlarc= 6440d769e936Smrg 6441d769e936Smrg # A generic and very simple default shared library creation 6442d769e936Smrg # command for GNU C++ for the case where it uses the native 6443d769e936Smrg # linker, instead of GNU ld. If possible, this setting should 6444d769e936Smrg # overridden to take advantage of the native linker features on 6445d769e936Smrg # the platform it is being used on. 6446d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6447ec713c28Smrg fi 6448d769e936Smrg 6449d769e936Smrg # Commands to make compiler produce verbose output that lists 6450d769e936Smrg # what "hidden" libraries, object files and flags are used when 6451d769e936Smrg # linking a shared library. 6452d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6453d769e936Smrg 6454ec713c28Smrg else 6455d769e936Smrg GXX=no 6456d769e936Smrg with_gnu_ld=no 6457d769e936Smrg wlarc= 6458ec713c28Smrg fi 64591d54945dSmrg 6460d769e936Smrg # PORTME: fill in a description of your system's C++ link characteristics 6461d769e936Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6462d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6463d769e936Smrg case $host_os in 6464d769e936Smrg aix3*) 6465d769e936Smrg # FIXME: insert proper C++ library support 6466d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6467d769e936Smrg ;; 6468d769e936Smrg aix[[4-9]]*) 64697322289dSmrg if test ia64 = "$host_cpu"; then 6470d769e936Smrg # On IA64, the linker does run time linking by default, so we don't 6471d769e936Smrg # have to do anything special. 6472d769e936Smrg aix_use_runtimelinking=no 6473d769e936Smrg exp_sym_flag='-Bexport' 64747322289dSmrg no_entry_flag= 6475d769e936Smrg else 6476d769e936Smrg aix_use_runtimelinking=no 6477d769e936Smrg 6478d769e936Smrg # Test if we are trying to use run time linking or normal 6479d769e936Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 64807322289dSmrg # have runtime linking enabled, and use it for executables. 64817322289dSmrg # For shared libraries, we enable/disable runtime linking 64827322289dSmrg # depending on the kind of the shared library created - 64837322289dSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 64847322289dSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 64857322289dSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 64867322289dSmrg # lib.a static archive 64877322289dSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 64887322289dSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 64897322289dSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 64907322289dSmrg # lib.a(lib.so.V) shared, rtl:no 64917322289dSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 64927322289dSmrg # lib.a static archive 6493d769e936Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6494d769e936Smrg for ld_flag in $LDFLAGS; do 6495d769e936Smrg case $ld_flag in 6496d769e936Smrg *-brtl*) 6497d769e936Smrg aix_use_runtimelinking=yes 6498d769e936Smrg break 6499d769e936Smrg ;; 6500d769e936Smrg esac 6501d769e936Smrg done 65027322289dSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 65037322289dSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 65047322289dSmrg # so we don't have lib.a shared libs to link our executables. 65057322289dSmrg # We have to force runtime linking in this case. 65067322289dSmrg aix_use_runtimelinking=yes 65077322289dSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65087322289dSmrg fi 6509d769e936Smrg ;; 6510d769e936Smrg esac 65111d54945dSmrg 6512d769e936Smrg exp_sym_flag='-bexport' 6513d769e936Smrg no_entry_flag='-bnoentry' 6514d769e936Smrg fi 65151d54945dSmrg 6516d769e936Smrg # When large executables or shared objects are built, AIX ld can 6517d769e936Smrg # have problems creating the table of contents. If linking a library 6518d769e936Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6519d769e936Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6520d769e936Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6521d769e936Smrg 6522d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='' 6523d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6524d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6525d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6526d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65277322289dSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65287322289dSmrg case $with_aix_soname,$aix_use_runtimelinking in 65297322289dSmrg aix,*) ;; # no import file 65307322289dSmrg svr4,* | *,yes) # use import file 65317322289dSmrg # The Import File defines what to hardcode. 65327322289dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65337322289dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65347322289dSmrg ;; 65357322289dSmrg esac 6536d769e936Smrg 65377322289dSmrg if test yes = "$GXX"; then 6538d769e936Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6539d769e936Smrg # We only want to do this on AIX 4.2 and lower, the check 6540d769e936Smrg # below for broken collect2 doesn't work under 4.3+ 65417322289dSmrg collect2name=`$CC -print-prog-name=collect2` 6542d769e936Smrg if test -f "$collect2name" && 6543d769e936Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6544d769e936Smrg then 6545d769e936Smrg # We have reworked collect2 6546d769e936Smrg : 6547d769e936Smrg else 6548d769e936Smrg # We have old collect2 6549d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6550d769e936Smrg # It fails to find uninstalled libraries when the uninstalled 6551d769e936Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6552d769e936Smrg # to unsupported forces relinking 6553d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6554d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6555d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6556d769e936Smrg fi 6557d769e936Smrg esac 6558d769e936Smrg shared_flag='-shared' 65597322289dSmrg if test yes = "$aix_use_runtimelinking"; then 65607322289dSmrg shared_flag=$shared_flag' $wl-G' 6561d769e936Smrg fi 65627322289dSmrg # Need to ensure runtime linking is disabled for the traditional 65637322289dSmrg # shared library, or the linker may eventually find shared libraries 65647322289dSmrg # /with/ Import File - we do not want to mix them. 65657322289dSmrg shared_flag_aix='-shared' 65667322289dSmrg shared_flag_svr4='-shared $wl-G' 6567d769e936Smrg else 6568d769e936Smrg # not using gcc 65697322289dSmrg if test ia64 = "$host_cpu"; then 6570d769e936Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6571d769e936Smrg # chokes on -Wl,-G. The following line is correct: 6572d769e936Smrg shared_flag='-G' 6573d769e936Smrg else 65747322289dSmrg if test yes = "$aix_use_runtimelinking"; then 65757322289dSmrg shared_flag='$wl-G' 6576d769e936Smrg else 65777322289dSmrg shared_flag='$wl-bM:SRE' 6578d769e936Smrg fi 65797322289dSmrg shared_flag_aix='$wl-bM:SRE' 65807322289dSmrg shared_flag_svr4='$wl-G' 6581d769e936Smrg fi 6582d769e936Smrg fi 65831d54945dSmrg 65847322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6585d769e936Smrg # It seems that -bexpall does not export symbols beginning with 6586d769e936Smrg # underscore (_), so it is better to generate a list of symbols to 6587d769e936Smrg # export. 6588d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 65897322289dSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6590d769e936Smrg # Warning - without using the other runtime loading flags (-brtl), 6591d769e936Smrg # -berok will link without error, but may produce a broken library. 65927322289dSmrg # The "-G" linker flag allows undefined symbols. 65937322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6594d769e936Smrg # Determine the default libpath from the value encoded in an empty 6595d769e936Smrg # executable. 6596d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 65977322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6598d769e936Smrg 65997322289dSmrg _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 6600d769e936Smrg else 66017322289dSmrg if test ia64 = "$host_cpu"; then 66027322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6603d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 66047322289dSmrg _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" 6605d769e936Smrg else 6606d769e936Smrg # Determine the default libpath from the value encoded in an 6607d769e936Smrg # empty executable. 6608d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66097322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6610d769e936Smrg # Warning - without using the other run time loading flags, 6611d769e936Smrg # -berok will link without error, but may produce a broken library. 66127322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66137322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66147322289dSmrg if test yes = "$with_gnu_ld"; then 6615d769e936Smrg # We only use this code for GNU lds that support --whole-archive. 66167322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6617d769e936Smrg else 6618d769e936Smrg # Exported symbols can be pulled into shared objects from archives 6619d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6620d769e936Smrg fi 6621d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66227322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66237322289dSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66247322289dSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66257322289dSmrg if test svr4 != "$with_aix_soname"; then 66267322289dSmrg # This is similar to how AIX traditionally builds its shared 66277322289dSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66287322289dSmrg _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' 66297322289dSmrg fi 66307322289dSmrg if test aix != "$with_aix_soname"; then 66317322289dSmrg _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' 66327322289dSmrg else 66337322289dSmrg # used by -dlpreopen to get the symbols 66347322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66357322289dSmrg fi 66367322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6637d769e936Smrg fi 6638d769e936Smrg fi 6639d769e936Smrg ;; 66401d54945dSmrg 6641d769e936Smrg beos*) 6642d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6643d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6644d769e936Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6645d769e936Smrg # support --undefined. This deserves some investigation. FIXME 66467322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6647ec713c28Smrg else 6648d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6649ec713c28Smrg fi 6650ec713c28Smrg ;; 6651d769e936Smrg 6652ec713c28Smrg chorus*) 6653d769e936Smrg case $cc_basename in 6654d769e936Smrg *) 6655d769e936Smrg # FIXME: insert proper C++ library support 6656d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6657d769e936Smrg ;; 6658d769e936Smrg esac 6659d769e936Smrg ;; 6660d769e936Smrg 6661d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 6662d769e936Smrg case $GXX,$cc_basename in 6663d769e936Smrg ,cl* | no,cl*) 6664d769e936Smrg # Native MSVC 6665d769e936Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6666d769e936Smrg # no search path for DLLs. 6667d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6668d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6669d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6670d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6671d769e936Smrg # Tell ltmain to make .lib files, not .a files. 6672d769e936Smrg libext=lib 6673d769e936Smrg # Tell ltmain to make .dll files, not .so files. 66747322289dSmrg shrext_cmds=.dll 6675d769e936Smrg # FIXME: Setting linknames here is a bad hack. 66767322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66777322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66787322289dSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 66797322289dSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66807322289dSmrg else 66817322289dSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66827322289dSmrg fi~ 66837322289dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66847322289dSmrg linknames=' 6685d769e936Smrg # The linker will not automatically build a static lib if we build a DLL. 6686d769e936Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6687d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6688d769e936Smrg # Don't use ranlib 6689d769e936Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6690d769e936Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 66917322289dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 66927322289dSmrg case $lt_outputfile in 66937322289dSmrg *.exe|*.EXE) ;; 66947322289dSmrg *) 66957322289dSmrg lt_outputfile=$lt_outputfile.exe 66967322289dSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 66977322289dSmrg ;; 66987322289dSmrg esac~ 66997322289dSmrg func_to_tool_file "$lt_outputfile"~ 67007322289dSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 67017322289dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 67027322289dSmrg $RM "$lt_outputfile.manifest"; 67037322289dSmrg fi' 6704d769e936Smrg ;; 6705d769e936Smrg *) 6706d769e936Smrg # g++ 6707d769e936Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6708d769e936Smrg # as there is no search path for DLLs. 6709d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67107322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6711d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6712d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6713d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6714d769e936Smrg 6715d769e936Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67167322289dSmrg _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' 67177322289dSmrg # If the export-symbols file already is a .def file, use it as 67187322289dSmrg # is; otherwise, prepend EXPORTS... 67197322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67207322289dSmrg cp $export_symbols $output_objdir/$soname.def; 67217322289dSmrg else 67227322289dSmrg echo EXPORTS > $output_objdir/$soname.def; 67237322289dSmrg cat $export_symbols >> $output_objdir/$soname.def; 67247322289dSmrg fi~ 67257322289dSmrg $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' 6726d769e936Smrg else 6727d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6728d769e936Smrg fi 6729ec713c28Smrg ;; 6730ec713c28Smrg esac 6731ec713c28Smrg ;; 6732d769e936Smrg darwin* | rhapsody*) 6733d769e936Smrg _LT_DARWIN_LINKER_FEATURES($1) 6734d769e936Smrg ;; 6735d769e936Smrg 67367322289dSmrg os2*) 67377322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67387322289dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67397322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67407322289dSmrg shrext_cmds=.dll 67417322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67427322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67437322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67447322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67457322289dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67467322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67477322289dSmrg emximp -o $lib $output_objdir/$libname.def' 67487322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67497322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67507322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67517322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67527322289dSmrg prefix_cmds="$SED"~ 67537322289dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67547322289dSmrg prefix_cmds="$prefix_cmds -e 1d"; 67557322289dSmrg fi~ 67567322289dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67577322289dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67587322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67597322289dSmrg emximp -o $lib $output_objdir/$libname.def' 67607322289dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67617322289dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67627322289dSmrg ;; 67637322289dSmrg 6764ec713c28Smrg dgux*) 6765d769e936Smrg case $cc_basename in 6766d769e936Smrg ec++*) 6767d769e936Smrg # FIXME: insert proper C++ library support 6768d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6769ec713c28Smrg ;; 6770d769e936Smrg ghcx*) 6771ec713c28Smrg # Green Hills C++ Compiler 6772d769e936Smrg # FIXME: insert proper C++ library support 6773d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6774ec713c28Smrg ;; 6775d769e936Smrg *) 6776d769e936Smrg # FIXME: insert proper C++ library support 6777d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6778ec713c28Smrg ;; 6779d769e936Smrg esac 6780d769e936Smrg ;; 6781d769e936Smrg 6782d769e936Smrg freebsd2.*) 6783d769e936Smrg # C++ shared libraries reported to be fairly broken before 6784d769e936Smrg # switch to ELF 6785d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6786d769e936Smrg ;; 6787d769e936Smrg 6788d769e936Smrg freebsd-elf*) 6789d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6790d769e936Smrg ;; 6791d769e936Smrg 6792ec713c28Smrg freebsd* | dragonfly*) 6793d769e936Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6794d769e936Smrg # conventions 6795d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6796d769e936Smrg ;; 6797d769e936Smrg 6798d769e936Smrg haiku*) 67997322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6800d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6801d769e936Smrg ;; 6802d769e936Smrg 6803d769e936Smrg hpux9*) 68047322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6805d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68067322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6807d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6808d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6809d769e936Smrg # but as the default 6810d769e936Smrg # location of the library. 6811d769e936Smrg 6812d769e936Smrg case $cc_basename in 6813d769e936Smrg CC*) 6814d769e936Smrg # FIXME: insert proper C++ library support 6815d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6816d769e936Smrg ;; 6817d769e936Smrg aCC*) 68187322289dSmrg _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' 6819d769e936Smrg # Commands to make compiler produce verbose output that lists 6820d769e936Smrg # what "hidden" libraries, object files and flags are used when 6821d769e936Smrg # linking a shared library. 6822d769e936Smrg # 6823d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6824d769e936Smrg # explicitly linking system object files so we need to strip them 6825d769e936Smrg # from the output so that they don't get included in the library 6826d769e936Smrg # dependencies. 68277322289dSmrg 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"' 6828d769e936Smrg ;; 6829d769e936Smrg *) 68307322289dSmrg if test yes = "$GXX"; then 68317322289dSmrg _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' 6832d769e936Smrg else 6833d769e936Smrg # FIXME: insert proper C++ library support 6834d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6835d769e936Smrg fi 6836d769e936Smrg ;; 6837d769e936Smrg esac 6838d769e936Smrg ;; 6839d769e936Smrg 6840d769e936Smrg hpux10*|hpux11*) 68417322289dSmrg if test no = "$with_gnu_ld"; then 68427322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6843d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6844d769e936Smrg 6845d769e936Smrg case $host_cpu in 6846d769e936Smrg hppa*64*|ia64*) 6847d769e936Smrg ;; 6848d769e936Smrg *) 68497322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6850d769e936Smrg ;; 6851d769e936Smrg esac 6852d769e936Smrg fi 6853d769e936Smrg case $host_cpu in 6854d769e936Smrg hppa*64*|ia64*) 6855d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6856d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6857d769e936Smrg ;; 6858d769e936Smrg *) 6859d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6860d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6861d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6862d769e936Smrg # but as the default 6863d769e936Smrg # location of the library. 6864d769e936Smrg ;; 6865d769e936Smrg esac 6866d769e936Smrg 6867d769e936Smrg case $cc_basename in 6868d769e936Smrg CC*) 6869d769e936Smrg # FIXME: insert proper C++ library support 6870d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6871ec713c28Smrg ;; 6872d769e936Smrg aCC*) 6873ec713c28Smrg case $host_cpu in 6874d769e936Smrg hppa*64*) 68757322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6876d769e936Smrg ;; 6877d769e936Smrg ia64*) 68787322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6879d769e936Smrg ;; 6880d769e936Smrg *) 68817322289dSmrg _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' 6882d769e936Smrg ;; 6883ec713c28Smrg esac 6884d769e936Smrg # Commands to make compiler produce verbose output that lists 6885d769e936Smrg # what "hidden" libraries, object files and flags are used when 6886d769e936Smrg # linking a shared library. 6887d769e936Smrg # 6888d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6889d769e936Smrg # explicitly linking system object files so we need to strip them 6890d769e936Smrg # from the output so that they don't get included in the library 6891d769e936Smrg # dependencies. 68927322289dSmrg 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"' 6893ec713c28Smrg ;; 6894d769e936Smrg *) 68957322289dSmrg if test yes = "$GXX"; then 68967322289dSmrg if test no = "$with_gnu_ld"; then 6897d769e936Smrg case $host_cpu in 6898d769e936Smrg hppa*64*) 68997322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6900d769e936Smrg ;; 6901d769e936Smrg ia64*) 69027322289dSmrg _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' 6903d769e936Smrg ;; 6904d769e936Smrg *) 69057322289dSmrg _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' 6906d769e936Smrg ;; 6907d769e936Smrg esac 6908d769e936Smrg fi 6909d769e936Smrg else 6910d769e936Smrg # FIXME: insert proper C++ library support 6911d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6912d769e936Smrg fi 6913ec713c28Smrg ;; 6914d769e936Smrg esac 6915d769e936Smrg ;; 6916d769e936Smrg 6917d769e936Smrg interix[[3-9]]*) 6918d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6919d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69207322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69217322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6922d769e936Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6923d769e936Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6924d769e936Smrg # default) and relocated if they conflict, which is a slow very memory 6925d769e936Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6926d769e936Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6927d769e936Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69287322289dSmrg _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' 69297322289dSmrg _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' 6930ec713c28Smrg ;; 6931d769e936Smrg irix5* | irix6*) 6932d769e936Smrg case $cc_basename in 6933d769e936Smrg CC*) 6934d769e936Smrg # SGI C++ 69357322289dSmrg _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' 6936d769e936Smrg 6937d769e936Smrg # Archives containing C++ object files must be created using 6938d769e936Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6939d769e936Smrg # necessary to make sure instantiated templates are included 6940d769e936Smrg # in the archive. 6941d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6942ec713c28Smrg ;; 6943d769e936Smrg *) 69447322289dSmrg if test yes = "$GXX"; then 69457322289dSmrg if test no = "$with_gnu_ld"; then 69467322289dSmrg _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' 6947d769e936Smrg else 69487322289dSmrg _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' 6949d769e936Smrg fi 6950d769e936Smrg fi 6951d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6952ec713c28Smrg ;; 6953d769e936Smrg esac 69547322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6955d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6956d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6957d769e936Smrg ;; 6958d769e936Smrg 69597322289dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6960d769e936Smrg case $cc_basename in 6961d769e936Smrg KCC*) 6962d769e936Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6963d769e936Smrg 6964d769e936Smrg # KCC will only create a shared library if the output file 6965d769e936Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6966d769e936Smrg # to its proper name (with version) after linking. 69677322289dSmrg _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' 69687322289dSmrg _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' 6969d769e936Smrg # Commands to make compiler produce verbose output that lists 6970d769e936Smrg # what "hidden" libraries, object files and flags are used when 6971d769e936Smrg # linking a shared library. 6972d769e936Smrg # 6973d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6974d769e936Smrg # explicitly linking system object files so we need to strip them 6975d769e936Smrg # from the output so that they don't get included in the library 6976d769e936Smrg # dependencies. 69777322289dSmrg 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"' 6978d769e936Smrg 69797322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69807322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6981d769e936Smrg 6982d769e936Smrg # Archives containing C++ object files must be created using 6983d769e936Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6984d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6985ec713c28Smrg ;; 6986d769e936Smrg icpc* | ecpc* ) 6987ec713c28Smrg # Intel C++ 6988d769e936Smrg with_gnu_ld=yes 6989d769e936Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6990d769e936Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6991d769e936Smrg # earlier do not add the objects themselves. 6992d769e936Smrg case `$CC -V 2>&1` in 6993d769e936Smrg *"Version 7."*) 69947322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 69957322289dSmrg _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' 6996d769e936Smrg ;; 6997d769e936Smrg *) # Version 8.0 or newer 6998d769e936Smrg tmp_idyn= 6999d769e936Smrg case $host_cpu in 7000d769e936Smrg ia64*) tmp_idyn=' -i_dynamic';; 7001d769e936Smrg esac 70027322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70037322289dSmrg _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' 7004d769e936Smrg ;; 7005d769e936Smrg esac 7006d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70077322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70087322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70097322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7010ec713c28Smrg ;; 7011d769e936Smrg pgCC* | pgcpp*) 7012d769e936Smrg # Portland Group C++ compiler 7013d769e936Smrg case `$CC -V` in 7014d769e936Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7015d769e936Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70167322289dSmrg rm -rf $tpldir~ 70177322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70187322289dSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7019d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70207322289dSmrg rm -rf $tpldir~ 70217322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70227322289dSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70237322289dSmrg $RANLIB $oldlib' 7024d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70257322289dSmrg rm -rf $tpldir~ 70267322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70277322289dSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7028d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70297322289dSmrg rm -rf $tpldir~ 70307322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70317322289dSmrg $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' 7032d769e936Smrg ;; 7033d769e936Smrg *) # Version 6 and above use weak symbols 70347322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70357322289dSmrg _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' 7036d769e936Smrg ;; 7037d769e936Smrg esac 7038d769e936Smrg 70397322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70407322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70417322289dSmrg _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' 7042d769e936Smrg ;; 7043ec713c28Smrg cxx*) 7044ec713c28Smrg # Compaq C++ 70457322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70467322289dSmrg _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' 7047d769e936Smrg 7048d769e936Smrg runpath_var=LD_RUN_PATH 7049d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7050d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7051d769e936Smrg 7052d769e936Smrg # Commands to make compiler produce verbose output that lists 7053d769e936Smrg # what "hidden" libraries, object files and flags are used when 7054d769e936Smrg # linking a shared library. 7055d769e936Smrg # 7056d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 7057d769e936Smrg # explicitly linking system object files so we need to strip them 7058d769e936Smrg # from the output so that they don't get included in the library 7059d769e936Smrg # dependencies. 70607322289dSmrg 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' 7061d769e936Smrg ;; 7062d769e936Smrg xl* | mpixl* | bgxl*) 7063d769e936Smrg # IBM XL 8.0 on PPC, with GNU ld 70647322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70657322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70667322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70677322289dSmrg if test yes = "$supports_anon_versioning"; then 7068d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70697322289dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70707322289dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70717322289dSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7072d769e936Smrg fi 7073ec713c28Smrg ;; 7074ec713c28Smrg *) 7075ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 7076ec713c28Smrg *Sun\ C*) 7077ec713c28Smrg # Sun C++ 5.9 7078d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 70797322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70807322289dSmrg _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' 7081d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 70827322289dSmrg _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' 7083d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7084d769e936Smrg 7085d769e936Smrg # Not sure whether something based on 7086d769e936Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7087d769e936Smrg # would be better. 7088d769e936Smrg output_verbose_link_cmd='func_echo_all' 7089d769e936Smrg 7090d769e936Smrg # Archives containing C++ object files must be created using 7091d769e936Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7092d769e936Smrg # necessary to make sure instantiated templates are included 7093d769e936Smrg # in the archive. 7094d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7095ec713c28Smrg ;; 7096ec713c28Smrg esac 7097ec713c28Smrg ;; 7098ec713c28Smrg esac 7099ec713c28Smrg ;; 7100d769e936Smrg 7101ec713c28Smrg lynxos*) 7102d769e936Smrg # FIXME: insert proper C++ library support 7103d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7104ec713c28Smrg ;; 7105d769e936Smrg 7106ec713c28Smrg m88k*) 7107d769e936Smrg # FIXME: insert proper C++ library support 7108d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7109ec713c28Smrg ;; 7110d769e936Smrg 7111ec713c28Smrg mvs*) 7112d769e936Smrg case $cc_basename in 7113d769e936Smrg cxx*) 7114d769e936Smrg # FIXME: insert proper C++ library support 7115d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7116ec713c28Smrg ;; 7117ec713c28Smrg *) 7118d769e936Smrg # FIXME: insert proper C++ library support 7119d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7120ec713c28Smrg ;; 7121ec713c28Smrg esac 7122ec713c28Smrg ;; 7123d769e936Smrg 7124ec713c28Smrg netbsd*) 7125d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7126d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7127d769e936Smrg wlarc= 7128d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7129d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7130d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7131d769e936Smrg fi 7132d769e936Smrg # Workaround some broken pre-1.5 toolchains 7133d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7134d769e936Smrg ;; 7135d769e936Smrg 7136d769e936Smrg *nto* | *qnx*) 7137d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7138d769e936Smrg ;; 7139d769e936Smrg 71407322289dSmrg openbsd* | bitrig*) 7141d769e936Smrg if test -f /usr/libexec/ld.so; then 7142d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7143d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7144d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7145d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71467322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71477322289dSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71487322289dSmrg _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' 71497322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71507322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7151d769e936Smrg fi 7152d769e936Smrg output_verbose_link_cmd=func_echo_all 7153d769e936Smrg else 7154d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7155d769e936Smrg fi 7156ec713c28Smrg ;; 7157d769e936Smrg 7158ec713c28Smrg osf3* | osf4* | osf5*) 7159d769e936Smrg case $cc_basename in 7160d769e936Smrg KCC*) 7161d769e936Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7162d769e936Smrg 7163d769e936Smrg # KCC will only create a shared library if the output file 7164d769e936Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7165d769e936Smrg # to its proper name (with version) after linking. 71667322289dSmrg _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' 7167d769e936Smrg 71687322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7169d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7170d769e936Smrg 7171d769e936Smrg # Archives containing C++ object files must be created using 7172d769e936Smrg # the KAI C++ compiler. 7173d769e936Smrg case $host in 7174d769e936Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7175d769e936Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7176d769e936Smrg esac 7177ec713c28Smrg ;; 7178d769e936Smrg RCC*) 7179ec713c28Smrg # Rational C++ 2.4.1 7180d769e936Smrg # FIXME: insert proper C++ library support 7181d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7182ec713c28Smrg ;; 7183d769e936Smrg cxx*) 7184d769e936Smrg case $host in 7185d769e936Smrg osf3*) 71867322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71877322289dSmrg _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' 71887322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7189d769e936Smrg ;; 7190d769e936Smrg *) 7191d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 71927322289dSmrg _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' 7193d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 71947322289dSmrg echo "-hidden">> $lib.exp~ 71957322289dSmrg $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~ 71967322289dSmrg $RM $lib.exp' 7197d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7198d769e936Smrg ;; 7199d769e936Smrg esac 7200d769e936Smrg 7201d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7202d769e936Smrg 7203d769e936Smrg # Commands to make compiler produce verbose output that lists 7204d769e936Smrg # what "hidden" libraries, object files and flags are used when 7205d769e936Smrg # linking a shared library. 7206d769e936Smrg # 7207d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 7208d769e936Smrg # explicitly linking system object files so we need to strip them 7209d769e936Smrg # from the output so that they don't get included in the library 7210d769e936Smrg # dependencies. 72117322289dSmrg 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"' 7212ec713c28Smrg ;; 7213ec713c28Smrg *) 72147322289dSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 72157322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7216d769e936Smrg case $host in 7217d769e936Smrg osf3*) 72187322289dSmrg _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' 7219d769e936Smrg ;; 7220d769e936Smrg *) 72217322289dSmrg _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' 7222d769e936Smrg ;; 7223d769e936Smrg esac 7224d769e936Smrg 72257322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7226d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7227d769e936Smrg 7228d769e936Smrg # Commands to make compiler produce verbose output that lists 7229d769e936Smrg # what "hidden" libraries, object files and flags are used when 7230d769e936Smrg # linking a shared library. 7231d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7232d769e936Smrg 7233d769e936Smrg else 7234d769e936Smrg # FIXME: insert proper C++ library support 7235d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7236d769e936Smrg fi 7237ec713c28Smrg ;; 7238d769e936Smrg esac 7239d769e936Smrg ;; 7240d769e936Smrg 7241ec713c28Smrg psos*) 7242d769e936Smrg # FIXME: insert proper C++ library support 7243d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7244d769e936Smrg ;; 7245d769e936Smrg 7246ec713c28Smrg sunos4*) 7247d769e936Smrg case $cc_basename in 7248d769e936Smrg CC*) 7249ec713c28Smrg # Sun C++ 4.x 7250d769e936Smrg # FIXME: insert proper C++ library support 7251d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7252ec713c28Smrg ;; 7253d769e936Smrg lcc*) 7254ec713c28Smrg # Lucid 7255d769e936Smrg # FIXME: insert proper C++ library support 7256d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7257ec713c28Smrg ;; 7258d769e936Smrg *) 7259d769e936Smrg # FIXME: insert proper C++ library support 7260d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7261ec713c28Smrg ;; 7262d769e936Smrg esac 7263d769e936Smrg ;; 72641d54945dSmrg 7265d769e936Smrg solaris*) 7266d769e936Smrg case $cc_basename in 7267d769e936Smrg CC* | sunCC*) 7268d769e936Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7269d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7270d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72717322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7272d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72737322289dSmrg $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' 7274d769e936Smrg 7275d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7276d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7277d769e936Smrg case $host_os in 7278d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7279d769e936Smrg *) 7280d769e936Smrg # The compiler driver will combine and reorder linker options, 72817322289dSmrg # but understands '-z linker_flag'. 7282d769e936Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7283d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7284d769e936Smrg ;; 7285d769e936Smrg esac 7286d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72871d54945dSmrg 7288d769e936Smrg output_verbose_link_cmd='func_echo_all' 72891d54945dSmrg 7290d769e936Smrg # Archives containing C++ object files must be created using 7291d769e936Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7292d769e936Smrg # necessary to make sure instantiated templates are included 7293d769e936Smrg # in the archive. 7294d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7295d769e936Smrg ;; 7296d769e936Smrg gcx*) 7297d769e936Smrg # Green Hills C++ Compiler 72987322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72991d54945dSmrg 7300d769e936Smrg # The C++ compiler must be used to create the archive. 7301d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7302d769e936Smrg ;; 7303d769e936Smrg *) 7304d769e936Smrg # GNU C++ compiler with Solaris linker 73057322289dSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 73067322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7307d769e936Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73087322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7309d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73107322289dSmrg $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' 7311d769e936Smrg 7312d769e936Smrg # Commands to make compiler produce verbose output that lists 7313d769e936Smrg # what "hidden" libraries, object files and flags are used when 7314d769e936Smrg # linking a shared library. 7315d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7316d769e936Smrg else 73177322289dSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7318d769e936Smrg # platform. 73197322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7320d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73217322289dSmrg $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' 7322d769e936Smrg 7323d769e936Smrg # Commands to make compiler produce verbose output that lists 7324d769e936Smrg # what "hidden" libraries, object files and flags are used when 7325d769e936Smrg # linking a shared library. 7326d769e936Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7327d769e936Smrg fi 7328d769e936Smrg 73297322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7330d769e936Smrg case $host_os in 7331d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7332d769e936Smrg *) 73337322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7334d769e936Smrg ;; 7335d769e936Smrg esac 7336d769e936Smrg fi 7337d769e936Smrg ;; 7338d769e936Smrg esac 7339d769e936Smrg ;; 73401d54945dSmrg 7341d769e936Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73427322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7343d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7344d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7345d769e936Smrg runpath_var='LD_RUN_PATH' 73461d54945dSmrg 7347ec713c28Smrg case $cc_basename in 7348d769e936Smrg CC*) 73497322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73507322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7351ec713c28Smrg ;; 7352d769e936Smrg *) 73537322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73547322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7355ec713c28Smrg ;; 7356ec713c28Smrg esac 7357ec713c28Smrg ;; 73581d54945dSmrg 7359d769e936Smrg sysv5* | sco3.2v5* | sco5v6*) 73607322289dSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 7361d769e936Smrg # link with -lc, and that would cause any symbols used from libc to 7362d769e936Smrg # always be unresolved, which means just about no library would 7363d769e936Smrg # ever link correctly. If we're not using GNU ld we use -z text 7364d769e936Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7365d769e936Smrg # as -z defs. 73667322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73677322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7368d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7369d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73707322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7371d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7372d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73737322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7374d769e936Smrg runpath_var='LD_RUN_PATH' 73751d54945dSmrg 7376d769e936Smrg case $cc_basename in 7377d769e936Smrg CC*) 73787322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73797322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7380d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73817322289dSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7382d769e936Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73837322289dSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7384d769e936Smrg ;; 7385d769e936Smrg *) 73867322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73877322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7388d769e936Smrg ;; 7389d769e936Smrg esac 7390ec713c28Smrg ;; 7391ba85709eSmrg 7392d769e936Smrg tandem*) 7393d769e936Smrg case $cc_basename in 7394d769e936Smrg NCC*) 7395d769e936Smrg # NonStop-UX NCC 3.20 7396d769e936Smrg # FIXME: insert proper C++ library support 7397d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7398d769e936Smrg ;; 7399d769e936Smrg *) 7400d769e936Smrg # FIXME: insert proper C++ library support 7401d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7402d769e936Smrg ;; 7403d769e936Smrg esac 7404d769e936Smrg ;; 74051d54945dSmrg 7406d769e936Smrg vxworks*) 7407d769e936Smrg # FIXME: insert proper C++ library support 7408d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7409d769e936Smrg ;; 74101d54945dSmrg 7411d769e936Smrg *) 7412d769e936Smrg # FIXME: insert proper C++ library support 7413d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7414d769e936Smrg ;; 7415d769e936Smrg esac 74161d54945dSmrg 7417d769e936Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74187322289dSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7419d769e936Smrg 74207322289dSmrg _LT_TAGVAR(GCC, $1)=$GXX 74217322289dSmrg _LT_TAGVAR(LD, $1)=$LD 7422d769e936Smrg 7423d769e936Smrg ## CAVEAT EMPTOR: 7424d769e936Smrg ## There is no encapsulation within the following macros, do not change 7425d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7426d769e936Smrg ## what you are doing... 7427d769e936Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7428d769e936Smrg _LT_COMPILER_PIC($1) 7429d769e936Smrg _LT_COMPILER_C_O($1) 7430d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7431d769e936Smrg _LT_LINKER_SHLIBS($1) 7432d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7433d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7434d769e936Smrg 7435d769e936Smrg _LT_CONFIG($1) 7436d769e936Smrg fi # test -n "$compiler" 7437d769e936Smrg 7438d769e936Smrg CC=$lt_save_CC 7439d769e936Smrg CFLAGS=$lt_save_CFLAGS 7440d769e936Smrg LDCXX=$LD 7441d769e936Smrg LD=$lt_save_LD 7442d769e936Smrg GCC=$lt_save_GCC 7443d769e936Smrg with_gnu_ld=$lt_save_with_gnu_ld 7444d769e936Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7445d769e936Smrg lt_cv_path_LD=$lt_save_path_LD 7446d769e936Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7447d769e936Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74487322289dSmrgfi # test yes != "$_lt_caught_CXX_error" 74491d54945dSmrg 7450d769e936SmrgAC_LANG_POP 7451d769e936Smrg])# _LT_LANG_CXX_CONFIG 74521d54945dSmrg 74531d54945dSmrg 7454d769e936Smrg# _LT_FUNC_STRIPNAME_CNF 7455d769e936Smrg# ---------------------- 7456d769e936Smrg# func_stripname_cnf prefix suffix name 7457d769e936Smrg# strip PREFIX and SUFFIX off of NAME. 7458d769e936Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7459d769e936Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7460d769e936Smrg# dot (in which case that matches only a dot). 7461d769e936Smrg# 7462d769e936Smrg# This function is identical to the (non-XSI) version of func_stripname, 7463d769e936Smrg# except this one can be used by m4 code that may be executed by configure, 7464d769e936Smrg# rather than the libtool script. 7465d769e936Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7466d769e936SmrgAC_REQUIRE([_LT_DECL_SED]) 7467d769e936SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7468d769e936Smrgfunc_stripname_cnf () 7469d769e936Smrg{ 74707322289dSmrg case @S|@2 in 74717322289dSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74727322289dSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7473d769e936Smrg esac 7474d769e936Smrg} # func_stripname_cnf 7475d769e936Smrg])# _LT_FUNC_STRIPNAME_CNF 74761d54945dSmrg 74777322289dSmrg 7478d769e936Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7479d769e936Smrg# --------------------------------- 7480d769e936Smrg# Figure out "hidden" library dependencies from verbose 7481d769e936Smrg# compiler output when linking a shared library. 7482d769e936Smrg# Parse the compiler output and extract the necessary 7483d769e936Smrg# objects, libraries and library flags. 7484d769e936Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7485d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7486d769e936SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7487d769e936Smrg# Dependencies to place before and after the object being linked: 7488d769e936Smrg_LT_TAGVAR(predep_objects, $1)= 7489d769e936Smrg_LT_TAGVAR(postdep_objects, $1)= 7490d769e936Smrg_LT_TAGVAR(predeps, $1)= 7491d769e936Smrg_LT_TAGVAR(postdeps, $1)= 7492d769e936Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7493d769e936Smrg 7494d769e936Smrgdnl we can't use the lt_simple_compile_test_code here, 7495d769e936Smrgdnl because it contains code intended for an executable, 7496d769e936Smrgdnl not a library. It's possible we should let each 7497d769e936Smrgdnl tag define a new lt_????_link_test_code variable, 7498d769e936Smrgdnl but it's only used here... 7499d769e936Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7500d769e936Smrgint a; 7501d769e936Smrgvoid foo (void) { a = 0; } 7502d769e936Smrg_LT_EOF 7503d769e936Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7504d769e936Smrgclass Foo 7505d769e936Smrg{ 7506d769e936Smrgpublic: 7507d769e936Smrg Foo (void) { a = 0; } 7508d769e936Smrgprivate: 7509d769e936Smrg int a; 7510d769e936Smrg}; 7511d769e936Smrg_LT_EOF 7512d769e936Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7513d769e936Smrg subroutine foo 7514d769e936Smrg implicit none 7515d769e936Smrg integer*4 a 7516d769e936Smrg a=0 7517d769e936Smrg return 7518d769e936Smrg end 7519d769e936Smrg_LT_EOF 7520d769e936Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7521d769e936Smrg subroutine foo 7522d769e936Smrg implicit none 7523d769e936Smrg integer a 7524d769e936Smrg a=0 7525d769e936Smrg return 7526d769e936Smrg end 7527d769e936Smrg_LT_EOF 7528d769e936Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7529d769e936Smrgpublic class foo { 7530d769e936Smrg private int a; 7531d769e936Smrg public void bar (void) { 7532d769e936Smrg a = 0; 7533d769e936Smrg } 7534d769e936Smrg}; 7535d769e936Smrg_LT_EOF 7536d769e936Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7537d769e936Smrgpackage foo 7538d769e936Smrgfunc foo() { 7539d769e936Smrg} 7540d769e936Smrg_LT_EOF 75411d54945dSmrg]) 75421d54945dSmrg 7543d769e936Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7544d769e936Smrgcase "$CC $CFLAGS " in #( 7545d769e936Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7546d769e936Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7547d769e936Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75481d54945dSmrgesac 75491d54945dSmrg 7550d769e936Smrgdnl Parse the compiler output and extract the necessary 7551d769e936Smrgdnl objects, libraries and library flags. 7552d769e936Smrgif AC_TRY_EVAL(ac_compile); then 7553d769e936Smrg # Parse the compiler output and extract the necessary 7554d769e936Smrg # objects, libraries and library flags. 7555786a6f21Smrg 7556d769e936Smrg # Sentinel used to keep track of whether or not we are before 7557d769e936Smrg # the conftest object file. 7558d769e936Smrg pre_test_object_deps_done=no 7559786a6f21Smrg 7560d769e936Smrg for p in `eval "$output_verbose_link_cmd"`; do 75617322289dSmrg case $prev$p in 75621d54945dSmrg 7563d769e936Smrg -L* | -R* | -l*) 7564d769e936Smrg # Some compilers place space between "-{L,R}" and the path. 7565d769e936Smrg # Remove the space. 75667322289dSmrg if test x-L = "$p" || 75677322289dSmrg test x-R = "$p"; then 7568d769e936Smrg prev=$p 7569d769e936Smrg continue 7570d769e936Smrg fi 75711d54945dSmrg 7572d769e936Smrg # Expand the sysroot to ease extracting the directories later. 7573d769e936Smrg if test -z "$prev"; then 7574d769e936Smrg case $p in 7575d769e936Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7576d769e936Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7577d769e936Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7578d769e936Smrg esac 7579d769e936Smrg fi 7580d769e936Smrg case $p in 7581d769e936Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7582d769e936Smrg esac 75837322289dSmrg if test no = "$pre_test_object_deps_done"; then 75847322289dSmrg case $prev in 7585d769e936Smrg -L | -R) 7586d769e936Smrg # Internal compiler library paths should come after those 7587d769e936Smrg # provided the user. The postdeps already come after the 7588d769e936Smrg # user supplied libs so there is no need to process them. 7589d769e936Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 75907322289dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7591d769e936Smrg else 75927322289dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7593d769e936Smrg fi 7594d769e936Smrg ;; 7595d769e936Smrg # The "-l" case would never come before the object being 7596d769e936Smrg # linked, so don't bother handling this case. 7597d769e936Smrg esac 7598d769e936Smrg else 7599d769e936Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 76007322289dSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 7601d769e936Smrg else 76027322289dSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7603d769e936Smrg fi 7604d769e936Smrg fi 7605d769e936Smrg prev= 7606d769e936Smrg ;; 76071d54945dSmrg 7608d769e936Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7609d769e936Smrg *.$objext) 7610d769e936Smrg # This assumes that the test object file only shows up 7611d769e936Smrg # once in the compiler output. 7612d769e936Smrg if test "$p" = "conftest.$objext"; then 7613d769e936Smrg pre_test_object_deps_done=yes 7614d769e936Smrg continue 7615d769e936Smrg fi 76161d54945dSmrg 76177322289dSmrg if test no = "$pre_test_object_deps_done"; then 7618d769e936Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76197322289dSmrg _LT_TAGVAR(predep_objects, $1)=$p 7620d769e936Smrg else 7621d769e936Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7622d769e936Smrg fi 7623d769e936Smrg else 7624d769e936Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76257322289dSmrg _LT_TAGVAR(postdep_objects, $1)=$p 7626d769e936Smrg else 7627d769e936Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7628d769e936Smrg fi 7629d769e936Smrg fi 7630d769e936Smrg ;; 76311d54945dSmrg 7632d769e936Smrg *) ;; # Ignore the rest. 76331d54945dSmrg 7634d769e936Smrg esac 7635d769e936Smrg done 76361d54945dSmrg 7637d769e936Smrg # Clean up. 7638d769e936Smrg rm -f a.out a.exe 7639d769e936Smrgelse 7640d769e936Smrg echo "libtool.m4: error: problem compiling $1 test program" 7641d769e936Smrgfi 76421d54945dSmrg 7643d769e936Smrg$RM -f confest.$objext 7644d769e936SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76451d54945dSmrg 7646d769e936Smrg# PORTME: override above test on systems where it is broken 7647d769e936Smrgm4_if([$1], [CXX], 7648d769e936Smrg[case $host_os in 7649d769e936Smrginterix[[3-9]]*) 7650d769e936Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7651d769e936Smrg # hack all around it, let's just trust "g++" to DTRT. 7652d769e936Smrg _LT_TAGVAR(predep_objects,$1)= 7653d769e936Smrg _LT_TAGVAR(postdep_objects,$1)= 7654d769e936Smrg _LT_TAGVAR(postdeps,$1)= 7655d769e936Smrg ;; 7656d769e936Smrgesac 7657d769e936Smrg]) 76581d54945dSmrg 7659d769e936Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7660d769e936Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7661d769e936Smrgesac 7662d769e936Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7663d769e936Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76647322289dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7665d769e936Smrgfi 7666d769e936Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7667d769e936Smrg [The directories searched by this compiler when creating a shared library]) 7668d769e936Smrg_LT_TAGDECL([], [predep_objects], [1], 7669d769e936Smrg [Dependencies to place before and after the objects being linked to 7670d769e936Smrg create a shared library]) 7671d769e936Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7672d769e936Smrg_LT_TAGDECL([], [predeps], [1]) 7673d769e936Smrg_LT_TAGDECL([], [postdeps], [1]) 7674d769e936Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7675d769e936Smrg [The library search path used internally by the compiler when linking 7676d769e936Smrg a shared library]) 7677d769e936Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7678d769e936Smrg 7679d769e936Smrg 7680d769e936Smrg# _LT_LANG_F77_CONFIG([TAG]) 7681d769e936Smrg# -------------------------- 7682d769e936Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7683d769e936Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 76847322289dSmrg# to write the compiler configuration to 'libtool'. 7685d769e936Smrgm4_defun([_LT_LANG_F77_CONFIG], 7686d769e936Smrg[AC_LANG_PUSH(Fortran 77) 76877322289dSmrgif test -z "$F77" || test no = "$F77"; then 7688d769e936Smrg _lt_disable_F77=yes 7689d769e936Smrgfi 76901d54945dSmrg 7691d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7692d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7693d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7694d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7695d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7696d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7697d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7698d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7699d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7700d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7701d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7702d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7703d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 7704d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7705d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7706d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7707d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7708d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7709d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7710d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7711d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77121d54945dSmrg 7713d769e936Smrg# Source file extension for f77 test sources. 7714d769e936Smrgac_ext=f 77151d54945dSmrg 7716d769e936Smrg# Object file extension for compiled f77 test sources. 7717d769e936Smrgobjext=o 7718d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 7719d769e936Smrg 7720d769e936Smrg# No sense in running all these tests if we already determined that 7721d769e936Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7722d769e936Smrg# are currently assumed to apply to all compilers on this platform, 7723d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 77247322289dSmrgif test yes != "$_lt_disable_F77"; then 7725d769e936Smrg # Code to be used in simple compile tests 7726d769e936Smrg lt_simple_compile_test_code="\ 7727d769e936Smrg subroutine t 7728d769e936Smrg return 7729d769e936Smrg end 7730d769e936Smrg" 77311d54945dSmrg 7732d769e936Smrg # Code to be used in simple link tests 7733d769e936Smrg lt_simple_link_test_code="\ 7734d769e936Smrg program t 7735d769e936Smrg end 7736d769e936Smrg" 77371d54945dSmrg 7738d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7739d769e936Smrg _LT_TAG_COMPILER 7740d769e936Smrg 7741d769e936Smrg # save warnings/boilerplate of simple test code 7742d769e936Smrg _LT_COMPILER_BOILERPLATE 7743d769e936Smrg _LT_LINKER_BOILERPLATE 7744d769e936Smrg 7745d769e936Smrg # Allow CC to be a program name with arguments. 77467322289dSmrg lt_save_CC=$CC 7747d769e936Smrg lt_save_GCC=$GCC 7748d769e936Smrg lt_save_CFLAGS=$CFLAGS 7749d769e936Smrg CC=${F77-"f77"} 7750d769e936Smrg CFLAGS=$FFLAGS 7751d769e936Smrg compiler=$CC 7752d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 7753d769e936Smrg _LT_CC_BASENAME([$compiler]) 7754d769e936Smrg GCC=$G77 7755d769e936Smrg if test -n "$compiler"; then 7756d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7757d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 77581d54945dSmrg 7759d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77607322289dSmrg test no = "$can_build_shared" && enable_shared=no 77611d54945dSmrg 7762d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7763d769e936Smrg # are all built from PIC. 7764ec713c28Smrg case $host_os in 7765d769e936Smrg aix3*) 77667322289dSmrg test yes = "$enable_shared" && enable_static=no 7767d769e936Smrg if test -n "$RANLIB"; then 7768d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7769d769e936Smrg postinstall_cmds='$RANLIB $lib' 7770d769e936Smrg fi 7771d769e936Smrg ;; 7772d769e936Smrg aix[[4-9]]*) 77737322289dSmrg if test ia64 != "$host_cpu"; then 77747322289dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77757322289dSmrg yes,aix,yes) ;; # shared object as lib.so file only 77767322289dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 77777322289dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77787322289dSmrg esac 7779ec713c28Smrg fi 7780d769e936Smrg ;; 7781d769e936Smrg esac 7782d769e936Smrg AC_MSG_RESULT([$enable_shared]) 7783d769e936Smrg 7784d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 7785d769e936Smrg # Make sure either enable_shared or enable_static is yes. 77867322289dSmrg test yes = "$enable_shared" || enable_static=yes 7787d769e936Smrg AC_MSG_RESULT([$enable_static]) 7788d769e936Smrg 77897322289dSmrg _LT_TAGVAR(GCC, $1)=$G77 77907322289dSmrg _LT_TAGVAR(LD, $1)=$LD 7791d769e936Smrg 7792d769e936Smrg ## CAVEAT EMPTOR: 7793d769e936Smrg ## There is no encapsulation within the following macros, do not change 7794d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7795d769e936Smrg ## what you are doing... 7796d769e936Smrg _LT_COMPILER_PIC($1) 7797d769e936Smrg _LT_COMPILER_C_O($1) 7798d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7799d769e936Smrg _LT_LINKER_SHLIBS($1) 7800d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7801d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7802d769e936Smrg 7803d769e936Smrg _LT_CONFIG($1) 7804d769e936Smrg fi # test -n "$compiler" 7805d769e936Smrg 7806d769e936Smrg GCC=$lt_save_GCC 78077322289dSmrg CC=$lt_save_CC 78087322289dSmrg CFLAGS=$lt_save_CFLAGS 78097322289dSmrgfi # test yes != "$_lt_disable_F77" 78101d54945dSmrg 7811d769e936SmrgAC_LANG_POP 7812d769e936Smrg])# _LT_LANG_F77_CONFIG 78131d54945dSmrg 7814786a6f21Smrg 7815d769e936Smrg# _LT_LANG_FC_CONFIG([TAG]) 7816d769e936Smrg# ------------------------- 7817d769e936Smrg# Ensure that the configuration variables for a Fortran compiler are 7818d769e936Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78197322289dSmrg# to write the compiler configuration to 'libtool'. 7820d769e936Smrgm4_defun([_LT_LANG_FC_CONFIG], 7821d769e936Smrg[AC_LANG_PUSH(Fortran) 7822d769e936Smrg 78237322289dSmrgif test -z "$FC" || test no = "$FC"; then 7824d769e936Smrg _lt_disable_FC=yes 7825d769e936Smrgfi 7826786a6f21Smrg 7827d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7828d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7829d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7830d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7831d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7832d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7833d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7834d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7835d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7836d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7837d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7838d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7839d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 7840d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7841d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7842d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7843d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7844d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7845d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7846d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7847d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7848d769e936Smrg 7849d769e936Smrg# Source file extension for fc test sources. 7850d769e936Smrgac_ext=${ac_fc_srcext-f} 7851d769e936Smrg 7852d769e936Smrg# Object file extension for compiled fc test sources. 7853d769e936Smrgobjext=o 7854d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 7855d769e936Smrg 7856d769e936Smrg# No sense in running all these tests if we already determined that 7857d769e936Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7858d769e936Smrg# are currently assumed to apply to all compilers on this platform, 7859d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 78607322289dSmrgif test yes != "$_lt_disable_FC"; then 7861d769e936Smrg # Code to be used in simple compile tests 7862d769e936Smrg lt_simple_compile_test_code="\ 7863d769e936Smrg subroutine t 7864d769e936Smrg return 7865d769e936Smrg end 7866d769e936Smrg" 7867786a6f21Smrg 7868d769e936Smrg # Code to be used in simple link tests 7869d769e936Smrg lt_simple_link_test_code="\ 7870d769e936Smrg program t 7871d769e936Smrg end 7872d769e936Smrg" 7873786a6f21Smrg 7874d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7875d769e936Smrg _LT_TAG_COMPILER 7876d769e936Smrg 7877d769e936Smrg # save warnings/boilerplate of simple test code 7878d769e936Smrg _LT_COMPILER_BOILERPLATE 7879d769e936Smrg _LT_LINKER_BOILERPLATE 7880d769e936Smrg 7881d769e936Smrg # Allow CC to be a program name with arguments. 78827322289dSmrg lt_save_CC=$CC 7883d769e936Smrg lt_save_GCC=$GCC 7884d769e936Smrg lt_save_CFLAGS=$CFLAGS 7885d769e936Smrg CC=${FC-"f95"} 7886d769e936Smrg CFLAGS=$FCFLAGS 7887d769e936Smrg compiler=$CC 7888d769e936Smrg GCC=$ac_cv_fc_compiler_gnu 7889d769e936Smrg 7890d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 7891d769e936Smrg _LT_CC_BASENAME([$compiler]) 7892d769e936Smrg 7893d769e936Smrg if test -n "$compiler"; then 7894d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7895d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 7896d769e936Smrg 7897d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 78987322289dSmrg test no = "$can_build_shared" && enable_shared=no 7899d769e936Smrg 7900d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7901d769e936Smrg # are all built from PIC. 7902d769e936Smrg case $host_os in 7903d769e936Smrg aix3*) 79047322289dSmrg test yes = "$enable_shared" && enable_static=no 7905d769e936Smrg if test -n "$RANLIB"; then 7906d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7907d769e936Smrg postinstall_cmds='$RANLIB $lib' 7908d769e936Smrg fi 7909d769e936Smrg ;; 7910d769e936Smrg aix[[4-9]]*) 79117322289dSmrg if test ia64 != "$host_cpu"; then 79127322289dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79137322289dSmrg yes,aix,yes) ;; # shared object as lib.so file only 79147322289dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 79157322289dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79167322289dSmrg esac 7917ec713c28Smrg fi 7918d769e936Smrg ;; 7919d769e936Smrg esac 7920d769e936Smrg AC_MSG_RESULT([$enable_shared]) 7921d769e936Smrg 7922d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 7923d769e936Smrg # Make sure either enable_shared or enable_static is yes. 79247322289dSmrg test yes = "$enable_shared" || enable_static=yes 7925d769e936Smrg AC_MSG_RESULT([$enable_static]) 7926d769e936Smrg 79277322289dSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79287322289dSmrg _LT_TAGVAR(LD, $1)=$LD 7929d769e936Smrg 7930d769e936Smrg ## CAVEAT EMPTOR: 7931d769e936Smrg ## There is no encapsulation within the following macros, do not change 7932d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7933d769e936Smrg ## what you are doing... 7934d769e936Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7935d769e936Smrg _LT_COMPILER_PIC($1) 7936d769e936Smrg _LT_COMPILER_C_O($1) 7937d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7938d769e936Smrg _LT_LINKER_SHLIBS($1) 7939d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7940d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7941d769e936Smrg 7942d769e936Smrg _LT_CONFIG($1) 7943d769e936Smrg fi # test -n "$compiler" 7944d769e936Smrg 7945d769e936Smrg GCC=$lt_save_GCC 7946d769e936Smrg CC=$lt_save_CC 7947d769e936Smrg CFLAGS=$lt_save_CFLAGS 79487322289dSmrgfi # test yes != "$_lt_disable_FC" 79491d54945dSmrg 7950d769e936SmrgAC_LANG_POP 7951d769e936Smrg])# _LT_LANG_FC_CONFIG 79521d54945dSmrg 79531d54945dSmrg 7954d769e936Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7955d769e936Smrg# -------------------------- 7956d769e936Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7957d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79587322289dSmrg# to write the compiler configuration to 'libtool'. 7959d769e936Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7960d769e936Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7961d769e936SmrgAC_LANG_SAVE 79621d54945dSmrg 7963d769e936Smrg# Source file extension for Java test sources. 7964d769e936Smrgac_ext=java 79651d54945dSmrg 7966d769e936Smrg# Object file extension for compiled Java test sources. 7967d769e936Smrgobjext=o 7968d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 79691d54945dSmrg 7970d769e936Smrg# Code to be used in simple compile tests 7971d769e936Smrglt_simple_compile_test_code="class foo {}" 79721d54945dSmrg 7973d769e936Smrg# Code to be used in simple link tests 7974d769e936Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7975d769e936Smrg 7976d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7977d769e936Smrg_LT_TAG_COMPILER 7978d769e936Smrg 7979d769e936Smrg# save warnings/boilerplate of simple test code 7980d769e936Smrg_LT_COMPILER_BOILERPLATE 7981d769e936Smrg_LT_LINKER_BOILERPLATE 7982d769e936Smrg 7983d769e936Smrg# Allow CC to be a program name with arguments. 7984d769e936Smrglt_save_CC=$CC 7985d769e936Smrglt_save_CFLAGS=$CFLAGS 7986d769e936Smrglt_save_GCC=$GCC 7987d769e936SmrgGCC=yes 7988d769e936SmrgCC=${GCJ-"gcj"} 7989d769e936SmrgCFLAGS=$GCJFLAGS 7990d769e936Smrgcompiler=$CC 7991d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 79927322289dSmrg_LT_TAGVAR(LD, $1)=$LD 7993d769e936Smrg_LT_CC_BASENAME([$compiler]) 79941d54945dSmrg 7995d769e936Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7996d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79971d54945dSmrg 7998d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7999d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8000d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80011d54945dSmrg 8002d769e936Smrgif test -n "$compiler"; then 8003d769e936Smrg _LT_COMPILER_NO_RTTI($1) 8004d769e936Smrg _LT_COMPILER_PIC($1) 8005d769e936Smrg _LT_COMPILER_C_O($1) 8006d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 8007d769e936Smrg _LT_LINKER_SHLIBS($1) 8008d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80091d54945dSmrg 8010d769e936Smrg _LT_CONFIG($1) 8011d769e936Smrgfi 80121d54945dSmrg 8013d769e936SmrgAC_LANG_RESTORE 80141d54945dSmrg 8015d769e936SmrgGCC=$lt_save_GCC 8016d769e936SmrgCC=$lt_save_CC 8017d769e936SmrgCFLAGS=$lt_save_CFLAGS 8018d769e936Smrg])# _LT_LANG_GCJ_CONFIG 80191d54945dSmrg 80201d54945dSmrg 8021d769e936Smrg# _LT_LANG_GO_CONFIG([TAG]) 8022d769e936Smrg# -------------------------- 8023d769e936Smrg# Ensure that the configuration variables for the GNU Go compiler 8024d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80257322289dSmrg# to write the compiler configuration to 'libtool'. 8026d769e936Smrgm4_defun([_LT_LANG_GO_CONFIG], 8027d769e936Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8028d769e936SmrgAC_LANG_SAVE 80291d54945dSmrg 8030d769e936Smrg# Source file extension for Go test sources. 8031d769e936Smrgac_ext=go 80321d54945dSmrg 8033d769e936Smrg# Object file extension for compiled Go test sources. 8034d769e936Smrgobjext=o 8035d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 80361d54945dSmrg 8037d769e936Smrg# Code to be used in simple compile tests 8038d769e936Smrglt_simple_compile_test_code="package main; func main() { }" 80391d54945dSmrg 8040d769e936Smrg# Code to be used in simple link tests 8041d769e936Smrglt_simple_link_test_code='package main; func main() { }' 80421d54945dSmrg 8043d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8044d769e936Smrg_LT_TAG_COMPILER 80451d54945dSmrg 8046d769e936Smrg# save warnings/boilerplate of simple test code 8047d769e936Smrg_LT_COMPILER_BOILERPLATE 8048d769e936Smrg_LT_LINKER_BOILERPLATE 80491d54945dSmrg 8050d769e936Smrg# Allow CC to be a program name with arguments. 8051d769e936Smrglt_save_CC=$CC 8052d769e936Smrglt_save_CFLAGS=$CFLAGS 8053d769e936Smrglt_save_GCC=$GCC 8054d769e936SmrgGCC=yes 8055d769e936SmrgCC=${GOC-"gccgo"} 8056d769e936SmrgCFLAGS=$GOFLAGS 8057d769e936Smrgcompiler=$CC 8058d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 80597322289dSmrg_LT_TAGVAR(LD, $1)=$LD 8060d769e936Smrg_LT_CC_BASENAME([$compiler]) 80611d54945dSmrg 8062d769e936Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8063d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80641d54945dSmrg 8065d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8066d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8067d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80681d54945dSmrg 8069d769e936Smrgif test -n "$compiler"; then 8070d769e936Smrg _LT_COMPILER_NO_RTTI($1) 8071d769e936Smrg _LT_COMPILER_PIC($1) 8072d769e936Smrg _LT_COMPILER_C_O($1) 8073d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 8074d769e936Smrg _LT_LINKER_SHLIBS($1) 8075d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8076786a6f21Smrg 8077d769e936Smrg _LT_CONFIG($1) 8078d769e936Smrgfi 80791d54945dSmrg 8080d769e936SmrgAC_LANG_RESTORE 80811d54945dSmrg 8082d769e936SmrgGCC=$lt_save_GCC 8083d769e936SmrgCC=$lt_save_CC 8084d769e936SmrgCFLAGS=$lt_save_CFLAGS 8085d769e936Smrg])# _LT_LANG_GO_CONFIG 80861d54945dSmrg 80871d54945dSmrg 8088d769e936Smrg# _LT_LANG_RC_CONFIG([TAG]) 8089d769e936Smrg# ------------------------- 8090d769e936Smrg# Ensure that the configuration variables for the Windows resource compiler 8091d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80927322289dSmrg# to write the compiler configuration to 'libtool'. 8093d769e936Smrgm4_defun([_LT_LANG_RC_CONFIG], 8094d769e936Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8095d769e936SmrgAC_LANG_SAVE 80961d54945dSmrg 8097d769e936Smrg# Source file extension for RC test sources. 8098d769e936Smrgac_ext=rc 80991d54945dSmrg 8100d769e936Smrg# Object file extension for compiled RC test sources. 8101d769e936Smrgobjext=o 8102d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 81031d54945dSmrg 8104d769e936Smrg# Code to be used in simple compile tests 8105d769e936Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81061d54945dSmrg 8107d769e936Smrg# Code to be used in simple link tests 81087322289dSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81091d54945dSmrg 8110d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8111d769e936Smrg_LT_TAG_COMPILER 8112786a6f21Smrg 8113d769e936Smrg# save warnings/boilerplate of simple test code 8114d769e936Smrg_LT_COMPILER_BOILERPLATE 8115d769e936Smrg_LT_LINKER_BOILERPLATE 81161d54945dSmrg 8117d769e936Smrg# Allow CC to be a program name with arguments. 81187322289dSmrglt_save_CC=$CC 8119d769e936Smrglt_save_CFLAGS=$CFLAGS 8120d769e936Smrglt_save_GCC=$GCC 8121d769e936SmrgGCC= 8122d769e936SmrgCC=${RC-"windres"} 8123d769e936SmrgCFLAGS= 8124d769e936Smrgcompiler=$CC 8125d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 8126d769e936Smrg_LT_CC_BASENAME([$compiler]) 8127d769e936Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81281d54945dSmrg 8129d769e936Smrgif test -n "$compiler"; then 8130d769e936Smrg : 8131d769e936Smrg _LT_CONFIG($1) 8132d769e936Smrgfi 8133d769e936Smrg 8134d769e936SmrgGCC=$lt_save_GCC 8135d769e936SmrgAC_LANG_RESTORE 8136d769e936SmrgCC=$lt_save_CC 8137d769e936SmrgCFLAGS=$lt_save_CFLAGS 8138d769e936Smrg])# _LT_LANG_RC_CONFIG 81391d54945dSmrg 81401d54945dSmrg 8141d769e936Smrg# LT_PROG_GCJ 8142d769e936Smrg# ----------- 8143d769e936SmrgAC_DEFUN([LT_PROG_GCJ], 8144d769e936Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8145d769e936Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8146d769e936Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81477322289dSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8148d769e936Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8149d769e936Smrg]) 8150d769e936Smrg 8151d769e936Smrg# Old name: 8152d769e936SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8153d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8154d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81551d54945dSmrg 81561d54945dSmrg 8157d769e936Smrg# LT_PROG_GO 8158d769e936Smrg# ---------- 8159d769e936SmrgAC_DEFUN([LT_PROG_GO], 8160d769e936Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8161d769e936Smrg]) 81621d54945dSmrg 81631d54945dSmrg 8164d769e936Smrg# LT_PROG_RC 8165d769e936Smrg# ---------- 8166d769e936SmrgAC_DEFUN([LT_PROG_RC], 8167d769e936Smrg[AC_CHECK_TOOL(RC, windres,) 8168ec713c28Smrg]) 81691d54945dSmrg 8170d769e936Smrg# Old name: 8171d769e936SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8172d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8173d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8174d769e936Smrg 8175d769e936Smrg 8176d769e936Smrg# _LT_DECL_EGREP 8177d769e936Smrg# -------------- 8178d769e936Smrg# If we don't have a new enough Autoconf to choose the best grep 8179d769e936Smrg# available, choose the one first in the user's PATH. 8180d769e936Smrgm4_defun([_LT_DECL_EGREP], 8181d769e936Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8182d769e936SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8183d769e936Smrgtest -z "$GREP" && GREP=grep 8184d769e936Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8185d769e936Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8186d769e936Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8187d769e936Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8188d769e936SmrgAC_SUBST([GREP]) 81891d54945dSmrg]) 81901d54945dSmrg 8191ba85709eSmrg 8192d769e936Smrg# _LT_DECL_OBJDUMP 8193d769e936Smrg# -------------- 8194d769e936Smrg# If we don't have a new enough Autoconf to choose the best objdump 8195d769e936Smrg# available, choose the one first in the user's PATH. 8196d769e936Smrgm4_defun([_LT_DECL_OBJDUMP], 8197d769e936Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8198d769e936Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8199d769e936Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8200d769e936SmrgAC_SUBST([OBJDUMP]) 8201d769e936Smrg]) 8202ba85709eSmrg 8203d769e936Smrg# _LT_DECL_DLLTOOL 8204ec713c28Smrg# ---------------- 8205d769e936Smrg# Ensure DLLTOOL variable is set. 8206d769e936Smrgm4_defun([_LT_DECL_DLLTOOL], 8207d769e936Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8208d769e936Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8209d769e936Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8210d769e936SmrgAC_SUBST([DLLTOOL]) 8211d769e936Smrg]) 8212ba85709eSmrg 8213d769e936Smrg# _LT_DECL_SED 8214d769e936Smrg# ------------ 8215d769e936Smrg# Check for a fully-functional sed program, that truncates 8216d769e936Smrg# as few characters as possible. Prefer GNU sed if found. 8217d769e936Smrgm4_defun([_LT_DECL_SED], 8218d769e936Smrg[AC_PROG_SED 8219d769e936Smrgtest -z "$SED" && SED=sed 8220d769e936SmrgXsed="$SED -e 1s/^X//" 8221d769e936Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8222d769e936Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8223d769e936Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8224d769e936Smrg])# _LT_DECL_SED 8225ba85709eSmrg 8226d769e936Smrgm4_ifndef([AC_PROG_SED], [ 8227ec713c28Smrg# NOTE: This macro has been submitted for inclusion into # 8228ec713c28Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8229ec713c28Smrg# a released version of Autoconf we should remove this # 8230d769e936Smrg# macro and use it instead. # 8231d769e936Smrg 8232d769e936Smrgm4_defun([AC_PROG_SED], 8233ec713c28Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8234ec713c28SmrgAC_CACHE_VAL(lt_cv_path_SED, 8235ec713c28Smrg[# Loop through the user's path and test for sed and gsed. 8236ec713c28Smrg# Then use that list of sed's as ones to test for truncation. 8237ec713c28Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8238ec713c28Smrgfor as_dir in $PATH 8239ec713c28Smrgdo 8240ec713c28Smrg IFS=$as_save_IFS 8241ec713c28Smrg test -z "$as_dir" && as_dir=. 8242ec713c28Smrg for lt_ac_prog in sed gsed; do 8243ec713c28Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8244d769e936Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8245ec713c28Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8246ec713c28Smrg fi 8247ec713c28Smrg done 8248ec713c28Smrg done 8249ec713c28Smrgdone 8250ec713c28SmrgIFS=$as_save_IFS 8251ec713c28Smrglt_ac_max=0 8252ec713c28Smrglt_ac_count=0 8253ec713c28Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8254ec713c28Smrg# along with /bin/sed that truncates output. 8255ec713c28Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82567322289dSmrg test ! -f "$lt_ac_sed" && continue 8257ec713c28Smrg cat /dev/null > conftest.in 8258ec713c28Smrg lt_ac_count=0 8259ec713c28Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8260ec713c28Smrg # Check for GNU sed and select it if it is found. 8261ec713c28Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8262ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 8263ec713c28Smrg break 8264ec713c28Smrg fi 8265ec713c28Smrg while true; do 8266ec713c28Smrg cat conftest.in conftest.in >conftest.tmp 8267ec713c28Smrg mv conftest.tmp conftest.in 8268ec713c28Smrg cp conftest.in conftest.nl 8269ec713c28Smrg echo >>conftest.nl 8270ec713c28Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8271ec713c28Smrg cmp -s conftest.out conftest.nl || break 8272ec713c28Smrg # 10000 chars as input seems more than enough 82737322289dSmrg test 10 -lt "$lt_ac_count" && break 8274ec713c28Smrg lt_ac_count=`expr $lt_ac_count + 1` 82757322289dSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8276ec713c28Smrg lt_ac_max=$lt_ac_count 8277ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 8278ec713c28Smrg fi 8279ec713c28Smrg done 8280ec713c28Smrgdone 8281ec713c28Smrg]) 8282ec713c28SmrgSED=$lt_cv_path_SED 8283ec713c28SmrgAC_SUBST([SED]) 8284ec713c28SmrgAC_MSG_RESULT([$SED]) 8285d769e936Smrg])#AC_PROG_SED 8286d769e936Smrg])#m4_ifndef 8287d769e936Smrg 8288d769e936Smrg# Old name: 8289d769e936SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8290d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8291d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8292d769e936Smrg 8293d769e936Smrg 8294d769e936Smrg# _LT_CHECK_SHELL_FEATURES 8295d769e936Smrg# ------------------------ 8296d769e936Smrg# Find out whether the shell is Bourne or XSI compatible, 8297d769e936Smrg# or has some other useful features. 8298d769e936Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 82997322289dSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8300d769e936Smrg lt_unset=unset 8301d769e936Smrgelse 8302d769e936Smrg lt_unset=false 8303d769e936Smrgfi 8304d769e936Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8305d769e936Smrg 8306d769e936Smrg# test EBCDIC or ASCII 8307d769e936Smrgcase `echo X|tr X '\101'` in 8308d769e936Smrg A) # ASCII based system 8309d769e936Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8310d769e936Smrg lt_SP2NL='tr \040 \012' 8311d769e936Smrg lt_NL2SP='tr \015\012 \040\040' 8312d769e936Smrg ;; 8313d769e936Smrg *) # EBCDIC based system 8314d769e936Smrg lt_SP2NL='tr \100 \n' 8315d769e936Smrg lt_NL2SP='tr \r\n \100\100' 8316d769e936Smrg ;; 8317d769e936Smrgesac 8318d769e936Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8319d769e936Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8320d769e936Smrg])# _LT_CHECK_SHELL_FEATURES 8321d769e936Smrg 8322d769e936Smrg 8323d769e936Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8324d769e936Smrg# ----------------------------- 83257322289dSmrg# Determine what file name conversion functions should be used by 8326d769e936Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8327d769e936Smrg# for certain cross-compile configurations and native mingw. 8328d769e936Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8329d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8330d769e936SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8331d769e936SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8332d769e936SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8333d769e936Smrg[case $host in 8334d769e936Smrg *-*-mingw* ) 8335d769e936Smrg case $build in 8336d769e936Smrg *-*-mingw* ) # actually msys 8337d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8338d769e936Smrg ;; 8339d769e936Smrg *-*-cygwin* ) 8340d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8341d769e936Smrg ;; 8342d769e936Smrg * ) # otherwise, assume *nix 8343d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8344d769e936Smrg ;; 8345d769e936Smrg esac 8346d769e936Smrg ;; 8347d769e936Smrg *-*-cygwin* ) 8348d769e936Smrg case $build in 8349d769e936Smrg *-*-mingw* ) # actually msys 8350d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8351d769e936Smrg ;; 8352d769e936Smrg *-*-cygwin* ) 8353d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8354d769e936Smrg ;; 8355d769e936Smrg * ) # otherwise, assume *nix 8356d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8357d769e936Smrg ;; 8358d769e936Smrg esac 8359d769e936Smrg ;; 8360d769e936Smrg * ) # unhandled hosts (and "normal" native builds) 8361d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8362d769e936Smrg ;; 8363d769e936Smrgesac 8364d769e936Smrg]) 8365d769e936Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8366d769e936SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8367d769e936Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8368d769e936Smrg [0], [convert $build file names to $host format])dnl 8369d769e936Smrg 8370d769e936SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8371d769e936SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8372d769e936Smrg[#assume ordinary cross tools, or native build. 8373d769e936Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8374d769e936Smrgcase $host in 8375d769e936Smrg *-*-mingw* ) 8376d769e936Smrg case $build in 8377d769e936Smrg *-*-mingw* ) # actually msys 8378d769e936Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8379d769e936Smrg ;; 8380d769e936Smrg esac 8381d769e936Smrg ;; 8382d769e936Smrgesac 8383d769e936Smrg]) 8384d769e936Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8385d769e936SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8386d769e936Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8387d769e936Smrg [0], [convert $build files to toolchain format])dnl 8388d769e936Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8389d769e936Smrg 8390d769e936Smrg# Helper functions for option handling. -*- Autoconf -*- 8391d769e936Smrg# 83927322289dSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 83937322289dSmrg# Foundation, Inc. 8394d769e936Smrg# Written by Gary V. Vaughan, 2004 8395d769e936Smrg# 8396d769e936Smrg# This file is free software; the Free Software Foundation gives 8397d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8398d769e936Smrg# modifications, as long as this notice is preserved. 8399d769e936Smrg 84007322289dSmrg# serial 8 ltoptions.m4 8401d769e936Smrg 8402d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8403d769e936SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8404d769e936Smrg 8405d769e936Smrg 8406d769e936Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8407d769e936Smrg# ------------------------------------------ 8408d769e936Smrgm4_define([_LT_MANGLE_OPTION], 8409d769e936Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8410d769e936Smrg 8411d769e936Smrg 8412d769e936Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8413d769e936Smrg# --------------------------------------- 8414d769e936Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8415d769e936Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8416d769e936Smrg# saved as a flag. 8417d769e936Smrgm4_define([_LT_SET_OPTION], 8418d769e936Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8419d769e936Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8420d769e936Smrg _LT_MANGLE_DEFUN([$1], [$2]), 84217322289dSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8422d769e936Smrg]) 8423d769e936Smrg 8424d769e936Smrg 8425d769e936Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8426d769e936Smrg# ------------------------------------------------------------ 8427d769e936Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8428d769e936Smrgm4_define([_LT_IF_OPTION], 8429d769e936Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8430d769e936Smrg 8431d769e936Smrg 8432d769e936Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8433d769e936Smrg# ------------------------------------------------------- 8434d769e936Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8435d769e936Smrg# are set. 8436d769e936Smrgm4_define([_LT_UNLESS_OPTIONS], 8437d769e936Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8438d769e936Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8439d769e936Smrg [m4_define([$0_found])])])[]dnl 8440d769e936Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8441d769e936Smrg])[]dnl 8442d769e936Smrg]) 8443d769e936Smrg 8444d769e936Smrg 8445d769e936Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8446d769e936Smrg# ---------------------------------------- 8447d769e936Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8448d769e936Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8449d769e936Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8450d769e936Smrg# the unknown option and exit. 8451d769e936Smrgm4_defun([_LT_SET_OPTIONS], 8452d769e936Smrg[# Set options 8453d769e936Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8454d769e936Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8455d769e936Smrg 8456d769e936Smrgm4_if([$1],[LT_INIT],[ 8457d769e936Smrg dnl 8458d769e936Smrg dnl Simply set some default values (i.e off) if boolean options were not 8459d769e936Smrg dnl specified: 8460d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8461d769e936Smrg ]) 8462d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8463d769e936Smrg ]) 8464d769e936Smrg dnl 8465d769e936Smrg dnl If no reference was made to various pairs of opposing options, then 8466d769e936Smrg dnl we run the default mode handler for the pair. For example, if neither 84677322289dSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8468d769e936Smrg dnl archives by default: 8469d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8470d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8471d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8472d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 84737322289dSmrg [_LT_ENABLE_FAST_INSTALL]) 84747322289dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 84757322289dSmrg [_LT_WITH_AIX_SONAME([aix])]) 8476d769e936Smrg ]) 8477d769e936Smrg])# _LT_SET_OPTIONS 8478d769e936Smrg 8479d769e936Smrg 8480d769e936Smrg 8481d769e936Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8482d769e936Smrg# ----------------------------------------- 8483d769e936Smrgm4_define([_LT_MANGLE_DEFUN], 8484d769e936Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8485d769e936Smrg 8486d769e936Smrg 8487d769e936Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8488d769e936Smrg# ----------------------------------------------- 8489d769e936Smrgm4_define([LT_OPTION_DEFINE], 8490d769e936Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8491d769e936Smrg])# LT_OPTION_DEFINE 8492d769e936Smrg 8493d769e936Smrg 8494d769e936Smrg# dlopen 8495d769e936Smrg# ------ 8496d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8497d769e936Smrg]) 8498d769e936Smrg 8499d769e936SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8500d769e936Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8501d769e936SmrgAC_DIAGNOSE([obsolete], 8502d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85037322289dSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 8504d769e936Smrg]) 8505d769e936Smrg 8506d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8507d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8508d769e936Smrg 8509d769e936Smrg 8510d769e936Smrg# win32-dll 8511d769e936Smrg# --------- 8512d769e936Smrg# Declare package support for building win32 dll's. 8513d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8514d769e936Smrg[enable_win32_dll=yes 8515d769e936Smrg 8516d769e936Smrgcase $host in 8517d769e936Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8518d769e936Smrg AC_CHECK_TOOL(AS, as, false) 8519d769e936Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8520d769e936Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8521d769e936Smrg ;; 8522d769e936Smrgesac 8523d769e936Smrg 8524d769e936Smrgtest -z "$AS" && AS=as 8525d769e936Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8526d769e936Smrg 8527d769e936Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8528d769e936Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8529d769e936Smrg 8530d769e936Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8531d769e936Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8532d769e936Smrg])# win32-dll 8533d769e936Smrg 8534d769e936SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8535d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8536d769e936Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8537d769e936SmrgAC_DIAGNOSE([obsolete], 8538d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85397322289dSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8540d769e936Smrg]) 8541d769e936Smrg 8542d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8543d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8544d769e936Smrg 8545d769e936Smrg 8546d769e936Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8547d769e936Smrg# ---------------------------- 85487322289dSmrg# implement the --enable-shared flag, and supports the 'shared' and 85497322289dSmrg# 'disable-shared' LT_INIT options. 85507322289dSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8551d769e936Smrgm4_define([_LT_ENABLE_SHARED], 8552d769e936Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8553d769e936SmrgAC_ARG_ENABLE([shared], 8554d769e936Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8555d769e936Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8556d769e936Smrg [p=${PACKAGE-default} 8557d769e936Smrg case $enableval in 8558d769e936Smrg yes) enable_shared=yes ;; 8559d769e936Smrg no) enable_shared=no ;; 8560d769e936Smrg *) 8561d769e936Smrg enable_shared=no 8562d769e936Smrg # Look at the argument we got. We use all the common list separators. 85637322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8564d769e936Smrg for pkg in $enableval; do 85657322289dSmrg IFS=$lt_save_ifs 8566d769e936Smrg if test "X$pkg" = "X$p"; then 8567d769e936Smrg enable_shared=yes 8568d769e936Smrg fi 8569d769e936Smrg done 85707322289dSmrg IFS=$lt_save_ifs 8571d769e936Smrg ;; 8572d769e936Smrg esac], 8573d769e936Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8574d769e936Smrg 8575d769e936Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8576d769e936Smrg [Whether or not to build shared libraries]) 8577d769e936Smrg])# _LT_ENABLE_SHARED 8578d769e936Smrg 8579d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8580d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8581d769e936Smrg 8582d769e936Smrg# Old names: 8583d769e936SmrgAC_DEFUN([AC_ENABLE_SHARED], 8584d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8585d769e936Smrg]) 8586d769e936Smrg 8587d769e936SmrgAC_DEFUN([AC_DISABLE_SHARED], 8588d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8589d769e936Smrg]) 8590d769e936Smrg 8591d769e936SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8592d769e936SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8593d769e936Smrg 8594d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8595d769e936Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8596d769e936Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8597d769e936Smrg 8598d769e936Smrg 8599d769e936Smrg 8600d769e936Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8601d769e936Smrg# ---------------------------- 86027322289dSmrg# implement the --enable-static flag, and support the 'static' and 86037322289dSmrg# 'disable-static' LT_INIT options. 86047322289dSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8605d769e936Smrgm4_define([_LT_ENABLE_STATIC], 8606d769e936Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8607d769e936SmrgAC_ARG_ENABLE([static], 8608d769e936Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8609d769e936Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8610d769e936Smrg [p=${PACKAGE-default} 8611d769e936Smrg case $enableval in 8612d769e936Smrg yes) enable_static=yes ;; 8613d769e936Smrg no) enable_static=no ;; 8614d769e936Smrg *) 8615d769e936Smrg enable_static=no 8616d769e936Smrg # Look at the argument we got. We use all the common list separators. 86177322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8618d769e936Smrg for pkg in $enableval; do 86197322289dSmrg IFS=$lt_save_ifs 8620d769e936Smrg if test "X$pkg" = "X$p"; then 8621d769e936Smrg enable_static=yes 8622d769e936Smrg fi 8623d769e936Smrg done 86247322289dSmrg IFS=$lt_save_ifs 8625d769e936Smrg ;; 8626d769e936Smrg esac], 8627d769e936Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8628d769e936Smrg 8629d769e936Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8630d769e936Smrg [Whether or not to build static libraries]) 8631d769e936Smrg])# _LT_ENABLE_STATIC 8632d769e936Smrg 8633d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8634d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8635d769e936Smrg 8636d769e936Smrg# Old names: 8637d769e936SmrgAC_DEFUN([AC_ENABLE_STATIC], 8638d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8639d769e936Smrg]) 8640d769e936Smrg 8641d769e936SmrgAC_DEFUN([AC_DISABLE_STATIC], 8642d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8643d769e936Smrg]) 8644d769e936Smrg 8645d769e936SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8646d769e936SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8647d769e936Smrg 8648d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8649d769e936Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8650d769e936Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8651d769e936Smrg 8652d769e936Smrg 8653d769e936Smrg 8654d769e936Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8655d769e936Smrg# ---------------------------------- 86567322289dSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 86577322289dSmrg# and 'disable-fast-install' LT_INIT options. 86587322289dSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8659d769e936Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8660d769e936Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8661d769e936SmrgAC_ARG_ENABLE([fast-install], 8662d769e936Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8663d769e936Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8664d769e936Smrg [p=${PACKAGE-default} 8665d769e936Smrg case $enableval in 8666d769e936Smrg yes) enable_fast_install=yes ;; 8667d769e936Smrg no) enable_fast_install=no ;; 8668d769e936Smrg *) 8669d769e936Smrg enable_fast_install=no 8670d769e936Smrg # Look at the argument we got. We use all the common list separators. 86717322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8672d769e936Smrg for pkg in $enableval; do 86737322289dSmrg IFS=$lt_save_ifs 8674d769e936Smrg if test "X$pkg" = "X$p"; then 8675d769e936Smrg enable_fast_install=yes 8676d769e936Smrg fi 8677d769e936Smrg done 86787322289dSmrg IFS=$lt_save_ifs 8679d769e936Smrg ;; 8680d769e936Smrg esac], 8681d769e936Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8682d769e936Smrg 8683d769e936Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8684d769e936Smrg [Whether or not to optimize for fast installation])dnl 8685d769e936Smrg])# _LT_ENABLE_FAST_INSTALL 8686d769e936Smrg 8687d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8688d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8689d769e936Smrg 8690d769e936Smrg# Old names: 8691d769e936SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8692d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8693d769e936SmrgAC_DIAGNOSE([obsolete], 8694d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86957322289dSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 8696d769e936Smrg]) 8697d769e936Smrg 8698d769e936SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8699d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8700d769e936SmrgAC_DIAGNOSE([obsolete], 8701d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 87027322289dSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8703d769e936Smrg]) 8704d769e936Smrg 8705d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8706d769e936Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8707d769e936Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8708d769e936Smrg 8709d769e936Smrg 87107322289dSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 87117322289dSmrg# ---------------------------------- 87127322289dSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 87137322289dSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 87147322289dSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 87157322289dSmrgm4_define([_LT_WITH_AIX_SONAME], 87167322289dSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 87177322289dSmrgshared_archive_member_spec= 87187322289dSmrgcase $host,$enable_shared in 87197322289dSmrgpower*-*-aix[[5-9]]*,yes) 87207322289dSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 87217322289dSmrg AC_ARG_WITH([aix-soname], 87227322289dSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 87237322289dSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 87247322289dSmrg [case $withval in 87257322289dSmrg aix|svr4|both) 87267322289dSmrg ;; 87277322289dSmrg *) 87287322289dSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 87297322289dSmrg ;; 87307322289dSmrg esac 87317322289dSmrg lt_cv_with_aix_soname=$with_aix_soname], 87327322289dSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 87337322289dSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 87347322289dSmrg with_aix_soname=$lt_cv_with_aix_soname]) 87357322289dSmrg AC_MSG_RESULT([$with_aix_soname]) 87367322289dSmrg if test aix != "$with_aix_soname"; then 87377322289dSmrg # For the AIX way of multilib, we name the shared archive member 87387322289dSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 87397322289dSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 87407322289dSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 87417322289dSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 87427322289dSmrg if test 64 = "${OBJECT_MODE-32}"; then 87437322289dSmrg shared_archive_member_spec=shr_64 87447322289dSmrg else 87457322289dSmrg shared_archive_member_spec=shr 87467322289dSmrg fi 87477322289dSmrg fi 87487322289dSmrg ;; 87497322289dSmrg*) 87507322289dSmrg with_aix_soname=aix 87517322289dSmrg ;; 87527322289dSmrgesac 87537322289dSmrg 87547322289dSmrg_LT_DECL([], [shared_archive_member_spec], [0], 87557322289dSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 87567322289dSmrg])# _LT_WITH_AIX_SONAME 87577322289dSmrg 87587322289dSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 87597322289dSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 87607322289dSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 87617322289dSmrg 87627322289dSmrg 8763d769e936Smrg# _LT_WITH_PIC([MODE]) 8764d769e936Smrg# -------------------- 87657322289dSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8766d769e936Smrg# LT_INIT options. 87677322289dSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8768d769e936Smrgm4_define([_LT_WITH_PIC], 8769d769e936Smrg[AC_ARG_WITH([pic], 8770d769e936Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8771d769e936Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8772d769e936Smrg [lt_p=${PACKAGE-default} 8773d769e936Smrg case $withval in 8774d769e936Smrg yes|no) pic_mode=$withval ;; 8775d769e936Smrg *) 8776d769e936Smrg pic_mode=default 8777d769e936Smrg # Look at the argument we got. We use all the common list separators. 87787322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8779d769e936Smrg for lt_pkg in $withval; do 87807322289dSmrg IFS=$lt_save_ifs 8781d769e936Smrg if test "X$lt_pkg" = "X$lt_p"; then 8782d769e936Smrg pic_mode=yes 8783d769e936Smrg fi 8784d769e936Smrg done 87857322289dSmrg IFS=$lt_save_ifs 8786d769e936Smrg ;; 8787d769e936Smrg esac], 87887322289dSmrg [pic_mode=m4_default([$1], [default])]) 8789d769e936Smrg 8790d769e936Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8791d769e936Smrg])# _LT_WITH_PIC 8792d769e936Smrg 8793d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8794d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8795d769e936Smrg 8796d769e936Smrg# Old name: 8797d769e936SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8798d769e936Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8799d769e936SmrgAC_DIAGNOSE([obsolete], 8800d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 88017322289dSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 8802d769e936Smrg]) 8803d769e936Smrg 8804d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8805d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8806d769e936Smrg 8807d769e936Smrg 8808d769e936Smrgm4_define([_LTDL_MODE], []) 8809d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8810d769e936Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8811d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8812d769e936Smrg [m4_define([_LTDL_MODE], [recursive])]) 8813d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8814d769e936Smrg [m4_define([_LTDL_MODE], [subproject])]) 8815d769e936Smrg 8816d769e936Smrgm4_define([_LTDL_TYPE], []) 8817d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8818d769e936Smrg [m4_define([_LTDL_TYPE], [installable])]) 8819d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8820d769e936Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8821d769e936Smrg 8822d769e936Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8823d769e936Smrg# 88247322289dSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 88257322289dSmrg# Foundation, Inc. 8826d769e936Smrg# Written by Gary V. Vaughan, 2004 8827d769e936Smrg# 8828d769e936Smrg# This file is free software; the Free Software Foundation gives 8829d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8830d769e936Smrg# modifications, as long as this notice is preserved. 8831d769e936Smrg 8832d769e936Smrg# serial 6 ltsugar.m4 8833d769e936Smrg 8834d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8835d769e936SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8836d769e936Smrg 8837d769e936Smrg 8838d769e936Smrg# lt_join(SEP, ARG1, [ARG2...]) 8839d769e936Smrg# ----------------------------- 8840d769e936Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8841d769e936Smrg# associated separator. 8842d769e936Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8843d769e936Smrg# versions in m4sugar had bugs. 8844d769e936Smrgm4_define([lt_join], 8845d769e936Smrg[m4_if([$#], [1], [], 8846d769e936Smrg [$#], [2], [[$2]], 8847d769e936Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8848d769e936Smrgm4_define([_lt_join], 8849d769e936Smrg[m4_if([$#$2], [2], [], 8850d769e936Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8851d769e936Smrg 8852d769e936Smrg 8853d769e936Smrg# lt_car(LIST) 8854d769e936Smrg# lt_cdr(LIST) 8855d769e936Smrg# ------------ 8856d769e936Smrg# Manipulate m4 lists. 8857d769e936Smrg# These macros are necessary as long as will still need to support 88587322289dSmrg# Autoconf-2.59, which quotes differently. 8859d769e936Smrgm4_define([lt_car], [[$1]]) 8860d769e936Smrgm4_define([lt_cdr], 8861d769e936Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8862d769e936Smrg [$#], 1, [], 8863d769e936Smrg [m4_dquote(m4_shift($@))])]) 8864d769e936Smrgm4_define([lt_unquote], $1) 8865d769e936Smrg 8866d769e936Smrg 8867d769e936Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8868d769e936Smrg# ------------------------------------------ 88697322289dSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8870d769e936Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8871d769e936Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8872d769e936Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8873d769e936Smrg# than defined and empty). 8874d769e936Smrg# 8875d769e936Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8876d769e936Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8877d769e936Smrgm4_define([lt_append], 8878d769e936Smrg[m4_define([$1], 8879d769e936Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8880d769e936Smrg 8881d769e936Smrg 8882d769e936Smrg 8883d769e936Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8884d769e936Smrg# ---------------------------------------------------------- 8885d769e936Smrg# Produce a SEP delimited list of all paired combinations of elements of 8886d769e936Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8887d769e936Smrg# has the form PREFIXmINFIXSUFFIXn. 8888d769e936Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8889d769e936Smrgm4_define([lt_combine], 8890d769e936Smrg[m4_if(m4_eval([$# > 3]), [1], 8891d769e936Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8892d769e936Smrg[[m4_foreach([_Lt_prefix], [$2], 8893d769e936Smrg [m4_foreach([_Lt_suffix], 8894d769e936Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8895d769e936Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8896d769e936Smrg 8897d769e936Smrg 8898d769e936Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8899d769e936Smrg# ----------------------------------------------------------------------- 8900d769e936Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8901d769e936Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8902d769e936Smrgm4_define([lt_if_append_uniq], 8903d769e936Smrg[m4_ifdef([$1], 8904d769e936Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8905d769e936Smrg [lt_append([$1], [$2], [$3])$4], 8906d769e936Smrg [$5])], 8907d769e936Smrg [lt_append([$1], [$2], [$3])$4])]) 8908d769e936Smrg 8909d769e936Smrg 8910d769e936Smrg# lt_dict_add(DICT, KEY, VALUE) 8911d769e936Smrg# ----------------------------- 8912d769e936Smrgm4_define([lt_dict_add], 8913d769e936Smrg[m4_define([$1($2)], [$3])]) 8914d769e936Smrg 8915d769e936Smrg 8916d769e936Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8917d769e936Smrg# -------------------------------------------- 8918d769e936Smrgm4_define([lt_dict_add_subkey], 8919d769e936Smrg[m4_define([$1($2:$3)], [$4])]) 8920d769e936Smrg 8921d769e936Smrg 8922d769e936Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8923d769e936Smrg# ---------------------------------- 8924d769e936Smrgm4_define([lt_dict_fetch], 8925d769e936Smrg[m4_ifval([$3], 8926d769e936Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8927d769e936Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8928d769e936Smrg 8929d769e936Smrg 8930d769e936Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8931d769e936Smrg# ----------------------------------------------------------------- 8932d769e936Smrgm4_define([lt_if_dict_fetch], 8933d769e936Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8934d769e936Smrg [$5], 8935d769e936Smrg [$6])]) 8936d769e936Smrg 8937d769e936Smrg 8938d769e936Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8939d769e936Smrg# -------------------------------------------------------------- 8940d769e936Smrgm4_define([lt_dict_filter], 8941d769e936Smrg[m4_if([$5], [], [], 8942d769e936Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8943d769e936Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8944d769e936Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8945d769e936Smrg]) 8946d769e936Smrg 8947d769e936Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8948d769e936Smrg# 89497322289dSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8950d769e936Smrg# Written by Scott James Remnant, 2004 8951d769e936Smrg# 8952d769e936Smrg# This file is free software; the Free Software Foundation gives 8953d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8954d769e936Smrg# modifications, as long as this notice is preserved. 8955d769e936Smrg 8956d769e936Smrg# @configure_input@ 8957d769e936Smrg 89587322289dSmrg# serial 4179 ltversion.m4 8959d769e936Smrg# This file is part of GNU Libtool 8960d769e936Smrg 89617322289dSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 89627322289dSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 8963d769e936Smrg 8964d769e936SmrgAC_DEFUN([LTVERSION_VERSION], 89657322289dSmrg[macro_version='2.4.6' 89667322289dSmrgmacro_revision='2.4.6' 8967d769e936Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8968d769e936Smrg_LT_DECL(, macro_revision, 0) 89691d54945dSmrg]) 8970786a6f21Smrg 8971d769e936Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8972d769e936Smrg# 89737322289dSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 89747322289dSmrg# Foundation, Inc. 8975d769e936Smrg# Written by Scott James Remnant, 2004. 8976d769e936Smrg# 8977d769e936Smrg# This file is free software; the Free Software Foundation gives 8978d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8979d769e936Smrg# modifications, as long as this notice is preserved. 8980d769e936Smrg 8981d769e936Smrg# serial 5 lt~obsolete.m4 8982d769e936Smrg 8983d769e936Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8984d769e936Smrg# 89857322289dSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8986d769e936Smrg# which have later been changed to m4_define as they aren't part of the 8987d769e936Smrg# exported API, or moved to Autoconf or Automake where they belong. 8988d769e936Smrg# 8989d769e936Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8990d769e936Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8991d769e936Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8992d769e936Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8993d769e936Smrg# and doesn't know about Autoconf macros at all.) 8994d769e936Smrg# 8995d769e936Smrg# So we provide this file, which has a silly filename so it's always 8996d769e936Smrg# included after everything else. This provides aclocal with the 8997d769e936Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8998d769e936Smrg# because those macros already exist, or will be overwritten later. 89997322289dSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9000d769e936Smrg# 9001d769e936Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9002d769e936Smrg# Yes, that means every name once taken will need to remain here until 9003d769e936Smrg# we give up compatibility with versions before 1.7, at which point 9004d769e936Smrg# we need to keep only those names which we still refer to. 9005d769e936Smrg 9006d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9007d769e936SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9008d769e936Smrg 9009d769e936Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9010d769e936Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9011d769e936Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9012d769e936Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9013d769e936Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9014d769e936Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9015d769e936Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9016d769e936Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9017d769e936Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9018d769e936Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9019d769e936Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9020d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9021d769e936Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9022d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9023d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9024d769e936Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9025d769e936Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9026d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9027d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9028d769e936Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9029d769e936Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9030d769e936Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9031d769e936Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9032d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9033d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9034d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9035d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9036d769e936Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9037d769e936Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9038d769e936Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9039d769e936Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9040d769e936Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9041d769e936Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9042d769e936Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9043d769e936Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9044d769e936Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9045d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9046d769e936Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9047d769e936Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9048d769e936Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9049d769e936Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9050d769e936Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9051d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9052d769e936Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9053d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9054d769e936Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9055d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9056d769e936Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9057d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9058d769e936Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9059d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9060d769e936Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9061d769e936Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9062d769e936Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9063d769e936Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9064d769e936Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9065d769e936Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9066d769e936Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9067d769e936Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9068d769e936Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9069d769e936Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9070d769e936Smrg 9071024581f2Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9072024581f2Smrgdnl serial 11 (pkg-config-0.29.1) 9073024581f2Smrgdnl 9074024581f2Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9075024581f2Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9076024581f2Smrgdnl 9077024581f2Smrgdnl This program is free software; you can redistribute it and/or modify 9078024581f2Smrgdnl it under the terms of the GNU General Public License as published by 9079024581f2Smrgdnl the Free Software Foundation; either version 2 of the License, or 9080024581f2Smrgdnl (at your option) any later version. 9081024581f2Smrgdnl 9082024581f2Smrgdnl This program is distributed in the hope that it will be useful, but 9083024581f2Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9084024581f2Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9085024581f2Smrgdnl General Public License for more details. 9086024581f2Smrgdnl 9087024581f2Smrgdnl You should have received a copy of the GNU General Public License 9088024581f2Smrgdnl along with this program; if not, write to the Free Software 9089024581f2Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9090024581f2Smrgdnl 02111-1307, USA. 9091024581f2Smrgdnl 9092024581f2Smrgdnl As a special exception to the GNU General Public License, if you 9093024581f2Smrgdnl distribute this file as part of a program that contains a 9094024581f2Smrgdnl configuration script generated by Autoconf, you may include it under 9095024581f2Smrgdnl the same distribution terms that you use for the rest of that 9096024581f2Smrgdnl program. 9097024581f2Smrg 9098024581f2Smrgdnl PKG_PREREQ(MIN-VERSION) 9099024581f2Smrgdnl ----------------------- 9100024581f2Smrgdnl Since: 0.29 9101024581f2Smrgdnl 9102024581f2Smrgdnl Verify that the version of the pkg-config macros are at least 9103024581f2Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9104024581f2Smrgdnl installed version of pkg-config, this checks the developer's version 9105024581f2Smrgdnl of pkg.m4 when generating configure. 9106024581f2Smrgdnl 9107024581f2Smrgdnl To ensure that this macro is defined, also add: 9108024581f2Smrgdnl m4_ifndef([PKG_PREREQ], 9109024581f2Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9110024581f2Smrgdnl 9111024581f2Smrgdnl See the "Since" comment for each macro you use to see what version 9112024581f2Smrgdnl of the macros you require. 9113024581f2Smrgm4_defun([PKG_PREREQ], 9114024581f2Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9115024581f2Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9116024581f2Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9117024581f2Smrg])dnl PKG_PREREQ 9118024581f2Smrg 9119024581f2Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9120024581f2Smrgdnl ---------------------------------- 9121024581f2Smrgdnl Since: 0.16 9122024581f2Smrgdnl 9123024581f2Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9124024581f2Smrgdnl first found in the path. Checks that the version of pkg-config found 9125024581f2Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9126024581f2Smrgdnl used since that's the first version where most current features of 9127024581f2Smrgdnl pkg-config existed. 91281d54945dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 91291d54945dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 91307322289dSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 91317322289dSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9132d769e936SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9133d769e936SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9134d769e936SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9135d769e936Smrg 91361d54945dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 91371d54945dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 91381d54945dSmrgfi 91391d54945dSmrgif test -n "$PKG_CONFIG"; then 91401d54945dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 91411d54945dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 91421d54945dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 91431d54945dSmrg AC_MSG_RESULT([yes]) 91441d54945dSmrg else 91451d54945dSmrg AC_MSG_RESULT([no]) 91461d54945dSmrg PKG_CONFIG="" 91471d54945dSmrg fi 91481d54945dSmrgfi[]dnl 9149024581f2Smrg])dnl PKG_PROG_PKG_CONFIG 91501d54945dSmrg 9151024581f2Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9152024581f2Smrgdnl ------------------------------------------------------------------- 9153024581f2Smrgdnl Since: 0.18 9154024581f2Smrgdnl 9155024581f2Smrgdnl Check to see whether a particular set of modules exists. Similar to 9156024581f2Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9157024581f2Smrgdnl 9158024581f2Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9159024581f2Smrgdnl only at the first occurence in configure.ac, so if the first place 9160024581f2Smrgdnl it's called might be skipped (such as if it is within an "if", you 9161024581f2Smrgdnl have to call PKG_CHECK_EXISTS manually 91621d54945dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 91631d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91641d54945dSmrgif test -n "$PKG_CONFIG" && \ 91651d54945dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9166d769e936Smrg m4_default([$2], [:]) 91671d54945dSmrgm4_ifvaln([$3], [else 91681d54945dSmrg $3])dnl 91691d54945dSmrgfi]) 91701d54945dSmrg 9171024581f2Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9172024581f2Smrgdnl --------------------------------------------- 9173024581f2Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9174024581f2Smrgdnl pkg_failed based on the result. 91751d54945dSmrgm4_define([_PKG_CONFIG], 9176ba85709eSmrg[if test -n "$$1"; then 9177ba85709eSmrg pkg_cv_[]$1="$$1" 9178ba85709eSmrg elif test -n "$PKG_CONFIG"; then 9179ba85709eSmrg PKG_CHECK_EXISTS([$3], 91807322289dSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 91817322289dSmrg test "x$?" != "x0" && pkg_failed=yes ], 9182ba85709eSmrg [pkg_failed=yes]) 9183ba85709eSmrg else 9184ba85709eSmrg pkg_failed=untried 91851d54945dSmrgfi[]dnl 9186024581f2Smrg])dnl _PKG_CONFIG 91871d54945dSmrg 9188024581f2Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9189024581f2Smrgdnl --------------------------- 9190024581f2Smrgdnl Internal check to see if pkg-config supports short errors. 91911d54945dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 91921d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91931d54945dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 91941d54945dSmrg _pkg_short_errors_supported=yes 91951d54945dSmrgelse 91961d54945dSmrg _pkg_short_errors_supported=no 91971d54945dSmrgfi[]dnl 9198024581f2Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 91991d54945dSmrg 92001d54945dSmrg 9201024581f2Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9202024581f2Smrgdnl [ACTION-IF-NOT-FOUND]) 9203024581f2Smrgdnl -------------------------------------------------------------- 9204024581f2Smrgdnl Since: 0.4.0 9205024581f2Smrgdnl 9206024581f2Smrgdnl Note that if there is a possibility the first call to 9207024581f2Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9208024581f2Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 92091d54945dSmrgAC_DEFUN([PKG_CHECK_MODULES], 92101d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92111d54945dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 92121d54945dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 92131d54945dSmrg 92141d54945dSmrgpkg_failed=no 92151d54945dSmrgAC_MSG_CHECKING([for $1]) 92161d54945dSmrg 92171d54945dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 92181d54945dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 92191d54945dSmrg 92201d54945dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 92211d54945dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 92221d54945dSmrgSee the pkg-config man page for more details.]) 92231d54945dSmrg 92241d54945dSmrgif test $pkg_failed = yes; then 9225d769e936Smrg AC_MSG_RESULT([no]) 92261d54945dSmrg _PKG_SHORT_ERRORS_SUPPORTED 92271d54945dSmrg if test $_pkg_short_errors_supported = yes; then 92287322289dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 92291d54945dSmrg else 92307322289dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 92311d54945dSmrg fi 92321d54945dSmrg # Put the nasty error message in config.log where it belongs 92331d54945dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 92341d54945dSmrg 9235d769e936Smrg m4_default([$4], [AC_MSG_ERROR( 92361d54945dSmrg[Package requirements ($2) were not met: 92371d54945dSmrg 92381d54945dSmrg$$1_PKG_ERRORS 92391d54945dSmrg 92401d54945dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 92411d54945dSmrginstalled software in a non-standard prefix. 92421d54945dSmrg 92437322289dSmrg_PKG_TEXT])[]dnl 9244d769e936Smrg ]) 92451d54945dSmrgelif test $pkg_failed = untried; then 9246d769e936Smrg AC_MSG_RESULT([no]) 9247d769e936Smrg m4_default([$4], [AC_MSG_FAILURE( 92481d54945dSmrg[The pkg-config script could not be found or is too old. Make sure it 92491d54945dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 92501d54945dSmrgpath to pkg-config. 92511d54945dSmrg 92521d54945dSmrg_PKG_TEXT 92531d54945dSmrg 92547322289dSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9255d769e936Smrg ]) 92561d54945dSmrgelse 92571d54945dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 92581d54945dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 92591d54945dSmrg AC_MSG_RESULT([yes]) 9260d769e936Smrg $3 92611d54945dSmrgfi[]dnl 9262024581f2Smrg])dnl PKG_CHECK_MODULES 92631d54945dSmrg 92647322289dSmrg 9265024581f2Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9266024581f2Smrgdnl [ACTION-IF-NOT-FOUND]) 9267024581f2Smrgdnl --------------------------------------------------------------------- 9268024581f2Smrgdnl Since: 0.29 9269024581f2Smrgdnl 9270024581f2Smrgdnl Checks for existence of MODULES and gathers its build flags with 9271024581f2Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9272024581f2Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9273024581f2Smrgdnl 9274024581f2Smrgdnl Note that if there is a possibility the first call to 9275024581f2Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9276024581f2Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9277024581f2Smrgdnl configure.ac. 9278024581f2SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9279024581f2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9280024581f2Smrg_save_PKG_CONFIG=$PKG_CONFIG 9281024581f2SmrgPKG_CONFIG="$PKG_CONFIG --static" 9282024581f2SmrgPKG_CHECK_MODULES($@) 9283024581f2SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9284024581f2Smrg])dnl PKG_CHECK_MODULES_STATIC 9285024581f2Smrg 9286024581f2Smrg 9287024581f2Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 9288024581f2Smrgdnl ------------------------- 9289024581f2Smrgdnl Since: 0.27 9290024581f2Smrgdnl 9291024581f2Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 9292024581f2Smrgdnl should install pkg-config .pc files. By default the directory is 9293024581f2Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 9294024581f2Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9295024581f2Smrgdnl parameter. 92967322289dSmrgAC_DEFUN([PKG_INSTALLDIR], 92977322289dSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 92987322289dSmrgm4_pushdef([pkg_description], 92997322289dSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 93007322289dSmrgAC_ARG_WITH([pkgconfigdir], 93017322289dSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 93027322289dSmrg [with_pkgconfigdir=]pkg_default) 93037322289dSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 93047322289dSmrgm4_popdef([pkg_default]) 93057322289dSmrgm4_popdef([pkg_description]) 9306024581f2Smrg])dnl PKG_INSTALLDIR 93077322289dSmrg 93087322289dSmrg 9309024581f2Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9310024581f2Smrgdnl -------------------------------- 9311024581f2Smrgdnl Since: 0.27 9312024581f2Smrgdnl 9313024581f2Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9314024581f2Smrgdnl module should install arch-independent pkg-config .pc files. By 9315024581f2Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 9316024581f2Smrgdnl changed by passing DIRECTORY. The user can override through the 9317024581f2Smrgdnl --with-noarch-pkgconfigdir parameter. 93187322289dSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 93197322289dSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 93207322289dSmrgm4_pushdef([pkg_description], 93217322289dSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 93227322289dSmrgAC_ARG_WITH([noarch-pkgconfigdir], 93237322289dSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 93247322289dSmrg [with_noarch_pkgconfigdir=]pkg_default) 93257322289dSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 93267322289dSmrgm4_popdef([pkg_default]) 93277322289dSmrgm4_popdef([pkg_description]) 9328024581f2Smrg])dnl PKG_NOARCH_INSTALLDIR 93297322289dSmrg 93307322289dSmrg 9331024581f2Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9332024581f2Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9333024581f2Smrgdnl ------------------------------------------- 9334024581f2Smrgdnl Since: 0.28 9335024581f2Smrgdnl 9336024581f2Smrgdnl Retrieves the value of the pkg-config variable for the given module. 93377322289dSmrgAC_DEFUN([PKG_CHECK_VAR], 93387322289dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 93397322289dSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 93407322289dSmrg 93417322289dSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 93427322289dSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 93437322289dSmrg 93447322289dSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9345024581f2Smrg])dnl PKG_CHECK_VAR 93467322289dSmrg 9347786a6f21Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 93481d54945dSmrgdnl 9349d769e936Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 93507322289dSmrgdnl 9351ba85709eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9352d769e936Smrgdnl copy of this software and associated documentation files (the "Software"), 9353d769e936Smrgdnl to deal in the Software without restriction, including without limitation 9354d769e936Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9355d769e936Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9356d769e936Smrgdnl Software is furnished to do so, subject to the following conditions: 9357ba85709eSmrgdnl 9358d769e936Smrgdnl The above copyright notice and this permission notice (including the next 9359d769e936Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9360d769e936Smrgdnl Software. 9361ba85709eSmrgdnl 9362d769e936Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9363d769e936Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9364d769e936Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9365d769e936Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9366d769e936Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9367d769e936Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9368d769e936Smrgdnl DEALINGS IN THE SOFTWARE. 9369ba85709eSmrg 9370ba85709eSmrg# XORG_MACROS_VERSION(required-version) 9371ba85709eSmrg# ------------------------------------- 9372ba85709eSmrg# Minimum version: 1.1.0 9373ba85709eSmrg# 9374ba85709eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9375ba85709eSmrg# your configure.ac with the minimum required version, such as: 9376ba85709eSmrg# XORG_MACROS_VERSION(1.1) 9377ba85709eSmrg# 9378d769e936Smrg# To ensure that this macro is defined, also add: 9379d769e936Smrg# m4_ifndef([XORG_MACROS_VERSION], 9380d769e936Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9381ba85709eSmrg# 9382ba85709eSmrg# 93837322289dSmrg# See the "minimum version" comment for each macro you use to see what 9384ba85709eSmrg# version you require. 9385d769e936Smrgm4_defun([XORG_MACROS_VERSION],[ 93867322289dSmrgm4_define([vers_have], [1.19.0]) 9387d769e936Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9388d769e936Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9389d769e936Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9390d769e936Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9391d769e936Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9392d769e936Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9393d769e936Smrgm4_undefine([vers_have]) 9394d769e936Smrgm4_undefine([maj_have]) 9395d769e936Smrgm4_undefine([maj_needed]) 9396ba85709eSmrg]) # XORG_MACROS_VERSION 93971d54945dSmrg 93981d54945dSmrg# XORG_PROG_RAWCPP() 93991d54945dSmrg# ------------------ 9400ba85709eSmrg# Minimum version: 1.0.0 9401ba85709eSmrg# 94021d54945dSmrg# Find cpp program and necessary flags for use in pre-processing text files 94031d54945dSmrg# such as man pages and config files 94041d54945dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 94051d54945dSmrgAC_REQUIRE([AC_PROG_CPP]) 94067322289dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 94071d54945dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 94081d54945dSmrg 94091d54945dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 94101d54945dSmrg# which is not the best choice for supporting other OS'es, but covers most 94111d54945dSmrg# of the ones we need for now. 94121d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9413d769e936SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 94141d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 94151d54945dSmrg AC_MSG_RESULT([no]) 94161d54945dSmrgelse 94171d54945dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 94181d54945dSmrg RAWCPPFLAGS=-undef 94191d54945dSmrg AC_MSG_RESULT([yes]) 9420786a6f21Smrg # under Cygwin unix is still defined even with -undef 9421786a6f21Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9422786a6f21Smrg RAWCPPFLAGS="-undef -ansi" 9423786a6f21Smrg AC_MSG_RESULT([yes, with -ansi]) 94241d54945dSmrg else 94251d54945dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 94261d54945dSmrg fi 94271d54945dSmrgfi 94281d54945dSmrgrm -f conftest.$ac_ext 94291d54945dSmrg 94301d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9431d769e936SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 94321d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 94331d54945dSmrg AC_MSG_RESULT([no]) 94341d54945dSmrgelse 94351d54945dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 94367322289dSmrg TRADITIONALCPPFLAGS="-traditional" 94371d54945dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 94381d54945dSmrg AC_MSG_RESULT([yes]) 94391d54945dSmrg else 94401d54945dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 94411d54945dSmrg fi 94421d54945dSmrgfi 94431d54945dSmrgrm -f conftest.$ac_ext 94441d54945dSmrgAC_SUBST(RAWCPPFLAGS) 94457322289dSmrgAC_SUBST(TRADITIONALCPPFLAGS) 94461d54945dSmrg]) # XORG_PROG_RAWCPP 94471d54945dSmrg 94481d54945dSmrg# XORG_MANPAGE_SECTIONS() 94491d54945dSmrg# ----------------------- 9450ba85709eSmrg# Minimum version: 1.0.0 9451ba85709eSmrg# 94521d54945dSmrg# Determine which sections man pages go in for the different man page types 94531d54945dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 94541d54945dSmrg# Not sure if there's any better way than just hardcoding by OS name. 94551d54945dSmrg# Override default settings by setting environment variables 9456d769e936Smrg# Added MAN_SUBSTS in version 1.8 9457d769e936Smrg# Added AC_PROG_SED in version 1.8 94581d54945dSmrg 94591d54945dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 94601d54945dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9461d769e936SmrgAC_REQUIRE([AC_PROG_SED]) 94621d54945dSmrg 94631d54945dSmrgif test x$APP_MAN_SUFFIX = x ; then 9464ba85709eSmrg APP_MAN_SUFFIX=1 94651d54945dSmrgfi 94661d54945dSmrgif test x$APP_MAN_DIR = x ; then 9467ba85709eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 94681d54945dSmrgfi 94691d54945dSmrg 94701d54945dSmrgif test x$LIB_MAN_SUFFIX = x ; then 9471ba85709eSmrg LIB_MAN_SUFFIX=3 94721d54945dSmrgfi 94731d54945dSmrgif test x$LIB_MAN_DIR = x ; then 9474ba85709eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 94751d54945dSmrgfi 94761d54945dSmrg 94771d54945dSmrgif test x$FILE_MAN_SUFFIX = x ; then 94781d54945dSmrg case $host_os in 94791d54945dSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 94801d54945dSmrg *) FILE_MAN_SUFFIX=5 ;; 94811d54945dSmrg esac 94821d54945dSmrgfi 94831d54945dSmrgif test x$FILE_MAN_DIR = x ; then 9484ba85709eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 94851d54945dSmrgfi 94861d54945dSmrg 94871d54945dSmrgif test x$MISC_MAN_SUFFIX = x ; then 94881d54945dSmrg case $host_os in 94891d54945dSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 94901d54945dSmrg *) MISC_MAN_SUFFIX=7 ;; 94911d54945dSmrg esac 94921d54945dSmrgfi 94931d54945dSmrgif test x$MISC_MAN_DIR = x ; then 9494ba85709eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 94951d54945dSmrgfi 94961d54945dSmrg 94971d54945dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 94981d54945dSmrg case $host_os in 94991d54945dSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 95001d54945dSmrg *) DRIVER_MAN_SUFFIX=4 ;; 95011d54945dSmrg esac 95021d54945dSmrgfi 95031d54945dSmrgif test x$DRIVER_MAN_DIR = x ; then 9504ba85709eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 95051d54945dSmrgfi 95061d54945dSmrg 95071d54945dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 95081d54945dSmrg case $host_os in 95091d54945dSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 95101d54945dSmrg *) ADMIN_MAN_SUFFIX=8 ;; 95111d54945dSmrg esac 95121d54945dSmrgfi 95131d54945dSmrgif test x$ADMIN_MAN_DIR = x ; then 95141d54945dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 95151d54945dSmrgfi 95161d54945dSmrg 95171d54945dSmrg 95181d54945dSmrgAC_SUBST([APP_MAN_SUFFIX]) 95191d54945dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 95201d54945dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 95211d54945dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 95221d54945dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 95231d54945dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 95241d54945dSmrgAC_SUBST([APP_MAN_DIR]) 95251d54945dSmrgAC_SUBST([LIB_MAN_DIR]) 95261d54945dSmrgAC_SUBST([FILE_MAN_DIR]) 95271d54945dSmrgAC_SUBST([MISC_MAN_DIR]) 95281d54945dSmrgAC_SUBST([DRIVER_MAN_DIR]) 95291d54945dSmrgAC_SUBST([ADMIN_MAN_DIR]) 9530d769e936Smrg 9531d769e936SmrgXORG_MAN_PAGE="X Version 11" 9532d769e936SmrgAC_SUBST([XORG_MAN_PAGE]) 9533d769e936SmrgMAN_SUBSTS="\ 9534d769e936Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9535d769e936Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9536d769e936Smrg -e 's|__xservername__|Xorg|g' \ 9537d769e936Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9538d769e936Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9539d769e936Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9540d769e936Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9541d769e936Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9542d769e936Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9543d769e936Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9544d769e936Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9545d769e936Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9546d769e936SmrgAC_SUBST([MAN_SUBSTS]) 9547d769e936Smrg 95481d54945dSmrg]) # XORG_MANPAGE_SECTIONS 95491d54945dSmrg 9550d769e936Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9551d769e936Smrg# ------------------------ 9552d769e936Smrg# Minimum version: 1.7.0 9553d769e936Smrg# 9554d769e936Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9555d769e936Smrg# provided by xorg-sgml-doctools, if installed. 9556d769e936SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9557d769e936SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9558d769e936SmrgXORG_SGML_PATH= 9559d769e936SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9560d769e936Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9561d769e936Smrg [m4_ifval([$1],[:], 9562d769e936Smrg [if test x"$cross_compiling" != x"yes" ; then 9563d769e936Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9564d769e936Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9565d769e936Smrg fi]) 9566d769e936Smrg ]) 9567d769e936Smrg 9568d769e936Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9569d769e936Smrg# the path and the name of the doc stylesheet 9570d769e936Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9571d769e936Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9572d769e936Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9573d769e936Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9574d769e936Smrgelse 9575d769e936Smrg AC_MSG_RESULT([no]) 9576d769e936Smrgfi 9577d769e936Smrg 9578d769e936SmrgAC_SUBST(XORG_SGML_PATH) 9579d769e936SmrgAC_SUBST(STYLESHEET_SRCDIR) 9580d769e936SmrgAC_SUBST(XSL_STYLESHEET) 9581d769e936SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9582d769e936Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9583d769e936Smrg 95841d54945dSmrg# XORG_CHECK_LINUXDOC 95851d54945dSmrg# ------------------- 9586ba85709eSmrg# Minimum version: 1.0.0 9587ba85709eSmrg# 95881d54945dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 95891d54945dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 95901d54945dSmrg# Whether or not the necessary tools and files are found can be checked 95911d54945dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 95921d54945dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9593d769e936SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9594d769e936SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 95951d54945dSmrg 95961d54945dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 95971d54945dSmrg 9598d769e936SmrgAC_MSG_CHECKING([whether to build documentation]) 95991d54945dSmrg 9600d769e936Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 96011d54945dSmrg BUILDDOC=yes 96021d54945dSmrgelse 96031d54945dSmrg BUILDDOC=no 96041d54945dSmrgfi 96051d54945dSmrg 96061d54945dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 96071d54945dSmrg 96081d54945dSmrgAC_MSG_RESULT([$BUILDDOC]) 96091d54945dSmrg 9610d769e936SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 96111d54945dSmrg 9612d769e936Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 96131d54945dSmrg BUILDPDFDOC=yes 96141d54945dSmrgelse 96151d54945dSmrg BUILDPDFDOC=no 96161d54945dSmrgfi 96171d54945dSmrg 96181d54945dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 96191d54945dSmrg 96201d54945dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 96211d54945dSmrg 9622d769e936SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9623ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 96241d54945dSmrgMAKE_PDF="$PS2PDF" 9625ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 96261d54945dSmrg 96271d54945dSmrgAC_SUBST(MAKE_TEXT) 96281d54945dSmrgAC_SUBST(MAKE_PS) 96291d54945dSmrgAC_SUBST(MAKE_PDF) 96301d54945dSmrgAC_SUBST(MAKE_HTML) 96311d54945dSmrg]) # XORG_CHECK_LINUXDOC 96321d54945dSmrg 9633ba85709eSmrg# XORG_CHECK_DOCBOOK 9634ba85709eSmrg# ------------------- 9635ba85709eSmrg# Minimum version: 1.0.0 9636ba85709eSmrg# 9637ba85709eSmrg# Checks for the ability to build output formats from SGML DocBook source. 9638ba85709eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9639ba85709eSmrg# indicates whether the necessary tools and files are found and, if set, 9640ba85709eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9641ba85709eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9642d769e936SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9643d769e936Smrg 9644ba85709eSmrgBUILDTXTDOC=no 9645ba85709eSmrgBUILDPDFDOC=no 9646ba85709eSmrgBUILDPSDOC=no 9647ba85709eSmrgBUILDHTMLDOC=no 9648ba85709eSmrg 9649ba85709eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9650ba85709eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9651ba85709eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9652ba85709eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9653ba85709eSmrg 9654d769e936SmrgAC_MSG_CHECKING([whether to build text documentation]) 9655d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9656ba85709eSmrg test x$BUILD_TXTDOC != xno; then 9657ba85709eSmrg BUILDTXTDOC=yes 9658ba85709eSmrgfi 9659ba85709eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9660ba85709eSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9661ba85709eSmrg 9662d769e936SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9663d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9664d769e936Smrg test x$BUILD_PDFDOC != xno; then 9665d769e936Smrg BUILDPDFDOC=yes 9666d769e936Smrgfi 9667d769e936SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9668d769e936SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9669d769e936Smrg 9670d769e936SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9671d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9672d769e936Smrg test x$BUILD_PSDOC != xno; then 9673d769e936Smrg BUILDPSDOC=yes 9674d769e936Smrgfi 9675d769e936SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9676d769e936SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9677d769e936Smrg 9678d769e936SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9679d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9680d769e936Smrg test x$BUILD_HTMLDOC != xno; then 9681d769e936Smrg BUILDHTMLDOC=yes 9682d769e936Smrgfi 9683d769e936SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9684d769e936SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9685d769e936Smrg 9686d769e936SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9687d769e936SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9688d769e936SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9689d769e936SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9690d769e936Smrg 9691d769e936SmrgAC_SUBST(MAKE_TEXT) 9692d769e936SmrgAC_SUBST(MAKE_PS) 9693d769e936SmrgAC_SUBST(MAKE_PDF) 9694d769e936SmrgAC_SUBST(MAKE_HTML) 9695d769e936Smrg]) # XORG_CHECK_DOCBOOK 9696d769e936Smrg 9697d769e936Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9698d769e936Smrg# ---------------- 9699d769e936Smrg# Minimum version: 1.5.0 9700d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9701d769e936Smrg# 9702d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9703d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9704d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9705d769e936Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9706d769e936Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9707d769e936Smrg# --with-xmlto assumes 'auto'. 9708d769e936Smrg# 9709d769e936Smrg# Interface to module: 9710d769e936Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9711d769e936Smrg# XMLTO: returns the path of the xmlto program found 9712d769e936Smrg# returns the path set by the user in the environment 9713d769e936Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9714d769e936Smrg# 'no' user instructs the module not to use xmlto 9715d769e936Smrg# 9716d769e936Smrg# Added in version 1.10.0 9717d769e936Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9718d769e936Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9719d769e936Smrg# 9720d769e936Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9721d769e936Smrg# 9722d769e936SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9723d769e936SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9724d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9725d769e936SmrgAC_ARG_WITH(xmlto, 9726d769e936Smrg AS_HELP_STRING([--with-xmlto], 9727d769e936Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9728d769e936Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9729d769e936Smrgm4_undefine([_defopt]) 9730d769e936Smrg 9731d769e936Smrgif test "x$use_xmlto" = x"auto"; then 9732d769e936Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9733d769e936Smrg if test "x$XMLTO" = "x"; then 9734d769e936Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9735d769e936Smrg have_xmlto=no 9736d769e936Smrg else 9737d769e936Smrg have_xmlto=yes 9738d769e936Smrg fi 9739d769e936Smrgelif test "x$use_xmlto" = x"yes" ; then 9740d769e936Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9741d769e936Smrg if test "x$XMLTO" = "x"; then 9742d769e936Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9743d769e936Smrg fi 9744d769e936Smrg have_xmlto=yes 9745d769e936Smrgelif test "x$use_xmlto" = x"no" ; then 9746d769e936Smrg if test "x$XMLTO" != "x"; then 9747d769e936Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9748d769e936Smrg fi 9749d769e936Smrg have_xmlto=no 9750d769e936Smrgelse 9751d769e936Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9752d769e936Smrgfi 9753d769e936Smrg 9754d769e936Smrg# Test for a minimum version of xmlto, if provided. 9755d769e936Smrgm4_ifval([$1], 9756d769e936Smrg[if test "$have_xmlto" = yes; then 9757d769e936Smrg # scrape the xmlto version 9758d769e936Smrg AC_MSG_CHECKING([the xmlto version]) 9759d769e936Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9760d769e936Smrg AC_MSG_RESULT([$xmlto_version]) 9761d769e936Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9762d769e936Smrg [if test "x$use_xmlto" = xauto; then 9763d769e936Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9764d769e936Smrg have_xmlto=no 9765d769e936Smrg else 9766d769e936Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9767d769e936Smrg fi]) 9768d769e936Smrgfi]) 9769d769e936Smrg 9770d769e936Smrg# Test for the ability of xmlto to generate a text target 9771d769e936Smrghave_xmlto_text=no 9772d769e936Smrgcat > conftest.xml << "EOF" 9773024581f2Smrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 9774024581f2Smrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> 9775024581f2Smrg<book id="saver"> 9776024581f2Smrg</book> 9777d769e936SmrgEOF 9778d769e936SmrgAS_IF([test "$have_xmlto" = yes], 9779d769e936Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9780d769e936Smrg [have_xmlto_text=yes], 9781d769e936Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9782d769e936Smrgrm -f conftest.xml 9783d769e936SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9784d769e936SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9785d769e936Smrg]) # XORG_WITH_XMLTO 9786d769e936Smrg 9787d769e936Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9788d769e936Smrg# -------------------------------------------- 9789d769e936Smrg# Minimum version: 1.12.0 9790d769e936Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9791d769e936Smrg# 9792d769e936Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9793d769e936Smrg# XML-based language used for the transformation of XML documents. 9794d769e936Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9795d769e936Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9796d769e936Smrg# The XSLT processor is often used as a standalone tool for transformations. 9797d769e936Smrg# It should not be assumed that this tool is used only to work with documnetation. 9798d769e936Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9799d769e936Smrg# 9800d769e936Smrg# Interface to module: 9801d769e936Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9802d769e936Smrg# XSLTPROC: returns the path of the xsltproc program found 9803d769e936Smrg# returns the path set by the user in the environment 9804d769e936Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9805d769e936Smrg# 'no' user instructs the module not to use xsltproc 9806d769e936Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9807d769e936Smrg# 9808d769e936Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9809d769e936Smrg# 9810d769e936SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9811d769e936SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9812d769e936Smrg# Preserves the interface, should it be implemented later 9813d769e936Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9814d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9815d769e936SmrgAC_ARG_WITH(xsltproc, 9816d769e936Smrg AS_HELP_STRING([--with-xsltproc], 9817d769e936Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9818d769e936Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9819d769e936Smrgm4_undefine([_defopt]) 9820d769e936Smrg 9821d769e936Smrgif test "x$use_xsltproc" = x"auto"; then 9822d769e936Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9823d769e936Smrg if test "x$XSLTPROC" = "x"; then 9824d769e936Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9825d769e936Smrg have_xsltproc=no 9826d769e936Smrg else 9827d769e936Smrg have_xsltproc=yes 9828d769e936Smrg fi 9829d769e936Smrgelif test "x$use_xsltproc" = x"yes" ; then 9830d769e936Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9831d769e936Smrg if test "x$XSLTPROC" = "x"; then 9832d769e936Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9833d769e936Smrg fi 9834d769e936Smrg have_xsltproc=yes 9835d769e936Smrgelif test "x$use_xsltproc" = x"no" ; then 9836d769e936Smrg if test "x$XSLTPROC" != "x"; then 9837d769e936Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9838d769e936Smrg fi 9839d769e936Smrg have_xsltproc=no 9840d769e936Smrgelse 9841d769e936Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9842d769e936Smrgfi 9843d769e936Smrg 9844d769e936SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9845d769e936Smrg]) # XORG_WITH_XSLTPROC 9846d769e936Smrg 9847d769e936Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9848d769e936Smrg# ---------------------------------------- 9849d769e936Smrg# Minimum version: 1.15.0 9850d769e936Smrg# 9851d769e936Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9852d769e936Smrg# scanning arbitrary text files, extracting information from those text files, 9853d769e936Smrg# and printing reports based on that information. 9854d769e936Smrg# 9855d769e936Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9856d769e936Smrg# 9857d769e936Smrg# Interface to module: 9858d769e936Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9859d769e936Smrg# PERL: returns the path of the perl program found 9860d769e936Smrg# returns the path set by the user in the environment 9861d769e936Smrg# --with-perl: 'yes' user instructs the module to use perl 9862d769e936Smrg# 'no' user instructs the module not to use perl 9863d769e936Smrg# have_perl: returns yes if perl found in PATH or no 9864d769e936Smrg# 9865d769e936Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9866d769e936Smrg# 9867d769e936SmrgAC_DEFUN([XORG_WITH_PERL],[ 9868d769e936SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9869d769e936Smrg# Preserves the interface, should it be implemented later 9870d769e936Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9871d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9872d769e936SmrgAC_ARG_WITH(perl, 9873d769e936Smrg AS_HELP_STRING([--with-perl], 9874d769e936Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9875d769e936Smrg [use_perl=$withval], [use_perl=]_defopt) 9876d769e936Smrgm4_undefine([_defopt]) 9877d769e936Smrg 9878d769e936Smrgif test "x$use_perl" = x"auto"; then 9879d769e936Smrg AC_PATH_PROG([PERL], [perl]) 9880d769e936Smrg if test "x$PERL" = "x"; then 9881d769e936Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9882d769e936Smrg have_perl=no 9883d769e936Smrg else 9884d769e936Smrg have_perl=yes 9885d769e936Smrg fi 9886d769e936Smrgelif test "x$use_perl" = x"yes" ; then 9887d769e936Smrg AC_PATH_PROG([PERL], [perl]) 9888d769e936Smrg if test "x$PERL" = "x"; then 9889d769e936Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9890d769e936Smrg fi 9891d769e936Smrg have_perl=yes 9892d769e936Smrgelif test "x$use_perl" = x"no" ; then 9893d769e936Smrg if test "x$PERL" != "x"; then 9894d769e936Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9895d769e936Smrg fi 9896d769e936Smrg have_perl=no 9897d769e936Smrgelse 9898d769e936Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9899d769e936Smrgfi 9900d769e936Smrg 9901d769e936SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9902d769e936Smrg]) # XORG_WITH_PERL 9903d769e936Smrg 9904d769e936Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9905d769e936Smrg# ---------------- 9906d769e936Smrg# Minimum version: 1.5.0 9907d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9908d769e936Smrg# 9909d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9910d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9911d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9912d769e936Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9913d769e936Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9914d769e936Smrg# --with-asciidoc assumes 'auto'. 9915d769e936Smrg# 9916d769e936Smrg# Interface to module: 9917d769e936Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9918d769e936Smrg# ASCIIDOC: returns the path of the asciidoc program found 9919d769e936Smrg# returns the path set by the user in the environment 9920d769e936Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9921d769e936Smrg# 'no' user instructs the module not to use asciidoc 9922d769e936Smrg# 9923d769e936Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9924d769e936Smrg# 9925d769e936SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9926d769e936SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9927d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9928d769e936SmrgAC_ARG_WITH(asciidoc, 9929d769e936Smrg AS_HELP_STRING([--with-asciidoc], 9930d769e936Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9931d769e936Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9932d769e936Smrgm4_undefine([_defopt]) 9933d769e936Smrg 9934d769e936Smrgif test "x$use_asciidoc" = x"auto"; then 9935d769e936Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9936d769e936Smrg if test "x$ASCIIDOC" = "x"; then 9937d769e936Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9938d769e936Smrg have_asciidoc=no 9939d769e936Smrg else 9940d769e936Smrg have_asciidoc=yes 9941d769e936Smrg fi 9942d769e936Smrgelif test "x$use_asciidoc" = x"yes" ; then 9943d769e936Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9944d769e936Smrg if test "x$ASCIIDOC" = "x"; then 9945d769e936Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9946d769e936Smrg fi 9947d769e936Smrg have_asciidoc=yes 9948d769e936Smrgelif test "x$use_asciidoc" = x"no" ; then 9949d769e936Smrg if test "x$ASCIIDOC" != "x"; then 9950d769e936Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9951d769e936Smrg fi 9952d769e936Smrg have_asciidoc=no 9953d769e936Smrgelse 9954d769e936Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9955d769e936Smrgfi 9956d769e936Smrgm4_ifval([$1], 9957d769e936Smrg[if test "$have_asciidoc" = yes; then 9958d769e936Smrg # scrape the asciidoc version 9959d769e936Smrg AC_MSG_CHECKING([the asciidoc version]) 9960d769e936Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9961d769e936Smrg AC_MSG_RESULT([$asciidoc_version]) 9962d769e936Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9963d769e936Smrg [if test "x$use_asciidoc" = xauto; then 9964d769e936Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9965d769e936Smrg have_asciidoc=no 9966d769e936Smrg else 9967d769e936Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9968d769e936Smrg fi]) 9969d769e936Smrgfi]) 9970d769e936SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9971d769e936Smrg]) # XORG_WITH_ASCIIDOC 9972d769e936Smrg 9973d769e936Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 99747322289dSmrg# ------------------------------------------- 9975d769e936Smrg# Minimum version: 1.5.0 9976d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99777322289dSmrg# Minimum version for optional DOT checking: 1.18.0 9978d769e936Smrg# 9979d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9980d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9981d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9982d769e936Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9983d769e936Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9984d769e936Smrg# --with-doxygen assumes 'auto'. 9985d769e936Smrg# 9986d769e936Smrg# Interface to module: 9987d769e936Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9988d769e936Smrg# DOXYGEN: returns the path of the doxygen program found 9989d769e936Smrg# returns the path set by the user in the environment 9990d769e936Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9991d769e936Smrg# 'no' user instructs the module not to use doxygen 9992d769e936Smrg# 9993d769e936Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9994d769e936Smrg# 9995d769e936SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9996d769e936SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 99977322289dSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9998d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9999d769e936SmrgAC_ARG_WITH(doxygen, 10000d769e936Smrg AS_HELP_STRING([--with-doxygen], 10001d769e936Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10002d769e936Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10003d769e936Smrgm4_undefine([_defopt]) 10004d769e936Smrg 10005d769e936Smrgif test "x$use_doxygen" = x"auto"; then 10006d769e936Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10007d769e936Smrg if test "x$DOXYGEN" = "x"; then 10008d769e936Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10009d769e936Smrg have_doxygen=no 10010d769e936Smrg else 10011d769e936Smrg have_doxygen=yes 10012d769e936Smrg fi 10013d769e936Smrgelif test "x$use_doxygen" = x"yes" ; then 10014d769e936Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10015d769e936Smrg if test "x$DOXYGEN" = "x"; then 10016d769e936Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10017d769e936Smrg fi 10018d769e936Smrg have_doxygen=yes 10019d769e936Smrgelif test "x$use_doxygen" = x"no" ; then 10020d769e936Smrg if test "x$DOXYGEN" != "x"; then 10021d769e936Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10022d769e936Smrg fi 10023d769e936Smrg have_doxygen=no 10024d769e936Smrgelse 10025d769e936Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10026d769e936Smrgfi 10027d769e936Smrgm4_ifval([$1], 10028d769e936Smrg[if test "$have_doxygen" = yes; then 10029d769e936Smrg # scrape the doxygen version 10030d769e936Smrg AC_MSG_CHECKING([the doxygen version]) 10031d769e936Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10032d769e936Smrg AC_MSG_RESULT([$doxygen_version]) 10033d769e936Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10034d769e936Smrg [if test "x$use_doxygen" = xauto; then 10035d769e936Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10036d769e936Smrg have_doxygen=no 10037d769e936Smrg else 10038d769e936Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10039d769e936Smrg fi]) 10040d769e936Smrgfi]) 100417322289dSmrg 100427322289dSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 100437322289dSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 100447322289dSmrgdnl HAVE_DOT = @HAVE_DOT@ 100457322289dSmrgHAVE_DOT=no 100467322289dSmrgif test "x$have_doxygen" = "xyes"; then 100477322289dSmrg AC_PATH_PROG([DOT], [dot]) 100487322289dSmrg if test "x$DOT" != "x"; then 100497322289dSmrg HAVE_DOT=yes 100507322289dSmrg fi 100517322289dSmrgfi 100527322289dSmrg 100537322289dSmrgAC_SUBST([HAVE_DOT]) 100547322289dSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10055d769e936SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10056d769e936Smrg]) # XORG_WITH_DOXYGEN 10057d769e936Smrg 10058d769e936Smrg# XORG_WITH_GROFF([DEFAULT]) 10059d769e936Smrg# ---------------- 10060d769e936Smrg# Minimum version: 1.6.0 10061d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10062d769e936Smrg# 10063d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10064d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 10065d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10066d769e936Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10067d769e936Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 10068d769e936Smrg# --with-groff assumes 'auto'. 10069d769e936Smrg# 10070d769e936Smrg# Interface to module: 10071d769e936Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10072d769e936Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10073d769e936Smrg# HAVE_GROFF_MS: the -ms macros package 10074d769e936Smrg# GROFF: returns the path of the groff program found 10075d769e936Smrg# returns the path set by the user in the environment 10076d769e936Smrg# --with-groff: 'yes' user instructs the module to use groff 10077d769e936Smrg# 'no' user instructs the module not to use groff 10078d769e936Smrg# 10079d769e936Smrg# Added in version 1.9.0: 10080d769e936Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10081d769e936Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10082d769e936Smrg# psselect from the psutils package. 10083d769e936Smrg# the ghostcript package. Refer to the grohtml man pages 10084d769e936Smrg# 10085d769e936Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10086d769e936Smrg# 10087d769e936Smrg# OS and distros often splits groff in a basic and full package, the former 10088d769e936Smrg# having the groff program and the later having devices, fonts and macros 10089d769e936Smrg# Checking for the groff executable is not enough. 10090d769e936Smrg# 10091d769e936Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10092d769e936Smrg# unset HAVE_GROFF or GROFF env variables. 10093d769e936Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10094d769e936Smrg# 10095d769e936SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10096d769e936SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10097d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10098d769e936SmrgAC_ARG_WITH(groff, 10099d769e936Smrg AS_HELP_STRING([--with-groff], 10100d769e936Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10101d769e936Smrg [use_groff=$withval], [use_groff=]_defopt) 10102d769e936Smrgm4_undefine([_defopt]) 10103d769e936Smrg 10104d769e936Smrgif test "x$use_groff" = x"auto"; then 10105d769e936Smrg AC_PATH_PROG([GROFF], [groff]) 10106d769e936Smrg if test "x$GROFF" = "x"; then 10107d769e936Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10108d769e936Smrg have_groff=no 10109d769e936Smrg else 10110d769e936Smrg have_groff=yes 10111d769e936Smrg fi 10112d769e936Smrgelif test "x$use_groff" = x"yes" ; then 10113d769e936Smrg AC_PATH_PROG([GROFF], [groff]) 10114d769e936Smrg if test "x$GROFF" = "x"; then 10115d769e936Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10116d769e936Smrg fi 10117d769e936Smrg have_groff=yes 10118d769e936Smrgelif test "x$use_groff" = x"no" ; then 10119d769e936Smrg if test "x$GROFF" != "x"; then 10120d769e936Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10121d769e936Smrg fi 10122d769e936Smrg have_groff=no 10123d769e936Smrgelse 10124d769e936Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10125d769e936Smrgfi 10126d769e936Smrg 10127d769e936Smrg# We have groff, test for the presence of the macro packages 10128d769e936Smrgif test "x$have_groff" = x"yes"; then 10129d769e936Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10130d769e936Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10131d769e936Smrg groff_ms_works=yes 10132d769e936Smrg else 10133d769e936Smrg groff_ms_works=no 10134d769e936Smrg fi 10135d769e936Smrg AC_MSG_RESULT([$groff_ms_works]) 10136d769e936Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10137d769e936Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10138d769e936Smrg groff_mm_works=yes 10139d769e936Smrg else 10140d769e936Smrg groff_mm_works=no 10141d769e936Smrg fi 10142d769e936Smrg AC_MSG_RESULT([$groff_mm_works]) 10143d769e936Smrgfi 10144d769e936Smrg 10145d769e936Smrg# We have groff, test for HTML dependencies, one command per package 10146d769e936Smrgif test "x$have_groff" = x"yes"; then 10147d769e936Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10148d769e936Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10149d769e936Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10150d769e936Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10151d769e936Smrg have_groff_html=yes 10152d769e936Smrg else 10153d769e936Smrg have_groff_html=no 10154d769e936Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10155d769e936Smrg fi 10156d769e936Smrgfi 10157d769e936Smrg 10158d769e936Smrg# Set Automake conditionals for Makefiles 10159d769e936SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10160d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10161d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10162d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10163d769e936Smrg]) # XORG_WITH_GROFF 10164d769e936Smrg 10165d769e936Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10166d769e936Smrg# --------------------------------------- 10167d769e936Smrg# Minimum version: 1.6.0 10168d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10169d769e936Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10170d769e936Smrg# 10171d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10172d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 10173d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10174d769e936Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10175d769e936Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10176d769e936Smrg# --with-fop assumes 'auto'. 10177d769e936Smrg# 10178d769e936Smrg# Interface to module: 10179d769e936Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10180d769e936Smrg# FOP: returns the path of the fop program found 10181d769e936Smrg# returns the path set by the user in the environment 10182d769e936Smrg# --with-fop: 'yes' user instructs the module to use fop 10183d769e936Smrg# 'no' user instructs the module not to use fop 10184d769e936Smrg# 10185d769e936Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10186d769e936Smrg# 10187d769e936SmrgAC_DEFUN([XORG_WITH_FOP],[ 10188d769e936SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10189d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 10190d769e936SmrgAC_ARG_WITH(fop, 10191d769e936Smrg AS_HELP_STRING([--with-fop], 10192d769e936Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10193d769e936Smrg [use_fop=$withval], [use_fop=]_defopt) 10194d769e936Smrgm4_undefine([_defopt]) 10195d769e936Smrg 10196d769e936Smrgif test "x$use_fop" = x"auto"; then 10197d769e936Smrg AC_PATH_PROG([FOP], [fop]) 10198d769e936Smrg if test "x$FOP" = "x"; then 10199d769e936Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10200d769e936Smrg have_fop=no 10201d769e936Smrg else 10202d769e936Smrg have_fop=yes 10203d769e936Smrg fi 10204d769e936Smrgelif test "x$use_fop" = x"yes" ; then 10205d769e936Smrg AC_PATH_PROG([FOP], [fop]) 10206d769e936Smrg if test "x$FOP" = "x"; then 10207d769e936Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10208d769e936Smrg fi 10209d769e936Smrg have_fop=yes 10210d769e936Smrgelif test "x$use_fop" = x"no" ; then 10211d769e936Smrg if test "x$FOP" != "x"; then 10212d769e936Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10213d769e936Smrg fi 10214d769e936Smrg have_fop=no 10215d769e936Smrgelse 10216d769e936Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10217d769e936Smrgfi 10218d769e936Smrg 10219d769e936Smrg# Test for a minimum version of fop, if provided. 10220d769e936Smrgm4_ifval([$1], 10221d769e936Smrg[if test "$have_fop" = yes; then 10222d769e936Smrg # scrape the fop version 10223d769e936Smrg AC_MSG_CHECKING([for fop minimum version]) 10224d769e936Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10225d769e936Smrg AC_MSG_RESULT([$fop_version]) 10226d769e936Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10227d769e936Smrg [if test "x$use_fop" = xauto; then 10228d769e936Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10229d769e936Smrg have_fop=no 10230d769e936Smrg else 10231d769e936Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10232d769e936Smrg fi]) 10233d769e936Smrgfi]) 10234d769e936SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10235d769e936Smrg]) # XORG_WITH_FOP 10236d769e936Smrg 102377322289dSmrg# XORG_WITH_M4([MIN-VERSION]) 102387322289dSmrg# --------------------------- 102397322289dSmrg# Minimum version: 1.19.0 102407322289dSmrg# 102417322289dSmrg# This macro attempts to locate an m4 macro processor which supports 102427322289dSmrg# -I option and is only useful for modules relying on M4 in order to 102437322289dSmrg# expand macros in source code files. 102447322289dSmrg# 102457322289dSmrg# Interface to module: 102467322289dSmrg# M4: returns the path of the m4 program found 102477322289dSmrg# returns the path set by the user in the environment 102487322289dSmrg# 102497322289dSmrgAC_DEFUN([XORG_WITH_M4], [ 102507322289dSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 102517322289dSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 102527322289dSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 102537322289dSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 102547322289dSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 102557322289dSmrg [$PATH:/usr/gnu/bin])]) 102567322289dSmrg 102577322289dSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 102587322289dSmrg]) # XORG_WITH_M4 102597322289dSmrg 10260d769e936Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10261d769e936Smrg# ---------------- 10262d769e936Smrg# Minimum version: 1.6.0 10263d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10264d769e936Smrg# 10265d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10266d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 10267d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10268d769e936Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10269d769e936Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10270d769e936Smrg# --with-ps2pdf assumes 'auto'. 10271d769e936Smrg# 10272d769e936Smrg# Interface to module: 10273d769e936Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10274d769e936Smrg# PS2PDF: returns the path of the ps2pdf program found 10275d769e936Smrg# returns the path set by the user in the environment 10276d769e936Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10277d769e936Smrg# 'no' user instructs the module not to use ps2pdf 10278d769e936Smrg# 10279d769e936Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10280d769e936Smrg# 10281d769e936SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10282d769e936SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10283d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10284d769e936SmrgAC_ARG_WITH(ps2pdf, 10285d769e936Smrg AS_HELP_STRING([--with-ps2pdf], 10286d769e936Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10287d769e936Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10288d769e936Smrgm4_undefine([_defopt]) 10289d769e936Smrg 10290d769e936Smrgif test "x$use_ps2pdf" = x"auto"; then 10291d769e936Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10292d769e936Smrg if test "x$PS2PDF" = "x"; then 10293d769e936Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10294d769e936Smrg have_ps2pdf=no 10295d769e936Smrg else 10296d769e936Smrg have_ps2pdf=yes 10297d769e936Smrg fi 10298d769e936Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10299d769e936Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10300d769e936Smrg if test "x$PS2PDF" = "x"; then 10301d769e936Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10302d769e936Smrg fi 10303d769e936Smrg have_ps2pdf=yes 10304d769e936Smrgelif test "x$use_ps2pdf" = x"no" ; then 10305d769e936Smrg if test "x$PS2PDF" != "x"; then 10306d769e936Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10307d769e936Smrg fi 10308d769e936Smrg have_ps2pdf=no 10309d769e936Smrgelse 10310d769e936Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10311d769e936Smrgfi 10312d769e936SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10313d769e936Smrg]) # XORG_WITH_PS2PDF 10314d769e936Smrg 10315d769e936Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10316d769e936Smrg# ---------------- 10317d769e936Smrg# Minimum version: 1.6.0 10318d769e936Smrg# 10319d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10320d769e936Smrg# not at the appropriate level. This macro enables a builder to skip all 10321d769e936Smrg# documentation targets except traditional man pages. 10322d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10323d769e936Smrg# maximum flexibilty in controlling documentation building. 10324d769e936Smrg# Refer to: 10325d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 10326d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10327d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 10328d769e936Smrg# XORG_WITH_FOP --with-fop 10329d769e936Smrg# XORG_WITH_GROFF --with-groff 10330d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10331d769e936Smrg# 10332d769e936Smrg# Interface to module: 10333d769e936Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10334d769e936Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10335d769e936Smrg# 'no' user instructs the module not to generate docs 10336d769e936Smrg# parm1: specify the default value, yes or no. 10337d769e936Smrg# 10338d769e936SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10339d769e936Smrgm4_define([docs_default], m4_default([$1], [yes])) 10340d769e936SmrgAC_ARG_ENABLE(docs, 10341d769e936Smrg AS_HELP_STRING([--enable-docs], 10342d769e936Smrg [Enable building the documentation (default: ]docs_default[)]), 10343d769e936Smrg [build_docs=$enableval], [build_docs=]docs_default) 10344d769e936Smrgm4_undefine([docs_default]) 10345d769e936SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10346d769e936SmrgAC_MSG_CHECKING([whether to build documentation]) 10347d769e936SmrgAC_MSG_RESULT([$build_docs]) 10348d769e936Smrg]) # XORG_ENABLE_DOCS 10349d769e936Smrg 10350d769e936Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10351d769e936Smrg# ---------------- 10352d769e936Smrg# Minimum version: 1.6.0 10353d769e936Smrg# 10354d769e936Smrg# This macro enables a builder to skip all developer documentation. 10355d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10356d769e936Smrg# maximum flexibilty in controlling documentation building. 10357d769e936Smrg# Refer to: 10358d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 10359d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10360d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 10361d769e936Smrg# XORG_WITH_FOP --with-fop 10362d769e936Smrg# XORG_WITH_GROFF --with-groff 10363d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10364d769e936Smrg# 10365d769e936Smrg# Interface to module: 10366d769e936Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10367d769e936Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10368d769e936Smrg# 'no' user instructs the module not to generate developer docs 10369d769e936Smrg# parm1: specify the default value, yes or no. 10370d769e936Smrg# 10371d769e936SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10372d769e936Smrgm4_define([devel_default], m4_default([$1], [yes])) 10373d769e936SmrgAC_ARG_ENABLE(devel-docs, 10374d769e936Smrg AS_HELP_STRING([--enable-devel-docs], 10375d769e936Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10376d769e936Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10377d769e936Smrgm4_undefine([devel_default]) 10378d769e936SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10379d769e936SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10380d769e936SmrgAC_MSG_RESULT([$build_devel_docs]) 10381d769e936Smrg]) # XORG_ENABLE_DEVEL_DOCS 10382d769e936Smrg 10383d769e936Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10384d769e936Smrg# ---------------- 10385d769e936Smrg# Minimum version: 1.6.0 10386d769e936Smrg# 10387d769e936Smrg# This macro enables a builder to skip all functional specification targets. 10388d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10389d769e936Smrg# maximum flexibilty in controlling documentation building. 10390d769e936Smrg# Refer to: 10391d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 10392d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10393d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 10394d769e936Smrg# XORG_WITH_FOP --with-fop 10395d769e936Smrg# XORG_WITH_GROFF --with-groff 10396d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10397d769e936Smrg# 10398d769e936Smrg# Interface to module: 10399d769e936Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10400d769e936Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10401d769e936Smrg# 'no' user instructs the module not to generate specs 10402d769e936Smrg# parm1: specify the default value, yes or no. 10403d769e936Smrg# 10404d769e936SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10405d769e936Smrgm4_define([spec_default], m4_default([$1], [yes])) 10406d769e936SmrgAC_ARG_ENABLE(specs, 10407d769e936Smrg AS_HELP_STRING([--enable-specs], 10408d769e936Smrg [Enable building the specs (default: ]spec_default[)]), 10409d769e936Smrg [build_specs=$enableval], [build_specs=]spec_default) 10410d769e936Smrgm4_undefine([spec_default]) 10411d769e936SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10412d769e936SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10413d769e936SmrgAC_MSG_RESULT([$build_specs]) 10414d769e936Smrg]) # XORG_ENABLE_SPECS 10415d769e936Smrg 10416d769e936Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10417d769e936Smrg# ---------------------------------------------- 10418d769e936Smrg# Minimum version: 1.13.0 10419d769e936Smrg# 10420d769e936Smrg# This macro enables a builder to enable/disable unit testing 10421d769e936Smrg# It makes no assumption about the test cases implementation 10422d769e936Smrg# Test cases may or may not use Automake "Support for test suites" 10423d769e936Smrg# They may or may not use the software utility library GLib 10424d769e936Smrg# 10425d769e936Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10426d769e936Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10427d769e936Smrg# The variable enable_unit_tests is used by other macros in this file. 10428d769e936Smrg# 10429d769e936Smrg# Interface to module: 10430d769e936Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10431d769e936Smrg# enable_unit_tests: used in configure.ac for additional configuration 10432d769e936Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10433d769e936Smrg# 'no' user instructs the module not to build tests 10434d769e936Smrg# parm1: specify the default value, yes or no. 10435d769e936Smrg# 10436d769e936SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10437d769e936SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10438d769e936SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10439d769e936SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10440d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10441d769e936SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10442d769e936Smrg [Enable building unit test cases (default: ]_defopt[)]), 10443d769e936Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10444d769e936Smrgm4_undefine([_defopt]) 10445d769e936SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10446d769e936SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10447d769e936SmrgAC_MSG_RESULT([$enable_unit_tests]) 10448d769e936Smrg]) # XORG_ENABLE_UNIT_TESTS 10449d769e936Smrg 10450d769e936Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10451d769e936Smrg# ------------------------------------------------------ 10452d769e936Smrg# Minimum version: 1.17.0 10453d769e936Smrg# 10454d769e936Smrg# This macro enables a builder to enable/disable integration testing 10455d769e936Smrg# It makes no assumption about the test cases' implementation 10456d769e936Smrg# Test cases may or may not use Automake "Support for test suites" 10457d769e936Smrg# 10458d769e936Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10459d769e936Smrg# usually requires less dependencies and may be built and run under less 10460d769e936Smrg# stringent environments than integration tests. 10461d769e936Smrg# 10462d769e936Smrg# Interface to module: 10463d769e936Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10464d769e936Smrg# enable_integration_tests: used in configure.ac for additional configuration 10465d769e936Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10466d769e936Smrg# 'no' user instructs the module not to build tests 10467d769e936Smrg# parm1: specify the default value, yes or no. 10468d769e936Smrg# 10469d769e936SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10470d769e936SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10471d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10472d769e936SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10473d769e936Smrg [Enable building integration test cases (default: ]_defopt[)]), 10474d769e936Smrg [enable_integration_tests=$enableval], 10475d769e936Smrg [enable_integration_tests=]_defopt) 10476d769e936Smrgm4_undefine([_defopt]) 10477d769e936SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10478d769e936Smrg [test "x$enable_integration_tests" != xno]) 10479d769e936SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10480d769e936SmrgAC_MSG_RESULT([$enable_integration_tests]) 10481d769e936Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10482d769e936Smrg 10483d769e936Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10484d769e936Smrg# ---------------------------------------- 10485d769e936Smrg# Minimum version: 1.13.0 10486d769e936Smrg# 10487d769e936Smrg# GLib is a library which provides advanced data structures and functions. 10488d769e936Smrg# This macro enables a module to test for the presence of Glib. 10489d769e936Smrg# 10490d769e936Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10491d769e936Smrg# Otherwise the value of $enable_unit_tests is blank. 10492d769e936Smrg# 10493d769e936Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10494d769e936Smrg# test support usually requires less dependencies and may be built and run under 10495d769e936Smrg# less stringent environments than integration tests. 10496d769e936Smrg# 10497d769e936Smrg# Interface to module: 10498d769e936Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10499d769e936Smrg# with_glib: used in configure.ac to know if GLib has been found 10500d769e936Smrg# --with-glib: 'yes' user instructs the module to use glib 10501d769e936Smrg# 'no' user instructs the module not to use glib 10502d769e936Smrg# 10503d769e936SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10504d769e936SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10505d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 10506d769e936SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10507d769e936Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10508d769e936Smrg [with_glib=$withval], [with_glib=]_defopt) 10509d769e936Smrgm4_undefine([_defopt]) 10510d769e936Smrg 10511d769e936Smrghave_glib=no 10512d769e936Smrg# Do not probe GLib if user explicitly disabled unit testing 10513d769e936Smrgif test "x$enable_unit_tests" != x"no"; then 10514d769e936Smrg # Do not probe GLib if user explicitly disabled it 10515d769e936Smrg if test "x$with_glib" != x"no"; then 10516d769e936Smrg m4_ifval( 10517d769e936Smrg [$1], 10518d769e936Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10519d769e936Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10520d769e936Smrg ) 10521d769e936Smrg fi 10522d769e936Smrgfi 10523d769e936Smrg 10524d769e936Smrg# Not having GLib when unit testing has been explicitly requested is an error 10525d769e936Smrgif test "x$enable_unit_tests" = x"yes"; then 10526d769e936Smrg if test "x$have_glib" = x"no"; then 10527d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10528d769e936Smrg fi 10529d769e936Smrgfi 10530d769e936Smrg 10531d769e936Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10532d769e936Smrgif test "x$enable_unit_tests" = x"no"; then 10533d769e936Smrg if test "x$with_glib" = x"yes"; then 10534d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10535d769e936Smrg fi 10536d769e936Smrgfi 10537d769e936Smrg 10538d769e936Smrg# Not having GLib when it has been explicitly requested is an error 10539d769e936Smrgif test "x$with_glib" = x"yes"; then 10540d769e936Smrg if test "x$have_glib" = x"no"; then 10541d769e936Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10542d769e936Smrg fi 10543d769e936Smrgfi 10544d769e936Smrg 10545d769e936SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10546d769e936Smrg]) # XORG_WITH_GLIB 10547d769e936Smrg 10548d769e936Smrg# XORG_LD_WRAP([required|optional]) 10549d769e936Smrg# --------------------------------- 10550d769e936Smrg# Minimum version: 1.13.0 10551d769e936Smrg# 10552d769e936Smrg# Check if linker supports -wrap, passed via compiler flags 10553d769e936Smrg# 10554d769e936Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10555d769e936Smrg# Otherwise the value of $enable_unit_tests is blank. 10556d769e936Smrg# 10557d769e936Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10558d769e936Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10559d769e936Smrg# available, an argument of "optional" allows use when some unit tests require 10560d769e936Smrg# ld -wrap and others do not. 10561d769e936Smrg# 10562d769e936SmrgAC_DEFUN([XORG_LD_WRAP],[ 10563d769e936SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10564d769e936Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10565d769e936Smrg void __wrap_exit(int status) { return; }], 10566d769e936Smrg [exit(0);])]) 10567d769e936Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10568d769e936Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10569d769e936Smrg if test "x$have_ld_wrap" = x"no"; then 10570d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10571d769e936Smrg fi 10572d769e936Smrgfi 10573d769e936SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10574d769e936Smrg# 10575d769e936Smrg]) # XORG_LD_WRAP 10576d769e936Smrg 10577d769e936Smrg# XORG_CHECK_LINKER_FLAGS 10578d769e936Smrg# ----------------------- 10579d769e936Smrg# SYNOPSIS 10580d769e936Smrg# 10581d769e936Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10582d769e936Smrg# 10583d769e936Smrg# DESCRIPTION 10584d769e936Smrg# 10585d769e936Smrg# Check whether the given linker FLAGS work with the current language's 10586d769e936Smrg# linker, or whether they give an error. 10587d769e936Smrg# 10588d769e936Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10589d769e936Smrg# success/failure. 10590d769e936Smrg# 10591d769e936Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10592d769e936Smrg# 10593d769e936Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10594d769e936Smrg# 10595d769e936Smrg# LICENSE 10596d769e936Smrg# 10597d769e936Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10598d769e936Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10599d769e936Smrg# Copyright (c) 2009 Matteo Frigo 10600d769e936Smrg# 10601d769e936Smrg# This program is free software: you can redistribute it and/or modify it 10602d769e936Smrg# under the terms of the GNU General Public License as published by the 10603d769e936Smrg# Free Software Foundation, either version 3 of the License, or (at your 10604d769e936Smrg# option) any later version. 10605d769e936Smrg# 10606d769e936Smrg# This program is distributed in the hope that it will be useful, but 10607d769e936Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10608d769e936Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10609d769e936Smrg# Public License for more details. 10610d769e936Smrg# 10611d769e936Smrg# You should have received a copy of the GNU General Public License along 10612d769e936Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10613d769e936Smrg# 10614d769e936Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10615d769e936Smrg# gives unlimited permission to copy, distribute and modify the configure 10616d769e936Smrg# scripts that are the output of Autoconf when processing the Macro. You 10617d769e936Smrg# need not follow the terms of the GNU General Public License when using 10618d769e936Smrg# or distributing such scripts, even though portions of the text of the 10619d769e936Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10620d769e936Smrg# all other use of the material that constitutes the Autoconf Macro. 10621d769e936Smrg# 10622d769e936Smrg# This special exception to the GPL applies to versions of the Autoconf 10623d769e936Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10624d769e936Smrg# modified version of the Autoconf Macro, you may extend this special 10625d769e936Smrg# exception to the GPL to apply to your modified version as well.# 10626d769e936SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10627d769e936Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10628d769e936Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10629d769e936SmrgAS_LITERAL_IF([$1], 10630d769e936Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10631d769e936Smrg ax_save_FLAGS=$LDFLAGS 10632d769e936Smrg LDFLAGS="$1" 10633d769e936Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10634d769e936Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10635d769e936Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10636d769e936Smrg LDFLAGS=$ax_save_FLAGS])], 10637d769e936Smrg [ax_save_FLAGS=$LDFLAGS 10638d769e936Smrg LDFLAGS="$1" 10639d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10640d769e936Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10641d769e936Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10642d769e936Smrg LDFLAGS=$ax_save_FLAGS]) 10643d769e936Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10644d769e936SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10645d769e936Smrgif test "x$xorg_check_linker_flags" = xyes; then 10646d769e936Smrg m4_default([$2], :) 10647d769e936Smrgelse 10648d769e936Smrg m4_default([$3], :) 10649d769e936Smrgfi 10650d769e936Smrg]) # XORG_CHECK_LINKER_FLAGS 10651d769e936Smrg 10652d769e936Smrg# XORG_MEMORY_CHECK_FLAGS 10653d769e936Smrg# ----------------------- 10654d769e936Smrg# Minimum version: 1.16.0 10655d769e936Smrg# 10656d769e936Smrg# This macro attempts to find appropriate memory checking functionality 10657d769e936Smrg# for various platforms which unit testing code may use to catch various 10658d769e936Smrg# forms of memory allocation and access errors in testing. 10659d769e936Smrg# 10660d769e936Smrg# Interface to module: 10661d769e936Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10662d769e936Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10663d769e936Smrg# 10664d769e936Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10665d769e936Smrg# 10666d769e936SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10667d769e936Smrg 10668d769e936SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10669d769e936SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10670d769e936Smrg [Environment variables to enable memory checking in tests]) 10671ba85709eSmrg 10672d769e936Smrg# Check for different types of support on different platforms 10673d769e936Smrgcase $host_os in 10674d769e936Smrg solaris*) 10675d769e936Smrg AC_CHECK_LIB([umem], [umem_alloc], 10676d769e936Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10677d769e936Smrg ;; 10678d769e936Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10679d769e936Smrg # both directly and inverted, so should not be 0 or 255. 10680d769e936Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10681d769e936Smrg ;; 10682d769e936Smrg darwin*) 10683d769e936Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10684d769e936Smrg ;; 10685d769e936Smrg *bsd*) 10686d769e936Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10687d769e936Smrg ;; 10688d769e936Smrgesac 10689ba85709eSmrg 10690d769e936Smrg# User supplied flags override default flags 10691d769e936Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10692d769e936Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10693ba85709eSmrgfi 10694ba85709eSmrg 10695d769e936SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10696d769e936Smrg]) # XORG_WITH_LINT 10697ba85709eSmrg 106981d54945dSmrg# XORG_CHECK_MALLOC_ZERO 106991d54945dSmrg# ---------------------- 10700ba85709eSmrg# Minimum version: 1.0.0 10701ba85709eSmrg# 107021d54945dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 107031d54945dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 107041d54945dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 107051d54945dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 107061d54945dSmrgAC_ARG_ENABLE(malloc0returnsnull, 10707d769e936Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 107081d54945dSmrg [malloc(0) returns NULL (default: auto)]), 107091d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 107101d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 107111d54945dSmrg 107121d54945dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 107131d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 107147322289dSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 107157322289dSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10716d769e936Smrg#include <stdlib.h> 10717d769e936Smrg],[ 107181d54945dSmrg char *m0, *r0, *c0, *p; 107191d54945dSmrg m0 = malloc(0); 107201d54945dSmrg p = malloc(10); 107211d54945dSmrg r0 = realloc(p,0); 10722d769e936Smrg c0 = calloc(0,10); 10723d769e936Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10724d769e936Smrg])], 107257322289dSmrg [xorg_cv_malloc0_returns_null=yes], 107267322289dSmrg [xorg_cv_malloc0_returns_null=no])]) 107277322289dSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 107281d54945dSmrgfi 107291d54945dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 107301d54945dSmrg 107311d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 107321d54945dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 107331d54945dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 107341d54945dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 107351d54945dSmrgelse 107361d54945dSmrg MALLOC_ZERO_CFLAGS="" 107371d54945dSmrg XMALLOC_ZERO_CFLAGS="" 107381d54945dSmrg XTMALLOC_ZERO_CFLAGS="" 107391d54945dSmrgfi 107401d54945dSmrg 107411d54945dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 107421d54945dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 107431d54945dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 107441d54945dSmrg]) # XORG_CHECK_MALLOC_ZERO 107451d54945dSmrg 10746ba85709eSmrg# XORG_WITH_LINT() 10747ba85709eSmrg# ---------------- 10748ba85709eSmrg# Minimum version: 1.1.0 10749ba85709eSmrg# 10750d769e936Smrg# This macro enables the use of a tool that flags some suspicious and 10751d769e936Smrg# non-portable constructs (likely to be bugs) in C language source code. 10752d769e936Smrg# It will attempt to locate the tool and use appropriate options. 10753d769e936Smrg# There are various lint type tools on different platforms. 10754d769e936Smrg# 10755d769e936Smrg# Interface to module: 10756d769e936Smrg# LINT: returns the path to the tool found on the platform 10757d769e936Smrg# or the value set to LINT on the configure cmd line 10758d769e936Smrg# also an Automake conditional 10759d769e936Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10760d769e936Smrg# 10761d769e936Smrg# --with-lint: 'yes' user instructs the module to use lint 10762d769e936Smrg# 'no' user instructs the module not to use lint (default) 10763d769e936Smrg# 10764d769e936Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10765d769e936Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10766ba85709eSmrg# 10767ba85709eSmrgAC_DEFUN([XORG_WITH_LINT],[ 10768ba85709eSmrg 10769d769e936SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10770d769e936SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10771d769e936SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10772ba85709eSmrg [Use a lint-style source code checker (default: disabled)])], 10773ba85709eSmrg [use_lint=$withval], [use_lint=no]) 10774d769e936Smrg 10775d769e936Smrg# Obtain platform specific info like program name and options 10776d769e936Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10777d769e936Smrgcase $host_os in 10778d769e936Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10779d769e936Smrg lint_name=splint 10780d769e936Smrg lint_options="-badflag" 10781d769e936Smrg ;; 10782d769e936Smrg *freebsd* | *netbsd*) 10783d769e936Smrg lint_name=lint 10784d769e936Smrg lint_options="-u -b" 10785d769e936Smrg ;; 10786d769e936Smrg *solaris*) 10787d769e936Smrg lint_name=lint 10788d769e936Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10789d769e936Smrg ;; 10790d769e936Smrgesac 10791d769e936Smrg 10792d769e936Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10793d769e936Smrgif test "x$use_lint" = x"yes" ; then 10794d769e936Smrg AC_PATH_PROG([LINT], [$lint_name]) 10795d769e936Smrg if test "x$LINT" = "x"; then 10796d769e936Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10797d769e936Smrg fi 10798d769e936Smrgelif test "x$use_lint" = x"no" ; then 10799d769e936Smrg if test "x$LINT" != "x"; then 10800d769e936Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10801d769e936Smrg fi 10802ba85709eSmrgelse 10803d769e936Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10804ba85709eSmrgfi 10805d769e936Smrg 10806d769e936Smrg# User supplied flags override default flags 10807d769e936Smrgif test "x$LINT_FLAGS" != "x"; then 10808d769e936Smrg lint_options=$LINT_FLAGS 10809ba85709eSmrgfi 10810ba85709eSmrg 10811d769e936SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10812d769e936SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10813ba85709eSmrg 10814ba85709eSmrg]) # XORG_WITH_LINT 10815ba85709eSmrg 10816ba85709eSmrg# XORG_LINT_LIBRARY(LIBNAME) 10817ba85709eSmrg# -------------------------- 10818ba85709eSmrg# Minimum version: 1.1.0 10819ba85709eSmrg# 10820ba85709eSmrg# Sets up flags for building lint libraries for checking programs that call 10821ba85709eSmrg# functions in the library. 10822ba85709eSmrg# 10823d769e936Smrg# Interface to module: 10824d769e936Smrg# LINTLIB - Automake variable with the name of lint library file to make 10825d769e936Smrg# MAKE_LINT_LIB - Automake conditional 10826d769e936Smrg# 10827d769e936Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10828d769e936Smrg# - 'no' user instructs the module not to create a lint library (default) 10829ba85709eSmrg 10830ba85709eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10831ba85709eSmrgAC_REQUIRE([XORG_WITH_LINT]) 10832d769e936SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10833ba85709eSmrg [Create lint library (default: disabled)])], 10834ba85709eSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10835d769e936Smrg 10836d769e936Smrgif test "x$make_lint_lib" = x"yes" ; then 10837d769e936Smrg LINTLIB=llib-l$1.ln 10838d769e936Smrg if test "x$LINT" = "x"; then 10839d769e936Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10840d769e936Smrg fi 10841d769e936Smrgelif test "x$make_lint_lib" != x"no" ; then 10842d769e936Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10843ba85709eSmrgfi 10844d769e936Smrg 10845ba85709eSmrgAC_SUBST(LINTLIB) 10846ba85709eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10847ba85709eSmrg 10848ba85709eSmrg]) # XORG_LINT_LIBRARY 10849ba85709eSmrg 10850d769e936Smrg# XORG_COMPILER_BRAND 10851d769e936Smrg# ------------------- 10852d769e936Smrg# Minimum version: 1.14.0 10853d769e936Smrg# 10854d769e936Smrg# Checks for various brands of compilers and sets flags as appropriate: 10855d769e936Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10856d769e936Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10857d769e936Smrg# clang compiler - sets CLANGCC to "yes" 10858d769e936Smrg# Intel compiler - sets INTELCC to "yes" 10859d769e936Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10860d769e936Smrg# 10861d769e936SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10862d769e936SmrgAC_LANG_CASE( 10863d769e936Smrg [C], [ 10864d769e936Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10865d769e936Smrg ], 10866d769e936Smrg [C++], [ 10867d769e936Smrg AC_REQUIRE([AC_PROG_CXX]) 10868d769e936Smrg ] 10869d769e936Smrg) 10870d769e936SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10871d769e936SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10872d769e936SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10873d769e936Smrg]) # XORG_COMPILER_BRAND 10874d769e936Smrg 10875d769e936Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10876d769e936Smrg# --------------- 10877d769e936Smrg# Minimum version: 1.16.0 10878d769e936Smrg# 10879d769e936Smrg# Test if the compiler works when passed the given flag as a command line argument. 10880d769e936Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10881d769e936Smrg# next flag in the list until there are no more options. 10882d769e936Smrg# 10883d769e936Smrg# Note that this does not guarantee that the compiler supports the flag as some 10884d769e936Smrg# compilers will simply ignore arguments that they do not understand, but we do 10885d769e936Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10886d769e936Smrg# -Werror=unused-command-line-argument 10887d769e936Smrg# 10888d769e936SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10889d769e936Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10890d769e936Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10891d769e936Smrg 10892d769e936SmrgAC_LANG_COMPILER_REQUIRE 10893d769e936Smrg 10894d769e936SmrgAC_LANG_CASE( 10895d769e936Smrg [C], [ 10896d769e936Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10897d769e936Smrg define([PREFIX], [C]) 10898d769e936Smrg define([CACHE_PREFIX], [cc]) 10899d769e936Smrg define([COMPILER], [$CC]) 10900d769e936Smrg ], 10901d769e936Smrg [C++], [ 10902d769e936Smrg define([PREFIX], [CXX]) 10903d769e936Smrg define([CACHE_PREFIX], [cxx]) 10904d769e936Smrg define([COMPILER], [$CXX]) 10905d769e936Smrg ] 10906d769e936Smrg) 10907d769e936Smrg 10908d769e936Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10909d769e936Smrg 10910d769e936Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10911d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10912d769e936Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10913d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10914d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10915d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10916d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10917d769e936Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10918d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10919d769e936Smrgfi 10920d769e936Smrg 10921d769e936Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10922d769e936Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10923d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10924d769e936Smrg fi 10925d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10926d769e936Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10927d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10928d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10929d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10930d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10931d769e936Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10932d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10933d769e936Smrgfi 10934d769e936Smrg 10935d769e936Smrgfound="no" 10936d769e936Smrgm4_foreach([flag], m4_cdr($@), [ 10937d769e936Smrg if test $found = "no" ; then 109387322289dSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10939d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10940d769e936Smrg fi 10941d769e936Smrg 109427322289dSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10943d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10944d769e936Smrg fi 10945d769e936Smrg 10946d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10947d769e936Smrg 10948d769e936Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10949d769e936Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10950d769e936Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10951d769e936Smrg AC_CACHE_VAL($cacheid, 10952d769e936Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10953d769e936Smrg [eval $cacheid=yes], 10954d769e936Smrg [eval $cacheid=no])]) 10955d769e936Smrg 10956d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10957d769e936Smrg 10958d769e936Smrg eval supported=\$$cacheid 10959d769e936Smrg AC_MSG_RESULT([$supported]) 10960d769e936Smrg if test "$supported" = "yes" ; then 10961d769e936Smrg $1="$$1 ]flag[" 10962d769e936Smrg found="yes" 10963d769e936Smrg fi 10964d769e936Smrg fi 10965d769e936Smrg]) 10966d769e936Smrg]) # XORG_TESTSET_CFLAG 10967d769e936Smrg 10968d769e936Smrg# XORG_COMPILER_FLAGS 10969d769e936Smrg# --------------- 10970d769e936Smrg# Minimum version: 1.16.0 10971d769e936Smrg# 10972d769e936Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10973d769e936Smrg# arguments supported by the selected compiler which do NOT alter the generated 10974d769e936Smrg# code. These arguments will cause the compiler to print various warnings 10975d769e936Smrg# during compilation AND turn a conservative set of warnings into errors. 10976d769e936Smrg# 10977d769e936Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10978d769e936Smrg# future versions of util-macros as options are added to new compilers. 10979d769e936Smrg# 10980d769e936SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10981d769e936SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10982d769e936Smrg 10983d769e936SmrgAC_ARG_ENABLE(selective-werror, 10984d769e936Smrg AS_HELP_STRING([--disable-selective-werror], 10985d769e936Smrg [Turn off selective compiler errors. (default: enabled)]), 10986d769e936Smrg [SELECTIVE_WERROR=$enableval], 10987d769e936Smrg [SELECTIVE_WERROR=yes]) 10988d769e936Smrg 10989d769e936SmrgAC_LANG_CASE( 10990d769e936Smrg [C], [ 10991d769e936Smrg define([PREFIX], [C]) 10992d769e936Smrg ], 10993d769e936Smrg [C++], [ 10994d769e936Smrg define([PREFIX], [CXX]) 10995d769e936Smrg ] 10996d769e936Smrg) 10997d769e936Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10998d769e936Smrgif test "x$SUNCC" = "xyes"; then 10999d769e936Smrg [BASE_]PREFIX[FLAGS]="-v" 11000d769e936Smrgelse 11001d769e936Smrg [BASE_]PREFIX[FLAGS]="" 11002d769e936Smrgfi 11003d769e936Smrg 11004d769e936Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11005d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11006d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11007d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11008d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11009d769e936Smrg 11010d769e936SmrgAC_LANG_CASE( 11011d769e936Smrg [C], [ 11012d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11013d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11014d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11015d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 110167322289dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11017d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11018d769e936Smrg ] 11019d769e936Smrg) 11020d769e936Smrg 11021d769e936Smrg# This chunk adds additional warnings that could catch undesired effects. 11022d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11023d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11024d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11025d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11026d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11027d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 110287322289dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11029d769e936Smrg 11030d769e936Smrg# These are currently disabled because they are noisy. They will be enabled 11031d769e936Smrg# in the future once the codebase is sufficiently modernized to silence 11032d769e936Smrg# them. For now, I don't want them to drown out the other warnings. 11033d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11034d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 110357322289dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11036d769e936Smrg 11037d769e936Smrg# Turn some warnings into errors, so we don't accidently get successful builds 11038d769e936Smrg# when there are problems that should be fixed. 11039d769e936Smrg 11040d769e936Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11041d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11042d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11043d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11044d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11045d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11046d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11047d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11048d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11049d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11050d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11051d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11052d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11053d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11054d769e936Smrgelse 11055d769e936SmrgAC_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]) 11056d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11057d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11058d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11059d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11060d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11061d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11062d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11063d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11064d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11065d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11066d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11067d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11068d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11069d769e936Smrgfi 11070d769e936Smrg 11071d769e936SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11072d769e936Smrg]) # XORG_COMPILER_FLAGS 11073d769e936Smrg 11074786a6f21Smrg# XORG_CWARNFLAGS 11075786a6f21Smrg# --------------- 11076786a6f21Smrg# Minimum version: 1.2.0 11077d769e936Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11078786a6f21Smrg# 11079786a6f21Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11080786a6f21Smrg# 11081d769e936Smrg# This function is deprecated because it defines -fno-strict-aliasing 11082d769e936Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11083d769e936Smrg# is needed, then it should be added explicitly in the module when 11084d769e936Smrg# it is updated to use BASE_CFLAGS. 11085d769e936Smrg# 11086786a6f21SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11087d769e936SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11088d769e936SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11089d769e936SmrgAC_LANG_CASE( 11090d769e936Smrg [C], [ 11091d769e936Smrg CWARNFLAGS="$BASE_CFLAGS" 11092d769e936Smrg if test "x$GCC" = xyes ; then 11093d769e936Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11094d769e936Smrg fi 11095d769e936Smrg AC_SUBST(CWARNFLAGS) 11096d769e936Smrg ] 11097d769e936Smrg) 11098786a6f21Smrg]) # XORG_CWARNFLAGS 11099d769e936Smrg 11100d769e936Smrg# XORG_STRICT_OPTION 11101d769e936Smrg# ----------------------- 11102d769e936Smrg# Minimum version: 1.3.0 11103d769e936Smrg# 11104d769e936Smrg# Add configure option to enable strict compilation flags, such as treating 11105d769e936Smrg# warnings as fatal errors. 11106d769e936Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11107d769e936Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11108d769e936Smrg# 11109d769e936Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11110d769e936Smrg# when strict compilation is unconditionally desired. 11111d769e936SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11112d769e936SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11113d769e936SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11114d769e936Smrg 11115d769e936SmrgAC_ARG_ENABLE(strict-compilation, 11116d769e936Smrg AS_HELP_STRING([--enable-strict-compilation], 11117d769e936Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11118d769e936Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11119d769e936Smrg 11120d769e936SmrgAC_LANG_CASE( 11121d769e936Smrg [C], [ 11122d769e936Smrg define([PREFIX], [C]) 11123d769e936Smrg ], 11124d769e936Smrg [C++], [ 11125d769e936Smrg define([PREFIX], [CXX]) 11126d769e936Smrg ] 11127d769e936Smrg) 11128d769e936Smrg 11129d769e936Smrg[STRICT_]PREFIX[FLAGS]="" 11130d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11131d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11132d769e936Smrg 11133d769e936Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11134d769e936Smrg# activate it with -Werror, so we add it here explicitly. 11135d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11136d769e936Smrg 11137d769e936Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11138d769e936Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11139d769e936Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11140d769e936Smrgfi 11141d769e936SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11142d769e936SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11143d769e936SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11144d769e936Smrg]) # XORG_STRICT_OPTION 11145d769e936Smrg 11146d769e936Smrg# XORG_DEFAULT_OPTIONS 11147d769e936Smrg# -------------------- 11148d769e936Smrg# Minimum version: 1.3.0 11149d769e936Smrg# 11150d769e936Smrg# Defines default options for X.Org modules. 11151d769e936Smrg# 11152d769e936SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11153d769e936SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11154d769e936SmrgXORG_COMPILER_FLAGS 11155d769e936SmrgXORG_CWARNFLAGS 11156d769e936SmrgXORG_STRICT_OPTION 11157d769e936SmrgXORG_RELEASE_VERSION 11158d769e936SmrgXORG_CHANGELOG 11159d769e936SmrgXORG_INSTALL 11160d769e936SmrgXORG_MANPAGE_SECTIONS 11161d769e936Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11162d769e936Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11163d769e936Smrg]) # XORG_DEFAULT_OPTIONS 11164d769e936Smrg 11165d769e936Smrg# XORG_INSTALL() 11166d769e936Smrg# ---------------- 11167d769e936Smrg# Minimum version: 1.4.0 11168d769e936Smrg# 11169d769e936Smrg# Defines the variable INSTALL_CMD as the command to copy 11170d769e936Smrg# INSTALL from $prefix/share/util-macros. 11171d769e936Smrg# 11172d769e936SmrgAC_DEFUN([XORG_INSTALL], [ 11173d769e936SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11174d769e936Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11175d769e936SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11176d769e936Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11177d769e936Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11178d769e936Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11179d769e936SmrgAC_SUBST([INSTALL_CMD]) 11180d769e936Smrg]) # XORG_INSTALL 111811d54945dSmrgdnl Copyright 2005 Red Hat, Inc 111821d54945dSmrgdnl 111831d54945dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111841d54945dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 111851d54945dSmrgdnl the above copyright notice appear in all copies and that both that 111861d54945dSmrgdnl copyright notice and this permission notice appear in supporting 111871d54945dSmrgdnl documentation. 111881d54945dSmrgdnl 111891d54945dSmrgdnl The above copyright notice and this permission notice shall be included 111901d54945dSmrgdnl in all copies or substantial portions of the Software. 111911d54945dSmrgdnl 111921d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111931d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111941d54945dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111951d54945dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111961d54945dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111971d54945dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111981d54945dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 111991d54945dSmrgdnl 112001d54945dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 112011d54945dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 112021d54945dSmrgdnl other dealings in this Software without prior written authorization 112031d54945dSmrgdnl from the copyright holders. 112041d54945dSmrgdnl 112051d54945dSmrg 112061d54945dSmrg# XORG_RELEASE_VERSION 112071d54945dSmrg# -------------------- 11208d769e936Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 112097322289dSmrg 112101d54945dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11211ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11212ba85709eSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11213ba85709eSmrg [Major version of this package]) 11214ba85709eSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11215ba85709eSmrg if test "x$PVM" = "x"; then 11216ba85709eSmrg PVM="0" 11217ba85709eSmrg fi 11218ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11219ba85709eSmrg [$PVM], 11220ba85709eSmrg [Minor version of this package]) 11221ba85709eSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11222ba85709eSmrg if test "x$PVP" = "x"; then 11223ba85709eSmrg PVP="0" 11224ba85709eSmrg fi 11225ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11226ba85709eSmrg [$PVP], 11227ba85709eSmrg [Patch version of this package]) 112281d54945dSmrg]) 112291d54945dSmrg 11230786a6f21Smrg# XORG_CHANGELOG() 11231786a6f21Smrg# ---------------- 11232786a6f21Smrg# Minimum version: 1.2.0 11233786a6f21Smrg# 11234786a6f21Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11235786a6f21Smrg# ChangeLog from git. 11236786a6f21Smrg# 11237786a6f21Smrg# 11238786a6f21SmrgAC_DEFUN([XORG_CHANGELOG], [ 11239d769e936SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11240d769e936Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11241d769e936Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11242786a6f21Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11243786a6f21SmrgAC_SUBST([CHANGELOG_CMD]) 11244786a6f21Smrg]) # XORG_CHANGELOG 11245786a6f21Smrg 11246d769e936Smrgdnl Copyright 2005 Red Hat, Inc 11247d769e936Smrgdnl 11248d769e936Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11249d769e936Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11250d769e936Smrgdnl the above copyright notice appear in all copies and that both that 11251d769e936Smrgdnl copyright notice and this permission notice appear in supporting 11252d769e936Smrgdnl documentation. 11253d769e936Smrgdnl 11254d769e936Smrgdnl The above copyright notice and this permission notice shall be included 11255d769e936Smrgdnl in all copies or substantial portions of the Software. 11256d769e936Smrgdnl 11257d769e936Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11258d769e936Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11259d769e936Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11260d769e936Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11261d769e936Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11262d769e936Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11263d769e936Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11264d769e936Smrgdnl 11265d769e936Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11266d769e936Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11267d769e936Smrgdnl other dealings in this Software without prior written authorization 11268d769e936Smrgdnl from the copyright holders. 11269d769e936Smrgdnl 11270d769e936Smrg 112717322289dSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11272d769e936Smrg# -------------------------- 112737322289dSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 112747322289dSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11275d769e936Smrg 11276d769e936SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11277d769e936Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11278d769e936Smrg SAVE_CFLAGS="$CFLAGS" 11279d769e936Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11280d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11281d769e936Smrg#include "xorg-server.h" 11282d769e936Smrg#if !defined $1 11283d769e936Smrg#error $1 not defined 11284d769e936Smrg#endif 11285d769e936Smrg ]])], 11286d769e936Smrg [_EXT_CHECK=yes], 11287d769e936Smrg [_EXT_CHECK=no]) 11288d769e936Smrg CFLAGS="$SAVE_CFLAGS" 11289d769e936Smrg AC_MSG_CHECKING([if $1 is defined]) 11290d769e936Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11291d769e936Smrg if test "$_EXT_CHECK" != no; then 11292d769e936Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11293d769e936Smrg fi 11294d769e936Smrg]) 11295d769e936Smrg 112967322289dSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 112971d54945dSmrg# 112981d54945dSmrg# This file is free software; the Free Software Foundation 112991d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113001d54945dSmrg# with or without modifications, as long as this notice is preserved. 113011d54945dSmrg 113021d54945dSmrg# AM_AUTOMAKE_VERSION(VERSION) 113031d54945dSmrg# ---------------------------- 113041d54945dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 113051d54945dSmrg# generated from the m4 files accompanying Automake X.Y. 11306ba85709eSmrg# (This private macro should not be called outside this file.) 11307ba85709eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 113087322289dSmrg[am__api_version='1.15' 11309ba85709eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11310ba85709eSmrgdnl require some minimum version. Point them to the right macro. 113117322289dSmrgm4_if([$1], [1.15], [], 11312ba85709eSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11313ba85709eSmrg]) 11314ba85709eSmrg 11315ba85709eSmrg# _AM_AUTOCONF_VERSION(VERSION) 11316ba85709eSmrg# ----------------------------- 11317ba85709eSmrg# aclocal traces this macro to find the Autoconf version. 11318ba85709eSmrg# This is a private macro too. Using m4_define simplifies 11319ba85709eSmrg# the logic in aclocal, which can simply ignore this definition. 11320ba85709eSmrgm4_define([_AM_AUTOCONF_VERSION], []) 113211d54945dSmrg 113221d54945dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 113231d54945dSmrg# ------------------------------- 11324ba85709eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11325786a6f21Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 113261d54945dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 113277322289dSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 11328ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 11329ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11330786a6f21Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 113311d54945dSmrg 113321d54945dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 113331d54945dSmrg 113347322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 113351d54945dSmrg# 113361d54945dSmrg# This file is free software; the Free Software Foundation 113371d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113381d54945dSmrg# with or without modifications, as long as this notice is preserved. 113391d54945dSmrg 113401d54945dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 113417322289dSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 113427322289dSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 113431d54945dSmrg# 113441d54945dSmrg# Of course, Automake must honor this variable whenever it calls a 113451d54945dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 113461d54945dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 113471d54945dSmrg# depending on how configure is run. This is pretty annoying, since 113481d54945dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 113491d54945dSmrg# source directory, any form will work fine, but in subdirectories a 113501d54945dSmrg# relative path needs to be adjusted first. 113511d54945dSmrg# 113521d54945dSmrg# $ac_aux_dir/missing 113531d54945dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 113541d54945dSmrg# $top_srcdir/$ac_aux_dir/missing 113551d54945dSmrg# fails if $ac_aux_dir is absolute, 113561d54945dSmrg# fails when called from a subdirectory in a VPATH build with 113571d54945dSmrg# a relative $ac_aux_dir 113581d54945dSmrg# 113591d54945dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 113601d54945dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 113617322289dSmrg# harmless because $srcdir is '.', but things will broke when you 113621d54945dSmrg# start a VPATH build or use an absolute $srcdir. 113631d54945dSmrg# 113641d54945dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 113651d54945dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 113661d54945dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 113671d54945dSmrg# and then we would define $MISSING as 113681d54945dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 113691d54945dSmrg# This will work as long as MISSING is not called from configure, because 113701d54945dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 113711d54945dSmrg# However there are other variables, like CC, which are often used in 113721d54945dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 113731d54945dSmrg# 113741d54945dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 113751d54945dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 113761d54945dSmrg# configured tree to be moved without reconfiguration. 113771d54945dSmrg 113781d54945dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 113797322289dSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 113807322289dSmrg# Expand $ac_aux_dir to an absolute path. 113817322289dSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 113821d54945dSmrg]) 113831d54945dSmrg 113841d54945dSmrg# AM_CONDITIONAL -*- Autoconf -*- 113851d54945dSmrg 113867322289dSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 113871d54945dSmrg# 113881d54945dSmrg# This file is free software; the Free Software Foundation 113891d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113901d54945dSmrg# with or without modifications, as long as this notice is preserved. 113911d54945dSmrg 113921d54945dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 113931d54945dSmrg# ------------------------------------- 113941d54945dSmrg# Define a conditional. 113951d54945dSmrgAC_DEFUN([AM_CONDITIONAL], 113967322289dSmrg[AC_PREREQ([2.52])dnl 113977322289dSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 113987322289dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11399ba85709eSmrgAC_SUBST([$1_TRUE])dnl 11400ba85709eSmrgAC_SUBST([$1_FALSE])dnl 11401ba85709eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11402ba85709eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11403ec713c28Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 114041d54945dSmrgif $2; then 114051d54945dSmrg $1_TRUE= 114061d54945dSmrg $1_FALSE='#' 114071d54945dSmrgelse 114081d54945dSmrg $1_TRUE='#' 114091d54945dSmrg $1_FALSE= 114101d54945dSmrgfi 114111d54945dSmrgAC_CONFIG_COMMANDS_PRE( 114121d54945dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 114131d54945dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 114141d54945dSmrgUsually this means the macro was only invoked conditionally.]]) 114151d54945dSmrgfi])]) 114161d54945dSmrg 114177322289dSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 114181d54945dSmrg# 114191d54945dSmrg# This file is free software; the Free Software Foundation 114201d54945dSmrg# gives unlimited permission to copy and/or distribute it, 114211d54945dSmrg# with or without modifications, as long as this notice is preserved. 114221d54945dSmrg 114231d54945dSmrg 114247322289dSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 114251d54945dSmrg# written in clear, in which case automake, when reading aclocal.m4, 114261d54945dSmrg# will think it sees a *use*, and therefore will trigger all it's 114271d54945dSmrg# C support machinery. Also note that it means that autoscan, seeing 114281d54945dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 114291d54945dSmrg 114301d54945dSmrg 114311d54945dSmrg# _AM_DEPENDENCIES(NAME) 114321d54945dSmrg# ---------------------- 114331d54945dSmrg# See how the compiler implements dependency checking. 114347322289dSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 114351d54945dSmrg# We try a few techniques and use that to set a single cache variable. 114361d54945dSmrg# 114371d54945dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 114381d54945dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 114391d54945dSmrg# dependency, and given that the user is not expected to run this macro, 114401d54945dSmrg# just rely on AC_PROG_CC. 114411d54945dSmrgAC_DEFUN([_AM_DEPENDENCIES], 114421d54945dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 114431d54945dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 114441d54945dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 114451d54945dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 114461d54945dSmrg 114477322289dSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 114487322289dSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 114497322289dSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 114507322289dSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 114517322289dSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 114527322289dSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 114537322289dSmrg [depcc="$$1" am_compiler_list=]) 114541d54945dSmrg 114551d54945dSmrgAC_CACHE_CHECK([dependency style of $depcc], 114561d54945dSmrg [am_cv_$1_dependencies_compiler_type], 114571d54945dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 114581d54945dSmrg # We make a subdir and do the tests there. Otherwise we can end up 114591d54945dSmrg # making bogus files that we don't know about and never remove. For 114601d54945dSmrg # instance it was reported that on HP-UX the gcc test will end up 114617322289dSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 114627322289dSmrg # in D". 11463d769e936Smrg rm -rf conftest.dir 114641d54945dSmrg mkdir conftest.dir 114651d54945dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 114661d54945dSmrg # using a relative directory. 114671d54945dSmrg cp "$am_depcomp" conftest.dir 114681d54945dSmrg cd conftest.dir 114691d54945dSmrg # We will build objects and dependencies in a subdirectory because 114701d54945dSmrg # it helps to detect inapplicable dependency modes. For instance 114711d54945dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 114721d54945dSmrg # side effect of compilation, but ICC will put the dependencies in 114731d54945dSmrg # the current directory while Tru64 will put them in the object 114741d54945dSmrg # directory. 114751d54945dSmrg mkdir sub 114761d54945dSmrg 114771d54945dSmrg am_cv_$1_dependencies_compiler_type=none 114781d54945dSmrg if test "$am_compiler_list" = ""; then 114791d54945dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 114801d54945dSmrg fi 11481ec713c28Smrg am__universal=false 11482ec713c28Smrg m4_case([$1], [CC], 11483ec713c28Smrg [case " $depcc " in #( 11484ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11485ec713c28Smrg esac], 11486ec713c28Smrg [CXX], 11487ec713c28Smrg [case " $depcc " in #( 11488ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11489ec713c28Smrg esac]) 11490ec713c28Smrg 114911d54945dSmrg for depmode in $am_compiler_list; do 114921d54945dSmrg # Setup a source with many dependencies, because some compilers 114931d54945dSmrg # like to wrap large dependency lists on column 80 (with \), and 114941d54945dSmrg # we should not choose a depcomp mode which is confused by this. 114951d54945dSmrg # 114961d54945dSmrg # We need to recreate these files for each test, as the compiler may 114971d54945dSmrg # overwrite some of them when testing with obscure command lines. 114981d54945dSmrg # This happens at least with the AIX C compiler. 114991d54945dSmrg : > sub/conftest.c 115001d54945dSmrg for i in 1 2 3 4 5 6; do 115011d54945dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 115027322289dSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 115037322289dSmrg # Solaris 10 /bin/sh. 115047322289dSmrg echo '/* dummy */' > sub/conftst$i.h 115051d54945dSmrg done 115061d54945dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 115071d54945dSmrg 115087322289dSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11509ec713c28Smrg # mode. It turns out that the SunPro C++ compiler does not properly 115107322289dSmrg # handle '-M -o', and we need to detect this. Also, some Intel 115117322289dSmrg # versions had trouble with output in subdirs. 11512ec713c28Smrg am__obj=sub/conftest.${OBJEXT-o} 11513ec713c28Smrg am__minus_obj="-o $am__obj" 115141d54945dSmrg case $depmode in 11515ec713c28Smrg gcc) 11516ec713c28Smrg # This depmode causes a compiler race in universal mode. 11517ec713c28Smrg test "$am__universal" = false || continue 11518ec713c28Smrg ;; 115191d54945dSmrg nosideeffect) 115207322289dSmrg # After this tag, mechanisms are not by side-effect, so they'll 115217322289dSmrg # only be used when explicitly requested. 115221d54945dSmrg if test "x$enable_dependency_tracking" = xyes; then 115231d54945dSmrg continue 115241d54945dSmrg else 115251d54945dSmrg break 115261d54945dSmrg fi 115271d54945dSmrg ;; 11528d769e936Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 115297322289dSmrg # This compiler won't grok '-c -o', but also, the minuso test has 11530ec713c28Smrg # not run yet. These depmodes are late enough in the game, and 11531ec713c28Smrg # so weak that their functioning should not be impacted. 11532ec713c28Smrg am__obj=conftest.${OBJEXT-o} 11533ec713c28Smrg am__minus_obj= 11534ec713c28Smrg ;; 115351d54945dSmrg none) break ;; 115361d54945dSmrg esac 115371d54945dSmrg if depmode=$depmode \ 11538ec713c28Smrg source=sub/conftest.c object=$am__obj \ 115391d54945dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11540ec713c28Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 115411d54945dSmrg >/dev/null 2>conftest.err && 11542ba85709eSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 115431d54945dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11544ec713c28Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 115451d54945dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 115461d54945dSmrg # icc doesn't choke on unknown options, it will just issue warnings 115471d54945dSmrg # or remarks (even with -Werror). So we grep stderr for any message 115481d54945dSmrg # that says an option was ignored or not supported. 115491d54945dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 115501d54945dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 115511d54945dSmrg # The diagnosis changed in icc 8.0: 115521d54945dSmrg # icc: Command line remark: option '-MP' not supported 115531d54945dSmrg if (grep 'ignoring option' conftest.err || 115541d54945dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 115551d54945dSmrg am_cv_$1_dependencies_compiler_type=$depmode 115561d54945dSmrg break 115571d54945dSmrg fi 115581d54945dSmrg fi 115591d54945dSmrg done 115601d54945dSmrg 115611d54945dSmrg cd .. 115621d54945dSmrg rm -rf conftest.dir 115631d54945dSmrgelse 115641d54945dSmrg am_cv_$1_dependencies_compiler_type=none 115651d54945dSmrgfi 115661d54945dSmrg]) 115671d54945dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 115681d54945dSmrgAM_CONDITIONAL([am__fastdep$1], [ 115691d54945dSmrg test "x$enable_dependency_tracking" != xno \ 115701d54945dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 115711d54945dSmrg]) 115721d54945dSmrg 115731d54945dSmrg 115741d54945dSmrg# AM_SET_DEPDIR 115751d54945dSmrg# ------------- 115761d54945dSmrg# Choose a directory name for dependency files. 115777322289dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 115781d54945dSmrgAC_DEFUN([AM_SET_DEPDIR], 115791d54945dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 115801d54945dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 115811d54945dSmrg]) 115821d54945dSmrg 115831d54945dSmrg 115841d54945dSmrg# AM_DEP_TRACK 115851d54945dSmrg# ------------ 115861d54945dSmrgAC_DEFUN([AM_DEP_TRACK], 115877322289dSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 115887322289dSmrgAS_HELP_STRING( 115897322289dSmrg [--enable-dependency-tracking], 115907322289dSmrg [do not reject slow dependency extractors]) 115917322289dSmrgAS_HELP_STRING( 115927322289dSmrg [--disable-dependency-tracking], 115937322289dSmrg [speeds up one-time build])]) 115941d54945dSmrgif test "x$enable_dependency_tracking" != xno; then 115951d54945dSmrg am_depcomp="$ac_aux_dir/depcomp" 115961d54945dSmrg AMDEPBACKSLASH='\' 11597d769e936Smrg am__nodep='_no' 115981d54945dSmrgfi 115991d54945dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11600ba85709eSmrgAC_SUBST([AMDEPBACKSLASH])dnl 11601ba85709eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11602d769e936SmrgAC_SUBST([am__nodep])dnl 11603d769e936Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 116041d54945dSmrg]) 116051d54945dSmrg 116061d54945dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 116071d54945dSmrg 116087322289dSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 116091d54945dSmrg# 116101d54945dSmrg# This file is free software; the Free Software Foundation 116111d54945dSmrg# gives unlimited permission to copy and/or distribute it, 116121d54945dSmrg# with or without modifications, as long as this notice is preserved. 116131d54945dSmrg 116141d54945dSmrg 116151d54945dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 116161d54945dSmrg# ------------------------------ 116171d54945dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11618ec713c28Smrg[{ 116197322289dSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11620ec713c28Smrg # are listed without --file. Let's play safe and only enable the eval 11621ec713c28Smrg # if we detect the quoting. 11622ec713c28Smrg case $CONFIG_FILES in 11623ec713c28Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11624ec713c28Smrg *) set x $CONFIG_FILES ;; 11625ec713c28Smrg esac 11626ec713c28Smrg shift 11627ec713c28Smrg for mf 11628ec713c28Smrg do 11629ec713c28Smrg # Strip MF so we end up with the name of the file. 11630ec713c28Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11631ec713c28Smrg # Check whether this is an Automake generated Makefile or not. 116327322289dSmrg # We used to match only the files named 'Makefile.in', but 11633ec713c28Smrg # some people rename them; so instead we look at the file content. 11634ec713c28Smrg # Grep'ing the first line is not enough: some people post-process 11635ec713c28Smrg # each Makefile.in and add a new line on top of each file to say so. 11636ec713c28Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11637ec713c28Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11638ec713c28Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11639ec713c28Smrg dirpart=`AS_DIRNAME("$mf")` 11640ec713c28Smrg else 11641ec713c28Smrg continue 11642ec713c28Smrg fi 11643ec713c28Smrg # Extract the definition of DEPDIR, am__include, and am__quote 116447322289dSmrg # from the Makefile without running 'make'. 11645ec713c28Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11646ec713c28Smrg test -z "$DEPDIR" && continue 11647ec713c28Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 116487322289dSmrg test -z "$am__include" && continue 11649ec713c28Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11650ec713c28Smrg # Find all dependency output files, they are included files with 11651ec713c28Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11652ec713c28Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11653ec713c28Smrg # expansion. 11654ec713c28Smrg for file in `sed -n " 11655ec713c28Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 116567322289dSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11657ec713c28Smrg # Make sure the directory exists. 11658ec713c28Smrg test -f "$dirpart/$file" && continue 11659ec713c28Smrg fdir=`AS_DIRNAME(["$file"])` 11660ec713c28Smrg AS_MKDIR_P([$dirpart/$fdir]) 11661ec713c28Smrg # echo "creating $dirpart/$file" 11662ec713c28Smrg echo '# dummy' > "$dirpart/$file" 11663ec713c28Smrg done 116641d54945dSmrg done 11665ec713c28Smrg} 116661d54945dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 116671d54945dSmrg 116681d54945dSmrg 116691d54945dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 116701d54945dSmrg# ----------------------------- 116711d54945dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 116721d54945dSmrg# 116731d54945dSmrg# This code is only required when automatic dependency tracking 116747322289dSmrg# is enabled. FIXME. This creates each '.P' file that we will 116751d54945dSmrg# need in order to bootstrap the dependency handling code. 116761d54945dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 116771d54945dSmrg[AC_CONFIG_COMMANDS([depfiles], 116781d54945dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 116791d54945dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 116801d54945dSmrg]) 116811d54945dSmrg 116821d54945dSmrg# Do all the work for Automake. -*- Autoconf -*- 116831d54945dSmrg 116847322289dSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 116851d54945dSmrg# 116861d54945dSmrg# This file is free software; the Free Software Foundation 116871d54945dSmrg# gives unlimited permission to copy and/or distribute it, 116881d54945dSmrg# with or without modifications, as long as this notice is preserved. 116891d54945dSmrg 116901d54945dSmrg# This macro actually does too much. Some checks are only needed if 116911d54945dSmrg# your package does certain things. But this isn't really a big deal. 116921d54945dSmrg 116937322289dSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 116947322289dSmrgm4_define([AC_PROG_CC], 116957322289dSmrgm4_defn([AC_PROG_CC]) 116967322289dSmrg[_AM_PROG_CC_C_O 116977322289dSmrg]) 116987322289dSmrg 116991d54945dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 117001d54945dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 117011d54945dSmrg# ----------------------------------------------- 117021d54945dSmrg# The call with PACKAGE and VERSION arguments is the old style 117031d54945dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 117041d54945dSmrg# and VERSION should now be passed to AC_INIT and removed from 117051d54945dSmrg# the call to AM_INIT_AUTOMAKE. 117061d54945dSmrg# We support both call styles for the transition. After 117071d54945dSmrg# the next Automake release, Autoconf can make the AC_INIT 117081d54945dSmrg# arguments mandatory, and then we can depend on a new Autoconf 117091d54945dSmrg# release and drop the old call support. 117101d54945dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 117117322289dSmrg[AC_PREREQ([2.65])dnl 117121d54945dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 117131d54945dSmrgdnl the ones we care about. 117141d54945dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 117151d54945dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 117161d54945dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11717ba85709eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11718ba85709eSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11719ba85709eSmrg # is not polluted with repeated "-I." 11720ba85709eSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11721ba85709eSmrg # test to see if srcdir already configured 11722ba85709eSmrg if test -f $srcdir/config.status; then 11723ba85709eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11724ba85709eSmrg fi 117251d54945dSmrgfi 117261d54945dSmrg 117271d54945dSmrg# test whether we have cygpath 117281d54945dSmrgif test -z "$CYGPATH_W"; then 117291d54945dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 117301d54945dSmrg CYGPATH_W='cygpath -w' 117311d54945dSmrg else 117321d54945dSmrg CYGPATH_W=echo 117331d54945dSmrg fi 117341d54945dSmrgfi 117351d54945dSmrgAC_SUBST([CYGPATH_W]) 117361d54945dSmrg 117371d54945dSmrg# Define the identity of the package. 117381d54945dSmrgdnl Distinguish between old-style and new-style calls. 117391d54945dSmrgm4_ifval([$2], 117407322289dSmrg[AC_DIAGNOSE([obsolete], 117417322289dSmrg [$0: two- and three-arguments forms are deprecated.]) 117427322289dSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 117431d54945dSmrg AC_SUBST([PACKAGE], [$1])dnl 117441d54945dSmrg AC_SUBST([VERSION], [$2])], 117451d54945dSmrg[_AM_SET_OPTIONS([$1])dnl 11746ba85709eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 117477322289dSmrgm4_if( 117487322289dSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 117497322289dSmrg [ok:ok],, 11750ba85709eSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 117511d54945dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 117521d54945dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 117531d54945dSmrg 117541d54945dSmrg_AM_IF_OPTION([no-define],, 117557322289dSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 117567322289dSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 117571d54945dSmrg 117581d54945dSmrg# Some tools Automake needs. 117591d54945dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 117601d54945dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 117617322289dSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 117627322289dSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 117637322289dSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 117647322289dSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 117657322289dSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11766ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11767ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 117687322289dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 117697322289dSmrg# For better backward compatibility. To be removed once Automake 1.9.x 117707322289dSmrg# dies out for good. For more background, see: 117717322289dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 117727322289dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 117737322289dSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 117747322289dSmrg# We need awk for the "check" target (and possibly the TAP driver). The 117757322289dSmrg# system "awk" is bad on some platforms. 117761d54945dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 117771d54945dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 117781d54945dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 117791d54945dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11780ec713c28Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11781ec713c28Smrg [_AM_PROG_TAR([v7])])]) 117821d54945dSmrg_AM_IF_OPTION([no-dependencies],, 117831d54945dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 117847322289dSmrg [_AM_DEPENDENCIES([CC])], 117857322289dSmrg [m4_define([AC_PROG_CC], 117867322289dSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 117871d54945dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 117887322289dSmrg [_AM_DEPENDENCIES([CXX])], 117897322289dSmrg [m4_define([AC_PROG_CXX], 117907322289dSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11791ba85709eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 117927322289dSmrg [_AM_DEPENDENCIES([OBJC])], 117937322289dSmrg [m4_define([AC_PROG_OBJC], 117947322289dSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 117957322289dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 117967322289dSmrg [_AM_DEPENDENCIES([OBJCXX])], 117977322289dSmrg [m4_define([AC_PROG_OBJCXX], 117987322289dSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 117991d54945dSmrg]) 118007322289dSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 118017322289dSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 118027322289dSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 118037322289dSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11804ec713c28SmrgAC_CONFIG_COMMANDS_PRE(dnl 11805ec713c28Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11806ec713c28Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 118077322289dSmrg 118087322289dSmrg# POSIX will say in a future version that running "rm -f" with no argument 118097322289dSmrg# is OK; and we want to be able to make that assumption in our Makefile 118107322289dSmrg# recipes. So use an aggressive probe to check that the usage we want is 118117322289dSmrg# actually supported "in the wild" to an acceptable degree. 118127322289dSmrg# See automake bug#10828. 118137322289dSmrg# To make any issue more visible, cause the running configure to be aborted 118147322289dSmrg# by default if the 'rm' program in use doesn't match our expectations; the 118157322289dSmrg# user can still override this though. 118167322289dSmrgif rm -f && rm -fr && rm -rf; then : OK; else 118177322289dSmrg cat >&2 <<'END' 118187322289dSmrgOops! 118197322289dSmrg 118207322289dSmrgYour 'rm' program seems unable to run without file operands specified 118217322289dSmrgon the command line, even when the '-f' option is present. This is contrary 118227322289dSmrgto the behaviour of most rm programs out there, and not conforming with 118237322289dSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 118247322289dSmrg 118257322289dSmrgPlease tell bug-automake@gnu.org about your system, including the value 118267322289dSmrgof your $PATH and any error possibly output before this message. This 118277322289dSmrgcan help us improve future automake versions. 118287322289dSmrg 118297322289dSmrgEND 118307322289dSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 118317322289dSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 118327322289dSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 118337322289dSmrg echo >&2 118347322289dSmrg else 118357322289dSmrg cat >&2 <<'END' 118367322289dSmrgAborting the configuration process, to ensure you take notice of the issue. 118377322289dSmrg 118387322289dSmrgYou can download and install GNU coreutils to get an 'rm' implementation 118397322289dSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 118407322289dSmrg 118417322289dSmrgIf you want to complete the configuration process using your problematic 118427322289dSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 118437322289dSmrgto "yes", and re-run configure. 118447322289dSmrg 118457322289dSmrgEND 118467322289dSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 118477322289dSmrg fi 118487322289dSmrgfi 118497322289dSmrgdnl The trailing newline in this macro's definition is deliberate, for 118507322289dSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 118517322289dSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 118521d54945dSmrg]) 118531d54945dSmrg 118547322289dSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11855ec713c28Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11856ec713c28Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11857ec713c28Smrgm4_define([_AC_COMPILER_EXEEXT], 11858ec713c28Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11859ec713c28Smrg 118601d54945dSmrg# When config.status generates a header, we must update the stamp-h file. 118611d54945dSmrg# This file resides in the same directory as the config header 118621d54945dSmrg# that is generated. The stamp files are numbered to have different names. 118631d54945dSmrg 118641d54945dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 118651d54945dSmrg# loop where config.status creates the headers, so we can generate 118661d54945dSmrg# our stamp files there. 118671d54945dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 118681d54945dSmrg[# Compute $1's index in $config_headers. 11869ba85709eSmrg_am_arg=$1 118701d54945dSmrg_am_stamp_count=1 118711d54945dSmrgfor _am_header in $config_headers :; do 118721d54945dSmrg case $_am_header in 11873ba85709eSmrg $_am_arg | $_am_arg:* ) 118741d54945dSmrg break ;; 118751d54945dSmrg * ) 118761d54945dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 118771d54945dSmrg esac 118781d54945dSmrgdone 11879ba85709eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 118801d54945dSmrg 118817322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 118821d54945dSmrg# 118831d54945dSmrg# This file is free software; the Free Software Foundation 118841d54945dSmrg# gives unlimited permission to copy and/or distribute it, 118851d54945dSmrg# with or without modifications, as long as this notice is preserved. 118861d54945dSmrg 118871d54945dSmrg# AM_PROG_INSTALL_SH 118881d54945dSmrg# ------------------ 118891d54945dSmrg# Define $install_sh. 118901d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 118911d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 118927322289dSmrgif test x"${install_sh+set}" != xset; then 11893ec713c28Smrg case $am_aux_dir in 11894ec713c28Smrg *\ * | *\ *) 11895ec713c28Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11896ec713c28Smrg *) 11897ec713c28Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11898ec713c28Smrg esac 11899ec713c28Smrgfi 119007322289dSmrgAC_SUBST([install_sh])]) 119011d54945dSmrg 119027322289dSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 119031d54945dSmrg# 119041d54945dSmrg# This file is free software; the Free Software Foundation 119051d54945dSmrg# gives unlimited permission to copy and/or distribute it, 119061d54945dSmrg# with or without modifications, as long as this notice is preserved. 119071d54945dSmrg 119081d54945dSmrg# Check whether the underlying file-system supports filenames 119091d54945dSmrg# with a leading dot. For instance MS-DOS doesn't. 119101d54945dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 119111d54945dSmrg[rm -rf .tst 2>/dev/null 119121d54945dSmrgmkdir .tst 2>/dev/null 119131d54945dSmrgif test -d .tst; then 119141d54945dSmrg am__leading_dot=. 119151d54945dSmrgelse 119161d54945dSmrg am__leading_dot=_ 119171d54945dSmrgfi 119181d54945dSmrgrmdir .tst 2>/dev/null 119191d54945dSmrgAC_SUBST([am__leading_dot])]) 119201d54945dSmrg 119211d54945dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 119221d54945dSmrg 119237322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 119241d54945dSmrg# 119251d54945dSmrg# This file is free software; the Free Software Foundation 119261d54945dSmrg# gives unlimited permission to copy and/or distribute it, 119271d54945dSmrg# with or without modifications, as long as this notice is preserved. 119281d54945dSmrg 119291d54945dSmrg# AM_MAKE_INCLUDE() 119301d54945dSmrg# ----------------- 119311d54945dSmrg# Check to see how make treats includes. 119321d54945dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 119331d54945dSmrg[am_make=${MAKE-make} 119341d54945dSmrgcat > confinc << 'END' 119351d54945dSmrgam__doit: 11936ec713c28Smrg @echo this is the am__doit target 119371d54945dSmrg.PHONY: am__doit 119381d54945dSmrgEND 119391d54945dSmrg# If we don't find an include directive, just comment out the code. 119401d54945dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 119411d54945dSmrgam__include="#" 119421d54945dSmrgam__quote= 119431d54945dSmrg_am_result=none 119441d54945dSmrg# First try GNU make style include. 119451d54945dSmrgecho "include confinc" > confmf 119467322289dSmrg# Ignore all kinds of additional output from 'make'. 11947ec713c28Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11948ec713c28Smrg*the\ am__doit\ target*) 11949ec713c28Smrg am__include=include 11950ec713c28Smrg am__quote= 11951ec713c28Smrg _am_result=GNU 11952ec713c28Smrg ;; 11953ec713c28Smrgesac 119541d54945dSmrg# Now try BSD make style include. 119551d54945dSmrgif test "$am__include" = "#"; then 119561d54945dSmrg echo '.include "confinc"' > confmf 11957ec713c28Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11958ec713c28Smrg *the\ am__doit\ target*) 11959ec713c28Smrg am__include=.include 11960ec713c28Smrg am__quote="\"" 11961ec713c28Smrg _am_result=BSD 11962ec713c28Smrg ;; 11963ec713c28Smrg esac 119641d54945dSmrgfi 119651d54945dSmrgAC_SUBST([am__include]) 119661d54945dSmrgAC_SUBST([am__quote]) 119671d54945dSmrgAC_MSG_RESULT([$_am_result]) 119681d54945dSmrgrm -f confinc confmf 119691d54945dSmrg]) 119701d54945dSmrg 119711d54945dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 119721d54945dSmrg 119737322289dSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 119741d54945dSmrg# 119751d54945dSmrg# This file is free software; the Free Software Foundation 119761d54945dSmrg# gives unlimited permission to copy and/or distribute it, 119771d54945dSmrg# with or without modifications, as long as this notice is preserved. 119781d54945dSmrg 119791d54945dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 119801d54945dSmrg# ------------------------------ 119811d54945dSmrgAC_DEFUN([AM_MISSING_PROG], 119821d54945dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 119831d54945dSmrg$1=${$1-"${am_missing_run}$2"} 119841d54945dSmrgAC_SUBST($1)]) 119851d54945dSmrg 119861d54945dSmrg# AM_MISSING_HAS_RUN 119871d54945dSmrg# ------------------ 119887322289dSmrg# Define MISSING if not defined so far and test if it is modern enough. 119897322289dSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 119901d54945dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 119911d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11992ba85709eSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11993ec713c28Smrgif test x"${MISSING+set}" != xset; then 11994ec713c28Smrg case $am_aux_dir in 11995ec713c28Smrg *\ * | *\ *) 11996ec713c28Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11997ec713c28Smrg *) 11998ec713c28Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11999ec713c28Smrg esac 12000ec713c28Smrgfi 120011d54945dSmrg# Use eval to expand $SHELL 120027322289dSmrgif eval "$MISSING --is-lightweight"; then 120037322289dSmrg am_missing_run="$MISSING " 120041d54945dSmrgelse 120051d54945dSmrg am_missing_run= 120067322289dSmrg AC_MSG_WARN(['missing' script is too old or missing]) 120071d54945dSmrgfi 120081d54945dSmrg]) 120091d54945dSmrg 120101d54945dSmrg# Helper functions for option handling. -*- Autoconf -*- 120111d54945dSmrg 120127322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 120131d54945dSmrg# 120141d54945dSmrg# This file is free software; the Free Software Foundation 120151d54945dSmrg# gives unlimited permission to copy and/or distribute it, 120161d54945dSmrg# with or without modifications, as long as this notice is preserved. 120171d54945dSmrg 120181d54945dSmrg# _AM_MANGLE_OPTION(NAME) 120191d54945dSmrg# ----------------------- 120201d54945dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 120211d54945dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 120221d54945dSmrg 120231d54945dSmrg# _AM_SET_OPTION(NAME) 12024d769e936Smrg# -------------------- 120251d54945dSmrg# Set option NAME. Presently that only means defining a flag for this option. 120261d54945dSmrgAC_DEFUN([_AM_SET_OPTION], 120277322289dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 120281d54945dSmrg 120291d54945dSmrg# _AM_SET_OPTIONS(OPTIONS) 12030d769e936Smrg# ------------------------ 120311d54945dSmrg# OPTIONS is a space-separated list of Automake options. 120321d54945dSmrgAC_DEFUN([_AM_SET_OPTIONS], 12033786a6f21Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 120341d54945dSmrg 120351d54945dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 120361d54945dSmrg# ------------------------------------------- 120371d54945dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 120381d54945dSmrgAC_DEFUN([_AM_IF_OPTION], 120391d54945dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 120401d54945dSmrg 120417322289dSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 120427322289dSmrg# 120437322289dSmrg# This file is free software; the Free Software Foundation 120447322289dSmrg# gives unlimited permission to copy and/or distribute it, 120457322289dSmrg# with or without modifications, as long as this notice is preserved. 120467322289dSmrg 120477322289dSmrg# _AM_PROG_CC_C_O 120487322289dSmrg# --------------- 120497322289dSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 120507322289dSmrg# to automatically call this. 120517322289dSmrgAC_DEFUN([_AM_PROG_CC_C_O], 120527322289dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 120537322289dSmrgAC_REQUIRE_AUX_FILE([compile])dnl 120547322289dSmrgAC_LANG_PUSH([C])dnl 120557322289dSmrgAC_CACHE_CHECK( 120567322289dSmrg [whether $CC understands -c and -o together], 120577322289dSmrg [am_cv_prog_cc_c_o], 120587322289dSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 120597322289dSmrg # Make sure it works both with $CC and with simple cc. 120607322289dSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 120617322289dSmrg # compilers refuse to overwrite an existing .o file with -o, 120627322289dSmrg # though they will create one. 120637322289dSmrg am_cv_prog_cc_c_o=yes 120647322289dSmrg for am_i in 1 2; do 120657322289dSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 120667322289dSmrg && test -f conftest2.$ac_objext; then 120677322289dSmrg : OK 120687322289dSmrg else 120697322289dSmrg am_cv_prog_cc_c_o=no 120707322289dSmrg break 120717322289dSmrg fi 120727322289dSmrg done 120737322289dSmrg rm -f core conftest* 120747322289dSmrg unset am_i]) 120757322289dSmrgif test "$am_cv_prog_cc_c_o" != yes; then 120767322289dSmrg # Losing compiler, so override with the script. 120777322289dSmrg # FIXME: It is wrong to rewrite CC. 120787322289dSmrg # But if we don't then we get into trouble of one sort or another. 120797322289dSmrg # A longer-term fix would be to have automake use am__CC in this case, 120807322289dSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 120817322289dSmrg CC="$am_aux_dir/compile $CC" 120827322289dSmrgfi 120837322289dSmrgAC_LANG_POP([C])]) 120847322289dSmrg 120857322289dSmrg# For backward compatibility. 120867322289dSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 120871d54945dSmrg 120887322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 120891d54945dSmrg# 120901d54945dSmrg# This file is free software; the Free Software Foundation 120911d54945dSmrg# gives unlimited permission to copy and/or distribute it, 120921d54945dSmrg# with or without modifications, as long as this notice is preserved. 120931d54945dSmrg 120947322289dSmrg# AM_RUN_LOG(COMMAND) 120957322289dSmrg# ------------------- 120967322289dSmrg# Run COMMAND, save the exit status in ac_status, and log it. 120977322289dSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 120987322289dSmrgAC_DEFUN([AM_RUN_LOG], 120997322289dSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 121007322289dSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 121017322289dSmrg ac_status=$? 121027322289dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 121037322289dSmrg (exit $ac_status); }]) 121047322289dSmrg 121057322289dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 121067322289dSmrg 121077322289dSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 121087322289dSmrg# 121097322289dSmrg# This file is free software; the Free Software Foundation 121107322289dSmrg# gives unlimited permission to copy and/or distribute it, 121117322289dSmrg# with or without modifications, as long as this notice is preserved. 121121d54945dSmrg 121131d54945dSmrg# AM_SANITY_CHECK 121141d54945dSmrg# --------------- 121151d54945dSmrgAC_DEFUN([AM_SANITY_CHECK], 121161d54945dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 12117ec713c28Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12118ec713c28Smrg# name. Accept space and tab only in the latter. 12119ec713c28Smrgam_lf=' 12120ec713c28Smrg' 12121ec713c28Smrgcase `pwd` in 12122ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12123ec713c28Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12124ec713c28Smrgesac 12125ec713c28Smrgcase $srcdir in 12126ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 121277322289dSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12128ec713c28Smrgesac 12129ec713c28Smrg 121307322289dSmrg# Do 'set' in a subshell so we don't clobber the current shell's 121311d54945dSmrg# arguments. Must try -L first in case configure is actually a 121321d54945dSmrg# symlink; some systems play weird games with the mod time of symlinks 121331d54945dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 121341d54945dSmrg# directory). 121351d54945dSmrgif ( 121367322289dSmrg am_has_slept=no 121377322289dSmrg for am_try in 1 2; do 121387322289dSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 121397322289dSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 121407322289dSmrg if test "$[*]" = "X"; then 121417322289dSmrg # -L didn't work. 121427322289dSmrg set X `ls -t "$srcdir/configure" conftest.file` 121437322289dSmrg fi 121447322289dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 121457322289dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 121467322289dSmrg 121477322289dSmrg # If neither matched, then we have a broken ls. This can happen 121487322289dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 121497322289dSmrg # broken ls alias from the environment. This has actually 121507322289dSmrg # happened. Such a system could not be considered "sane". 121517322289dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 121527322289dSmrg alias in your environment]) 121537322289dSmrg fi 121547322289dSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 121557322289dSmrg break 121567322289dSmrg fi 121577322289dSmrg # Just in case. 121587322289dSmrg sleep 1 121597322289dSmrg am_has_slept=yes 121607322289dSmrg done 121611d54945dSmrg test "$[2]" = conftest.file 121621d54945dSmrg ) 121631d54945dSmrgthen 121641d54945dSmrg # Ok. 121651d54945dSmrg : 121661d54945dSmrgelse 121671d54945dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 121681d54945dSmrgCheck your system clock]) 121691d54945dSmrgfi 121707322289dSmrgAC_MSG_RESULT([yes]) 121717322289dSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 121727322289dSmrg# generated files are strictly newer. 121737322289dSmrgam_sleep_pid= 121747322289dSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 121757322289dSmrg ( sleep 1 ) & 121767322289dSmrg am_sleep_pid=$! 121777322289dSmrgfi 121787322289dSmrgAC_CONFIG_COMMANDS_PRE( 121797322289dSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 121807322289dSmrg if test -n "$am_sleep_pid"; then 121817322289dSmrg # Hide warnings about reused PIDs. 121827322289dSmrg wait $am_sleep_pid 2>/dev/null 121837322289dSmrg fi 121847322289dSmrg AC_MSG_RESULT([done])]) 121857322289dSmrgrm -f conftest.file 121867322289dSmrg]) 121871d54945dSmrg 121887322289dSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12189d769e936Smrg# 12190d769e936Smrg# This file is free software; the Free Software Foundation 12191d769e936Smrg# gives unlimited permission to copy and/or distribute it, 12192d769e936Smrg# with or without modifications, as long as this notice is preserved. 12193d769e936Smrg 12194d769e936Smrg# AM_SILENT_RULES([DEFAULT]) 12195d769e936Smrg# -------------------------- 12196d769e936Smrg# Enable less verbose build rules; with the default set to DEFAULT 121977322289dSmrg# ("yes" being less verbose, "no" or empty being verbose). 12198d769e936SmrgAC_DEFUN([AM_SILENT_RULES], 121997322289dSmrg[AC_ARG_ENABLE([silent-rules], [dnl 122007322289dSmrgAS_HELP_STRING( 122017322289dSmrg [--enable-silent-rules], 122027322289dSmrg [less verbose build output (undo: "make V=1")]) 122037322289dSmrgAS_HELP_STRING( 122047322289dSmrg [--disable-silent-rules], 122057322289dSmrg [verbose build output (undo: "make V=0")])dnl 122067322289dSmrg]) 122077322289dSmrgcase $enable_silent_rules in @%:@ ((( 122087322289dSmrg yes) AM_DEFAULT_VERBOSITY=0;; 122097322289dSmrg no) AM_DEFAULT_VERBOSITY=1;; 122107322289dSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12211d769e936Smrgesac 12212d769e936Smrgdnl 122137322289dSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12214d769e936Smrgdnl do not support nested variable expansions. 12215d769e936Smrgdnl See automake bug#9928 and bug#10237. 12216d769e936Smrgam_make=${MAKE-make} 12217d769e936SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12218d769e936Smrg [am_cv_make_support_nested_variables], 12219d769e936Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12220d769e936SmrgBAR0=false 12221d769e936SmrgBAR1=true 12222d769e936SmrgV=1 12223d769e936Smrgam__doit: 12224d769e936Smrg @$(TRUE) 12225d769e936Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12226d769e936Smrg am_cv_make_support_nested_variables=yes 12227d769e936Smrgelse 12228d769e936Smrg am_cv_make_support_nested_variables=no 12229d769e936Smrgfi]) 12230d769e936Smrgif test $am_cv_make_support_nested_variables = yes; then 122317322289dSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12232d769e936Smrg AM_V='$(V)' 12233d769e936Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12234d769e936Smrgelse 12235d769e936Smrg AM_V=$AM_DEFAULT_VERBOSITY 12236d769e936Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12237d769e936Smrgfi 12238d769e936SmrgAC_SUBST([AM_V])dnl 12239d769e936SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12240d769e936SmrgAC_SUBST([AM_DEFAULT_V])dnl 12241d769e936SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12242d769e936SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12243d769e936SmrgAM_BACKSLASH='\' 12244d769e936SmrgAC_SUBST([AM_BACKSLASH])dnl 12245d769e936Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12246d769e936Smrg]) 12247d769e936Smrg 122487322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 122491d54945dSmrg# 122501d54945dSmrg# This file is free software; the Free Software Foundation 122511d54945dSmrg# gives unlimited permission to copy and/or distribute it, 122521d54945dSmrg# with or without modifications, as long as this notice is preserved. 122531d54945dSmrg 122541d54945dSmrg# AM_PROG_INSTALL_STRIP 122551d54945dSmrg# --------------------- 122567322289dSmrg# One issue with vendor 'install' (even GNU) is that you can't 122571d54945dSmrg# specify the program used to strip binaries. This is especially 122581d54945dSmrg# annoying in cross-compiling environments, where the build's strip 122591d54945dSmrg# is unlikely to handle the host's binaries. 122601d54945dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 122617322289dSmrg# always use install-sh in "make install-strip", and initialize 122621d54945dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 122631d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 122641d54945dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 122657322289dSmrg# Installed binaries are usually stripped using 'strip' when the user 122667322289dSmrg# run "make install-strip". However 'strip' might not be the right 122671d54945dSmrg# tool to use in cross-compilation environments, therefore Automake 122687322289dSmrg# will honor the 'STRIP' environment variable to overrule this program. 122697322289dSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 122701d54945dSmrgif test "$cross_compiling" != no; then 122711d54945dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 122721d54945dSmrgfi 12273ba85709eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 122741d54945dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 122751d54945dSmrg 122767322289dSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 12277ba85709eSmrg# 12278ba85709eSmrg# This file is free software; the Free Software Foundation 12279ba85709eSmrg# gives unlimited permission to copy and/or distribute it, 12280ba85709eSmrg# with or without modifications, as long as this notice is preserved. 12281ba85709eSmrg 12282ba85709eSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 12283ba85709eSmrg# --------------------------- 12284ba85709eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12285ba85709eSmrg# This macro is traced by Automake. 12286ba85709eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12287ba85709eSmrg 12288ec713c28Smrg# AM_SUBST_NOTMAKE(VARIABLE) 12289d769e936Smrg# -------------------------- 12290ec713c28Smrg# Public sister of _AM_SUBST_NOTMAKE. 12291ec713c28SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12292ec713c28Smrg 122931d54945dSmrg# Check how to create a tarball. -*- Autoconf -*- 122941d54945dSmrg 122957322289dSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 122961d54945dSmrg# 122971d54945dSmrg# This file is free software; the Free Software Foundation 122981d54945dSmrg# gives unlimited permission to copy and/or distribute it, 122991d54945dSmrg# with or without modifications, as long as this notice is preserved. 123001d54945dSmrg 123011d54945dSmrg# _AM_PROG_TAR(FORMAT) 123021d54945dSmrg# -------------------- 123031d54945dSmrg# Check how to create a tarball in format FORMAT. 123047322289dSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 123051d54945dSmrg# 123061d54945dSmrg# Substitute a variable $(am__tar) that is a command 123071d54945dSmrg# writing to stdout a FORMAT-tarball containing the directory 123081d54945dSmrg# $tardir. 123091d54945dSmrg# tardir=directory && $(am__tar) > result.tar 123101d54945dSmrg# 123111d54945dSmrg# Substitute a variable $(am__untar) that extract such 123121d54945dSmrg# a tarball read from stdin. 123131d54945dSmrg# $(am__untar) < result.tar 123147322289dSmrg# 123151d54945dSmrgAC_DEFUN([_AM_PROG_TAR], 12316d769e936Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12317d769e936Smrg# in the wild :-( We should find a proper way to deprecate it ... 12318d769e936SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 123197322289dSmrg 123207322289dSmrg# We'll loop over all known methods to create a tar archive until one works. 123211d54945dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 123221d54945dSmrg 123237322289dSmrgm4_if([$1], [v7], 123247322289dSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 123257322289dSmrg 123267322289dSmrg [m4_case([$1], 123277322289dSmrg [ustar], 123287322289dSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 123297322289dSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 123307322289dSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 123317322289dSmrg # and bug#13588). 123327322289dSmrg am_max_uid=2097151 # 2^21 - 1 123337322289dSmrg am_max_gid=$am_max_uid 123347322289dSmrg # The $UID and $GID variables are not portable, so we need to resort 123357322289dSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 123367322289dSmrg # below are definitely unexpected, so allow the users to see them 123377322289dSmrg # (that is, avoid stderr redirection). 123387322289dSmrg am_uid=`id -u || echo unknown` 123397322289dSmrg am_gid=`id -g || echo unknown` 123407322289dSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 123417322289dSmrg if test $am_uid -le $am_max_uid; then 123427322289dSmrg AC_MSG_RESULT([yes]) 123437322289dSmrg else 123447322289dSmrg AC_MSG_RESULT([no]) 123457322289dSmrg _am_tools=none 123467322289dSmrg fi 123477322289dSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 123487322289dSmrg if test $am_gid -le $am_max_gid; then 123497322289dSmrg AC_MSG_RESULT([yes]) 123507322289dSmrg else 123517322289dSmrg AC_MSG_RESULT([no]) 123527322289dSmrg _am_tools=none 123537322289dSmrg fi], 123541d54945dSmrg 123557322289dSmrg [pax], 123567322289dSmrg [], 123577322289dSmrg 123587322289dSmrg [m4_fatal([Unknown tar format])]) 123597322289dSmrg 123607322289dSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 123617322289dSmrg 123627322289dSmrg # Go ahead even if we have the value already cached. We do so because we 123637322289dSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 123647322289dSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 123657322289dSmrg 123667322289dSmrg for _am_tool in $_am_tools; do 123677322289dSmrg case $_am_tool in 123687322289dSmrg gnutar) 123697322289dSmrg for _am_tar in tar gnutar gtar; do 123707322289dSmrg AM_RUN_LOG([$_am_tar --version]) && break 123717322289dSmrg done 123727322289dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 123737322289dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 123747322289dSmrg am__untar="$_am_tar -xf -" 123757322289dSmrg ;; 123767322289dSmrg plaintar) 123777322289dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 123787322289dSmrg # ustar tarball either. 123797322289dSmrg (tar --version) >/dev/null 2>&1 && continue 123807322289dSmrg am__tar='tar chf - "$$tardir"' 123817322289dSmrg am__tar_='tar chf - "$tardir"' 123827322289dSmrg am__untar='tar xf -' 123837322289dSmrg ;; 123847322289dSmrg pax) 123857322289dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 123867322289dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 123877322289dSmrg am__untar='pax -r' 123887322289dSmrg ;; 123897322289dSmrg cpio) 123907322289dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 123917322289dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 123927322289dSmrg am__untar='cpio -i -H $1 -d' 123937322289dSmrg ;; 123947322289dSmrg none) 123957322289dSmrg am__tar=false 123967322289dSmrg am__tar_=false 123977322289dSmrg am__untar=false 123987322289dSmrg ;; 123997322289dSmrg esac 124007322289dSmrg 124017322289dSmrg # If the value was cached, stop now. We just wanted to have am__tar 124027322289dSmrg # and am__untar set. 124037322289dSmrg test -n "${am_cv_prog_tar_$1}" && break 124047322289dSmrg 124057322289dSmrg # tar/untar a dummy directory, and stop if the command works. 124067322289dSmrg rm -rf conftest.dir 124077322289dSmrg mkdir conftest.dir 124087322289dSmrg echo GrepMe > conftest.dir/file 124097322289dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 124107322289dSmrg rm -rf conftest.dir 124117322289dSmrg if test -s conftest.tar; then 124127322289dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 124137322289dSmrg AM_RUN_LOG([cat conftest.dir/file]) 124147322289dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 124157322289dSmrg fi 124167322289dSmrg done 124171d54945dSmrg rm -rf conftest.dir 124181d54945dSmrg 124197322289dSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 124207322289dSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 124217322289dSmrg 124221d54945dSmrgAC_SUBST([am__tar]) 124231d54945dSmrgAC_SUBST([am__untar]) 124241d54945dSmrg]) # _AM_PROG_TAR 124251d54945dSmrg 12426