aclocal.m4 revision 7322289d
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 26837322289dSmrg # Handle Gentoo/FreeBSD as it was Linux 26847322289dSmrg case $host_vendor in 26857322289dSmrg gentoo) 26867322289dSmrg version_type=linux ;; 26877322289dSmrg *) 26887322289dSmrg version_type=freebsd-$objformat ;; 26897322289dSmrg esac 26907322289dSmrg 26911d54945dSmrg case $version_type in 26921d54945dSmrg freebsd-elf*) 26937322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26947322289dSmrg soname_spec='$libname$release$shared_ext$major' 26951d54945dSmrg need_version=no 26961d54945dSmrg need_lib_prefix=no 26971d54945dSmrg ;; 26981d54945dSmrg freebsd-*) 26997322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27001d54945dSmrg need_version=yes 27011d54945dSmrg ;; 27027322289dSmrg linux) 27037322289dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27047322289dSmrg soname_spec='${libname}${release}${shared_ext}$major' 27057322289dSmrg need_lib_prefix=no 27067322289dSmrg need_version=no 27077322289dSmrg ;; 27081d54945dSmrg esac 27091d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27101d54945dSmrg case $host_os in 2711d769e936Smrg freebsd2.*) 27121d54945dSmrg shlibpath_overrides_runpath=yes 27131d54945dSmrg ;; 27141d54945dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27151d54945dSmrg shlibpath_overrides_runpath=yes 27161d54945dSmrg hardcode_into_libs=yes 27171d54945dSmrg ;; 27181d54945dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27191d54945dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27201d54945dSmrg shlibpath_overrides_runpath=no 27211d54945dSmrg hardcode_into_libs=yes 27221d54945dSmrg ;; 2723ba85709eSmrg *) # from 4.6 on, and DragonFly 27241d54945dSmrg shlibpath_overrides_runpath=yes 27251d54945dSmrg hardcode_into_libs=yes 27261d54945dSmrg ;; 27271d54945dSmrg esac 27281d54945dSmrg ;; 27291d54945dSmrg 2730d769e936Smrghaiku*) 2731d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 2732d769e936Smrg need_lib_prefix=no 2733d769e936Smrg need_version=no 2734d769e936Smrg dynamic_linker="$host_os runtime_loader" 27357322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27367322289dSmrg soname_spec='$libname$release$shared_ext$major' 2737d769e936Smrg shlibpath_var=LIBRARY_PATH 27387322289dSmrg shlibpath_overrides_runpath=no 2739d769e936Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27401d54945dSmrg hardcode_into_libs=yes 27411d54945dSmrg ;; 27421d54945dSmrg 27431d54945dSmrghpux9* | hpux10* | hpux11*) 27441d54945dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 27451d54945dSmrg # link against other versions. 27461d54945dSmrg version_type=sunos 27471d54945dSmrg need_lib_prefix=no 27481d54945dSmrg need_version=no 27491d54945dSmrg case $host_cpu in 27501d54945dSmrg ia64*) 27511d54945dSmrg shrext_cmds='.so' 27521d54945dSmrg hardcode_into_libs=yes 27531d54945dSmrg dynamic_linker="$host_os dld.so" 27541d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 27551d54945dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27567322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27577322289dSmrg soname_spec='$libname$release$shared_ext$major' 27587322289dSmrg if test 32 = "$HPUX_IA64_MODE"; then 27591d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27607322289dSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27611d54945dSmrg else 27621d54945dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27637322289dSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27641d54945dSmrg fi 27651d54945dSmrg ;; 2766d769e936Smrg hppa*64*) 2767d769e936Smrg shrext_cmds='.sl' 2768d769e936Smrg hardcode_into_libs=yes 2769d769e936Smrg dynamic_linker="$host_os dld.sl" 2770d769e936Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2771d769e936Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27727322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27737322289dSmrg soname_spec='$libname$release$shared_ext$major' 2774d769e936Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2775d769e936Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2776d769e936Smrg ;; 2777d769e936Smrg *) 27781d54945dSmrg shrext_cmds='.sl' 27791d54945dSmrg dynamic_linker="$host_os dld.sl" 27801d54945dSmrg shlibpath_var=SHLIB_PATH 27811d54945dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27827322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27837322289dSmrg soname_spec='$libname$release$shared_ext$major' 27841d54945dSmrg ;; 27851d54945dSmrg esac 2786d769e936Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27871d54945dSmrg postinstall_cmds='chmod 555 $lib' 2788d769e936Smrg # or fails outright, so override atomically: 2789d769e936Smrg install_override_mode=555 27901d54945dSmrg ;; 27911d54945dSmrg 2792ba85709eSmrginterix[[3-9]]*) 2793d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 27941d54945dSmrg need_lib_prefix=no 27951d54945dSmrg need_version=no 27967322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27977322289dSmrg soname_spec='$libname$release$shared_ext$major' 27981d54945dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27991d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28001d54945dSmrg shlibpath_overrides_runpath=no 28011d54945dSmrg hardcode_into_libs=yes 28021d54945dSmrg ;; 28031d54945dSmrg 28041d54945dSmrgirix5* | irix6* | nonstopux*) 28051d54945dSmrg case $host_os in 28061d54945dSmrg nonstopux*) version_type=nonstopux ;; 28071d54945dSmrg *) 28087322289dSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 2809d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 28101d54945dSmrg else 28111d54945dSmrg version_type=irix 28121d54945dSmrg fi ;; 28131d54945dSmrg esac 28141d54945dSmrg need_lib_prefix=no 28151d54945dSmrg need_version=no 28167322289dSmrg soname_spec='$libname$release$shared_ext$major' 28177322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28181d54945dSmrg case $host_os in 28191d54945dSmrg irix5* | nonstopux*) 28201d54945dSmrg libsuff= shlibsuff= 28211d54945dSmrg ;; 28221d54945dSmrg *) 28231d54945dSmrg case $LD in # libtool.m4 will add one of these switches to LD 28241d54945dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28251d54945dSmrg libsuff= shlibsuff= libmagic=32-bit;; 28261d54945dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28271d54945dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28281d54945dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28291d54945dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28301d54945dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 28311d54945dSmrg esac 28321d54945dSmrg ;; 28331d54945dSmrg esac 28341d54945dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28351d54945dSmrg shlibpath_overrides_runpath=no 28367322289dSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28377322289dSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28381d54945dSmrg hardcode_into_libs=yes 28391d54945dSmrg ;; 28401d54945dSmrg 28411d54945dSmrg# No shared lib support for Linux oldld, aout, or coff. 28421d54945dSmrglinux*oldld* | linux*aout* | linux*coff*) 28431d54945dSmrg dynamic_linker=no 28441d54945dSmrg ;; 28451d54945dSmrg 28467322289dSmrglinux*android*) 28477322289dSmrg version_type=none # Android doesn't support versioned libraries. 28487322289dSmrg need_lib_prefix=no 28497322289dSmrg need_version=no 28507322289dSmrg library_names_spec='$libname$release$shared_ext' 28517322289dSmrg soname_spec='$libname$release$shared_ext' 28527322289dSmrg finish_cmds= 28537322289dSmrg shlibpath_var=LD_LIBRARY_PATH 28547322289dSmrg shlibpath_overrides_runpath=yes 28557322289dSmrg 28567322289dSmrg # This implies no fast_install, which is unacceptable. 28577322289dSmrg # Some rework will be needed to allow for fast_install 28587322289dSmrg # before this can be enabled. 28597322289dSmrg hardcode_into_libs=yes 28607322289dSmrg 28617322289dSmrg dynamic_linker='Android linker' 28627322289dSmrg # Don't embed -rpath directories since the linker doesn't support them. 28637322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28647322289dSmrg ;; 28657322289dSmrg 2866d769e936Smrg# This must be glibc/ELF. 28677322289dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2868d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 28691d54945dSmrg need_lib_prefix=no 28701d54945dSmrg need_version=no 28717322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28727322289dSmrg soname_spec='$libname$release$shared_ext$major' 28731d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28741d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 28751d54945dSmrg shlibpath_overrides_runpath=no 2876d769e936Smrg 2877d769e936Smrg # Some binutils ld are patched to set DT_RUNPATH 2878d769e936Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2879d769e936Smrg [lt_cv_shlibpath_overrides_runpath=no 2880d769e936Smrg save_LDFLAGS=$LDFLAGS 2881d769e936Smrg save_libdir=$libdir 2882d769e936Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2883d769e936Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2884d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2885d769e936Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2886d769e936Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2887d769e936Smrg LDFLAGS=$save_LDFLAGS 2888d769e936Smrg libdir=$save_libdir 2889d769e936Smrg ]) 2890d769e936Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2891d769e936Smrg 28921d54945dSmrg # This implies no fast_install, which is unacceptable. 28931d54945dSmrg # Some rework will be needed to allow for fast_install 28941d54945dSmrg # before this can be enabled. 28951d54945dSmrg hardcode_into_libs=yes 2896d769e936Smrg 28977322289dSmrg # Ideally, we could use ldconfig to report *all* directores which are 28987322289dSmrg # searched for libraries, however this is still not possible. Aside from not 28997322289dSmrg # being certain /sbin/ldconfig is available, command 29007322289dSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 29017322289dSmrg # even though it is searched at run-time. Try to do the best guess by 29027322289dSmrg # appending ld.so.conf contents (and includes) to the search path. 29031d54945dSmrg if test -f /etc/ld.so.conf; then 2904d769e936Smrg 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' ' '` 29057322289dSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29061d54945dSmrg fi 29071d54945dSmrg 29081d54945dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29091d54945dSmrg # powerpc, because MkLinux only supported shared libraries with the 29101d54945dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 29111d54945dSmrg # most powerpc-linux boxes support dynamic linking these days and 29121d54945dSmrg # people can always --disable-shared, the test was removed, and we 29131d54945dSmrg # assume the GNU/Linux dynamic linker is in use. 29141d54945dSmrg dynamic_linker='GNU/Linux ld.so' 29151d54945dSmrg ;; 29161d54945dSmrg 29171d54945dSmrgnetbsd*) 29181d54945dSmrg version_type=sunos 29191d54945dSmrg need_lib_prefix=no 29201d54945dSmrg need_version=no 2921d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29227322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29231d54945dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29241d54945dSmrg dynamic_linker='NetBSD (a.out) ld.so' 29251d54945dSmrg else 29267322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29277322289dSmrg soname_spec='$libname$release$shared_ext$major' 29281d54945dSmrg dynamic_linker='NetBSD ld.elf_so' 29291d54945dSmrg fi 29301d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 29311d54945dSmrg shlibpath_overrides_runpath=yes 29321d54945dSmrg hardcode_into_libs=yes 29331d54945dSmrg ;; 29341d54945dSmrg 29351d54945dSmrgnewsos6) 2936d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 29377322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29381d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 29391d54945dSmrg shlibpath_overrides_runpath=yes 29401d54945dSmrg ;; 29411d54945dSmrg 2942d769e936Smrg*nto* | *qnx*) 2943d769e936Smrg version_type=qnx 29441d54945dSmrg need_lib_prefix=no 29451d54945dSmrg need_version=no 29467322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29477322289dSmrg soname_spec='$libname$release$shared_ext$major' 29481d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 2949d769e936Smrg shlibpath_overrides_runpath=no 2950d769e936Smrg hardcode_into_libs=yes 2951d769e936Smrg dynamic_linker='ldqnx.so' 29521d54945dSmrg ;; 29531d54945dSmrg 29547322289dSmrgopenbsd* | bitrig*) 29551d54945dSmrg version_type=sunos 29567322289dSmrg sys_lib_dlsearch_path_spec=/usr/lib 29571d54945dSmrg need_lib_prefix=no 29587322289dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29597322289dSmrg need_version=no 29601d54945dSmrg else 29617322289dSmrg need_version=yes 29621d54945dSmrg fi 29637322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29647322289dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29657322289dSmrg shlibpath_var=LD_LIBRARY_PATH 29667322289dSmrg shlibpath_overrides_runpath=yes 29671d54945dSmrg ;; 29681d54945dSmrg 29691d54945dSmrgos2*) 29701d54945dSmrg libname_spec='$name' 29717322289dSmrg version_type=windows 29727322289dSmrg shrext_cmds=.dll 29737322289dSmrg need_version=no 29741d54945dSmrg need_lib_prefix=no 29757322289dSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29767322289dSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29777322289dSmrg v=$($ECHO $release$versuffix | tr -d .-); 29787322289dSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29797322289dSmrg $ECHO $n$v`$shared_ext' 29807322289dSmrg library_names_spec='${libname}_dll.$libext' 29811d54945dSmrg dynamic_linker='OS/2 ld.exe' 29827322289dSmrg shlibpath_var=BEGINLIBPATH 29837322289dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29847322289dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29857322289dSmrg postinstall_cmds='base_file=`basename \$file`~ 29867322289dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29877322289dSmrg dldir=$destdir/`dirname \$dlpath`~ 29887322289dSmrg test -d \$dldir || mkdir -p \$dldir~ 29897322289dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 29907322289dSmrg chmod a+x \$dldir/$dlname~ 29917322289dSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 29927322289dSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 29937322289dSmrg fi' 29947322289dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 29957322289dSmrg dlpath=$dir/\$dldll~ 29967322289dSmrg $RM \$dlpath' 29971d54945dSmrg ;; 29981d54945dSmrg 29991d54945dSmrgosf3* | osf4* | osf5*) 30001d54945dSmrg version_type=osf 30011d54945dSmrg need_lib_prefix=no 30021d54945dSmrg need_version=no 30037322289dSmrg soname_spec='$libname$release$shared_ext$major' 30047322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30051d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30061d54945dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30077322289dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30081d54945dSmrg ;; 30091d54945dSmrg 3010ba85709eSmrgrdos*) 3011ba85709eSmrg dynamic_linker=no 3012ba85709eSmrg ;; 3013ba85709eSmrg 30141d54945dSmrgsolaris*) 3015d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 30161d54945dSmrg need_lib_prefix=no 30171d54945dSmrg need_version=no 30187322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30197322289dSmrg soname_spec='$libname$release$shared_ext$major' 30201d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30211d54945dSmrg shlibpath_overrides_runpath=yes 30221d54945dSmrg hardcode_into_libs=yes 30231d54945dSmrg # ldd complains unless libraries are executable 30241d54945dSmrg postinstall_cmds='chmod +x $lib' 30251d54945dSmrg ;; 30261d54945dSmrg 30271d54945dSmrgsunos4*) 30281d54945dSmrg version_type=sunos 30297322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30301d54945dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30311d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30321d54945dSmrg shlibpath_overrides_runpath=yes 30337322289dSmrg if test yes = "$with_gnu_ld"; then 30341d54945dSmrg need_lib_prefix=no 30351d54945dSmrg fi 30361d54945dSmrg need_version=yes 30371d54945dSmrg ;; 30381d54945dSmrg 30391d54945dSmrgsysv4 | sysv4.3*) 3040d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 30417322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30427322289dSmrg soname_spec='$libname$release$shared_ext$major' 30431d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30441d54945dSmrg case $host_vendor in 30451d54945dSmrg sni) 30461d54945dSmrg shlibpath_overrides_runpath=no 30471d54945dSmrg need_lib_prefix=no 30481d54945dSmrg runpath_var=LD_RUN_PATH 30491d54945dSmrg ;; 30501d54945dSmrg siemens) 30511d54945dSmrg need_lib_prefix=no 30521d54945dSmrg ;; 30531d54945dSmrg motorola) 30541d54945dSmrg need_lib_prefix=no 30551d54945dSmrg need_version=no 30561d54945dSmrg shlibpath_overrides_runpath=no 30571d54945dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30581d54945dSmrg ;; 30591d54945dSmrg esac 30601d54945dSmrg ;; 30611d54945dSmrg 30621d54945dSmrgsysv4*MP*) 30637322289dSmrg if test -d /usr/nec; then 3064d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 30657322289dSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30667322289dSmrg soname_spec='$libname$shared_ext.$major' 30671d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 30681d54945dSmrg fi 30691d54945dSmrg ;; 30701d54945dSmrg 30711d54945dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30727322289dSmrg version_type=sco 30731d54945dSmrg need_lib_prefix=no 30741d54945dSmrg need_version=no 30757322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30767322289dSmrg soname_spec='$libname$release$shared_ext$major' 30771d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 3078d769e936Smrg shlibpath_overrides_runpath=yes 30791d54945dSmrg hardcode_into_libs=yes 30807322289dSmrg if test yes = "$with_gnu_ld"; then 30811d54945dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30821d54945dSmrg else 30831d54945dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30841d54945dSmrg case $host_os in 30851d54945dSmrg sco3.2v5*) 30861d54945dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30871d54945dSmrg ;; 30881d54945dSmrg esac 30891d54945dSmrg fi 30901d54945dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 30911d54945dSmrg ;; 30921d54945dSmrg 3093d769e936Smrgtpf*) 3094d769e936Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3095d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 3096d769e936Smrg need_lib_prefix=no 3097d769e936Smrg need_version=no 30987322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3099d769e936Smrg shlibpath_var=LD_LIBRARY_PATH 3100d769e936Smrg shlibpath_overrides_runpath=no 3101d769e936Smrg hardcode_into_libs=yes 3102d769e936Smrg ;; 3103d769e936Smrg 31041d54945dSmrguts4*) 3105d769e936Smrg version_type=linux # correct to gnu/linux during the next big refactor 31067322289dSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31077322289dSmrg soname_spec='$libname$release$shared_ext$major' 31081d54945dSmrg shlibpath_var=LD_LIBRARY_PATH 31091d54945dSmrg ;; 31101d54945dSmrg 31111d54945dSmrg*) 31121d54945dSmrg dynamic_linker=no 31131d54945dSmrg ;; 31141d54945dSmrgesac 31151d54945dSmrgAC_MSG_RESULT([$dynamic_linker]) 31167322289dSmrgtest no = "$dynamic_linker" && can_build_shared=no 31171d54945dSmrg 31181d54945dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31197322289dSmrgif test yes = "$GCC"; then 31201d54945dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31211d54945dSmrgfi 3122ec713c28Smrg 31237322289dSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31247322289dSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3125d769e936Smrgfi 31267322289dSmrg 31277322289dSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31287322289dSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3129ec713c28Smrgfi 3130ec713c28Smrg 31317322289dSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31327322289dSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31337322289dSmrg 31347322289dSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31357322289dSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31367322289dSmrg 31377322289dSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31387322289dSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31397322289dSmrg 3140d769e936Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3141d769e936Smrg [Variables whose values should be saved in libtool wrapper scripts and 3142d769e936Smrg restored at link time]) 3143d769e936Smrg_LT_DECL([], [need_lib_prefix], [0], 3144d769e936Smrg [Do we need the "lib" prefix for modules?]) 3145d769e936Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3146d769e936Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3147d769e936Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3148d769e936Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3149d769e936Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3150d769e936Smrg [Is shlibpath searched before the hard-coded library search path?]) 3151d769e936Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3152d769e936Smrg_LT_DECL([], [library_names_spec], [1], 3153d769e936Smrg [[List of archive names. First name is the real one, the rest are links. 3154d769e936Smrg The last name is the one that the linker finds with -lNAME]]) 3155d769e936Smrg_LT_DECL([], [soname_spec], [1], 3156d769e936Smrg [[The coded name of the library, if different from the real name]]) 3157d769e936Smrg_LT_DECL([], [install_override_mode], [1], 3158d769e936Smrg [Permission mode override for installation of shared libraries]) 3159d769e936Smrg_LT_DECL([], [postinstall_cmds], [2], 3160d769e936Smrg [Command to use after installation of a shared archive]) 3161d769e936Smrg_LT_DECL([], [postuninstall_cmds], [2], 3162d769e936Smrg [Command to use after uninstallation of a shared archive]) 3163d769e936Smrg_LT_DECL([], [finish_cmds], [2], 3164d769e936Smrg [Commands used to finish a libtool library installation in a directory]) 3165d769e936Smrg_LT_DECL([], [finish_eval], [1], 3166d769e936Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3167d769e936Smrg not shown]]) 3168d769e936Smrg_LT_DECL([], [hardcode_into_libs], [0], 3169d769e936Smrg [Whether we should hardcode library paths into libraries]) 3170d769e936Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3171d769e936Smrg [Compile-time system search path for libraries]) 31727322289dSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31737322289dSmrg [Detected run-time system search path for libraries]) 31747322289dSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31757322289dSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3176d769e936Smrg])# _LT_SYS_DYNAMIC_LINKER 3177d769e936Smrg 3178d769e936Smrg 3179d769e936Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3180ec713c28Smrg# -------------------------- 31817322289dSmrg# find a file program that can recognize shared library 3182d769e936SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3183d769e936Smrg[m4_require([_LT_DECL_EGREP])dnl 3184ec713c28SmrgAC_MSG_CHECKING([for $1]) 3185ec713c28SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3186ec713c28Smrg[case $MAGIC_CMD in 31871d54945dSmrg[[\\/*] | ?:[\\/]*]) 31887322289dSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31891d54945dSmrg ;; 31901d54945dSmrg*) 31917322289dSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 31927322289dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31931d54945dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 31941d54945dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 31951d54945dSmrgdnl not every word. This closes a longstanding sh security hole. 3196d769e936Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 31971d54945dSmrg for ac_dir in $ac_dummy; do 31987322289dSmrg IFS=$lt_save_ifs 31991d54945dSmrg test -z "$ac_dir" && ac_dir=. 32007322289dSmrg if test -f "$ac_dir/$1"; then 32017322289dSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32021d54945dSmrg if test -n "$file_magic_test_file"; then 32031d54945dSmrg case $deplibs_check_method in 32041d54945dSmrg "file_magic "*) 32051d54945dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32067322289dSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32071d54945dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32081d54945dSmrg $EGREP "$file_magic_regex" > /dev/null; then 32091d54945dSmrg : 32101d54945dSmrg else 3211d769e936Smrg cat <<_LT_EOF 1>&2 32121d54945dSmrg 32131d54945dSmrg*** Warning: the command libtool uses to detect shared libraries, 32141d54945dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32151d54945dSmrg*** The result is that libtool may fail to recognize shared libraries 32161d54945dSmrg*** as such. This will affect the creation of libtool libraries that 32171d54945dSmrg*** depend on shared libraries, but programs linked with such libtool 32181d54945dSmrg*** libraries will work regardless of this problem. Nevertheless, you 32191d54945dSmrg*** may want to report the problem to your system manager and/or to 32201d54945dSmrg*** bug-libtool@gnu.org 32211d54945dSmrg 3222d769e936Smrg_LT_EOF 32231d54945dSmrg fi ;; 32241d54945dSmrg esac 32251d54945dSmrg fi 32261d54945dSmrg break 32271d54945dSmrg fi 32281d54945dSmrg done 32297322289dSmrg IFS=$lt_save_ifs 32307322289dSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 32311d54945dSmrg ;; 32321d54945dSmrgesac]) 32337322289dSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32341d54945dSmrgif test -n "$MAGIC_CMD"; then 32351d54945dSmrg AC_MSG_RESULT($MAGIC_CMD) 32361d54945dSmrgelse 32371d54945dSmrg AC_MSG_RESULT(no) 32381d54945dSmrgfi 3239d769e936Smrg_LT_DECL([], [MAGIC_CMD], [0], 3240d769e936Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3241d769e936Smrg])# _LT_PATH_TOOL_PREFIX 32421d54945dSmrg 3243d769e936Smrg# Old name: 3244d769e936SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3245d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3246d769e936Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3247786a6f21Smrg 3248d769e936Smrg 3249d769e936Smrg# _LT_PATH_MAGIC 3250d769e936Smrg# -------------- 32517322289dSmrg# find a file program that can recognize a shared library 3252d769e936Smrgm4_defun([_LT_PATH_MAGIC], 3253d769e936Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32541d54945dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32551d54945dSmrg if test -n "$ac_tool_prefix"; then 3256d769e936Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32571d54945dSmrg else 32581d54945dSmrg MAGIC_CMD=: 32591d54945dSmrg fi 32601d54945dSmrgfi 3261d769e936Smrg])# _LT_PATH_MAGIC 32621d54945dSmrg 32631d54945dSmrg 3264d769e936Smrg# LT_PATH_LD 32651d54945dSmrg# ---------- 32661d54945dSmrg# find the pathname to the GNU or non-GNU linker 3267d769e936SmrgAC_DEFUN([LT_PATH_LD], 3268d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3269ec713c28SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3270ec713c28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3271d769e936Smrgm4_require([_LT_DECL_SED])dnl 3272d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 3273d769e936Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3274d769e936Smrg 3275d769e936SmrgAC_ARG_WITH([gnu-ld], 3276d769e936Smrg [AS_HELP_STRING([--with-gnu-ld], 3277d769e936Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32787322289dSmrg [test no = "$withval" || with_gnu_ld=yes], 3279d769e936Smrg [with_gnu_ld=no])dnl 3280d769e936Smrg 32811d54945dSmrgac_prog=ld 32827322289dSmrgif test yes = "$GCC"; then 32831d54945dSmrg # Check if gcc -print-prog-name=ld gives a path. 32841d54945dSmrg AC_MSG_CHECKING([for ld used by $CC]) 32851d54945dSmrg case $host in 32861d54945dSmrg *-*-mingw*) 32877322289dSmrg # gcc leaves a trailing carriage return, which upsets mingw 32881d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32891d54945dSmrg *) 32901d54945dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32911d54945dSmrg esac 32921d54945dSmrg case $ac_prog in 32931d54945dSmrg # Accept absolute paths. 32941d54945dSmrg [[\\/]]* | ?:[[\\/]]*) 32951d54945dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 32961d54945dSmrg # Canonicalize the pathname of ld 3297d769e936Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3298d769e936Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3299d769e936Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 33001d54945dSmrg done 33017322289dSmrg test -z "$LD" && LD=$ac_prog 33021d54945dSmrg ;; 33031d54945dSmrg "") 33041d54945dSmrg # If it fails, then pretend we aren't using GCC. 33051d54945dSmrg ac_prog=ld 33061d54945dSmrg ;; 33071d54945dSmrg *) 33081d54945dSmrg # If it is relative, then search for the first ld in PATH. 33091d54945dSmrg with_gnu_ld=unknown 33101d54945dSmrg ;; 33111d54945dSmrg esac 33127322289dSmrgelif test yes = "$with_gnu_ld"; then 33131d54945dSmrg AC_MSG_CHECKING([for GNU ld]) 33141d54945dSmrgelse 33151d54945dSmrg AC_MSG_CHECKING([for non-GNU ld]) 33161d54945dSmrgfi 33171d54945dSmrgAC_CACHE_VAL(lt_cv_path_LD, 33181d54945dSmrg[if test -z "$LD"; then 33197322289dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33201d54945dSmrg for ac_dir in $PATH; do 33217322289dSmrg IFS=$lt_save_ifs 33221d54945dSmrg test -z "$ac_dir" && ac_dir=. 33231d54945dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33247322289dSmrg lt_cv_path_LD=$ac_dir/$ac_prog 33251d54945dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 33261d54945dSmrg # but apparently some variants of GNU ld only accept -v. 33271d54945dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 33281d54945dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33291d54945dSmrg *GNU* | *'with BFD'*) 33307322289dSmrg test no != "$with_gnu_ld" && break 33311d54945dSmrg ;; 33321d54945dSmrg *) 33337322289dSmrg test yes != "$with_gnu_ld" && break 33341d54945dSmrg ;; 33351d54945dSmrg esac 33361d54945dSmrg fi 33371d54945dSmrg done 33387322289dSmrg IFS=$lt_save_ifs 33391d54945dSmrgelse 33407322289dSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33411d54945dSmrgfi]) 33427322289dSmrgLD=$lt_cv_path_LD 33431d54945dSmrgif test -n "$LD"; then 33441d54945dSmrg AC_MSG_RESULT($LD) 33451d54945dSmrgelse 33461d54945dSmrg AC_MSG_RESULT(no) 33471d54945dSmrgfi 33481d54945dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3349d769e936Smrg_LT_PATH_LD_GNU 3350d769e936SmrgAC_SUBST([LD]) 33511d54945dSmrg 3352d769e936Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3353d769e936Smrg])# LT_PATH_LD 33541d54945dSmrg 3355d769e936Smrg# Old names: 3356d769e936SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3357d769e936SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3358d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3359d769e936Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3360d769e936Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3361d769e936Smrg 3362d769e936Smrg 3363d769e936Smrg# _LT_PATH_LD_GNU 3364d769e936Smrg#- -------------- 3365d769e936Smrgm4_defun([_LT_PATH_LD_GNU], 3366d769e936Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33671d54945dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33681d54945dSmrgcase `$LD -v 2>&1 </dev/null` in 33691d54945dSmrg*GNU* | *'with BFD'*) 33701d54945dSmrg lt_cv_prog_gnu_ld=yes 33711d54945dSmrg ;; 33721d54945dSmrg*) 33731d54945dSmrg lt_cv_prog_gnu_ld=no 33741d54945dSmrg ;; 33751d54945dSmrgesac]) 33761d54945dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3377d769e936Smrg])# _LT_PATH_LD_GNU 33781d54945dSmrg 33791d54945dSmrg 3380d769e936Smrg# _LT_CMD_RELOAD 3381d769e936Smrg# -------------- 33821d54945dSmrg# find reload flag for linker 33831d54945dSmrg# -- PORTME Some linkers may need a different reload flag. 3384d769e936Smrgm4_defun([_LT_CMD_RELOAD], 33851d54945dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 33861d54945dSmrg lt_cv_ld_reload_flag, 33871d54945dSmrg [lt_cv_ld_reload_flag='-r']) 33881d54945dSmrgreload_flag=$lt_cv_ld_reload_flag 33891d54945dSmrgcase $reload_flag in 33901d54945dSmrg"" | " "*) ;; 33911d54945dSmrg*) reload_flag=" $reload_flag" ;; 33921d54945dSmrgesac 33931d54945dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 33941d54945dSmrgcase $host_os in 3395d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 33967322289dSmrg if test yes != "$GCC"; then 3397d769e936Smrg reload_cmds=false 3398d769e936Smrg fi 3399d769e936Smrg ;; 34001d54945dSmrg darwin*) 34017322289dSmrg if test yes = "$GCC"; then 34027322289dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34031d54945dSmrg else 34041d54945dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34051d54945dSmrg fi 34061d54945dSmrg ;; 34071d54945dSmrgesac 3408d769e936Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3409d769e936Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3410d769e936Smrg])# _LT_CMD_RELOAD 34111d54945dSmrg 34121d54945dSmrg 34137322289dSmrg# _LT_PATH_DD 34147322289dSmrg# ----------- 34157322289dSmrg# find a working dd 34167322289dSmrgm4_defun([_LT_PATH_DD], 34177322289dSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34187322289dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34197322289dSmrgcat conftest.i conftest.i >conftest2.i 34207322289dSmrg: ${lt_DD:=$DD} 34217322289dSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34227322289dSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34237322289dSmrg cmp -s conftest.i conftest.out \ 34247322289dSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34257322289dSmrgfi]) 34267322289dSmrgrm -f conftest.i conftest2.i conftest.out]) 34277322289dSmrg])# _LT_PATH_DD 34287322289dSmrg 34297322289dSmrg 34307322289dSmrg# _LT_CMD_TRUNCATE 34317322289dSmrg# ---------------- 34327322289dSmrg# find command to truncate a binary pipe 34337322289dSmrgm4_defun([_LT_CMD_TRUNCATE], 34347322289dSmrg[m4_require([_LT_PATH_DD]) 34357322289dSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34367322289dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34377322289dSmrgcat conftest.i conftest.i >conftest2.i 34387322289dSmrglt_cv_truncate_bin= 34397322289dSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34407322289dSmrg cmp -s conftest.i conftest.out \ 34417322289dSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34427322289dSmrgfi 34437322289dSmrgrm -f conftest.i conftest2.i conftest.out 34447322289dSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34457322289dSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34467322289dSmrg [Command to truncate a binary pipe]) 34477322289dSmrg])# _LT_CMD_TRUNCATE 34487322289dSmrg 34497322289dSmrg 3450d769e936Smrg# _LT_CHECK_MAGIC_METHOD 3451d769e936Smrg# ---------------------- 34521d54945dSmrg# how to check for library dependencies 34531d54945dSmrg# -- PORTME fill in with the dynamic library characteristics 3454d769e936Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3455d769e936Smrg[m4_require([_LT_DECL_EGREP]) 3456d769e936Smrgm4_require([_LT_DECL_OBJDUMP]) 3457d769e936SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34581d54945dSmrglt_cv_deplibs_check_method, 34591d54945dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34601d54945dSmrglt_cv_file_magic_test_file= 34611d54945dSmrglt_cv_deplibs_check_method='unknown' 34621d54945dSmrg# Need to set the preceding variable on all platforms that support 34631d54945dSmrg# interlibrary dependencies. 34641d54945dSmrg# 'none' -- dependencies not supported. 34657322289dSmrg# 'unknown' -- same as none, but documents that we really don't know. 34661d54945dSmrg# 'pass_all' -- all dependencies passed with no checks. 34671d54945dSmrg# 'test_compile' -- check by making test program. 34681d54945dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 34697322289dSmrg# that responds to the $file_magic_cmd with a given extended regex. 34707322289dSmrg# If you have 'file' or equivalent on your system and you're not sure 34717322289dSmrg# whether 'pass_all' will *always* work, you probably want this one. 34721d54945dSmrg 34731d54945dSmrgcase $host_os in 3474ba85709eSmrgaix[[4-9]]*) 34751d54945dSmrg lt_cv_deplibs_check_method=pass_all 34761d54945dSmrg ;; 34771d54945dSmrg 34781d54945dSmrgbeos*) 34791d54945dSmrg lt_cv_deplibs_check_method=pass_all 34801d54945dSmrg ;; 34811d54945dSmrg 34821d54945dSmrgbsdi[[45]]*) 34831d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34841d54945dSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 34851d54945dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 34861d54945dSmrg ;; 34871d54945dSmrg 34881d54945dSmrgcygwin*) 34891d54945dSmrg # func_win32_libid is a shell function defined in ltmain.sh 34901d54945dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34911d54945dSmrg lt_cv_file_magic_cmd='func_win32_libid' 34921d54945dSmrg ;; 34931d54945dSmrg 34941d54945dSmrgmingw* | pw32*) 34951d54945dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3496ba85709eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3497ba85709eSmrg # unless we find 'file', for example because we are cross-compiling. 34987322289dSmrg if ( file / ) >/dev/null 2>&1; then 3499ba85709eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3500ba85709eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3501ba85709eSmrg else 3502d769e936Smrg # Keep this pattern in sync with the one in func_win32_libid. 3503d769e936Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3504ba85709eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3505ba85709eSmrg fi 35061d54945dSmrg ;; 35071d54945dSmrg 3508d769e936Smrgcegcc*) 3509d769e936Smrg # use the weaker test based on 'objdump'. See mingw*. 3510d769e936Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3511d769e936Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3512d769e936Smrg ;; 3513d769e936Smrg 35141d54945dSmrgdarwin* | rhapsody*) 35151d54945dSmrg lt_cv_deplibs_check_method=pass_all 35161d54945dSmrg ;; 35171d54945dSmrg 3518ba85709eSmrgfreebsd* | dragonfly*) 3519d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35201d54945dSmrg case $host_cpu in 35211d54945dSmrg i*86 ) 35221d54945dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 35231d54945dSmrg # Let's accept both of them until this is cleared up. 35241d54945dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35251d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 35261d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35271d54945dSmrg ;; 35281d54945dSmrg esac 35291d54945dSmrg else 35301d54945dSmrg lt_cv_deplibs_check_method=pass_all 35311d54945dSmrg fi 35321d54945dSmrg ;; 35331d54945dSmrg 3534d769e936Smrghaiku*) 3535d769e936Smrg lt_cv_deplibs_check_method=pass_all 3536d769e936Smrg ;; 3537d769e936Smrg 35381d54945dSmrghpux10.20* | hpux11*) 35391d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 35401d54945dSmrg case $host_cpu in 35411d54945dSmrg ia64*) 35421d54945dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35431d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35441d54945dSmrg ;; 35451d54945dSmrg hppa*64*) 3546d769e936Smrg [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]'] 35471d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35481d54945dSmrg ;; 35491d54945dSmrg *) 3550d769e936Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35511d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35521d54945dSmrg ;; 35531d54945dSmrg esac 35541d54945dSmrg ;; 35551d54945dSmrg 3556ba85709eSmrginterix[[3-9]]*) 35571d54945dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35581d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35591d54945dSmrg ;; 35601d54945dSmrg 35611d54945dSmrgirix5* | irix6* | nonstopux*) 35621d54945dSmrg case $LD in 35631d54945dSmrg *-32|*"-32 ") libmagic=32-bit;; 35641d54945dSmrg *-n32|*"-n32 ") libmagic=N32;; 35651d54945dSmrg *-64|*"-64 ") libmagic=64-bit;; 35661d54945dSmrg *) libmagic=never-match;; 35671d54945dSmrg esac 35681d54945dSmrg lt_cv_deplibs_check_method=pass_all 35691d54945dSmrg ;; 35701d54945dSmrg 3571d769e936Smrg# This must be glibc/ELF. 35727322289dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35731d54945dSmrg lt_cv_deplibs_check_method=pass_all 35741d54945dSmrg ;; 35751d54945dSmrg 35761d54945dSmrgnetbsd*) 3577d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35781d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35791d54945dSmrg else 35801d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35811d54945dSmrg fi 35821d54945dSmrg ;; 35831d54945dSmrg 35841d54945dSmrgnewos6*) 35851d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35861d54945dSmrg lt_cv_file_magic_cmd=/usr/bin/file 35871d54945dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35881d54945dSmrg ;; 35891d54945dSmrg 3590d769e936Smrg*nto* | *qnx*) 3591d769e936Smrg lt_cv_deplibs_check_method=pass_all 35921d54945dSmrg ;; 35931d54945dSmrg 35947322289dSmrgopenbsd* | bitrig*) 35957322289dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 35961d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35971d54945dSmrg else 35981d54945dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35991d54945dSmrg fi 36001d54945dSmrg ;; 36011d54945dSmrg 36021d54945dSmrgosf3* | osf4* | osf5*) 36031d54945dSmrg lt_cv_deplibs_check_method=pass_all 36041d54945dSmrg ;; 36051d54945dSmrg 3606ba85709eSmrgrdos*) 3607ba85709eSmrg lt_cv_deplibs_check_method=pass_all 3608ba85709eSmrg ;; 3609ba85709eSmrg 36101d54945dSmrgsolaris*) 36111d54945dSmrg lt_cv_deplibs_check_method=pass_all 36121d54945dSmrg ;; 36131d54945dSmrg 3614d769e936Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3615d769e936Smrg lt_cv_deplibs_check_method=pass_all 3616d769e936Smrg ;; 3617d769e936Smrg 36181d54945dSmrgsysv4 | sysv4.3*) 36191d54945dSmrg case $host_vendor in 36201d54945dSmrg motorola) 36211d54945dSmrg 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]]' 36221d54945dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36231d54945dSmrg ;; 36241d54945dSmrg ncr) 36251d54945dSmrg lt_cv_deplibs_check_method=pass_all 36261d54945dSmrg ;; 36271d54945dSmrg sequent) 36281d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 36291d54945dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36301d54945dSmrg ;; 36311d54945dSmrg sni) 36321d54945dSmrg lt_cv_file_magic_cmd='/bin/file' 36331d54945dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36341d54945dSmrg lt_cv_file_magic_test_file=/lib/libc.so 36351d54945dSmrg ;; 36361d54945dSmrg siemens) 36371d54945dSmrg lt_cv_deplibs_check_method=pass_all 36381d54945dSmrg ;; 36391d54945dSmrg pc) 36401d54945dSmrg lt_cv_deplibs_check_method=pass_all 36411d54945dSmrg ;; 36421d54945dSmrg esac 36431d54945dSmrg ;; 36441d54945dSmrg 3645d769e936Smrgtpf*) 36461d54945dSmrg lt_cv_deplibs_check_method=pass_all 36471d54945dSmrg ;; 36487322289dSmrgos2*) 36497322289dSmrg lt_cv_deplibs_check_method=pass_all 36507322289dSmrg ;; 36511d54945dSmrgesac 36521d54945dSmrg]) 3653d769e936Smrg 3654d769e936Smrgfile_magic_glob= 3655d769e936Smrgwant_nocaseglob=no 3656d769e936Smrgif test "$build" = "$host"; then 3657d769e936Smrg case $host_os in 3658d769e936Smrg mingw* | pw32*) 3659d769e936Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3660d769e936Smrg want_nocaseglob=yes 3661d769e936Smrg else 3662d769e936Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3663d769e936Smrg fi 3664d769e936Smrg ;; 3665d769e936Smrg esac 3666d769e936Smrgfi 3667d769e936Smrg 36681d54945dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 36691d54945dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 36701d54945dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36711d54945dSmrg 3672d769e936Smrg_LT_DECL([], [deplibs_check_method], [1], 3673d769e936Smrg [Method to check whether dependent libraries are shared objects]) 3674d769e936Smrg_LT_DECL([], [file_magic_cmd], [1], 3675d769e936Smrg [Command to use when deplibs_check_method = "file_magic"]) 3676d769e936Smrg_LT_DECL([], [file_magic_glob], [1], 3677d769e936Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3678d769e936Smrg_LT_DECL([], [want_nocaseglob], [1], 3679d769e936Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3680d769e936Smrg])# _LT_CHECK_MAGIC_METHOD 36811d54945dSmrg 3682d769e936Smrg 3683d769e936Smrg# LT_PATH_NM 36841d54945dSmrg# ---------- 3685d769e936Smrg# find the pathname to a BSD- or MS-compatible name lister 3686d769e936SmrgAC_DEFUN([LT_PATH_NM], 3687d769e936Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3688d769e936SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36891d54945dSmrg[if test -n "$NM"; then 36901d54945dSmrg # Let the user override the test. 36917322289dSmrg lt_cv_path_NM=$NM 36921d54945dSmrgelse 36937322289dSmrg lt_nm_to_check=${ac_tool_prefix}nm 3694ba85709eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36951d54945dSmrg lt_nm_to_check="$lt_nm_to_check nm" 36961d54945dSmrg fi 36971d54945dSmrg for lt_tmp_nm in $lt_nm_to_check; do 36987322289dSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 36991d54945dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 37007322289dSmrg IFS=$lt_save_ifs 37011d54945dSmrg test -z "$ac_dir" && ac_dir=. 37027322289dSmrg tmp_nm=$ac_dir/$lt_tmp_nm 37037322289dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37041d54945dSmrg # Check to see if the nm accepts a BSD-compat flag. 37057322289dSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37061d54945dSmrg # nm: unknown option "B" ignored 37071d54945dSmrg # Tru64's nm complains that /dev/null is an invalid object file 37087322289dSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37097322289dSmrg case $build_os in 37107322289dSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37117322289dSmrg *) lt_bad_file=/dev/null ;; 37127322289dSmrg esac 37137322289dSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 37147322289dSmrg *$lt_bad_file* | *'Invalid file or object type'*) 37151d54945dSmrg lt_cv_path_NM="$tmp_nm -B" 37167322289dSmrg break 2 37171d54945dSmrg ;; 37181d54945dSmrg *) 37191d54945dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 37201d54945dSmrg */dev/null*) 37211d54945dSmrg lt_cv_path_NM="$tmp_nm -p" 37227322289dSmrg break 2 37231d54945dSmrg ;; 37241d54945dSmrg *) 37251d54945dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37261d54945dSmrg continue # so that we can try to find one that supports BSD flags 37271d54945dSmrg ;; 37281d54945dSmrg esac 37291d54945dSmrg ;; 37301d54945dSmrg esac 37311d54945dSmrg fi 37321d54945dSmrg done 37337322289dSmrg IFS=$lt_save_ifs 37341d54945dSmrg done 3735d769e936Smrg : ${lt_cv_path_NM=no} 37361d54945dSmrgfi]) 37377322289dSmrgif test no != "$lt_cv_path_NM"; then 37387322289dSmrg NM=$lt_cv_path_NM 3739d769e936Smrgelse 3740d769e936Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3741d769e936Smrg if test -n "$DUMPBIN"; then : 3742d769e936Smrg # Let the user override the test. 3743d769e936Smrg else 3744d769e936Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37457322289dSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3746d769e936Smrg *COFF*) 37477322289dSmrg DUMPBIN="$DUMPBIN -symbols -headers" 3748d769e936Smrg ;; 3749d769e936Smrg *) 3750d769e936Smrg DUMPBIN=: 3751d769e936Smrg ;; 3752d769e936Smrg esac 3753d769e936Smrg fi 3754d769e936Smrg AC_SUBST([DUMPBIN]) 37557322289dSmrg if test : != "$DUMPBIN"; then 37567322289dSmrg NM=$DUMPBIN 3757d769e936Smrg fi 3758d769e936Smrgfi 3759d769e936Smrgtest -z "$NM" && NM=nm 3760d769e936SmrgAC_SUBST([NM]) 3761d769e936Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3762d769e936Smrg 3763d769e936SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3764d769e936Smrg [lt_cv_nm_interface="BSD nm" 3765d769e936Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3766d769e936Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3767d769e936Smrg (eval "$ac_compile" 2>conftest.err) 3768d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3769d769e936Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3770d769e936Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3771d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3772d769e936Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3773d769e936Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3774d769e936Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3775d769e936Smrg lt_cv_nm_interface="MS dumpbin" 3776d769e936Smrg fi 3777d769e936Smrg rm -f conftest*]) 3778d769e936Smrg])# LT_PATH_NM 3779d769e936Smrg 3780d769e936Smrg# Old names: 3781d769e936SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3782d769e936SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3783d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3784d769e936Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3785d769e936Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3786d769e936Smrg 3787d769e936Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3788d769e936Smrg# -------------------------------- 3789d769e936Smrg# how to determine the name of the shared library 3790d769e936Smrg# associated with a specific link library. 3791d769e936Smrg# -- PORTME fill in with the dynamic library characteristics 3792d769e936Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3793d769e936Smrg[m4_require([_LT_DECL_EGREP]) 3794d769e936Smrgm4_require([_LT_DECL_OBJDUMP]) 3795d769e936Smrgm4_require([_LT_DECL_DLLTOOL]) 3796d769e936SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3797d769e936Smrglt_cv_sharedlib_from_linklib_cmd, 3798d769e936Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37991d54945dSmrg 3800d769e936Smrgcase $host_os in 3801d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 38027322289dSmrg # two different shell functions defined in ltmain.sh; 38037322289dSmrg # decide which one to use based on capabilities of $DLLTOOL 3804d769e936Smrg case `$DLLTOOL --help 2>&1` in 3805d769e936Smrg *--identify-strict*) 3806d769e936Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3807d769e936Smrg ;; 3808d769e936Smrg *) 3809d769e936Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3810d769e936Smrg ;; 3811d769e936Smrg esac 3812d769e936Smrg ;; 3813d769e936Smrg*) 3814d769e936Smrg # fallback: assume linklib IS sharedlib 38157322289dSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3816d769e936Smrg ;; 3817d769e936Smrgesac 3818d769e936Smrg]) 3819d769e936Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3820d769e936Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3821786a6f21Smrg 3822d769e936Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3823d769e936Smrg [Command to associate shared and link libraries]) 3824d769e936Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3825d769e936Smrg 3826d769e936Smrg 3827d769e936Smrg# _LT_PATH_MANIFEST_TOOL 3828d769e936Smrg# ---------------------- 3829d769e936Smrg# locate the manifest tool 3830d769e936Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3831d769e936Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3832d769e936Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3833d769e936SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3834d769e936Smrg [lt_cv_path_mainfest_tool=no 3835d769e936Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3836d769e936Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3837d769e936Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3838d769e936Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3839d769e936Smrg lt_cv_path_mainfest_tool=yes 3840d769e936Smrg fi 3841d769e936Smrg rm -f conftest*]) 38427322289dSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 3843d769e936Smrg MANIFEST_TOOL=: 3844d769e936Smrgfi 3845d769e936Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3846d769e936Smrg])# _LT_PATH_MANIFEST_TOOL 3847d769e936Smrg 3848d769e936Smrg 38497322289dSmrg# _LT_DLL_DEF_P([FILE]) 38507322289dSmrg# --------------------- 38517322289dSmrg# True iff FILE is a Windows DLL '.def' file. 38527322289dSmrg# Keep in sync with func_dll_def_p in the libtool script 38537322289dSmrgAC_DEFUN([_LT_DLL_DEF_P], 38547322289dSmrg[dnl 38557322289dSmrg test DEF = "`$SED -n dnl 38567322289dSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38577322289dSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38587322289dSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38597322289dSmrg -e q dnl Only consider the first "real" line 38607322289dSmrg $1`" dnl 38617322289dSmrg])# _LT_DLL_DEF_P 38627322289dSmrg 38637322289dSmrg 3864d769e936Smrg# LT_LIB_M 3865d769e936Smrg# -------- 38661d54945dSmrg# check for math library 3867d769e936SmrgAC_DEFUN([LT_LIB_M], 38681d54945dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38691d54945dSmrgLIBM= 38701d54945dSmrgcase $host in 3871d769e936Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38721d54945dSmrg # These system don't have libm, or don't need it 38731d54945dSmrg ;; 38741d54945dSmrg*-ncr-sysv4.3*) 38757322289dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38761d54945dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38771d54945dSmrg ;; 38781d54945dSmrg*) 38797322289dSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38801d54945dSmrg ;; 38811d54945dSmrgesac 3882d769e936SmrgAC_SUBST([LIBM]) 3883d769e936Smrg])# LT_LIB_M 38841d54945dSmrg 3885d769e936Smrg# Old name: 3886d769e936SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3887d769e936Smrgdnl aclocal-1.4 backwards compatibility: 3888d769e936Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38891d54945dSmrg 38901d54945dSmrg 3891d769e936Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3892d769e936Smrg# ------------------------------- 3893d769e936Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3894d769e936Smrg[m4_require([_LT_TAG_COMPILER])dnl 38951d54945dSmrg 3896d769e936Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38971d54945dSmrg 38987322289dSmrgif test yes = "$GCC"; then 3899d769e936Smrg case $cc_basename in 3900d769e936Smrg nvcc*) 3901d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3902d769e936Smrg *) 3903d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3904d769e936Smrg esac 39051d54945dSmrg 3906d769e936Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3907d769e936Smrg lt_cv_prog_compiler_rtti_exceptions, 3908d769e936Smrg [-fno-rtti -fno-exceptions], [], 3909d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3910ec713c28Smrgfi 3911d769e936Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3912d769e936Smrg [Compiler flag to turn off builtin functions]) 3913d769e936Smrg])# _LT_COMPILER_NO_RTTI 39141d54945dSmrg 39151d54945dSmrg 3916d769e936Smrg# _LT_CMD_GLOBAL_SYMBOLS 3917d769e936Smrg# ---------------------- 3918d769e936Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3919d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3920d769e936SmrgAC_REQUIRE([AC_PROG_CC])dnl 3921d769e936SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3922d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 3923d769e936SmrgAC_REQUIRE([LT_PATH_LD])dnl 3924d769e936Smrgm4_require([_LT_DECL_SED])dnl 3925d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 3926d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 3927ec713c28Smrg 3928d769e936Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3929d769e936SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3930d769e936SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3931d769e936Smrg[ 3932d769e936Smrg# These are sane defaults that work on at least a few old systems. 3933d769e936Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3934ec713c28Smrg 3935d769e936Smrg# Character class describing NM global symbol codes. 3936d769e936Smrgsymcode='[[BCDEGRST]]' 3937ec713c28Smrg 3938d769e936Smrg# Regexp to match symbols that can be accessed directly from C. 3939d769e936Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3940ec713c28Smrg 3941d769e936Smrg# Define system-specific variables. 3942ec713c28Smrgcase $host_os in 3943d769e936Smrgaix*) 3944d769e936Smrg symcode='[[BCDT]]' 3945ec713c28Smrg ;; 3946d769e936Smrgcygwin* | mingw* | pw32* | cegcc*) 3947d769e936Smrg symcode='[[ABCDGISTW]]' 3948d769e936Smrg ;; 3949d769e936Smrghpux*) 39507322289dSmrg if test ia64 = "$host_cpu"; then 3951d769e936Smrg symcode='[[ABCDEGRST]]' 3952ec713c28Smrg fi 3953d769e936Smrg ;; 3954d769e936Smrgirix* | nonstopux*) 3955d769e936Smrg symcode='[[BCDEGRST]]' 3956d769e936Smrg ;; 3957d769e936Smrgosf*) 3958d769e936Smrg symcode='[[BCDEGQRST]]' 3959d769e936Smrg ;; 3960d769e936Smrgsolaris*) 3961d769e936Smrg symcode='[[BDRT]]' 3962d769e936Smrg ;; 3963d769e936Smrgsco3.2v5*) 3964d769e936Smrg symcode='[[DT]]' 3965d769e936Smrg ;; 3966d769e936Smrgsysv4.2uw2*) 3967d769e936Smrg symcode='[[DT]]' 3968d769e936Smrg ;; 3969d769e936Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3970d769e936Smrg symcode='[[ABDT]]' 3971d769e936Smrg ;; 3972d769e936Smrgsysv4) 3973d769e936Smrg symcode='[[DFNSTU]]' 3974d769e936Smrg ;; 3975ec713c28Smrgesac 3976ec713c28Smrg 3977d769e936Smrg# If we're using GNU nm, then use its standard symbol codes. 3978d769e936Smrgcase `$NM -V 2>&1` in 3979d769e936Smrg*GNU* | *'with BFD'*) 3980d769e936Smrg symcode='[[ABCDGIRSTW]]' ;; 3981d769e936Smrgesac 3982ec713c28Smrg 39837322289dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39847322289dSmrg # Gets list of data symbols to import. 39857322289dSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 39867322289dSmrg # Adjust the below global symbol transforms to fixup imported variables. 39877322289dSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39887322289dSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 39897322289dSmrg lt_c_name_lib_hook="\ 39907322289dSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 39917322289dSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39927322289dSmrgelse 39937322289dSmrg # Disable hooks by default. 39947322289dSmrg lt_cv_sys_global_symbol_to_import= 39957322289dSmrg lt_cdecl_hook= 39967322289dSmrg lt_c_name_hook= 39977322289dSmrg lt_c_name_lib_hook= 39987322289dSmrgfi 39997322289dSmrg 4000d769e936Smrg# Transform an extracted symbol line into a proper C declaration. 4001d769e936Smrg# Some systems (esp. on ia64) link data and code symbols differently, 4002d769e936Smrg# so use this general approach. 40037322289dSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 40047322289dSmrg$lt_cdecl_hook\ 40057322289dSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40067322289dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4007ec713c28Smrg 4008d769e936Smrg# Transform an extracted symbol line into symbol name and symbol address 40097322289dSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 40107322289dSmrg$lt_c_name_hook\ 40117322289dSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40127322289dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40137322289dSmrg 40147322289dSmrg# Transform an extracted symbol line into symbol name with lib prefix and 40157322289dSmrg# symbol address. 40167322289dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 40177322289dSmrg$lt_c_name_lib_hook\ 40187322289dSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40197322289dSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40207322289dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4021ec713c28Smrg 4022d769e936Smrg# Handle CRLF in mingw tool chain 4023d769e936Smrgopt_cr= 4024d769e936Smrgcase $build_os in 4025d769e936Smrgmingw*) 4026d769e936Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4027d769e936Smrg ;; 4028d769e936Smrgesac 4029ec713c28Smrg 4030d769e936Smrg# Try without a prefix underscore, then with it. 4031d769e936Smrgfor ac_symprfx in "" "_"; do 4032ec713c28Smrg 4033d769e936Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4034d769e936Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4035ec713c28Smrg 4036d769e936Smrg # Write the raw and C identifiers. 4037d769e936Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40387322289dSmrg # Fake it for dumpbin and say T for any non-static function, 40397322289dSmrg # D for any global variable and I for any imported variable. 4040d769e936Smrg # Also find C++ and __fastcall symbols from MSVC++, 4041d769e936Smrg # which start with @ or ?. 4042d769e936Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4043d769e936Smrg" {last_section=section; section=\$ 3};"\ 4044d769e936Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4045d769e936Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40467322289dSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40477322289dSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40487322289dSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4049d769e936Smrg" \$ 0!~/External *\|/{next};"\ 4050d769e936Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4051d769e936Smrg" {if(hide[section]) next};"\ 40527322289dSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40537322289dSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40547322289dSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40557322289dSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4056d769e936Smrg" ' prfx=^$ac_symprfx]" 4057d769e936Smrg else 4058d769e936Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4059d769e936Smrg fi 4060d769e936Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4061ec713c28Smrg 4062d769e936Smrg # Check to see that the pipe works correctly. 4063d769e936Smrg pipe_works=no 4064ec713c28Smrg 4065d769e936Smrg rm -f conftest* 4066d769e936Smrg cat > conftest.$ac_ext <<_LT_EOF 4067d769e936Smrg#ifdef __cplusplus 4068d769e936Smrgextern "C" { 4069d769e936Smrg#endif 4070d769e936Smrgchar nm_test_var; 4071d769e936Smrgvoid nm_test_func(void); 4072d769e936Smrgvoid nm_test_func(void){} 4073d769e936Smrg#ifdef __cplusplus 4074d769e936Smrg} 4075d769e936Smrg#endif 4076d769e936Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4077d769e936Smrg_LT_EOF 4078ec713c28Smrg 4079d769e936Smrg if AC_TRY_EVAL(ac_compile); then 4080d769e936Smrg # Now try to grab the symbols. 4081d769e936Smrg nlist=conftest.nm 4082d769e936Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4083d769e936Smrg # Try sorting and uniquifying the output. 4084d769e936Smrg if sort "$nlist" | uniq > "$nlist"T; then 4085d769e936Smrg mv -f "$nlist"T "$nlist" 4086d769e936Smrg else 4087d769e936Smrg rm -f "$nlist"T 4088d769e936Smrg fi 40891d54945dSmrg 4090d769e936Smrg # Make sure that we snagged all the symbols we need. 4091d769e936Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4092d769e936Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4093d769e936Smrg cat <<_LT_EOF > conftest.$ac_ext 4094d769e936Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 40957322289dSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 40967322289dSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4097d769e936Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4098d769e936Smrg# define LT@&t@_DLSYM_CONST 40997322289dSmrg#elif defined __osf__ 4100d769e936Smrg/* This system does not cope well with relocations in const data. */ 4101d769e936Smrg# define LT@&t@_DLSYM_CONST 4102d769e936Smrg#else 4103d769e936Smrg# define LT@&t@_DLSYM_CONST const 4104d769e936Smrg#endif 4105ec713c28Smrg 4106d769e936Smrg#ifdef __cplusplus 4107d769e936Smrgextern "C" { 4108d769e936Smrg#endif 41091d54945dSmrg 4110d769e936Smrg_LT_EOF 4111d769e936Smrg # Now generate the symbol file. 4112d769e936Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41131d54945dSmrg 4114d769e936Smrg cat <<_LT_EOF >> conftest.$ac_ext 41151d54945dSmrg 4116d769e936Smrg/* The mapping between symbol names and symbols. */ 4117d769e936SmrgLT@&t@_DLSYM_CONST struct { 4118d769e936Smrg const char *name; 4119d769e936Smrg void *address; 4120d769e936Smrg} 4121d769e936Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4122d769e936Smrg{ 4123d769e936Smrg { "@PROGRAM@", (void *) 0 }, 4124d769e936Smrg_LT_EOF 41257322289dSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4126d769e936Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4127d769e936Smrg {0, (void *) 0} 4128d769e936Smrg}; 41291d54945dSmrg 4130d769e936Smrg/* This works around a problem in FreeBSD linker */ 4131d769e936Smrg#ifdef FREEBSD_WORKAROUND 4132d769e936Smrgstatic const void *lt_preloaded_setup() { 4133d769e936Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4134d769e936Smrg} 4135d769e936Smrg#endif 41361d54945dSmrg 4137d769e936Smrg#ifdef __cplusplus 4138d769e936Smrg} 4139d769e936Smrg#endif 4140d769e936Smrg_LT_EOF 4141d769e936Smrg # Now try linking the two files. 4142d769e936Smrg mv conftest.$ac_objext conftstm.$ac_objext 4143d769e936Smrg lt_globsym_save_LIBS=$LIBS 4144d769e936Smrg lt_globsym_save_CFLAGS=$CFLAGS 41457322289dSmrg LIBS=conftstm.$ac_objext 4146d769e936Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41477322289dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4148d769e936Smrg pipe_works=yes 4149d769e936Smrg fi 4150d769e936Smrg LIBS=$lt_globsym_save_LIBS 4151d769e936Smrg CFLAGS=$lt_globsym_save_CFLAGS 4152ec713c28Smrg else 4153d769e936Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4154ec713c28Smrg fi 4155ec713c28Smrg else 4156d769e936Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4157ec713c28Smrg fi 4158ec713c28Smrg else 4159d769e936Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4160ec713c28Smrg fi 4161d769e936Smrg else 4162d769e936Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4163d769e936Smrg cat conftest.$ac_ext >&5 4164d769e936Smrg fi 4165d769e936Smrg rm -rf conftest* conftst* 4166ec713c28Smrg 4167d769e936Smrg # Do not use the global_symbol_pipe unless it works. 41687322289dSmrg if test yes = "$pipe_works"; then 4169d769e936Smrg break 4170d769e936Smrg else 4171d769e936Smrg lt_cv_sys_global_symbol_pipe= 4172d769e936Smrg fi 4173d769e936Smrgdone 4174d769e936Smrg]) 4175d769e936Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4176d769e936Smrg lt_cv_sys_global_symbol_to_cdecl= 4177d769e936Smrgfi 4178d769e936Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4179d769e936Smrg AC_MSG_RESULT(failed) 4180d769e936Smrgelse 4181d769e936Smrg AC_MSG_RESULT(ok) 4182d769e936Smrgfi 4183ec713c28Smrg 4184d769e936Smrg# Response file support. 4185d769e936Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4186d769e936Smrg nm_file_list_spec='@' 4187d769e936Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4188d769e936Smrg nm_file_list_spec='@' 4189d769e936Smrgfi 4190ec713c28Smrg 4191d769e936Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4192d769e936Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4193d769e936Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4194d769e936Smrg [Transform the output of nm in a proper C declaration]) 41957322289dSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 41967322289dSmrg [Transform the output of nm into a list of symbols to manually relocate]) 4197d769e936Smrg_LT_DECL([global_symbol_to_c_name_address], 4198d769e936Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4199d769e936Smrg [Transform the output of nm in a C name address pair]) 4200d769e936Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4201d769e936Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4202d769e936Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42037322289dSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42047322289dSmrg [The name lister interface]) 4205d769e936Smrg_LT_DECL([], [nm_file_list_spec], [1], 4206d769e936Smrg [Specify filename containing input files for $NM]) 4207d769e936Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4208d769e936Smrg 4209d769e936Smrg 4210d769e936Smrg# _LT_COMPILER_PIC([TAGNAME]) 4211d769e936Smrg# --------------------------- 4212d769e936Smrgm4_defun([_LT_COMPILER_PIC], 4213d769e936Smrg[m4_require([_LT_TAG_COMPILER])dnl 4214d769e936Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4215d769e936Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4216d769e936Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4217ec713c28Smrg 4218d769e936Smrgm4_if([$1], [CXX], [ 4219d769e936Smrg # C++ specific cases for pic, static, wl, etc. 42207322289dSmrg if test yes = "$GXX"; then 4221d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4222d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4223d769e936Smrg 4224d769e936Smrg case $host_os in 4225d769e936Smrg aix*) 4226d769e936Smrg # All AIX code is PIC. 42277322289dSmrg if test ia64 = "$host_cpu"; then 4228d769e936Smrg # AIX 5 now supports IA64 processor 4229d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42301d54945dSmrg fi 42317322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4232786a6f21Smrg ;; 42331d54945dSmrg 4234d769e936Smrg amigaos*) 4235786a6f21Smrg case $host_cpu in 4236d769e936Smrg powerpc) 4237d769e936Smrg # see comment about AmigaOS4 .so support 4238d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4239d769e936Smrg ;; 4240d769e936Smrg m68k) 4241d769e936Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42427322289dSmrg # adding the '-m68020' flag to GCC prevents building anything better, 42437322289dSmrg # like '-m68040'. 4244d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4245786a6f21Smrg ;; 4246786a6f21Smrg esac 4247ec713c28Smrg ;; 4248ec713c28Smrg 4249d769e936Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4250d769e936Smrg # PIC is the default for these OSes. 4251d769e936Smrg ;; 4252d769e936Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4253d769e936Smrg # This hack is so that the source file can tell whether it is being 4254d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4255d769e936Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4256d769e936Smrg # (--disable-auto-import) libraries 4257d769e936Smrg m4_if([$1], [GCJ], [], 4258d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42597322289dSmrg case $host_os in 42607322289dSmrg os2*) 42617322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42627322289dSmrg ;; 42637322289dSmrg esac 4264d769e936Smrg ;; 4265d769e936Smrg darwin* | rhapsody*) 4266d769e936Smrg # PIC is the default on this platform 4267d769e936Smrg # Common symbols not allowed in MH_DYLIB files 4268d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4269d769e936Smrg ;; 4270d769e936Smrg *djgpp*) 4271d769e936Smrg # DJGPP does not support shared libraries at all 4272d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4273d769e936Smrg ;; 4274d769e936Smrg haiku*) 4275d769e936Smrg # PIC is the default for Haiku. 4276d769e936Smrg # The "-static" flag exists, but is broken. 4277d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4278d769e936Smrg ;; 4279d769e936Smrg interix[[3-9]]*) 4280d769e936Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4281d769e936Smrg # Instead, we relocate shared libraries at runtime. 4282d769e936Smrg ;; 4283d769e936Smrg sysv4*MP*) 4284d769e936Smrg if test -d /usr/nec; then 4285d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4286d769e936Smrg fi 4287d769e936Smrg ;; 4288d769e936Smrg hpux*) 4289d769e936Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4290d769e936Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4291d769e936Smrg # sets the default TLS model and affects inlining. 4292d769e936Smrg case $host_cpu in 4293d769e936Smrg hppa*64*) 42941d54945dSmrg ;; 4295ec713c28Smrg *) 4296d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42971d54945dSmrg ;; 4298d769e936Smrg esac 4299d769e936Smrg ;; 4300d769e936Smrg *qnx* | *nto*) 4301d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4302d769e936Smrg # it will coredump. 4303d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4304d769e936Smrg ;; 4305d769e936Smrg *) 4306d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4307d769e936Smrg ;; 4308d769e936Smrg esac 4309d769e936Smrg else 4310d769e936Smrg case $host_os in 4311d769e936Smrg aix[[4-9]]*) 4312d769e936Smrg # All AIX code is PIC. 43137322289dSmrg if test ia64 = "$host_cpu"; then 4314d769e936Smrg # AIX 5 now supports IA64 processor 4315d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4316d769e936Smrg else 4317d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4318d769e936Smrg fi 43191d54945dSmrg ;; 4320d769e936Smrg chorus*) 4321d769e936Smrg case $cc_basename in 4322d769e936Smrg cxch68*) 4323d769e936Smrg # Green Hills C++ Compiler 4324d769e936Smrg # _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" 4325d769e936Smrg ;; 4326d769e936Smrg esac 43271d54945dSmrg ;; 4328d769e936Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4329d769e936Smrg # This hack is so that the source file can tell whether it is being 4330d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4331d769e936Smrg m4_if([$1], [GCJ], [], 4332d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43331d54945dSmrg ;; 4334d769e936Smrg dgux*) 4335d769e936Smrg case $cc_basename in 4336d769e936Smrg ec++*) 4337d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4338d769e936Smrg ;; 4339d769e936Smrg ghcx*) 4340d769e936Smrg # Green Hills C++ Compiler 4341d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4342d769e936Smrg ;; 4343d769e936Smrg *) 4344d769e936Smrg ;; 4345d769e936Smrg esac 43461d54945dSmrg ;; 4347d769e936Smrg freebsd* | dragonfly*) 4348d769e936Smrg # FreeBSD uses GNU C++ 43491d54945dSmrg ;; 4350d769e936Smrg hpux9* | hpux10* | hpux11*) 4351d769e936Smrg case $cc_basename in 4352d769e936Smrg CC*) 4353d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43547322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43557322289dSmrg if test ia64 != "$host_cpu"; then 4356d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4357d769e936Smrg fi 4358d769e936Smrg ;; 4359d769e936Smrg aCC*) 4360d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43617322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4362d769e936Smrg case $host_cpu in 4363d769e936Smrg hppa*64*|ia64*) 4364d769e936Smrg # +Z the default 4365d769e936Smrg ;; 4366d769e936Smrg *) 4367d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4368d769e936Smrg ;; 4369d769e936Smrg esac 4370d769e936Smrg ;; 4371d769e936Smrg *) 4372d769e936Smrg ;; 4373d769e936Smrg esac 43741d54945dSmrg ;; 4375d769e936Smrg interix*) 4376d769e936Smrg # This is c89, which is MS Visual C++ (no shared libs) 4377d769e936Smrg # Anyone wants to do a port? 43781d54945dSmrg ;; 4379d769e936Smrg irix5* | irix6* | nonstopux*) 4380d769e936Smrg case $cc_basename in 4381d769e936Smrg CC*) 4382d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4383d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4384d769e936Smrg # CC pic flag -KPIC is the default. 4385d769e936Smrg ;; 4386d769e936Smrg *) 4387d769e936Smrg ;; 4388d769e936Smrg esac 4389ec713c28Smrg ;; 43907322289dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4391d769e936Smrg case $cc_basename in 4392d769e936Smrg KCC*) 4393d769e936Smrg # KAI C++ Compiler 4394d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4395d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4396d769e936Smrg ;; 4397d769e936Smrg ecpc* ) 43987322289dSmrg # old Intel C++ for x86_64, which still supported -KPIC. 4399d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4402d769e936Smrg ;; 4403d769e936Smrg icpc* ) 4404d769e936Smrg # Intel C++, used to be incompatible with GCC. 4405d769e936Smrg # ICC 10 doesn't accept -KPIC any more. 4406d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4407d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4408d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4409d769e936Smrg ;; 4410d769e936Smrg pgCC* | pgcpp*) 4411d769e936Smrg # Portland Group C++ compiler 4412d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4414d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415d769e936Smrg ;; 4416d769e936Smrg cxx*) 4417d769e936Smrg # Compaq C++ 4418d769e936Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4419d769e936Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4420d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4421d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4422d769e936Smrg ;; 4423d769e936Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4424d769e936Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4425d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4426d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4427d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4428d769e936Smrg ;; 4429d769e936Smrg *) 4430d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4431d769e936Smrg *Sun\ C*) 4432d769e936Smrg # Sun C++ 5.9 4433d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4434d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4435d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4436d769e936Smrg ;; 4437d769e936Smrg esac 4438d769e936Smrg ;; 4439d769e936Smrg esac 4440ec713c28Smrg ;; 4441d769e936Smrg lynxos*) 4442ec713c28Smrg ;; 4443d769e936Smrg m88k*) 4444ec713c28Smrg ;; 4445d769e936Smrg mvs*) 4446d769e936Smrg case $cc_basename in 4447d769e936Smrg cxx*) 4448d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4449d769e936Smrg ;; 4450786a6f21Smrg *) 4451786a6f21Smrg ;; 4452786a6f21Smrg esac 44531d54945dSmrg ;; 4454d769e936Smrg netbsd*) 44551d54945dSmrg ;; 4456d769e936Smrg *qnx* | *nto*) 4457d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4458d769e936Smrg # it will coredump. 4459d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4460d769e936Smrg ;; 4461d769e936Smrg osf3* | osf4* | osf5*) 4462d769e936Smrg case $cc_basename in 4463d769e936Smrg KCC*) 4464d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4465d769e936Smrg ;; 4466d769e936Smrg RCC*) 4467d769e936Smrg # Rational C++ 2.4.1 4468d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4469d769e936Smrg ;; 4470d769e936Smrg cxx*) 4471d769e936Smrg # Digital/Compaq C++ 4472d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4473d769e936Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4474d769e936Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4475d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4476d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4477d769e936Smrg ;; 4478ec713c28Smrg *) 4479ec713c28Smrg ;; 4480d769e936Smrg esac 4481ec713c28Smrg ;; 4482d769e936Smrg psos*) 4483786a6f21Smrg ;; 4484d769e936Smrg solaris*) 4485d769e936Smrg case $cc_basename in 4486d769e936Smrg CC* | sunCC*) 4487d769e936Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4488d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4489d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4490d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4491d769e936Smrg ;; 4492d769e936Smrg gcx*) 4493d769e936Smrg # Green Hills C++ Compiler 4494d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4495d769e936Smrg ;; 4496d769e936Smrg *) 4497d769e936Smrg ;; 4498d769e936Smrg esac 4499786a6f21Smrg ;; 4500d769e936Smrg sunos4*) 4501d769e936Smrg case $cc_basename in 4502d769e936Smrg CC*) 4503d769e936Smrg # Sun C++ 4.x 4504d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4505d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4506d769e936Smrg ;; 4507d769e936Smrg lcc*) 4508d769e936Smrg # Lucid 4509d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4510d769e936Smrg ;; 4511d769e936Smrg *) 4512d769e936Smrg ;; 4513d769e936Smrg esac 4514786a6f21Smrg ;; 4515d769e936Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4516d769e936Smrg case $cc_basename in 4517d769e936Smrg CC*) 4518d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4519d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4520d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4521d769e936Smrg ;; 4522d769e936Smrg esac 4523786a6f21Smrg ;; 4524d769e936Smrg tandem*) 4525d769e936Smrg case $cc_basename in 4526d769e936Smrg NCC*) 4527d769e936Smrg # NonStop-UX NCC 3.20 4528d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4529d769e936Smrg ;; 4530d769e936Smrg *) 4531d769e936Smrg ;; 4532d769e936Smrg esac 4533d769e936Smrg ;; 4534d769e936Smrg vxworks*) 4535786a6f21Smrg ;; 4536786a6f21Smrg *) 4537d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4538786a6f21Smrg ;; 4539ec713c28Smrg esac 4540d769e936Smrg fi 4541d769e936Smrg], 4542d769e936Smrg[ 45437322289dSmrg if test yes = "$GCC"; then 4544d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4545d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45461d54945dSmrg 4547d769e936Smrg case $host_os in 4548d769e936Smrg aix*) 4549d769e936Smrg # All AIX code is PIC. 45507322289dSmrg if test ia64 = "$host_cpu"; then 4551d769e936Smrg # AIX 5 now supports IA64 processor 4552d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4553d769e936Smrg fi 45547322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4555d769e936Smrg ;; 45561d54945dSmrg 4557d769e936Smrg amigaos*) 4558d769e936Smrg case $host_cpu in 4559d769e936Smrg powerpc) 4560d769e936Smrg # see comment about AmigaOS4 .so support 4561d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4562d769e936Smrg ;; 4563d769e936Smrg m68k) 4564d769e936Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45657322289dSmrg # adding the '-m68020' flag to GCC prevents building anything better, 45667322289dSmrg # like '-m68040'. 4567d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4568d769e936Smrg ;; 4569d769e936Smrg esac 4570d769e936Smrg ;; 45711d54945dSmrg 4572d769e936Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4573d769e936Smrg # PIC is the default for these OSes. 4574d769e936Smrg ;; 45751d54945dSmrg 4576d769e936Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4577d769e936Smrg # This hack is so that the source file can tell whether it is being 4578d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4579d769e936Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4580d769e936Smrg # (--disable-auto-import) libraries 4581d769e936Smrg m4_if([$1], [GCJ], [], 4582d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45837322289dSmrg case $host_os in 45847322289dSmrg os2*) 45857322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45867322289dSmrg ;; 45877322289dSmrg esac 4588d769e936Smrg ;; 45891d54945dSmrg 4590d769e936Smrg darwin* | rhapsody*) 4591d769e936Smrg # PIC is the default on this platform 4592d769e936Smrg # Common symbols not allowed in MH_DYLIB files 4593d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4594d769e936Smrg ;; 4595ec713c28Smrg 4596d769e936Smrg haiku*) 4597d769e936Smrg # PIC is the default for Haiku. 4598d769e936Smrg # The "-static" flag exists, but is broken. 4599d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4600d769e936Smrg ;; 46011d54945dSmrg 4602d769e936Smrg hpux*) 4603d769e936Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4604d769e936Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4605d769e936Smrg # sets the default TLS model and affects inlining. 4606d769e936Smrg case $host_cpu in 4607d769e936Smrg hppa*64*) 4608d769e936Smrg # +Z the default 4609d769e936Smrg ;; 4610d769e936Smrg *) 4611d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4612d769e936Smrg ;; 4613d769e936Smrg esac 4614d769e936Smrg ;; 46151d54945dSmrg 4616d769e936Smrg interix[[3-9]]*) 4617d769e936Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4618d769e936Smrg # Instead, we relocate shared libraries at runtime. 4619d769e936Smrg ;; 46201d54945dSmrg 4621d769e936Smrg msdosdjgpp*) 4622d769e936Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4623d769e936Smrg # on systems that don't support them. 4624d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4625d769e936Smrg enable_shared=no 4626d769e936Smrg ;; 46271d54945dSmrg 4628d769e936Smrg *nto* | *qnx*) 4629d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4630d769e936Smrg # it will coredump. 4631d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4632d769e936Smrg ;; 46331d54945dSmrg 4634d769e936Smrg sysv4*MP*) 4635d769e936Smrg if test -d /usr/nec; then 4636d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4637d769e936Smrg fi 4638d769e936Smrg ;; 4639ec713c28Smrg 4640d769e936Smrg *) 4641d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4642ec713c28Smrg ;; 4643ec713c28Smrg esac 46441d54945dSmrg 4645d769e936Smrg case $cc_basename in 4646d769e936Smrg nvcc*) # Cuda Compiler Driver 2.2 4647d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4648d769e936Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4649d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4650d769e936Smrg fi 4651ec713c28Smrg ;; 4652ec713c28Smrg esac 4653d769e936Smrg else 4654d769e936Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4655d769e936Smrg case $host_os in 4656d769e936Smrg aix*) 4657d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46587322289dSmrg if test ia64 = "$host_cpu"; then 4659d769e936Smrg # AIX 5 now supports IA64 processor 4660d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4661d769e936Smrg else 4662d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4663d769e936Smrg fi 4664d769e936Smrg ;; 4665ec713c28Smrg 46667322289dSmrg darwin* | rhapsody*) 46677322289dSmrg # PIC is the default on this platform 46687322289dSmrg # Common symbols not allowed in MH_DYLIB files 46697322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46707322289dSmrg case $cc_basename in 46717322289dSmrg nagfor*) 46727322289dSmrg # NAG Fortran compiler 46737322289dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46747322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46757322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46767322289dSmrg ;; 46777322289dSmrg esac 46787322289dSmrg ;; 46797322289dSmrg 4680d769e936Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4681d769e936Smrg # This hack is so that the source file can tell whether it is being 4682d769e936Smrg # built for inclusion in a dll (and should export symbols for example). 4683d769e936Smrg m4_if([$1], [GCJ], [], 4684d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46857322289dSmrg case $host_os in 46867322289dSmrg os2*) 46877322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46887322289dSmrg ;; 46897322289dSmrg esac 4690d769e936Smrg ;; 46911d54945dSmrg 4692d769e936Smrg hpux9* | hpux10* | hpux11*) 4693d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4694d769e936Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4695d769e936Smrg # not for PA HP-UX. 4696d769e936Smrg case $host_cpu in 4697d769e936Smrg hppa*64*|ia64*) 4698d769e936Smrg # +Z the default 4699d769e936Smrg ;; 4700d769e936Smrg *) 4701d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4702d769e936Smrg ;; 4703d769e936Smrg esac 4704d769e936Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47057322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4706d769e936Smrg ;; 47071d54945dSmrg 4708d769e936Smrg irix5* | irix6* | nonstopux*) 4709d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4710d769e936Smrg # PIC (with -KPIC) is the default. 4711d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4712d769e936Smrg ;; 47131d54945dSmrg 47147322289dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4715d769e936Smrg case $cc_basename in 47167322289dSmrg # old Intel for x86_64, which still supported -KPIC. 4717d769e936Smrg ecc*) 4718d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4720d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4721d769e936Smrg ;; 4722d769e936Smrg # icc used to be incompatible with GCC. 4723d769e936Smrg # ICC 10 doesn't accept -KPIC any more. 4724d769e936Smrg icc* | ifort*) 4725d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4726d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4727d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4728d769e936Smrg ;; 4729d769e936Smrg # Lahey Fortran 8.1. 4730d769e936Smrg lf95*) 4731d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4732d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4733d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4734d769e936Smrg ;; 4735d769e936Smrg nagfor*) 4736d769e936Smrg # NAG Fortran compiler 4737d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4738d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4739d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4740d769e936Smrg ;; 47417322289dSmrg tcc*) 47427322289dSmrg # Fabrice Bellard et al's Tiny C Compiler 47437322289dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47447322289dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47457322289dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47467322289dSmrg ;; 4747d769e936Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4748d769e936Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4749d769e936Smrg # which looks to be a dead project) 4750d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4751d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4752d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4753d769e936Smrg ;; 4754d769e936Smrg ccc*) 4755d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756d769e936Smrg # All Alpha code is PIC. 4757d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4758d769e936Smrg ;; 4759d769e936Smrg xl* | bgxl* | bgf* | mpixl*) 4760d769e936Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4761d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4762d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4763d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4764d769e936Smrg ;; 4765d769e936Smrg *) 4766d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 4767d769e936Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4768d769e936Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4769d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4770d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4771d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4772d769e936Smrg ;; 4773d769e936Smrg *Sun\ F* | *Sun*Fortran*) 4774d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4775d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4776d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4777d769e936Smrg ;; 4778d769e936Smrg *Sun\ C*) 4779d769e936Smrg # Sun C 5.9 4780d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4781d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4782d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4783d769e936Smrg ;; 4784d769e936Smrg *Intel*\ [[CF]]*Compiler*) 4785d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4786d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4787d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4788d769e936Smrg ;; 4789d769e936Smrg *Portland\ Group*) 4790d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4791d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4792d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4793d769e936Smrg ;; 4794d769e936Smrg esac 4795d769e936Smrg ;; 4796d769e936Smrg esac 4797d769e936Smrg ;; 47981d54945dSmrg 4799d769e936Smrg newsos6) 4800d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4801d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4802d769e936Smrg ;; 48031d54945dSmrg 4804d769e936Smrg *nto* | *qnx*) 4805d769e936Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4806d769e936Smrg # it will coredump. 4807d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4808d769e936Smrg ;; 48091d54945dSmrg 4810d769e936Smrg osf3* | osf4* | osf5*) 4811d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4812d769e936Smrg # All OSF/1 code is PIC. 4813d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4814d769e936Smrg ;; 48151d54945dSmrg 4816d769e936Smrg rdos*) 4817d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4818d769e936Smrg ;; 48191d54945dSmrg 4820d769e936Smrg solaris*) 4821d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4822d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4823d769e936Smrg case $cc_basename in 4824d769e936Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4825d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4826d769e936Smrg *) 4827d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4828d769e936Smrg esac 4829d769e936Smrg ;; 48301d54945dSmrg 4831d769e936Smrg sunos4*) 4832d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4833d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4834d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4835d769e936Smrg ;; 48361d54945dSmrg 4837d769e936Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4838d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4839d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4840d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4841d769e936Smrg ;; 48421d54945dSmrg 4843d769e936Smrg sysv4*MP*) 48447322289dSmrg if test -d /usr/nec; then 4845d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4846d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4847d769e936Smrg fi 4848d769e936Smrg ;; 48491d54945dSmrg 4850d769e936Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4851d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4853d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4854d769e936Smrg ;; 48551d54945dSmrg 4856d769e936Smrg unicos*) 4857d769e936Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4858d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4859d769e936Smrg ;; 48601d54945dSmrg 4861d769e936Smrg uts4*) 4862d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4863d769e936Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4864786a6f21Smrg ;; 4865d769e936Smrg 4866ec713c28Smrg *) 4867d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4868786a6f21Smrg ;; 4869ec713c28Smrg esac 4870d769e936Smrg fi 4871d769e936Smrg]) 4872d769e936Smrgcase $host_os in 48737322289dSmrg # For platforms that do not support PIC, -DPIC is meaningless: 4874d769e936Smrg *djgpp*) 4875d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4876ec713c28Smrg ;; 4877d769e936Smrg *) 4878d769e936Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4879d769e936Smrg ;; 4880d769e936Smrgesac 48811d54945dSmrg 4882d769e936SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4883d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4884d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4885d769e936Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48861d54945dSmrg 4887ec713c28Smrg# 4888d769e936Smrg# Check to make sure the PIC flag actually works. 4889ec713c28Smrg# 4890d769e936Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4891d769e936Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4892d769e936Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4893d769e936Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4894d769e936Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4895d769e936Smrg "" | " "*) ;; 4896d769e936Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4897d769e936Smrg esac], 4898d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4899d769e936Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4900d769e936Smrgfi 4901d769e936Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4902d769e936Smrg [Additional compiler flags for building library objects]) 4903d769e936Smrg 4904d769e936Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4905d769e936Smrg [How to pass a linker flag through the compiler]) 4906ec713c28Smrg# 4907d769e936Smrg# Check to make sure the static flag actually works. 4908ec713c28Smrg# 4909d769e936Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4910d769e936Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4911d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4912d769e936Smrg $lt_tmp_static_flag, 4913d769e936Smrg [], 4914d769e936Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4915d769e936Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4916d769e936Smrg [Compiler flag to prevent dynamic linking]) 4917d769e936Smrg])# _LT_COMPILER_PIC 49181d54945dSmrg 49191d54945dSmrg 4920d769e936Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4921d769e936Smrg# ---------------------------- 4922d769e936Smrg# See if the linker supports building shared libraries. 4923d769e936Smrgm4_defun([_LT_LINKER_SHLIBS], 4924d769e936Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4925d769e936SmrgAC_REQUIRE([LT_PATH_NM])dnl 4926d769e936Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4927d769e936Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 4929d769e936Smrgm4_require([_LT_DECL_SED])dnl 4930d769e936Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4931d769e936Smrgm4_require([_LT_TAG_COMPILER])dnl 4932d769e936SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4933d769e936Smrgm4_if([$1], [CXX], [ 4934d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4935d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4936d769e936Smrg case $host_os in 4937d769e936Smrg aix[[4-9]]*) 4938d769e936Smrg # If we're using GNU nm, then we don't want the "-C" option. 49397322289dSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49407322289dSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49417322289dSmrg # weak defined symbols like other global defined symbols, whereas 49427322289dSmrg # GNU nm marks them as "W". 49437322289dSmrg # While the 'weak' keyword is ignored in the Export File, we need 49447322289dSmrg # it in the Import File for the 'aix-soname' feature, so we have 49457322289dSmrg # to replace the "-B" option with "-P" for AIX nm. 4946d769e936Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49477322289dSmrg _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' 4948d769e936Smrg else 49497322289dSmrg _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' 4950d769e936Smrg fi 4951d769e936Smrg ;; 4952d769e936Smrg pw32*) 49537322289dSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4954d769e936Smrg ;; 4955d769e936Smrg cygwin* | mingw* | cegcc*) 4956d769e936Smrg case $cc_basename in 4957d769e936Smrg cl*) 4958d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4959d769e936Smrg ;; 4960d769e936Smrg *) 4961d769e936Smrg _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' 4962d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4963d769e936Smrg ;; 4964d769e936Smrg esac 4965d769e936Smrg ;; 4966d769e936Smrg *) 4967d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4968d769e936Smrg ;; 4969d769e936Smrg esac 4970d769e936Smrg], [ 4971d769e936Smrg runpath_var= 4972d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4973d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4974d769e936Smrg _LT_TAGVAR(archive_cmds, $1)= 4975d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4976d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4977d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4978d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4979d769e936Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4980d769e936Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4981d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4982d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4983d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4984d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4985d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4986d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4987d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4988d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4989d769e936Smrg _LT_TAGVAR(module_cmds, $1)= 4990d769e936Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4991d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4992d769e936Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4993d769e936Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4994d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4995d769e936Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4996d769e936Smrg # included in the symbol list 4997d769e936Smrg _LT_TAGVAR(include_expsyms, $1)= 4998d769e936Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 49997322289dSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50007322289dSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50017322289dSmrg # as well as any symbol that contains 'd'. 5002d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5003d769e936Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5004d769e936Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5005d769e936Smrg # the symbol is explicitly referenced. Since portable code cannot 5006d769e936Smrg # rely on this symbol name, it's probably fine to never include it in 5007d769e936Smrg # preloaded symbol tables. 5008d769e936Smrg # Exclude shared library initialization/finalization symbols. 5009d769e936Smrgdnl Note also adjust exclude_expsyms for C++ above. 5010d769e936Smrg extract_expsyms_cmds= 50111d54945dSmrg 5012d769e936Smrg case $host_os in 5013d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5014d769e936Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5015d769e936Smrg # When not using gcc, we currently assume that we are using 5016d769e936Smrg # Microsoft Visual C++. 50177322289dSmrg if test yes != "$GCC"; then 5018d769e936Smrg with_gnu_ld=no 5019d769e936Smrg fi 5020d769e936Smrg ;; 5021d769e936Smrg interix*) 5022d769e936Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5023d769e936Smrg with_gnu_ld=yes 5024d769e936Smrg ;; 50257322289dSmrg openbsd* | bitrig*) 5026d769e936Smrg with_gnu_ld=no 5027d769e936Smrg ;; 5028d769e936Smrg esac 50291d54945dSmrg 5030d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50311d54945dSmrg 5032d769e936Smrg # On some targets, GNU ld is compatible enough with the native linker 5033d769e936Smrg # that we're better off using the native interface for both. 5034d769e936Smrg lt_use_gnu_ld_interface=no 50357322289dSmrg if test yes = "$with_gnu_ld"; then 5036d769e936Smrg case $host_os in 5037d769e936Smrg aix*) 5038d769e936Smrg # The AIX port of GNU ld has always aspired to compatibility 5039d769e936Smrg # with the native linker. However, as the warning in the GNU ld 5040d769e936Smrg # block says, versions before 2.19.5* couldn't really create working 5041d769e936Smrg # shared libraries, regardless of the interface used. 5042d769e936Smrg case `$LD -v 2>&1` in 5043d769e936Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5044d769e936Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5045d769e936Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5046d769e936Smrg *) 5047d769e936Smrg lt_use_gnu_ld_interface=yes 5048d769e936Smrg ;; 5049d769e936Smrg esac 5050d769e936Smrg ;; 5051d769e936Smrg *) 5052d769e936Smrg lt_use_gnu_ld_interface=yes 5053d769e936Smrg ;; 5054d769e936Smrg esac 5055d769e936Smrg fi 50561d54945dSmrg 50577322289dSmrg if test yes = "$lt_use_gnu_ld_interface"; then 5058d769e936Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50597322289dSmrg wlarc='$wl' 50601d54945dSmrg 5061d769e936Smrg # Set some defaults for GNU ld with shared library support. These 5062d769e936Smrg # are reset later if shared libraries are not supported. Putting them 5063d769e936Smrg # here allows them to be overridden if necessary. 5064d769e936Smrg runpath_var=LD_RUN_PATH 50657322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50667322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5067d769e936Smrg # ancient GNU ld didn't support --whole-archive et. al. 5068d769e936Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50697322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5070d769e936Smrg else 5071d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5072d769e936Smrg fi 5073d769e936Smrg supports_anon_versioning=no 50747322289dSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5075d769e936Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5076d769e936Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5077d769e936Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5078d769e936Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5079d769e936Smrg *\ 2.11.*) ;; # other 2.11 versions 5080d769e936Smrg *) supports_anon_versioning=yes ;; 5081d769e936Smrg esac 50821d54945dSmrg 5083d769e936Smrg # See if GNU ld supports shared libraries. 5084d769e936Smrg case $host_os in 5085d769e936Smrg aix[[3-9]]*) 5086d769e936Smrg # On AIX/PPC, the GNU linker is very broken 50877322289dSmrg if test ia64 != "$host_cpu"; then 5088d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5089d769e936Smrg cat <<_LT_EOF 1>&2 50901d54945dSmrg 5091d769e936Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5092d769e936Smrg*** to be unable to reliably create shared libraries on AIX. 5093d769e936Smrg*** Therefore, libtool is disabling shared libraries support. If you 5094d769e936Smrg*** really care for shared libraries, you may want to install binutils 5095d769e936Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5096d769e936Smrg*** You will then need to restart the configuration process. 50971d54945dSmrg 5098d769e936Smrg_LT_EOF 5099d769e936Smrg fi 5100d769e936Smrg ;; 51011d54945dSmrg 5102d769e936Smrg amigaos*) 5103d769e936Smrg case $host_cpu in 5104d769e936Smrg powerpc) 5105d769e936Smrg # see comment about AmigaOS4 .so support 51067322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5107d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5108d769e936Smrg ;; 5109d769e936Smrg m68k) 5110d769e936Smrg _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)' 5111d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5112d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5113d769e936Smrg ;; 5114d769e936Smrg esac 5115d769e936Smrg ;; 51161d54945dSmrg 5117d769e936Smrg beos*) 5118d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5119d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5120d769e936Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5121d769e936Smrg # support --undefined. This deserves some investigation. FIXME 51227322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5123d769e936Smrg else 5124d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5125d769e936Smrg fi 5126d769e936Smrg ;; 51271d54945dSmrg 5128d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5129d769e936Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5130d769e936Smrg # as there is no search path for DLLs. 5131d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51327322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5133d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5134d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5135d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5136d769e936Smrg _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' 5137d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5138d769e936Smrg 5139d769e936Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51407322289dSmrg _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' 51417322289dSmrg # If the export-symbols file already is a .def file, use it as 51427322289dSmrg # is; otherwise, prepend EXPORTS... 51437322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51447322289dSmrg cp $export_symbols $output_objdir/$soname.def; 51457322289dSmrg else 51467322289dSmrg echo EXPORTS > $output_objdir/$soname.def; 51477322289dSmrg cat $export_symbols >> $output_objdir/$soname.def; 51487322289dSmrg fi~ 51497322289dSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5150d769e936Smrg else 5151d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5152d769e936Smrg fi 5153d769e936Smrg ;; 51541d54945dSmrg 5155d769e936Smrg haiku*) 51567322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5157d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5158d769e936Smrg ;; 51591d54945dSmrg 51607322289dSmrg os2*) 51617322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51627322289dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51637322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51647322289dSmrg shrext_cmds=.dll 51657322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51667322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51677322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51687322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51697322289dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51707322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51717322289dSmrg emximp -o $lib $output_objdir/$libname.def' 51727322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51737322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51747322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51757322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51767322289dSmrg prefix_cmds="$SED"~ 51777322289dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51787322289dSmrg prefix_cmds="$prefix_cmds -e 1d"; 51797322289dSmrg fi~ 51807322289dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51817322289dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51827322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51837322289dSmrg emximp -o $lib $output_objdir/$libname.def' 51847322289dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 51857322289dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51867322289dSmrg ;; 51877322289dSmrg 5188d769e936Smrg interix[[3-9]]*) 5189d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5190d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 51917322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 51927322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5193d769e936Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5194d769e936Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5195d769e936Smrg # default) and relocated if they conflict, which is a slow very memory 5196d769e936Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5197d769e936Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5198d769e936Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 51997322289dSmrg _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' 52007322289dSmrg _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' 5201d769e936Smrg ;; 52021d54945dSmrg 5203d769e936Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5204d769e936Smrg tmp_diet=no 52057322289dSmrg if test linux-dietlibc = "$host_os"; then 5206d769e936Smrg case $cc_basename in 5207d769e936Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5208d769e936Smrg esac 5209d769e936Smrg fi 5210d769e936Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52117322289dSmrg && test no = "$tmp_diet" 5212d769e936Smrg then 5213d769e936Smrg tmp_addflag=' $pic_flag' 5214d769e936Smrg tmp_sharedflag='-shared' 5215d769e936Smrg case $cc_basename,$host_cpu in 5216d769e936Smrg pgcc*) # Portland Group C compiler 52177322289dSmrg _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' 5218d769e936Smrg tmp_addflag=' $pic_flag' 5219d769e936Smrg ;; 5220d769e936Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 5221d769e936Smrg # Portland Group f77 and f90 compilers 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 -Mnomain' ;; 5224d769e936Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5225d769e936Smrg tmp_addflag=' -i_dynamic' ;; 5226d769e936Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5227d769e936Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5228d769e936Smrg ifc* | ifort*) # Intel Fortran compiler 5229d769e936Smrg tmp_addflag=' -nofor_main' ;; 5230d769e936Smrg lf95*) # Lahey Fortran 8.1 5231d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5232d769e936Smrg tmp_sharedflag='--shared' ;; 52337322289dSmrg nagfor*) # NAGFOR 5.3 52347322289dSmrg tmp_sharedflag='-Wl,-shared' ;; 5235d769e936Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5236d769e936Smrg tmp_sharedflag='-qmkshrobj' 5237d769e936Smrg tmp_addflag= ;; 5238d769e936Smrg nvcc*) # Cuda Compiler Driver 2.2 52397322289dSmrg _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' 5240d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5241d769e936Smrg ;; 5242d769e936Smrg esac 5243d769e936Smrg case `$CC -V 2>&1 | sed 5q` in 5244d769e936Smrg *Sun\ C*) # Sun C 5.9 52457322289dSmrg _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' 5246d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5247d769e936Smrg tmp_sharedflag='-G' ;; 5248d769e936Smrg *Sun\ F*) # Sun Fortran 8.3 5249d769e936Smrg tmp_sharedflag='-G' ;; 5250d769e936Smrg esac 52517322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52521d54945dSmrg 52537322289dSmrg if test yes = "$supports_anon_versioning"; then 5254d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52557322289dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52567322289dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52577322289dSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5258d769e936Smrg fi 5259ba85709eSmrg 5260d769e936Smrg case $cc_basename in 52617322289dSmrg tcc*) 52627322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52637322289dSmrg ;; 5264d769e936Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5265d769e936Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5266d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52677322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5268d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52697322289dSmrg if test yes = "$supports_anon_versioning"; then 5270d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52717322289dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52727322289dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52737322289dSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5274d769e936Smrg fi 5275d769e936Smrg ;; 5276d769e936Smrg esac 5277d769e936Smrg else 5278d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5279d769e936Smrg fi 5280d769e936Smrg ;; 52811d54945dSmrg 5282d769e936Smrg netbsd*) 5283d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5284d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5285d769e936Smrg wlarc= 5286d769e936Smrg else 52877322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52887322289dSmrg _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' 5289d769e936Smrg fi 5290d769e936Smrg ;; 52911d54945dSmrg 5292d769e936Smrg solaris*) 5293d769e936Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5294d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5295d769e936Smrg cat <<_LT_EOF 1>&2 52961d54945dSmrg 5297d769e936Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5298d769e936Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5299d769e936Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5300d769e936Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5301d769e936Smrg*** your PATH or compiler configuration so that the native linker is 5302d769e936Smrg*** used, and then restart. 53031d54945dSmrg 5304d769e936Smrg_LT_EOF 5305d769e936Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53067322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53077322289dSmrg _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' 5308d769e936Smrg else 5309d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5310d769e936Smrg fi 5311d769e936Smrg ;; 53121d54945dSmrg 5313d769e936Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5314d769e936Smrg case `$LD -v 2>&1` in 5315d769e936Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5316d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5317d769e936Smrg cat <<_LT_EOF 1>&2 53181d54945dSmrg 53197322289dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5320d769e936Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5321d769e936Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5322d769e936Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5323d769e936Smrg*** your PATH or compiler configuration so that the native linker is 5324d769e936Smrg*** used, and then restart. 53251d54945dSmrg 5326d769e936Smrg_LT_EOF 5327d769e936Smrg ;; 5328d769e936Smrg *) 5329d769e936Smrg # For security reasons, it is highly recommended that you always 5330d769e936Smrg # use absolute paths for naming shared libraries, and exclude the 5331d769e936Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5332d769e936Smrg # requires that you compile everything twice, which is a pain. 5333d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53347322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53357322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53367322289dSmrg _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' 5337d769e936Smrg else 5338d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5339d769e936Smrg fi 5340d769e936Smrg ;; 5341d769e936Smrg esac 5342d769e936Smrg ;; 53431d54945dSmrg 5344d769e936Smrg sunos4*) 5345d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5346d769e936Smrg wlarc= 5347d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5348d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5349d769e936Smrg ;; 53501d54945dSmrg 5351d769e936Smrg *) 5352d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53537322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53547322289dSmrg _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' 5355d769e936Smrg else 5356d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5357d769e936Smrg fi 5358d769e936Smrg ;; 5359d769e936Smrg esac 53601d54945dSmrg 53617322289dSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5362d769e936Smrg runpath_var= 5363d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5364d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5365d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5366d769e936Smrg fi 5367d769e936Smrg else 5368d769e936Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5369d769e936Smrg case $host_os in 5370d769e936Smrg aix3*) 5371d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5372d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5373d769e936Smrg _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' 5374d769e936Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5375d769e936Smrg # are no directories specified by -L. 5376d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53777322289dSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5378d769e936Smrg # Neither direct hardcoding nor static linking is supported with a 5379d769e936Smrg # broken collect2. 5380d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5381d769e936Smrg fi 5382d769e936Smrg ;; 53831d54945dSmrg 5384d769e936Smrg aix[[4-9]]*) 53857322289dSmrg if test ia64 = "$host_cpu"; then 5386d769e936Smrg # On IA64, the linker does run time linking by default, so we don't 5387d769e936Smrg # have to do anything special. 5388d769e936Smrg aix_use_runtimelinking=no 5389d769e936Smrg exp_sym_flag='-Bexport' 53907322289dSmrg no_entry_flag= 5391d769e936Smrg else 5392d769e936Smrg # If we're using GNU nm, then we don't want the "-C" option. 53937322289dSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 53947322289dSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 53957322289dSmrg # weak defined symbols like other global defined symbols, whereas 53967322289dSmrg # GNU nm marks them as "W". 53977322289dSmrg # While the 'weak' keyword is ignored in the Export File, we need 53987322289dSmrg # it in the Import File for the 'aix-soname' feature, so we have 53997322289dSmrg # to replace the "-B" option with "-P" for AIX nm. 5400d769e936Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54017322289dSmrg _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' 5402d769e936Smrg else 54037322289dSmrg _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' 5404d769e936Smrg fi 5405d769e936Smrg aix_use_runtimelinking=no 54061d54945dSmrg 5407d769e936Smrg # Test if we are trying to use run time linking or normal 5408d769e936Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54097322289dSmrg # have runtime linking enabled, and use it for executables. 54107322289dSmrg # For shared libraries, we enable/disable runtime linking 54117322289dSmrg # depending on the kind of the shared library created - 54127322289dSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 54137322289dSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54147322289dSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 54157322289dSmrg # lib.a static archive 54167322289dSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54177322289dSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 54187322289dSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54197322289dSmrg # lib.a(lib.so.V) shared, rtl:no 54207322289dSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54217322289dSmrg # lib.a static archive 5422d769e936Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5423d769e936Smrg for ld_flag in $LDFLAGS; do 54247322289dSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5425d769e936Smrg aix_use_runtimelinking=yes 5426d769e936Smrg break 5427d769e936Smrg fi 5428d769e936Smrg done 54297322289dSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54307322289dSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54317322289dSmrg # so we don't have lib.a shared libs to link our executables. 54327322289dSmrg # We have to force runtime linking in this case. 54337322289dSmrg aix_use_runtimelinking=yes 54347322289dSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54357322289dSmrg fi 5436d769e936Smrg ;; 5437d769e936Smrg esac 54381d54945dSmrg 5439d769e936Smrg exp_sym_flag='-bexport' 5440d769e936Smrg no_entry_flag='-bnoentry' 5441d769e936Smrg fi 54421d54945dSmrg 5443d769e936Smrg # When large executables or shared objects are built, AIX ld can 5444d769e936Smrg # have problems creating the table of contents. If linking a library 5445d769e936Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5446d769e936Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5447d769e936Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54481d54945dSmrg 5449d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='' 5450d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5451d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5452d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5453d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54547322289dSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54557322289dSmrg case $with_aix_soname,$aix_use_runtimelinking in 54567322289dSmrg aix,*) ;; # traditional, no import file 54577322289dSmrg svr4,* | *,yes) # use import file 54587322289dSmrg # The Import File defines what to hardcode. 54597322289dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 54607322289dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54617322289dSmrg ;; 54627322289dSmrg esac 54631d54945dSmrg 54647322289dSmrg if test yes = "$GCC"; then 5465d769e936Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5466d769e936Smrg # We only want to do this on AIX 4.2 and lower, the check 5467d769e936Smrg # below for broken collect2 doesn't work under 4.3+ 54687322289dSmrg collect2name=`$CC -print-prog-name=collect2` 5469d769e936Smrg if test -f "$collect2name" && 5470d769e936Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5471d769e936Smrg then 5472d769e936Smrg # We have reworked collect2 5473d769e936Smrg : 5474d769e936Smrg else 5475d769e936Smrg # We have old collect2 5476d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5477d769e936Smrg # It fails to find uninstalled libraries when the uninstalled 5478d769e936Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5479d769e936Smrg # to unsupported forces relinking 5480d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5481d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5482d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5483d769e936Smrg fi 5484d769e936Smrg ;; 5485d769e936Smrg esac 5486d769e936Smrg shared_flag='-shared' 54877322289dSmrg if test yes = "$aix_use_runtimelinking"; then 54887322289dSmrg shared_flag="$shared_flag "'$wl-G' 5489d769e936Smrg fi 54907322289dSmrg # Need to ensure runtime linking is disabled for the traditional 54917322289dSmrg # shared library, or the linker may eventually find shared libraries 54927322289dSmrg # /with/ Import File - we do not want to mix them. 54937322289dSmrg shared_flag_aix='-shared' 54947322289dSmrg shared_flag_svr4='-shared $wl-G' 5495d769e936Smrg else 5496d769e936Smrg # not using gcc 54977322289dSmrg if test ia64 = "$host_cpu"; then 5498d769e936Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5499d769e936Smrg # chokes on -Wl,-G. The following line is correct: 5500d769e936Smrg shared_flag='-G' 5501d769e936Smrg else 55027322289dSmrg if test yes = "$aix_use_runtimelinking"; then 55037322289dSmrg shared_flag='$wl-G' 5504d769e936Smrg else 55057322289dSmrg shared_flag='$wl-bM:SRE' 5506d769e936Smrg fi 55077322289dSmrg shared_flag_aix='$wl-bM:SRE' 55087322289dSmrg shared_flag_svr4='$wl-G' 5509d769e936Smrg fi 5510d769e936Smrg fi 55111d54945dSmrg 55127322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5513d769e936Smrg # It seems that -bexpall does not export symbols beginning with 5514d769e936Smrg # underscore (_), so it is better to generate a list of symbols to export. 5515d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55167322289dSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5517d769e936Smrg # Warning - without using the other runtime loading flags (-brtl), 5518d769e936Smrg # -berok will link without error, but may produce a broken library. 5519d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5520d769e936Smrg # Determine the default libpath from the value encoded in an 5521d769e936Smrg # empty executable. 5522d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55237322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55247322289dSmrg _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 5525d769e936Smrg else 55267322289dSmrg if test ia64 = "$host_cpu"; then 55277322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5528d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55297322289dSmrg _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" 5530d769e936Smrg else 5531d769e936Smrg # Determine the default libpath from the value encoded in an 5532d769e936Smrg # empty executable. 5533d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55347322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5535d769e936Smrg # Warning - without using the other run time loading flags, 5536d769e936Smrg # -berok will link without error, but may produce a broken library. 55377322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55387322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55397322289dSmrg if test yes = "$with_gnu_ld"; then 5540d769e936Smrg # We only use this code for GNU lds that support --whole-archive. 55417322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5542d769e936Smrg else 5543d769e936Smrg # Exported symbols can be pulled into shared objects from archives 5544d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5545d769e936Smrg fi 5546d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55477322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55487322289dSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55497322289dSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55507322289dSmrg if test svr4 != "$with_aix_soname"; then 55517322289dSmrg # This is similar to how AIX traditionally builds its shared libraries. 55527322289dSmrg _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' 55537322289dSmrg fi 55547322289dSmrg if test aix != "$with_aix_soname"; then 55557322289dSmrg _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' 55567322289dSmrg else 55577322289dSmrg # used by -dlpreopen to get the symbols 55587322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55597322289dSmrg fi 55607322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5561d769e936Smrg fi 5562d769e936Smrg fi 5563d769e936Smrg ;; 55641d54945dSmrg 5565d769e936Smrg amigaos*) 5566d769e936Smrg case $host_cpu in 5567d769e936Smrg powerpc) 5568d769e936Smrg # see comment about AmigaOS4 .so support 55697322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5570d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5571d769e936Smrg ;; 5572d769e936Smrg m68k) 5573d769e936Smrg _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)' 5574d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5575d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5576d769e936Smrg ;; 5577d769e936Smrg esac 5578d769e936Smrg ;; 55791d54945dSmrg 5580d769e936Smrg bsdi[[45]]*) 5581d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5582d769e936Smrg ;; 55831d54945dSmrg 5584d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 5585d769e936Smrg # When not using gcc, we currently assume that we are using 5586d769e936Smrg # Microsoft Visual C++. 5587d769e936Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5588d769e936Smrg # no search path for DLLs. 5589d769e936Smrg case $cc_basename in 5590d769e936Smrg cl*) 5591d769e936Smrg # Native MSVC 5592d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5593d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5594d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5595d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5596d769e936Smrg # Tell ltmain to make .lib files, not .a files. 5597d769e936Smrg libext=lib 5598d769e936Smrg # Tell ltmain to make .dll files, not .so files. 55997322289dSmrg shrext_cmds=.dll 5600d769e936Smrg # FIXME: Setting linknames here is a bad hack. 56017322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56027322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56037322289dSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 56047322289dSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56057322289dSmrg else 56067322289dSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56077322289dSmrg fi~ 56087322289dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56097322289dSmrg linknames=' 5610d769e936Smrg # The linker will not automatically build a static lib if we build a DLL. 5611d769e936Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5612d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5613d769e936Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5614d769e936Smrg _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' 5615d769e936Smrg # Don't use ranlib 5616d769e936Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5617d769e936Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56187322289dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56197322289dSmrg case $lt_outputfile in 56207322289dSmrg *.exe|*.EXE) ;; 56217322289dSmrg *) 56227322289dSmrg lt_outputfile=$lt_outputfile.exe 56237322289dSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 56247322289dSmrg ;; 56257322289dSmrg esac~ 56267322289dSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56277322289dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56287322289dSmrg $RM "$lt_outputfile.manifest"; 56297322289dSmrg fi' 5630d769e936Smrg ;; 5631d769e936Smrg *) 5632d769e936Smrg # Assume MSVC wrapper 5633d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5634d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5635d769e936Smrg # Tell ltmain to make .lib files, not .a files. 5636d769e936Smrg libext=lib 5637d769e936Smrg # Tell ltmain to make .dll files, not .so files. 56387322289dSmrg shrext_cmds=.dll 5639d769e936Smrg # FIXME: Setting linknames here is a bad hack. 5640d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5641d769e936Smrg # The linker will automatically build a .lib file if we build a DLL. 5642d769e936Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5643d769e936Smrg # FIXME: Should let the user specify the lib program. 5644d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5645d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5646d769e936Smrg ;; 5647d769e936Smrg esac 5648d769e936Smrg ;; 56491d54945dSmrg 5650d769e936Smrg darwin* | rhapsody*) 5651d769e936Smrg _LT_DARWIN_LINKER_FEATURES($1) 5652d769e936Smrg ;; 56531d54945dSmrg 5654d769e936Smrg dgux*) 5655d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5656d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5657d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5658d769e936Smrg ;; 56591d54945dSmrg 5660d769e936Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5661d769e936Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5662d769e936Smrg # does not break anything, and helps significantly (at the cost of a little 5663d769e936Smrg # extra space). 5664d769e936Smrg freebsd2.2*) 5665d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5666d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5667d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5668d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5669d769e936Smrg ;; 56701d54945dSmrg 5671d769e936Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5672d769e936Smrg freebsd2.*) 5673d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5674d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5675d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5676d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5677d769e936Smrg ;; 56781d54945dSmrg 5679d769e936Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5680d769e936Smrg freebsd* | dragonfly*) 5681d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5682d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5683d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5684d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5685d769e936Smrg ;; 56861d54945dSmrg 5687d769e936Smrg hpux9*) 56887322289dSmrg if test yes = "$GCC"; then 56897322289dSmrg _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' 5690d769e936Smrg else 56917322289dSmrg _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' 5692d769e936Smrg fi 56937322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5694d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5695d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56961d54945dSmrg 5697d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5698d769e936Smrg # but as the default location of the library. 5699d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57007322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5701d769e936Smrg ;; 57021d54945dSmrg 5703d769e936Smrg hpux10*) 57047322289dSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57057322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5706d769e936Smrg else 5707d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5708d769e936Smrg fi 57097322289dSmrg if test no = "$with_gnu_ld"; then 57107322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5711d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5712d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5713d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57147322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5715d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5716d769e936Smrg # but as the default location of the library. 5717d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5718d769e936Smrg fi 5719d769e936Smrg ;; 57201d54945dSmrg 5721d769e936Smrg hpux11*) 57227322289dSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5723d769e936Smrg case $host_cpu in 5724d769e936Smrg hppa*64*) 57257322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5726d769e936Smrg ;; 5727d769e936Smrg ia64*) 57287322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5729d769e936Smrg ;; 5730d769e936Smrg *) 57317322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5732d769e936Smrg ;; 5733d769e936Smrg esac 5734d769e936Smrg else 5735d769e936Smrg case $host_cpu in 5736d769e936Smrg hppa*64*) 57377322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5738d769e936Smrg ;; 5739d769e936Smrg ia64*) 57407322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5741d769e936Smrg ;; 5742d769e936Smrg *) 5743d769e936Smrg m4_if($1, [], [ 5744d769e936Smrg # Older versions of the 11.00 compiler do not understand -b yet 5745d769e936Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5746d769e936Smrg _LT_LINKER_OPTION([if $CC understands -b], 5747d769e936Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57487322289dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5749d769e936Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57507322289dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5751d769e936Smrg ;; 5752d769e936Smrg esac 5753d769e936Smrg fi 57547322289dSmrg if test no = "$with_gnu_ld"; then 57557322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5756d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57571d54945dSmrg 5758d769e936Smrg case $host_cpu in 5759d769e936Smrg hppa*64*|ia64*) 5760d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5761d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5762d769e936Smrg ;; 5763d769e936Smrg *) 5764d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5765d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57667322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57671d54945dSmrg 5768d769e936Smrg # hardcode_minus_L: Not really in the search PATH, 5769d769e936Smrg # but as the default location of the library. 5770d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5771d769e936Smrg ;; 5772d769e936Smrg esac 5773d769e936Smrg fi 5774d769e936Smrg ;; 57751d54945dSmrg 5776d769e936Smrg irix5* | irix6* | nonstopux*) 57777322289dSmrg if test yes = "$GCC"; then 57787322289dSmrg _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' 5779d769e936Smrg # Try to use the -exported_symbol ld option, if it does not 5780d769e936Smrg # work, assume that -exports_file does not work either and 5781d769e936Smrg # implicitly export all symbols. 5782d769e936Smrg # This should be the same for all languages, so no per-tag cache variable. 5783d769e936Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5784d769e936Smrg [lt_cv_irix_exported_symbol], 57857322289dSmrg [save_LDFLAGS=$LDFLAGS 57867322289dSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5787d769e936Smrg AC_LINK_IFELSE( 5788d769e936Smrg [AC_LANG_SOURCE( 5789d769e936Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5790d769e936Smrg [C++], [[int foo (void) { return 0; }]], 5791d769e936Smrg [Fortran 77], [[ 5792d769e936Smrg subroutine foo 5793d769e936Smrg end]], 5794d769e936Smrg [Fortran], [[ 5795d769e936Smrg subroutine foo 5796d769e936Smrg end]])])], 5797d769e936Smrg [lt_cv_irix_exported_symbol=yes], 5798d769e936Smrg [lt_cv_irix_exported_symbol=no]) 57997322289dSmrg LDFLAGS=$save_LDFLAGS]) 58007322289dSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 58017322289dSmrg _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' 5802d769e936Smrg fi 5803d769e936Smrg else 58047322289dSmrg _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' 58057322289dSmrg _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' 5806d769e936Smrg fi 5807d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58087322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5809d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5810d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5811d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5812d769e936Smrg ;; 58131d54945dSmrg 58147322289dSmrg linux*) 58157322289dSmrg case $cc_basename in 58167322289dSmrg tcc*) 58177322289dSmrg # Fabrice Bellard et al's Tiny C Compiler 58187322289dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 58197322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58207322289dSmrg ;; 58217322289dSmrg esac 58227322289dSmrg ;; 58237322289dSmrg 5824d769e936Smrg netbsd*) 5825d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5826d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5827d769e936Smrg else 5828d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5829d769e936Smrg fi 5830d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5831d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5832d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5833d769e936Smrg ;; 58341d54945dSmrg 5835d769e936Smrg newsos6) 5836d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5837d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58387322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5839d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5840d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5841d769e936Smrg ;; 58421d54945dSmrg 5843d769e936Smrg *nto* | *qnx*) 5844d769e936Smrg ;; 58451d54945dSmrg 58467322289dSmrg openbsd* | bitrig*) 5847d769e936Smrg if test -f /usr/libexec/ld.so; then 5848d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5849d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5850d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58517322289dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5852d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58537322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58547322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58557322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5856d769e936Smrg else 58577322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58587322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5859d769e936Smrg fi 5860d769e936Smrg else 5861d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5862d769e936Smrg fi 5863d769e936Smrg ;; 58641d54945dSmrg 5865d769e936Smrg os2*) 5866d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5867d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5868d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58697322289dSmrg shrext_cmds=.dll 58707322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58717322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58727322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58737322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58747322289dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58757322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58767322289dSmrg emximp -o $lib $output_objdir/$libname.def' 58777322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58787322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58797322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58807322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58817322289dSmrg prefix_cmds="$SED"~ 58827322289dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 58837322289dSmrg prefix_cmds="$prefix_cmds -e 1d"; 58847322289dSmrg fi~ 58857322289dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 58867322289dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 58877322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58887322289dSmrg emximp -o $lib $output_objdir/$libname.def' 58897322289dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 58907322289dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5891d769e936Smrg ;; 58921d54945dSmrg 5893d769e936Smrg osf3*) 58947322289dSmrg if test yes = "$GCC"; then 58957322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 58967322289dSmrg _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' 5897d769e936Smrg else 5898d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 58997322289dSmrg _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' 5900d769e936Smrg fi 5901d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59027322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5903d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5904d769e936Smrg ;; 59051d54945dSmrg 5906d769e936Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59077322289dSmrg if test yes = "$GCC"; then 59087322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59097322289dSmrg _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' 59107322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5911d769e936Smrg else 5912d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59137322289dSmrg _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' 5914d769e936Smrg _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~ 59157322289dSmrg $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' 59161d54945dSmrg 5917d769e936Smrg # Both c and cxx compiler support -rpath directly 5918d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5919d769e936Smrg fi 5920d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5921d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5922d769e936Smrg ;; 59231d54945dSmrg 5924d769e936Smrg solaris*) 5925d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59267322289dSmrg if test yes = "$GCC"; then 59277322289dSmrg wlarc='$wl' 59287322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5929d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59307322289dSmrg $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' 5931d769e936Smrg else 5932d769e936Smrg case `$CC -V 2>&1` in 5933d769e936Smrg *"Compilers 5.0"*) 5934d769e936Smrg wlarc='' 59357322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5936d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59377322289dSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5938d769e936Smrg ;; 5939d769e936Smrg *) 59407322289dSmrg wlarc='$wl' 59417322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_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 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5944d769e936Smrg ;; 5945d769e936Smrg esac 5946d769e936Smrg fi 5947d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5948d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5949d769e936Smrg case $host_os in 5950d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5951d769e936Smrg *) 5952d769e936Smrg # The compiler driver will combine and reorder linker options, 59537322289dSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5954d769e936Smrg # but is careful enough not to reorder. 5955d769e936Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59567322289dSmrg if test yes = "$GCC"; then 59577322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5958d769e936Smrg else 5959d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5960d769e936Smrg fi 5961d769e936Smrg ;; 5962d769e936Smrg esac 5963d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5964d769e936Smrg ;; 59651d54945dSmrg 5966d769e936Smrg sunos4*) 59677322289dSmrg if test sequent = "$host_vendor"; then 5968d769e936Smrg # Use $CC to link under sequent, because it throws in some extra .o 5969d769e936Smrg # files that make .init and .fini sections work. 59707322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5971d769e936Smrg else 5972d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5973d769e936Smrg fi 5974d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5975d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5976d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5977d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5978d769e936Smrg ;; 59791d54945dSmrg 5980d769e936Smrg sysv4) 5981d769e936Smrg case $host_vendor in 5982d769e936Smrg sni) 5983d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5984d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5985d769e936Smrg ;; 5986d769e936Smrg siemens) 5987d769e936Smrg ## LD is ld it makes a PLAMLIB 5988d769e936Smrg ## CC just makes a GrossModule. 5989d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5990d769e936Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5991d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5992d769e936Smrg ;; 5993d769e936Smrg motorola) 5994d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5995d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5996d769e936Smrg ;; 5997d769e936Smrg esac 5998d769e936Smrg runpath_var='LD_RUN_PATH' 5999d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6000d769e936Smrg ;; 60011d54945dSmrg 6002d769e936Smrg sysv4.3*) 6003d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6004d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6005d769e936Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6006d769e936Smrg ;; 60071d54945dSmrg 6008d769e936Smrg sysv4*MP*) 6009d769e936Smrg if test -d /usr/nec; then 6010d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6011d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6012d769e936Smrg runpath_var=LD_RUN_PATH 6013d769e936Smrg hardcode_runpath_var=yes 6014d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6015d769e936Smrg fi 6016d769e936Smrg ;; 60171d54945dSmrg 6018d769e936Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60197322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6020d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6021d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6022d769e936Smrg runpath_var='LD_RUN_PATH' 60231d54945dSmrg 60247322289dSmrg if test yes = "$GCC"; then 60257322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60267322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6027d769e936Smrg else 60287322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60297322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6030d769e936Smrg fi 6031d769e936Smrg ;; 60321d54945dSmrg 6033d769e936Smrg sysv5* | sco3.2v5* | sco5v6*) 60347322289dSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 6035d769e936Smrg # link with -lc, and that would cause any symbols used from libc to 6036d769e936Smrg # always be unresolved, which means just about no library would 6037d769e936Smrg # ever link correctly. If we're not using GNU ld we use -z text 6038d769e936Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6039d769e936Smrg # as -z defs. 60407322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60417322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6042d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6043d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60447322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6045d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6046d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60477322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6048d769e936Smrg runpath_var='LD_RUN_PATH' 60491d54945dSmrg 60507322289dSmrg if test yes = "$GCC"; then 60517322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60527322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6053d769e936Smrg else 60547322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60557322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6056d769e936Smrg fi 6057d769e936Smrg ;; 60581d54945dSmrg 6059d769e936Smrg uts4*) 6060d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6061d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6062d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6063d769e936Smrg ;; 60641d54945dSmrg 6065d769e936Smrg *) 6066d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6067d769e936Smrg ;; 6068d769e936Smrg esac 60691d54945dSmrg 60707322289dSmrg if test sni = "$host_vendor"; then 6071d769e936Smrg case $host in 6072d769e936Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60737322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6074d769e936Smrg ;; 6075d769e936Smrg esac 6076d769e936Smrg fi 6077d769e936Smrg fi 6078d769e936Smrg]) 6079d769e936SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 60807322289dSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60811d54945dSmrg 6082d769e936Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60831d54945dSmrg 6084d769e936Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6085d769e936Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6086d769e936Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6087d769e936Smrg [The commands to extract the exported symbol list from a shared archive]) 60881d54945dSmrg 6089d769e936Smrg# 6090d769e936Smrg# Do we need to explicitly link libc? 6091d769e936Smrg# 6092d769e936Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6093d769e936Smrgx|xyes) 6094d769e936Smrg # Assume -lc should be added 6095d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 60961d54945dSmrg 60977322289dSmrg if test yes,yes = "$GCC,$enable_shared"; then 6098d769e936Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6099d769e936Smrg *'~'*) 6100d769e936Smrg # FIXME: we may have to deal with multi-command sequences. 6101d769e936Smrg ;; 6102d769e936Smrg '$CC '*) 6103d769e936Smrg # Test whether the compiler implicitly links with -lc since on some 6104d769e936Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6105d769e936Smrg # to ld, don't add -lc before -lgcc. 6106d769e936Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6107d769e936Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6108d769e936Smrg [$RM conftest* 6109d769e936Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6110d769e936Smrg 6111d769e936Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6112d769e936Smrg soname=conftest 6113d769e936Smrg lib=conftest 6114d769e936Smrg libobjs=conftest.$ac_objext 6115d769e936Smrg deplibs= 6116d769e936Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6117d769e936Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6118d769e936Smrg compiler_flags=-v 6119d769e936Smrg linker_flags=-v 6120d769e936Smrg verstring= 6121d769e936Smrg output_objdir=. 6122d769e936Smrg libname=conftest 6123d769e936Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6124d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6125d769e936Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6126d769e936Smrg then 6127d769e936Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6128d769e936Smrg else 6129d769e936Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6130d769e936Smrg fi 6131d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6132d769e936Smrg else 6133d769e936Smrg cat conftest.err 1>&5 6134d769e936Smrg fi 6135d769e936Smrg $RM conftest* 6136d769e936Smrg ]) 6137d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6138d769e936Smrg ;; 6139d769e936Smrg esac 6140d769e936Smrg fi 6141d769e936Smrg ;; 6142d769e936Smrgesac 61431d54945dSmrg 6144d769e936Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6145d769e936Smrg [Whether or not to add -lc for building shared libraries]) 6146d769e936Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6147d769e936Smrg [enable_shared_with_static_runtimes], [0], 6148d769e936Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6149d769e936Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6150d769e936Smrg [Compiler flag to allow reflexive dlopens]) 6151d769e936Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6152d769e936Smrg [Compiler flag to generate shared objects directly from archives]) 6153d769e936Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6154d769e936Smrg [Whether the compiler copes with passing no objects directly]) 6155d769e936Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6156d769e936Smrg [Create an old-style archive from a shared archive]) 6157d769e936Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6158d769e936Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6159d769e936Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6160d769e936Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6161d769e936Smrg_LT_TAGDECL([], [module_cmds], [2], 6162d769e936Smrg [Commands used to build a loadable module if different from building 6163d769e936Smrg a shared archive.]) 6164d769e936Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6165d769e936Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6166d769e936Smrg [Whether we are building with GNU ld or not]) 6167d769e936Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6168d769e936Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6169d769e936Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6170d769e936Smrg [Flag that enforces no undefined symbols]) 6171d769e936Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6172d769e936Smrg [Flag to hardcode $libdir into a binary during linking. 6173d769e936Smrg This must work even if $libdir does not exist]) 6174d769e936Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6175d769e936Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6176d769e936Smrg_LT_TAGDECL([], [hardcode_direct], [0], 61777322289dSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6178d769e936Smrg DIR into the resulting binary]) 6179d769e936Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 61807322289dSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6181d769e936Smrg DIR into the resulting binary and the resulting library dependency is 61827322289dSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6183d769e936Smrg library is relocated]) 6184d769e936Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6185d769e936Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6186d769e936Smrg into the resulting binary]) 6187d769e936Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6188d769e936Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6189d769e936Smrg into the resulting binary]) 6190d769e936Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6191d769e936Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6192d769e936Smrg into the library and all subsequent libraries and executables linked 6193d769e936Smrg against it]) 6194d769e936Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6195d769e936Smrg [Set to yes if linker adds runtime paths of dependent libraries 6196d769e936Smrg to runtime path list]) 6197d769e936Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6198d769e936Smrg [Whether libtool must link a program against all its dependency libraries]) 6199d769e936Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6200d769e936Smrg [Set to "yes" if exported symbols are required]) 6201d769e936Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6202d769e936Smrg [The commands to list exported symbols]) 6203d769e936Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6204d769e936Smrg [Symbols that should not be listed in the preloaded symbols]) 6205d769e936Smrg_LT_TAGDECL([], [include_expsyms], [1], 6206d769e936Smrg [Symbols that must always be exported]) 6207d769e936Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6208d769e936Smrg [Commands necessary for linking programs (against libraries) with templates]) 6209d769e936Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6210d769e936Smrg [Commands necessary for finishing linking programs]) 6211d769e936Smrg_LT_TAGDECL([], [file_list_spec], [1], 6212d769e936Smrg [Specify filename containing input files]) 6213d769e936Smrgdnl FIXME: Not yet implemented 6214d769e936Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6215d769e936Smrgdnl [Compiler flag to generate thread safe objects]) 6216d769e936Smrg])# _LT_LINKER_SHLIBS 6217d769e936Smrg 6218d769e936Smrg 6219d769e936Smrg# _LT_LANG_C_CONFIG([TAG]) 6220d769e936Smrg# ------------------------ 6221d769e936Smrg# Ensure that the configuration variables for a C compiler are suitably 6222d769e936Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62237322289dSmrg# the compiler configuration to 'libtool'. 6224d769e936Smrgm4_defun([_LT_LANG_C_CONFIG], 6225d769e936Smrg[m4_require([_LT_DECL_EGREP])dnl 62267322289dSmrglt_save_CC=$CC 6227d769e936SmrgAC_LANG_PUSH(C) 62281d54945dSmrg 6229d769e936Smrg# Source file extension for C test sources. 6230d769e936Smrgac_ext=c 62311d54945dSmrg 6232d769e936Smrg# Object file extension for compiled C test sources. 6233d769e936Smrgobjext=o 6234d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 62351d54945dSmrg 6236d769e936Smrg# Code to be used in simple compile tests 6237d769e936Smrglt_simple_compile_test_code="int some_variable = 0;" 6238786a6f21Smrg 6239d769e936Smrg# Code to be used in simple link tests 6240d769e936Smrglt_simple_link_test_code='int main(){return(0);}' 6241786a6f21Smrg 6242d769e936Smrg_LT_TAG_COMPILER 6243d769e936Smrg# Save the default compiler, since it gets overwritten when the other 6244d769e936Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6245d769e936Smrgcompiler_DEFAULT=$CC 6246786a6f21Smrg 6247d769e936Smrg# save warnings/boilerplate of simple test code 6248d769e936Smrg_LT_COMPILER_BOILERPLATE 6249d769e936Smrg_LT_LINKER_BOILERPLATE 6250786a6f21Smrg 6251d769e936Smrgif test -n "$compiler"; then 6252d769e936Smrg _LT_COMPILER_NO_RTTI($1) 6253d769e936Smrg _LT_COMPILER_PIC($1) 6254d769e936Smrg _LT_COMPILER_C_O($1) 6255d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 6256d769e936Smrg _LT_LINKER_SHLIBS($1) 6257d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 6258d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6259d769e936Smrg LT_SYS_DLOPEN_SELF 6260d769e936Smrg _LT_CMD_STRIPLIB 6261d769e936Smrg 62627322289dSmrg # Report what library types will actually be built 6263d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6264d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 6265d769e936Smrg 6266d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62677322289dSmrg test no = "$can_build_shared" && enable_shared=no 6268d769e936Smrg 6269d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6270d769e936Smrg # are all built from PIC. 6271ec713c28Smrg case $host_os in 6272ec713c28Smrg aix3*) 62737322289dSmrg test yes = "$enable_shared" && enable_static=no 6274d769e936Smrg if test -n "$RANLIB"; then 6275d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6276d769e936Smrg postinstall_cmds='$RANLIB $lib' 6277d769e936Smrg fi 6278d769e936Smrg ;; 6279786a6f21Smrg 6280d769e936Smrg aix[[4-9]]*) 62817322289dSmrg if test ia64 != "$host_cpu"; then 62827322289dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 62837322289dSmrg yes,aix,yes) ;; # shared object as lib.so file only 62847322289dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 62857322289dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 62867322289dSmrg esac 6287d769e936Smrg fi 6288ec713c28Smrg ;; 6289ec713c28Smrg esac 6290d769e936Smrg AC_MSG_RESULT([$enable_shared]) 6291786a6f21Smrg 6292d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 6293d769e936Smrg # Make sure either enable_shared or enable_static is yes. 62947322289dSmrg test yes = "$enable_shared" || enable_static=yes 6295d769e936Smrg AC_MSG_RESULT([$enable_static]) 62961d54945dSmrg 6297d769e936Smrg _LT_CONFIG($1) 6298786a6f21Smrgfi 6299d769e936SmrgAC_LANG_POP 63007322289dSmrgCC=$lt_save_CC 6301d769e936Smrg])# _LT_LANG_C_CONFIG 6302786a6f21Smrg 6303786a6f21Smrg 6304d769e936Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6305d769e936Smrg# -------------------------- 6306d769e936Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6307d769e936Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63087322289dSmrg# the compiler configuration to 'libtool'. 6309d769e936Smrgm4_defun([_LT_LANG_CXX_CONFIG], 6310d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6311d769e936Smrgm4_require([_LT_DECL_EGREP])dnl 6312d769e936Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63137322289dSmrgif test -n "$CXX" && ( test no != "$CXX" && 63147322289dSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63157322289dSmrg (test g++ != "$CXX"))); then 6316d769e936Smrg AC_PROG_CXXCPP 6317d769e936Smrgelse 6318d769e936Smrg _lt_caught_CXX_error=yes 6319d769e936Smrgfi 6320786a6f21Smrg 6321d769e936SmrgAC_LANG_PUSH(C++) 6322d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6323d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6324d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6325d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6326d769e936Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6327d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6328d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6329d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6330d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6331d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6332d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6333d769e936Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6334d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6335d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6336d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 6337d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6338d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6339d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6340d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6341d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6342d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6343d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6344d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345786a6f21Smrg 6346d769e936Smrg# Source file extension for C++ test sources. 6347d769e936Smrgac_ext=cpp 63481d54945dSmrg 6349d769e936Smrg# Object file extension for compiled C++ test sources. 6350d769e936Smrgobjext=o 6351d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 6352d769e936Smrg 6353d769e936Smrg# No sense in running all these tests if we already determined that 6354d769e936Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6355d769e936Smrg# are currently assumed to apply to all compilers on this platform, 6356d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 63577322289dSmrgif test yes != "$_lt_caught_CXX_error"; then 6358d769e936Smrg # Code to be used in simple compile tests 6359d769e936Smrg lt_simple_compile_test_code="int some_variable = 0;" 6360d769e936Smrg 6361d769e936Smrg # Code to be used in simple link tests 6362d769e936Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6363d769e936Smrg 6364d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6365d769e936Smrg _LT_TAG_COMPILER 6366d769e936Smrg 6367d769e936Smrg # save warnings/boilerplate of simple test code 6368d769e936Smrg _LT_COMPILER_BOILERPLATE 6369d769e936Smrg _LT_LINKER_BOILERPLATE 6370d769e936Smrg 6371d769e936Smrg # Allow CC to be a program name with arguments. 6372d769e936Smrg lt_save_CC=$CC 6373d769e936Smrg lt_save_CFLAGS=$CFLAGS 6374d769e936Smrg lt_save_LD=$LD 6375d769e936Smrg lt_save_GCC=$GCC 6376d769e936Smrg GCC=$GXX 6377d769e936Smrg lt_save_with_gnu_ld=$with_gnu_ld 6378d769e936Smrg lt_save_path_LD=$lt_cv_path_LD 6379d769e936Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6380d769e936Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6381d769e936Smrg else 6382d769e936Smrg $as_unset lt_cv_prog_gnu_ld 6383d769e936Smrg fi 6384d769e936Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6385d769e936Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6386d769e936Smrg else 6387d769e936Smrg $as_unset lt_cv_path_LD 6388d769e936Smrg fi 6389d769e936Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6390d769e936Smrg CC=${CXX-"c++"} 6391d769e936Smrg CFLAGS=$CXXFLAGS 6392d769e936Smrg compiler=$CC 6393d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 6394d769e936Smrg _LT_CC_BASENAME([$compiler]) 6395786a6f21Smrg 6396d769e936Smrg if test -n "$compiler"; then 6397d769e936Smrg # We don't want -fno-exception when compiling C++ code, so set the 6398d769e936Smrg # no_builtin_flag separately 63997322289dSmrg if test yes = "$GXX"; then 6400d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6401d769e936Smrg else 6402d769e936Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6403d769e936Smrg fi 6404786a6f21Smrg 64057322289dSmrg if test yes = "$GXX"; then 6406d769e936Smrg # Set up default GNU C++ configuration 6407786a6f21Smrg 6408d769e936Smrg LT_PATH_LD 6409786a6f21Smrg 6410d769e936Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6411d769e936Smrg # archiving commands below assume that GNU ld is being used. 64127322289dSmrg if test yes = "$with_gnu_ld"; then 64137322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64147322289dSmrg _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' 6415786a6f21Smrg 64167322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64177322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6418786a6f21Smrg 6419d769e936Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6420d769e936Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6421d769e936Smrg # investigate it a little bit more. (MM) 64227322289dSmrg wlarc='$wl' 6423786a6f21Smrg 6424d769e936Smrg # ancient GNU ld didn't support --whole-archive et. al. 6425d769e936Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6426d769e936Smrg $GREP 'no-whole-archive' > /dev/null; then 64277322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6428d769e936Smrg else 6429d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6430d769e936Smrg fi 6431ec713c28Smrg else 6432d769e936Smrg with_gnu_ld=no 6433d769e936Smrg wlarc= 6434d769e936Smrg 6435d769e936Smrg # A generic and very simple default shared library creation 6436d769e936Smrg # command for GNU C++ for the case where it uses the native 6437d769e936Smrg # linker, instead of GNU ld. If possible, this setting should 6438d769e936Smrg # overridden to take advantage of the native linker features on 6439d769e936Smrg # the platform it is being used on. 6440d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6441ec713c28Smrg fi 6442d769e936Smrg 6443d769e936Smrg # Commands to make compiler produce verbose output that lists 6444d769e936Smrg # what "hidden" libraries, object files and flags are used when 6445d769e936Smrg # linking a shared library. 6446d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6447d769e936Smrg 6448ec713c28Smrg else 6449d769e936Smrg GXX=no 6450d769e936Smrg with_gnu_ld=no 6451d769e936Smrg wlarc= 6452ec713c28Smrg fi 64531d54945dSmrg 6454d769e936Smrg # PORTME: fill in a description of your system's C++ link characteristics 6455d769e936Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6456d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6457d769e936Smrg case $host_os in 6458d769e936Smrg aix3*) 6459d769e936Smrg # FIXME: insert proper C++ library support 6460d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6461d769e936Smrg ;; 6462d769e936Smrg aix[[4-9]]*) 64637322289dSmrg if test ia64 = "$host_cpu"; then 6464d769e936Smrg # On IA64, the linker does run time linking by default, so we don't 6465d769e936Smrg # have to do anything special. 6466d769e936Smrg aix_use_runtimelinking=no 6467d769e936Smrg exp_sym_flag='-Bexport' 64687322289dSmrg no_entry_flag= 6469d769e936Smrg else 6470d769e936Smrg aix_use_runtimelinking=no 6471d769e936Smrg 6472d769e936Smrg # Test if we are trying to use run time linking or normal 6473d769e936Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 64747322289dSmrg # have runtime linking enabled, and use it for executables. 64757322289dSmrg # For shared libraries, we enable/disable runtime linking 64767322289dSmrg # depending on the kind of the shared library created - 64777322289dSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 64787322289dSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 64797322289dSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 64807322289dSmrg # lib.a static archive 64817322289dSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 64827322289dSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 64837322289dSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 64847322289dSmrg # lib.a(lib.so.V) shared, rtl:no 64857322289dSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 64867322289dSmrg # lib.a static archive 6487d769e936Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6488d769e936Smrg for ld_flag in $LDFLAGS; do 6489d769e936Smrg case $ld_flag in 6490d769e936Smrg *-brtl*) 6491d769e936Smrg aix_use_runtimelinking=yes 6492d769e936Smrg break 6493d769e936Smrg ;; 6494d769e936Smrg esac 6495d769e936Smrg done 64967322289dSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 64977322289dSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 64987322289dSmrg # so we don't have lib.a shared libs to link our executables. 64997322289dSmrg # We have to force runtime linking in this case. 65007322289dSmrg aix_use_runtimelinking=yes 65017322289dSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65027322289dSmrg fi 6503d769e936Smrg ;; 6504d769e936Smrg esac 65051d54945dSmrg 6506d769e936Smrg exp_sym_flag='-bexport' 6507d769e936Smrg no_entry_flag='-bnoentry' 6508d769e936Smrg fi 65091d54945dSmrg 6510d769e936Smrg # When large executables or shared objects are built, AIX ld can 6511d769e936Smrg # have problems creating the table of contents. If linking a library 6512d769e936Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6513d769e936Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6514d769e936Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6515d769e936Smrg 6516d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='' 6517d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6518d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6519d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6520d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65217322289dSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65227322289dSmrg case $with_aix_soname,$aix_use_runtimelinking in 65237322289dSmrg aix,*) ;; # no import file 65247322289dSmrg svr4,* | *,yes) # use import file 65257322289dSmrg # The Import File defines what to hardcode. 65267322289dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65277322289dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65287322289dSmrg ;; 65297322289dSmrg esac 6530d769e936Smrg 65317322289dSmrg if test yes = "$GXX"; then 6532d769e936Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6533d769e936Smrg # We only want to do this on AIX 4.2 and lower, the check 6534d769e936Smrg # below for broken collect2 doesn't work under 4.3+ 65357322289dSmrg collect2name=`$CC -print-prog-name=collect2` 6536d769e936Smrg if test -f "$collect2name" && 6537d769e936Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6538d769e936Smrg then 6539d769e936Smrg # We have reworked collect2 6540d769e936Smrg : 6541d769e936Smrg else 6542d769e936Smrg # We have old collect2 6543d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6544d769e936Smrg # It fails to find uninstalled libraries when the uninstalled 6545d769e936Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6546d769e936Smrg # to unsupported forces relinking 6547d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6548d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6549d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6550d769e936Smrg fi 6551d769e936Smrg esac 6552d769e936Smrg shared_flag='-shared' 65537322289dSmrg if test yes = "$aix_use_runtimelinking"; then 65547322289dSmrg shared_flag=$shared_flag' $wl-G' 6555d769e936Smrg fi 65567322289dSmrg # Need to ensure runtime linking is disabled for the traditional 65577322289dSmrg # shared library, or the linker may eventually find shared libraries 65587322289dSmrg # /with/ Import File - we do not want to mix them. 65597322289dSmrg shared_flag_aix='-shared' 65607322289dSmrg shared_flag_svr4='-shared $wl-G' 6561d769e936Smrg else 6562d769e936Smrg # not using gcc 65637322289dSmrg if test ia64 = "$host_cpu"; then 6564d769e936Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6565d769e936Smrg # chokes on -Wl,-G. The following line is correct: 6566d769e936Smrg shared_flag='-G' 6567d769e936Smrg else 65687322289dSmrg if test yes = "$aix_use_runtimelinking"; then 65697322289dSmrg shared_flag='$wl-G' 6570d769e936Smrg else 65717322289dSmrg shared_flag='$wl-bM:SRE' 6572d769e936Smrg fi 65737322289dSmrg shared_flag_aix='$wl-bM:SRE' 65747322289dSmrg shared_flag_svr4='$wl-G' 6575d769e936Smrg fi 6576d769e936Smrg fi 65771d54945dSmrg 65787322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6579d769e936Smrg # It seems that -bexpall does not export symbols beginning with 6580d769e936Smrg # underscore (_), so it is better to generate a list of symbols to 6581d769e936Smrg # export. 6582d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 65837322289dSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6584d769e936Smrg # Warning - without using the other runtime loading flags (-brtl), 6585d769e936Smrg # -berok will link without error, but may produce a broken library. 65867322289dSmrg # The "-G" linker flag allows undefined symbols. 65877322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6588d769e936Smrg # Determine the default libpath from the value encoded in an empty 6589d769e936Smrg # executable. 6590d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 65917322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6592d769e936Smrg 65937322289dSmrg _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 6594d769e936Smrg else 65957322289dSmrg if test ia64 = "$host_cpu"; then 65967322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6597d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 65987322289dSmrg _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" 6599d769e936Smrg else 6600d769e936Smrg # Determine the default libpath from the value encoded in an 6601d769e936Smrg # empty executable. 6602d769e936Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66037322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6604d769e936Smrg # Warning - without using the other run time loading flags, 6605d769e936Smrg # -berok will link without error, but may produce a broken library. 66067322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66077322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66087322289dSmrg if test yes = "$with_gnu_ld"; then 6609d769e936Smrg # We only use this code for GNU lds that support --whole-archive. 66107322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6611d769e936Smrg else 6612d769e936Smrg # Exported symbols can be pulled into shared objects from archives 6613d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6614d769e936Smrg fi 6615d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66167322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66177322289dSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66187322289dSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66197322289dSmrg if test svr4 != "$with_aix_soname"; then 66207322289dSmrg # This is similar to how AIX traditionally builds its shared 66217322289dSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66227322289dSmrg _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' 66237322289dSmrg fi 66247322289dSmrg if test aix != "$with_aix_soname"; then 66257322289dSmrg _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' 66267322289dSmrg else 66277322289dSmrg # used by -dlpreopen to get the symbols 66287322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66297322289dSmrg fi 66307322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6631d769e936Smrg fi 6632d769e936Smrg fi 6633d769e936Smrg ;; 66341d54945dSmrg 6635d769e936Smrg beos*) 6636d769e936Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6637d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6638d769e936Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6639d769e936Smrg # support --undefined. This deserves some investigation. FIXME 66407322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6641ec713c28Smrg else 6642d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6643ec713c28Smrg fi 6644ec713c28Smrg ;; 6645d769e936Smrg 6646ec713c28Smrg chorus*) 6647d769e936Smrg case $cc_basename in 6648d769e936Smrg *) 6649d769e936Smrg # FIXME: insert proper C++ library support 6650d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6651d769e936Smrg ;; 6652d769e936Smrg esac 6653d769e936Smrg ;; 6654d769e936Smrg 6655d769e936Smrg cygwin* | mingw* | pw32* | cegcc*) 6656d769e936Smrg case $GXX,$cc_basename in 6657d769e936Smrg ,cl* | no,cl*) 6658d769e936Smrg # Native MSVC 6659d769e936Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6660d769e936Smrg # no search path for DLLs. 6661d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6662d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6663d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6664d769e936Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6665d769e936Smrg # Tell ltmain to make .lib files, not .a files. 6666d769e936Smrg libext=lib 6667d769e936Smrg # Tell ltmain to make .dll files, not .so files. 66687322289dSmrg shrext_cmds=.dll 6669d769e936Smrg # FIXME: Setting linknames here is a bad hack. 66707322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66717322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66727322289dSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 66737322289dSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66747322289dSmrg else 66757322289dSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66767322289dSmrg fi~ 66777322289dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66787322289dSmrg linknames=' 6679d769e936Smrg # The linker will not automatically build a static lib if we build a DLL. 6680d769e936Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6681d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6682d769e936Smrg # Don't use ranlib 6683d769e936Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6684d769e936Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 66857322289dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 66867322289dSmrg case $lt_outputfile in 66877322289dSmrg *.exe|*.EXE) ;; 66887322289dSmrg *) 66897322289dSmrg lt_outputfile=$lt_outputfile.exe 66907322289dSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 66917322289dSmrg ;; 66927322289dSmrg esac~ 66937322289dSmrg func_to_tool_file "$lt_outputfile"~ 66947322289dSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 66957322289dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 66967322289dSmrg $RM "$lt_outputfile.manifest"; 66977322289dSmrg fi' 6698d769e936Smrg ;; 6699d769e936Smrg *) 6700d769e936Smrg # g++ 6701d769e936Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6702d769e936Smrg # as there is no search path for DLLs. 6703d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67047322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6705d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6706d769e936Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6707d769e936Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6708d769e936Smrg 6709d769e936Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67107322289dSmrg _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' 67117322289dSmrg # If the export-symbols file already is a .def file, use it as 67127322289dSmrg # is; otherwise, prepend EXPORTS... 67137322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67147322289dSmrg cp $export_symbols $output_objdir/$soname.def; 67157322289dSmrg else 67167322289dSmrg echo EXPORTS > $output_objdir/$soname.def; 67177322289dSmrg cat $export_symbols >> $output_objdir/$soname.def; 67187322289dSmrg fi~ 67197322289dSmrg $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' 6720d769e936Smrg else 6721d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6722d769e936Smrg fi 6723ec713c28Smrg ;; 6724ec713c28Smrg esac 6725ec713c28Smrg ;; 6726d769e936Smrg darwin* | rhapsody*) 6727d769e936Smrg _LT_DARWIN_LINKER_FEATURES($1) 6728d769e936Smrg ;; 6729d769e936Smrg 67307322289dSmrg os2*) 67317322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67327322289dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67337322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67347322289dSmrg shrext_cmds=.dll 67357322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67367322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67377322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67387322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67397322289dSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67407322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67417322289dSmrg emximp -o $lib $output_objdir/$libname.def' 67427322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67437322289dSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67447322289dSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67457322289dSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67467322289dSmrg prefix_cmds="$SED"~ 67477322289dSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67487322289dSmrg prefix_cmds="$prefix_cmds -e 1d"; 67497322289dSmrg fi~ 67507322289dSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67517322289dSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67527322289dSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67537322289dSmrg emximp -o $lib $output_objdir/$libname.def' 67547322289dSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67557322289dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67567322289dSmrg ;; 67577322289dSmrg 6758ec713c28Smrg dgux*) 6759d769e936Smrg case $cc_basename in 6760d769e936Smrg ec++*) 6761d769e936Smrg # FIXME: insert proper C++ library support 6762d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6763ec713c28Smrg ;; 6764d769e936Smrg ghcx*) 6765ec713c28Smrg # Green Hills C++ Compiler 6766d769e936Smrg # FIXME: insert proper C++ library support 6767d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6768ec713c28Smrg ;; 6769d769e936Smrg *) 6770d769e936Smrg # FIXME: insert proper C++ library support 6771d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6772ec713c28Smrg ;; 6773d769e936Smrg esac 6774d769e936Smrg ;; 6775d769e936Smrg 6776d769e936Smrg freebsd2.*) 6777d769e936Smrg # C++ shared libraries reported to be fairly broken before 6778d769e936Smrg # switch to ELF 6779d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6780d769e936Smrg ;; 6781d769e936Smrg 6782d769e936Smrg freebsd-elf*) 6783d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6784d769e936Smrg ;; 6785d769e936Smrg 6786ec713c28Smrg freebsd* | dragonfly*) 6787d769e936Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6788d769e936Smrg # conventions 6789d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6790d769e936Smrg ;; 6791d769e936Smrg 6792d769e936Smrg haiku*) 67937322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6794d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6795d769e936Smrg ;; 6796d769e936Smrg 6797d769e936Smrg hpux9*) 67987322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6799d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68007322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6801d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6802d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6803d769e936Smrg # but as the default 6804d769e936Smrg # location of the library. 6805d769e936Smrg 6806d769e936Smrg case $cc_basename in 6807d769e936Smrg CC*) 6808d769e936Smrg # FIXME: insert proper C++ library support 6809d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6810d769e936Smrg ;; 6811d769e936Smrg aCC*) 68127322289dSmrg _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' 6813d769e936Smrg # Commands to make compiler produce verbose output that lists 6814d769e936Smrg # what "hidden" libraries, object files and flags are used when 6815d769e936Smrg # linking a shared library. 6816d769e936Smrg # 6817d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6818d769e936Smrg # explicitly linking system object files so we need to strip them 6819d769e936Smrg # from the output so that they don't get included in the library 6820d769e936Smrg # dependencies. 68217322289dSmrg 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"' 6822d769e936Smrg ;; 6823d769e936Smrg *) 68247322289dSmrg if test yes = "$GXX"; then 68257322289dSmrg _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' 6826d769e936Smrg else 6827d769e936Smrg # FIXME: insert proper C++ library support 6828d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6829d769e936Smrg fi 6830d769e936Smrg ;; 6831d769e936Smrg esac 6832d769e936Smrg ;; 6833d769e936Smrg 6834d769e936Smrg hpux10*|hpux11*) 68357322289dSmrg if test no = "$with_gnu_ld"; then 68367322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6837d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838d769e936Smrg 6839d769e936Smrg case $host_cpu in 6840d769e936Smrg hppa*64*|ia64*) 6841d769e936Smrg ;; 6842d769e936Smrg *) 68437322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6844d769e936Smrg ;; 6845d769e936Smrg esac 6846d769e936Smrg fi 6847d769e936Smrg case $host_cpu in 6848d769e936Smrg hppa*64*|ia64*) 6849d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6850d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6851d769e936Smrg ;; 6852d769e936Smrg *) 6853d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6854d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6855d769e936Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6856d769e936Smrg # but as the default 6857d769e936Smrg # location of the library. 6858d769e936Smrg ;; 6859d769e936Smrg esac 6860d769e936Smrg 6861d769e936Smrg case $cc_basename in 6862d769e936Smrg CC*) 6863d769e936Smrg # FIXME: insert proper C++ library support 6864d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6865ec713c28Smrg ;; 6866d769e936Smrg aCC*) 6867ec713c28Smrg case $host_cpu in 6868d769e936Smrg hppa*64*) 68697322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6870d769e936Smrg ;; 6871d769e936Smrg ia64*) 68727322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6873d769e936Smrg ;; 6874d769e936Smrg *) 68757322289dSmrg _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' 6876d769e936Smrg ;; 6877ec713c28Smrg esac 6878d769e936Smrg # Commands to make compiler produce verbose output that lists 6879d769e936Smrg # what "hidden" libraries, object files and flags are used when 6880d769e936Smrg # linking a shared library. 6881d769e936Smrg # 6882d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6883d769e936Smrg # explicitly linking system object files so we need to strip them 6884d769e936Smrg # from the output so that they don't get included in the library 6885d769e936Smrg # dependencies. 68867322289dSmrg 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"' 6887ec713c28Smrg ;; 6888d769e936Smrg *) 68897322289dSmrg if test yes = "$GXX"; then 68907322289dSmrg if test no = "$with_gnu_ld"; then 6891d769e936Smrg case $host_cpu in 6892d769e936Smrg hppa*64*) 68937322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6894d769e936Smrg ;; 6895d769e936Smrg ia64*) 68967322289dSmrg _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' 6897d769e936Smrg ;; 6898d769e936Smrg *) 68997322289dSmrg _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' 6900d769e936Smrg ;; 6901d769e936Smrg esac 6902d769e936Smrg fi 6903d769e936Smrg else 6904d769e936Smrg # FIXME: insert proper C++ library support 6905d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6906d769e936Smrg fi 6907ec713c28Smrg ;; 6908d769e936Smrg esac 6909d769e936Smrg ;; 6910d769e936Smrg 6911d769e936Smrg interix[[3-9]]*) 6912d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6913d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69147322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69157322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6916d769e936Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6917d769e936Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6918d769e936Smrg # default) and relocated if they conflict, which is a slow very memory 6919d769e936Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6920d769e936Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6921d769e936Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69227322289dSmrg _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' 69237322289dSmrg _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' 6924ec713c28Smrg ;; 6925d769e936Smrg irix5* | irix6*) 6926d769e936Smrg case $cc_basename in 6927d769e936Smrg CC*) 6928d769e936Smrg # SGI C++ 69297322289dSmrg _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' 6930d769e936Smrg 6931d769e936Smrg # Archives containing C++ object files must be created using 6932d769e936Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6933d769e936Smrg # necessary to make sure instantiated templates are included 6934d769e936Smrg # in the archive. 6935d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936ec713c28Smrg ;; 6937d769e936Smrg *) 69387322289dSmrg if test yes = "$GXX"; then 69397322289dSmrg if test no = "$with_gnu_ld"; then 69407322289dSmrg _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' 6941d769e936Smrg else 69427322289dSmrg _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' 6943d769e936Smrg fi 6944d769e936Smrg fi 6945d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6946ec713c28Smrg ;; 6947d769e936Smrg esac 69487322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6949d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950d769e936Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6951d769e936Smrg ;; 6952d769e936Smrg 69537322289dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6954d769e936Smrg case $cc_basename in 6955d769e936Smrg KCC*) 6956d769e936Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6957d769e936Smrg 6958d769e936Smrg # KCC will only create a shared library if the output file 6959d769e936Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6960d769e936Smrg # to its proper name (with version) after linking. 69617322289dSmrg _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' 69627322289dSmrg _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' 6963d769e936Smrg # Commands to make compiler produce verbose output that lists 6964d769e936Smrg # what "hidden" libraries, object files and flags are used when 6965d769e936Smrg # linking a shared library. 6966d769e936Smrg # 6967d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 6968d769e936Smrg # explicitly linking system object files so we need to strip them 6969d769e936Smrg # from the output so that they don't get included in the library 6970d769e936Smrg # dependencies. 69717322289dSmrg 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"' 6972d769e936Smrg 69737322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69747322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975d769e936Smrg 6976d769e936Smrg # Archives containing C++ object files must be created using 6977d769e936Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6978d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979ec713c28Smrg ;; 6980d769e936Smrg icpc* | ecpc* ) 6981ec713c28Smrg # Intel C++ 6982d769e936Smrg with_gnu_ld=yes 6983d769e936Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6984d769e936Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6985d769e936Smrg # earlier do not add the objects themselves. 6986d769e936Smrg case `$CC -V 2>&1` in 6987d769e936Smrg *"Version 7."*) 69887322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 69897322289dSmrg _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' 6990d769e936Smrg ;; 6991d769e936Smrg *) # Version 8.0 or newer 6992d769e936Smrg tmp_idyn= 6993d769e936Smrg case $host_cpu in 6994d769e936Smrg ia64*) tmp_idyn=' -i_dynamic';; 6995d769e936Smrg esac 69967322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 69977322289dSmrg _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' 6998d769e936Smrg ;; 6999d769e936Smrg esac 7000d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70017322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70027322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70037322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004ec713c28Smrg ;; 7005d769e936Smrg pgCC* | pgcpp*) 7006d769e936Smrg # Portland Group C++ compiler 7007d769e936Smrg case `$CC -V` in 7008d769e936Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7009d769e936Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70107322289dSmrg rm -rf $tpldir~ 70117322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70127322289dSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7013d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70147322289dSmrg rm -rf $tpldir~ 70157322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70167322289dSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70177322289dSmrg $RANLIB $oldlib' 7018d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70197322289dSmrg rm -rf $tpldir~ 70207322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70217322289dSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7022d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70237322289dSmrg rm -rf $tpldir~ 70247322289dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70257322289dSmrg $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' 7026d769e936Smrg ;; 7027d769e936Smrg *) # Version 6 and above use weak symbols 70287322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70297322289dSmrg _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' 7030d769e936Smrg ;; 7031d769e936Smrg esac 7032d769e936Smrg 70337322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70347322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70357322289dSmrg _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' 7036d769e936Smrg ;; 7037ec713c28Smrg cxx*) 7038ec713c28Smrg # Compaq C++ 70397322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70407322289dSmrg _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' 7041d769e936Smrg 7042d769e936Smrg runpath_var=LD_RUN_PATH 7043d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7044d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045d769e936Smrg 7046d769e936Smrg # Commands to make compiler produce verbose output that lists 7047d769e936Smrg # what "hidden" libraries, object files and flags are used when 7048d769e936Smrg # linking a shared library. 7049d769e936Smrg # 7050d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 7051d769e936Smrg # explicitly linking system object files so we need to strip them 7052d769e936Smrg # from the output so that they don't get included in the library 7053d769e936Smrg # dependencies. 70547322289dSmrg 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' 7055d769e936Smrg ;; 7056d769e936Smrg xl* | mpixl* | bgxl*) 7057d769e936Smrg # IBM XL 8.0 on PPC, with GNU ld 70587322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70597322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70607322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70617322289dSmrg if test yes = "$supports_anon_versioning"; then 7062d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70637322289dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70647322289dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70657322289dSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7066d769e936Smrg fi 7067ec713c28Smrg ;; 7068ec713c28Smrg *) 7069ec713c28Smrg case `$CC -V 2>&1 | sed 5q` in 7070ec713c28Smrg *Sun\ C*) 7071ec713c28Smrg # Sun C++ 5.9 7072d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 70737322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70747322289dSmrg _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' 7075d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 70767322289dSmrg _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' 7077d769e936Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7078d769e936Smrg 7079d769e936Smrg # Not sure whether something based on 7080d769e936Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7081d769e936Smrg # would be better. 7082d769e936Smrg output_verbose_link_cmd='func_echo_all' 7083d769e936Smrg 7084d769e936Smrg # Archives containing C++ object files must be created using 7085d769e936Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7086d769e936Smrg # necessary to make sure instantiated templates are included 7087d769e936Smrg # in the archive. 7088d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089ec713c28Smrg ;; 7090ec713c28Smrg esac 7091ec713c28Smrg ;; 7092ec713c28Smrg esac 7093ec713c28Smrg ;; 7094d769e936Smrg 7095ec713c28Smrg lynxos*) 7096d769e936Smrg # FIXME: insert proper C++ library support 7097d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7098ec713c28Smrg ;; 7099d769e936Smrg 7100ec713c28Smrg m88k*) 7101d769e936Smrg # FIXME: insert proper C++ library support 7102d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7103ec713c28Smrg ;; 7104d769e936Smrg 7105ec713c28Smrg mvs*) 7106d769e936Smrg case $cc_basename in 7107d769e936Smrg cxx*) 7108d769e936Smrg # FIXME: insert proper C++ library support 7109d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7110ec713c28Smrg ;; 7111ec713c28Smrg *) 7112d769e936Smrg # FIXME: insert proper C++ library support 7113d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7114ec713c28Smrg ;; 7115ec713c28Smrg esac 7116ec713c28Smrg ;; 7117d769e936Smrg 7118ec713c28Smrg netbsd*) 7119d769e936Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7120d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7121d769e936Smrg wlarc= 7122d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7123d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7124d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7125d769e936Smrg fi 7126d769e936Smrg # Workaround some broken pre-1.5 toolchains 7127d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7128d769e936Smrg ;; 7129d769e936Smrg 7130d769e936Smrg *nto* | *qnx*) 7131d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7132d769e936Smrg ;; 7133d769e936Smrg 71347322289dSmrg openbsd* | bitrig*) 7135d769e936Smrg if test -f /usr/libexec/ld.so; then 7136d769e936Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7137d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138d769e936Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7139d769e936Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71407322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71417322289dSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71427322289dSmrg _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' 71437322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71447322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7145d769e936Smrg fi 7146d769e936Smrg output_verbose_link_cmd=func_echo_all 7147d769e936Smrg else 7148d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7149d769e936Smrg fi 7150ec713c28Smrg ;; 7151d769e936Smrg 7152ec713c28Smrg osf3* | osf4* | osf5*) 7153d769e936Smrg case $cc_basename in 7154d769e936Smrg KCC*) 7155d769e936Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7156d769e936Smrg 7157d769e936Smrg # KCC will only create a shared library if the output file 7158d769e936Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7159d769e936Smrg # to its proper name (with version) after linking. 71607322289dSmrg _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' 7161d769e936Smrg 71627322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7163d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7164d769e936Smrg 7165d769e936Smrg # Archives containing C++ object files must be created using 7166d769e936Smrg # the KAI C++ compiler. 7167d769e936Smrg case $host in 7168d769e936Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7169d769e936Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7170d769e936Smrg esac 7171ec713c28Smrg ;; 7172d769e936Smrg RCC*) 7173ec713c28Smrg # Rational C++ 2.4.1 7174d769e936Smrg # FIXME: insert proper C++ library support 7175d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7176ec713c28Smrg ;; 7177d769e936Smrg cxx*) 7178d769e936Smrg case $host in 7179d769e936Smrg osf3*) 71807322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71817322289dSmrg _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' 71827322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7183d769e936Smrg ;; 7184d769e936Smrg *) 7185d769e936Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 71867322289dSmrg _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' 7187d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 71887322289dSmrg echo "-hidden">> $lib.exp~ 71897322289dSmrg $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~ 71907322289dSmrg $RM $lib.exp' 7191d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7192d769e936Smrg ;; 7193d769e936Smrg esac 7194d769e936Smrg 7195d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7196d769e936Smrg 7197d769e936Smrg # Commands to make compiler produce verbose output that lists 7198d769e936Smrg # what "hidden" libraries, object files and flags are used when 7199d769e936Smrg # linking a shared library. 7200d769e936Smrg # 7201d769e936Smrg # There doesn't appear to be a way to prevent this compiler from 7202d769e936Smrg # explicitly linking system object files so we need to strip them 7203d769e936Smrg # from the output so that they don't get included in the library 7204d769e936Smrg # dependencies. 72057322289dSmrg 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"' 7206ec713c28Smrg ;; 7207ec713c28Smrg *) 72087322289dSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 72097322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7210d769e936Smrg case $host in 7211d769e936Smrg osf3*) 72127322289dSmrg _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' 7213d769e936Smrg ;; 7214d769e936Smrg *) 72157322289dSmrg _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' 7216d769e936Smrg ;; 7217d769e936Smrg esac 7218d769e936Smrg 72197322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7221d769e936Smrg 7222d769e936Smrg # Commands to make compiler produce verbose output that lists 7223d769e936Smrg # what "hidden" libraries, object files and flags are used when 7224d769e936Smrg # linking a shared library. 7225d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226d769e936Smrg 7227d769e936Smrg else 7228d769e936Smrg # FIXME: insert proper C++ library support 7229d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7230d769e936Smrg fi 7231ec713c28Smrg ;; 7232d769e936Smrg esac 7233d769e936Smrg ;; 7234d769e936Smrg 7235ec713c28Smrg psos*) 7236d769e936Smrg # FIXME: insert proper C++ library support 7237d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7238d769e936Smrg ;; 7239d769e936Smrg 7240ec713c28Smrg sunos4*) 7241d769e936Smrg case $cc_basename in 7242d769e936Smrg CC*) 7243ec713c28Smrg # Sun C++ 4.x 7244d769e936Smrg # FIXME: insert proper C++ library support 7245d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7246ec713c28Smrg ;; 7247d769e936Smrg lcc*) 7248ec713c28Smrg # Lucid 7249d769e936Smrg # FIXME: insert proper C++ library support 7250d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7251ec713c28Smrg ;; 7252d769e936Smrg *) 7253d769e936Smrg # FIXME: insert proper C++ library support 7254d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7255ec713c28Smrg ;; 7256d769e936Smrg esac 7257d769e936Smrg ;; 72581d54945dSmrg 7259d769e936Smrg solaris*) 7260d769e936Smrg case $cc_basename in 7261d769e936Smrg CC* | sunCC*) 7262d769e936Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7263d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7264d769e936Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72657322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7266d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72677322289dSmrg $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' 7268d769e936Smrg 7269d769e936Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7270d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7271d769e936Smrg case $host_os in 7272d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7273d769e936Smrg *) 7274d769e936Smrg # The compiler driver will combine and reorder linker options, 72757322289dSmrg # but understands '-z linker_flag'. 7276d769e936Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7277d769e936Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7278d769e936Smrg ;; 7279d769e936Smrg esac 7280d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72811d54945dSmrg 7282d769e936Smrg output_verbose_link_cmd='func_echo_all' 72831d54945dSmrg 7284d769e936Smrg # Archives containing C++ object files must be created using 7285d769e936Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7286d769e936Smrg # necessary to make sure instantiated templates are included 7287d769e936Smrg # in the archive. 7288d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7289d769e936Smrg ;; 7290d769e936Smrg gcx*) 7291d769e936Smrg # Green Hills C++ Compiler 72927322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72931d54945dSmrg 7294d769e936Smrg # The C++ compiler must be used to create the archive. 7295d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7296d769e936Smrg ;; 7297d769e936Smrg *) 7298d769e936Smrg # GNU C++ compiler with Solaris linker 72997322289dSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 73007322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7301d769e936Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73027322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7303d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73047322289dSmrg $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' 7305d769e936Smrg 7306d769e936Smrg # Commands to make compiler produce verbose output that lists 7307d769e936Smrg # what "hidden" libraries, object files and flags are used when 7308d769e936Smrg # linking a shared library. 7309d769e936Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7310d769e936Smrg else 73117322289dSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7312d769e936Smrg # platform. 73137322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7314d769e936Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73157322289dSmrg $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' 7316d769e936Smrg 7317d769e936Smrg # Commands to make compiler produce verbose output that lists 7318d769e936Smrg # what "hidden" libraries, object files and flags are used when 7319d769e936Smrg # linking a shared library. 7320d769e936Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7321d769e936Smrg fi 7322d769e936Smrg 73237322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7324d769e936Smrg case $host_os in 7325d769e936Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7326d769e936Smrg *) 73277322289dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7328d769e936Smrg ;; 7329d769e936Smrg esac 7330d769e936Smrg fi 7331d769e936Smrg ;; 7332d769e936Smrg esac 7333d769e936Smrg ;; 73341d54945dSmrg 7335d769e936Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73367322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7337d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7338d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339d769e936Smrg runpath_var='LD_RUN_PATH' 73401d54945dSmrg 7341ec713c28Smrg case $cc_basename in 7342d769e936Smrg CC*) 73437322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73447322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345ec713c28Smrg ;; 7346d769e936Smrg *) 73477322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73487322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349ec713c28Smrg ;; 7350ec713c28Smrg esac 7351ec713c28Smrg ;; 73521d54945dSmrg 7353d769e936Smrg sysv5* | sco3.2v5* | sco5v6*) 73547322289dSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 7355d769e936Smrg # link with -lc, and that would cause any symbols used from libc to 7356d769e936Smrg # always be unresolved, which means just about no library would 7357d769e936Smrg # ever link correctly. If we're not using GNU ld we use -z text 7358d769e936Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7359d769e936Smrg # as -z defs. 73607322289dSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73617322289dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7362d769e936Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7363d769e936Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73647322289dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7365d769e936Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7366d769e936Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73677322289dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7368d769e936Smrg runpath_var='LD_RUN_PATH' 73691d54945dSmrg 7370d769e936Smrg case $cc_basename in 7371d769e936Smrg CC*) 73727322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73737322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374d769e936Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73757322289dSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7376d769e936Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73777322289dSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7378d769e936Smrg ;; 7379d769e936Smrg *) 73807322289dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73817322289dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382d769e936Smrg ;; 7383d769e936Smrg esac 7384ec713c28Smrg ;; 7385ba85709eSmrg 7386d769e936Smrg tandem*) 7387d769e936Smrg case $cc_basename in 7388d769e936Smrg NCC*) 7389d769e936Smrg # NonStop-UX NCC 3.20 7390d769e936Smrg # FIXME: insert proper C++ library support 7391d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7392d769e936Smrg ;; 7393d769e936Smrg *) 7394d769e936Smrg # FIXME: insert proper C++ library support 7395d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7396d769e936Smrg ;; 7397d769e936Smrg esac 7398d769e936Smrg ;; 73991d54945dSmrg 7400d769e936Smrg vxworks*) 7401d769e936Smrg # FIXME: insert proper C++ library support 7402d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7403d769e936Smrg ;; 74041d54945dSmrg 7405d769e936Smrg *) 7406d769e936Smrg # FIXME: insert proper C++ library support 7407d769e936Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7408d769e936Smrg ;; 7409d769e936Smrg esac 74101d54945dSmrg 7411d769e936Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74127322289dSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413d769e936Smrg 74147322289dSmrg _LT_TAGVAR(GCC, $1)=$GXX 74157322289dSmrg _LT_TAGVAR(LD, $1)=$LD 7416d769e936Smrg 7417d769e936Smrg ## CAVEAT EMPTOR: 7418d769e936Smrg ## There is no encapsulation within the following macros, do not change 7419d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7420d769e936Smrg ## what you are doing... 7421d769e936Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7422d769e936Smrg _LT_COMPILER_PIC($1) 7423d769e936Smrg _LT_COMPILER_C_O($1) 7424d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7425d769e936Smrg _LT_LINKER_SHLIBS($1) 7426d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7427d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7428d769e936Smrg 7429d769e936Smrg _LT_CONFIG($1) 7430d769e936Smrg fi # test -n "$compiler" 7431d769e936Smrg 7432d769e936Smrg CC=$lt_save_CC 7433d769e936Smrg CFLAGS=$lt_save_CFLAGS 7434d769e936Smrg LDCXX=$LD 7435d769e936Smrg LD=$lt_save_LD 7436d769e936Smrg GCC=$lt_save_GCC 7437d769e936Smrg with_gnu_ld=$lt_save_with_gnu_ld 7438d769e936Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7439d769e936Smrg lt_cv_path_LD=$lt_save_path_LD 7440d769e936Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7441d769e936Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74427322289dSmrgfi # test yes != "$_lt_caught_CXX_error" 74431d54945dSmrg 7444d769e936SmrgAC_LANG_POP 7445d769e936Smrg])# _LT_LANG_CXX_CONFIG 74461d54945dSmrg 74471d54945dSmrg 7448d769e936Smrg# _LT_FUNC_STRIPNAME_CNF 7449d769e936Smrg# ---------------------- 7450d769e936Smrg# func_stripname_cnf prefix suffix name 7451d769e936Smrg# strip PREFIX and SUFFIX off of NAME. 7452d769e936Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7453d769e936Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7454d769e936Smrg# dot (in which case that matches only a dot). 7455d769e936Smrg# 7456d769e936Smrg# This function is identical to the (non-XSI) version of func_stripname, 7457d769e936Smrg# except this one can be used by m4 code that may be executed by configure, 7458d769e936Smrg# rather than the libtool script. 7459d769e936Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7460d769e936SmrgAC_REQUIRE([_LT_DECL_SED]) 7461d769e936SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7462d769e936Smrgfunc_stripname_cnf () 7463d769e936Smrg{ 74647322289dSmrg case @S|@2 in 74657322289dSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74667322289dSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7467d769e936Smrg esac 7468d769e936Smrg} # func_stripname_cnf 7469d769e936Smrg])# _LT_FUNC_STRIPNAME_CNF 74701d54945dSmrg 74717322289dSmrg 7472d769e936Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7473d769e936Smrg# --------------------------------- 7474d769e936Smrg# Figure out "hidden" library dependencies from verbose 7475d769e936Smrg# compiler output when linking a shared library. 7476d769e936Smrg# Parse the compiler output and extract the necessary 7477d769e936Smrg# objects, libraries and library flags. 7478d769e936Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7479d769e936Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7480d769e936SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7481d769e936Smrg# Dependencies to place before and after the object being linked: 7482d769e936Smrg_LT_TAGVAR(predep_objects, $1)= 7483d769e936Smrg_LT_TAGVAR(postdep_objects, $1)= 7484d769e936Smrg_LT_TAGVAR(predeps, $1)= 7485d769e936Smrg_LT_TAGVAR(postdeps, $1)= 7486d769e936Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7487d769e936Smrg 7488d769e936Smrgdnl we can't use the lt_simple_compile_test_code here, 7489d769e936Smrgdnl because it contains code intended for an executable, 7490d769e936Smrgdnl not a library. It's possible we should let each 7491d769e936Smrgdnl tag define a new lt_????_link_test_code variable, 7492d769e936Smrgdnl but it's only used here... 7493d769e936Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7494d769e936Smrgint a; 7495d769e936Smrgvoid foo (void) { a = 0; } 7496d769e936Smrg_LT_EOF 7497d769e936Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7498d769e936Smrgclass Foo 7499d769e936Smrg{ 7500d769e936Smrgpublic: 7501d769e936Smrg Foo (void) { a = 0; } 7502d769e936Smrgprivate: 7503d769e936Smrg int a; 7504d769e936Smrg}; 7505d769e936Smrg_LT_EOF 7506d769e936Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7507d769e936Smrg subroutine foo 7508d769e936Smrg implicit none 7509d769e936Smrg integer*4 a 7510d769e936Smrg a=0 7511d769e936Smrg return 7512d769e936Smrg end 7513d769e936Smrg_LT_EOF 7514d769e936Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7515d769e936Smrg subroutine foo 7516d769e936Smrg implicit none 7517d769e936Smrg integer a 7518d769e936Smrg a=0 7519d769e936Smrg return 7520d769e936Smrg end 7521d769e936Smrg_LT_EOF 7522d769e936Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7523d769e936Smrgpublic class foo { 7524d769e936Smrg private int a; 7525d769e936Smrg public void bar (void) { 7526d769e936Smrg a = 0; 7527d769e936Smrg } 7528d769e936Smrg}; 7529d769e936Smrg_LT_EOF 7530d769e936Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7531d769e936Smrgpackage foo 7532d769e936Smrgfunc foo() { 7533d769e936Smrg} 7534d769e936Smrg_LT_EOF 75351d54945dSmrg]) 75361d54945dSmrg 7537d769e936Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7538d769e936Smrgcase "$CC $CFLAGS " in #( 7539d769e936Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7540d769e936Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7541d769e936Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75421d54945dSmrgesac 75431d54945dSmrg 7544d769e936Smrgdnl Parse the compiler output and extract the necessary 7545d769e936Smrgdnl objects, libraries and library flags. 7546d769e936Smrgif AC_TRY_EVAL(ac_compile); then 7547d769e936Smrg # Parse the compiler output and extract the necessary 7548d769e936Smrg # objects, libraries and library flags. 7549786a6f21Smrg 7550d769e936Smrg # Sentinel used to keep track of whether or not we are before 7551d769e936Smrg # the conftest object file. 7552d769e936Smrg pre_test_object_deps_done=no 7553786a6f21Smrg 7554d769e936Smrg for p in `eval "$output_verbose_link_cmd"`; do 75557322289dSmrg case $prev$p in 75561d54945dSmrg 7557d769e936Smrg -L* | -R* | -l*) 7558d769e936Smrg # Some compilers place space between "-{L,R}" and the path. 7559d769e936Smrg # Remove the space. 75607322289dSmrg if test x-L = "$p" || 75617322289dSmrg test x-R = "$p"; then 7562d769e936Smrg prev=$p 7563d769e936Smrg continue 7564d769e936Smrg fi 75651d54945dSmrg 7566d769e936Smrg # Expand the sysroot to ease extracting the directories later. 7567d769e936Smrg if test -z "$prev"; then 7568d769e936Smrg case $p in 7569d769e936Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7570d769e936Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7571d769e936Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7572d769e936Smrg esac 7573d769e936Smrg fi 7574d769e936Smrg case $p in 7575d769e936Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7576d769e936Smrg esac 75777322289dSmrg if test no = "$pre_test_object_deps_done"; then 75787322289dSmrg case $prev in 7579d769e936Smrg -L | -R) 7580d769e936Smrg # Internal compiler library paths should come after those 7581d769e936Smrg # provided the user. The postdeps already come after the 7582d769e936Smrg # user supplied libs so there is no need to process them. 7583d769e936Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 75847322289dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7585d769e936Smrg else 75867322289dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7587d769e936Smrg fi 7588d769e936Smrg ;; 7589d769e936Smrg # The "-l" case would never come before the object being 7590d769e936Smrg # linked, so don't bother handling this case. 7591d769e936Smrg esac 7592d769e936Smrg else 7593d769e936Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 75947322289dSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 7595d769e936Smrg else 75967322289dSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7597d769e936Smrg fi 7598d769e936Smrg fi 7599d769e936Smrg prev= 7600d769e936Smrg ;; 76011d54945dSmrg 7602d769e936Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7603d769e936Smrg *.$objext) 7604d769e936Smrg # This assumes that the test object file only shows up 7605d769e936Smrg # once in the compiler output. 7606d769e936Smrg if test "$p" = "conftest.$objext"; then 7607d769e936Smrg pre_test_object_deps_done=yes 7608d769e936Smrg continue 7609d769e936Smrg fi 76101d54945dSmrg 76117322289dSmrg if test no = "$pre_test_object_deps_done"; then 7612d769e936Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76137322289dSmrg _LT_TAGVAR(predep_objects, $1)=$p 7614d769e936Smrg else 7615d769e936Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7616d769e936Smrg fi 7617d769e936Smrg else 7618d769e936Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76197322289dSmrg _LT_TAGVAR(postdep_objects, $1)=$p 7620d769e936Smrg else 7621d769e936Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7622d769e936Smrg fi 7623d769e936Smrg fi 7624d769e936Smrg ;; 76251d54945dSmrg 7626d769e936Smrg *) ;; # Ignore the rest. 76271d54945dSmrg 7628d769e936Smrg esac 7629d769e936Smrg done 76301d54945dSmrg 7631d769e936Smrg # Clean up. 7632d769e936Smrg rm -f a.out a.exe 7633d769e936Smrgelse 7634d769e936Smrg echo "libtool.m4: error: problem compiling $1 test program" 7635d769e936Smrgfi 76361d54945dSmrg 7637d769e936Smrg$RM -f confest.$objext 7638d769e936SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76391d54945dSmrg 7640d769e936Smrg# PORTME: override above test on systems where it is broken 7641d769e936Smrgm4_if([$1], [CXX], 7642d769e936Smrg[case $host_os in 7643d769e936Smrginterix[[3-9]]*) 7644d769e936Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7645d769e936Smrg # hack all around it, let's just trust "g++" to DTRT. 7646d769e936Smrg _LT_TAGVAR(predep_objects,$1)= 7647d769e936Smrg _LT_TAGVAR(postdep_objects,$1)= 7648d769e936Smrg _LT_TAGVAR(postdeps,$1)= 7649d769e936Smrg ;; 7650d769e936Smrgesac 7651d769e936Smrg]) 76521d54945dSmrg 7653d769e936Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7654d769e936Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7655d769e936Smrgesac 7656d769e936Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7657d769e936Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76587322289dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7659d769e936Smrgfi 7660d769e936Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7661d769e936Smrg [The directories searched by this compiler when creating a shared library]) 7662d769e936Smrg_LT_TAGDECL([], [predep_objects], [1], 7663d769e936Smrg [Dependencies to place before and after the objects being linked to 7664d769e936Smrg create a shared library]) 7665d769e936Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7666d769e936Smrg_LT_TAGDECL([], [predeps], [1]) 7667d769e936Smrg_LT_TAGDECL([], [postdeps], [1]) 7668d769e936Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7669d769e936Smrg [The library search path used internally by the compiler when linking 7670d769e936Smrg a shared library]) 7671d769e936Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7672d769e936Smrg 7673d769e936Smrg 7674d769e936Smrg# _LT_LANG_F77_CONFIG([TAG]) 7675d769e936Smrg# -------------------------- 7676d769e936Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7677d769e936Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 76787322289dSmrg# to write the compiler configuration to 'libtool'. 7679d769e936Smrgm4_defun([_LT_LANG_F77_CONFIG], 7680d769e936Smrg[AC_LANG_PUSH(Fortran 77) 76817322289dSmrgif test -z "$F77" || test no = "$F77"; then 7682d769e936Smrg _lt_disable_F77=yes 7683d769e936Smrgfi 76841d54945dSmrg 7685d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7686d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7687d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7688d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7689d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7690d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7691d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7692d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7693d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7694d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7695d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7696d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7697d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 7698d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7699d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7700d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7701d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7702d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7703d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7704d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7705d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77061d54945dSmrg 7707d769e936Smrg# Source file extension for f77 test sources. 7708d769e936Smrgac_ext=f 77091d54945dSmrg 7710d769e936Smrg# Object file extension for compiled f77 test sources. 7711d769e936Smrgobjext=o 7712d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 7713d769e936Smrg 7714d769e936Smrg# No sense in running all these tests if we already determined that 7715d769e936Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7716d769e936Smrg# are currently assumed to apply to all compilers on this platform, 7717d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 77187322289dSmrgif test yes != "$_lt_disable_F77"; then 7719d769e936Smrg # Code to be used in simple compile tests 7720d769e936Smrg lt_simple_compile_test_code="\ 7721d769e936Smrg subroutine t 7722d769e936Smrg return 7723d769e936Smrg end 7724d769e936Smrg" 77251d54945dSmrg 7726d769e936Smrg # Code to be used in simple link tests 7727d769e936Smrg lt_simple_link_test_code="\ 7728d769e936Smrg program t 7729d769e936Smrg end 7730d769e936Smrg" 77311d54945dSmrg 7732d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7733d769e936Smrg _LT_TAG_COMPILER 7734d769e936Smrg 7735d769e936Smrg # save warnings/boilerplate of simple test code 7736d769e936Smrg _LT_COMPILER_BOILERPLATE 7737d769e936Smrg _LT_LINKER_BOILERPLATE 7738d769e936Smrg 7739d769e936Smrg # Allow CC to be a program name with arguments. 77407322289dSmrg lt_save_CC=$CC 7741d769e936Smrg lt_save_GCC=$GCC 7742d769e936Smrg lt_save_CFLAGS=$CFLAGS 7743d769e936Smrg CC=${F77-"f77"} 7744d769e936Smrg CFLAGS=$FFLAGS 7745d769e936Smrg compiler=$CC 7746d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 7747d769e936Smrg _LT_CC_BASENAME([$compiler]) 7748d769e936Smrg GCC=$G77 7749d769e936Smrg if test -n "$compiler"; then 7750d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7751d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 77521d54945dSmrg 7753d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77547322289dSmrg test no = "$can_build_shared" && enable_shared=no 77551d54945dSmrg 7756d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7757d769e936Smrg # are all built from PIC. 7758ec713c28Smrg case $host_os in 7759d769e936Smrg aix3*) 77607322289dSmrg test yes = "$enable_shared" && enable_static=no 7761d769e936Smrg if test -n "$RANLIB"; then 7762d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7763d769e936Smrg postinstall_cmds='$RANLIB $lib' 7764d769e936Smrg fi 7765d769e936Smrg ;; 7766d769e936Smrg aix[[4-9]]*) 77677322289dSmrg if test ia64 != "$host_cpu"; then 77687322289dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77697322289dSmrg yes,aix,yes) ;; # shared object as lib.so file only 77707322289dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 77717322289dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77727322289dSmrg esac 7773ec713c28Smrg fi 7774d769e936Smrg ;; 7775d769e936Smrg esac 7776d769e936Smrg AC_MSG_RESULT([$enable_shared]) 7777d769e936Smrg 7778d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 7779d769e936Smrg # Make sure either enable_shared or enable_static is yes. 77807322289dSmrg test yes = "$enable_shared" || enable_static=yes 7781d769e936Smrg AC_MSG_RESULT([$enable_static]) 7782d769e936Smrg 77837322289dSmrg _LT_TAGVAR(GCC, $1)=$G77 77847322289dSmrg _LT_TAGVAR(LD, $1)=$LD 7785d769e936Smrg 7786d769e936Smrg ## CAVEAT EMPTOR: 7787d769e936Smrg ## There is no encapsulation within the following macros, do not change 7788d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7789d769e936Smrg ## what you are doing... 7790d769e936Smrg _LT_COMPILER_PIC($1) 7791d769e936Smrg _LT_COMPILER_C_O($1) 7792d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7793d769e936Smrg _LT_LINKER_SHLIBS($1) 7794d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7795d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7796d769e936Smrg 7797d769e936Smrg _LT_CONFIG($1) 7798d769e936Smrg fi # test -n "$compiler" 7799d769e936Smrg 7800d769e936Smrg GCC=$lt_save_GCC 78017322289dSmrg CC=$lt_save_CC 78027322289dSmrg CFLAGS=$lt_save_CFLAGS 78037322289dSmrgfi # test yes != "$_lt_disable_F77" 78041d54945dSmrg 7805d769e936SmrgAC_LANG_POP 7806d769e936Smrg])# _LT_LANG_F77_CONFIG 78071d54945dSmrg 7808786a6f21Smrg 7809d769e936Smrg# _LT_LANG_FC_CONFIG([TAG]) 7810d769e936Smrg# ------------------------- 7811d769e936Smrg# Ensure that the configuration variables for a Fortran compiler are 7812d769e936Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78137322289dSmrg# to write the compiler configuration to 'libtool'. 7814d769e936Smrgm4_defun([_LT_LANG_FC_CONFIG], 7815d769e936Smrg[AC_LANG_PUSH(Fortran) 7816d769e936Smrg 78177322289dSmrgif test -z "$FC" || test no = "$FC"; then 7818d769e936Smrg _lt_disable_FC=yes 7819d769e936Smrgfi 7820786a6f21Smrg 7821d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7822d769e936Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7823d769e936Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7824d769e936Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7825d769e936Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7826d769e936Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7827d769e936Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7828d769e936Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7829d769e936Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7830d769e936Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7831d769e936Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7832d769e936Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7833d769e936Smrg_LT_TAGVAR(module_cmds, $1)= 7834d769e936Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7835d769e936Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7836d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7837d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7838d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7839d769e936Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7840d769e936Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7841d769e936Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7842d769e936Smrg 7843d769e936Smrg# Source file extension for fc test sources. 7844d769e936Smrgac_ext=${ac_fc_srcext-f} 7845d769e936Smrg 7846d769e936Smrg# Object file extension for compiled fc test sources. 7847d769e936Smrgobjext=o 7848d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 7849d769e936Smrg 7850d769e936Smrg# No sense in running all these tests if we already determined that 7851d769e936Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7852d769e936Smrg# are currently assumed to apply to all compilers on this platform, 7853d769e936Smrg# and will be corrupted by setting them based on a non-working compiler. 78547322289dSmrgif test yes != "$_lt_disable_FC"; then 7855d769e936Smrg # Code to be used in simple compile tests 7856d769e936Smrg lt_simple_compile_test_code="\ 7857d769e936Smrg subroutine t 7858d769e936Smrg return 7859d769e936Smrg end 7860d769e936Smrg" 7861786a6f21Smrg 7862d769e936Smrg # Code to be used in simple link tests 7863d769e936Smrg lt_simple_link_test_code="\ 7864d769e936Smrg program t 7865d769e936Smrg end 7866d769e936Smrg" 7867786a6f21Smrg 7868d769e936Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7869d769e936Smrg _LT_TAG_COMPILER 7870d769e936Smrg 7871d769e936Smrg # save warnings/boilerplate of simple test code 7872d769e936Smrg _LT_COMPILER_BOILERPLATE 7873d769e936Smrg _LT_LINKER_BOILERPLATE 7874d769e936Smrg 7875d769e936Smrg # Allow CC to be a program name with arguments. 78767322289dSmrg lt_save_CC=$CC 7877d769e936Smrg lt_save_GCC=$GCC 7878d769e936Smrg lt_save_CFLAGS=$CFLAGS 7879d769e936Smrg CC=${FC-"f95"} 7880d769e936Smrg CFLAGS=$FCFLAGS 7881d769e936Smrg compiler=$CC 7882d769e936Smrg GCC=$ac_cv_fc_compiler_gnu 7883d769e936Smrg 7884d769e936Smrg _LT_TAGVAR(compiler, $1)=$CC 7885d769e936Smrg _LT_CC_BASENAME([$compiler]) 7886d769e936Smrg 7887d769e936Smrg if test -n "$compiler"; then 7888d769e936Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7889d769e936Smrg AC_MSG_RESULT([$can_build_shared]) 7890d769e936Smrg 7891d769e936Smrg AC_MSG_CHECKING([whether to build shared libraries]) 78927322289dSmrg test no = "$can_build_shared" && enable_shared=no 7893d769e936Smrg 7894d769e936Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7895d769e936Smrg # are all built from PIC. 7896d769e936Smrg case $host_os in 7897d769e936Smrg aix3*) 78987322289dSmrg test yes = "$enable_shared" && enable_static=no 7899d769e936Smrg if test -n "$RANLIB"; then 7900d769e936Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901d769e936Smrg postinstall_cmds='$RANLIB $lib' 7902d769e936Smrg fi 7903d769e936Smrg ;; 7904d769e936Smrg aix[[4-9]]*) 79057322289dSmrg if test ia64 != "$host_cpu"; then 79067322289dSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79077322289dSmrg yes,aix,yes) ;; # shared object as lib.so file only 79087322289dSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 79097322289dSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79107322289dSmrg esac 7911ec713c28Smrg fi 7912d769e936Smrg ;; 7913d769e936Smrg esac 7914d769e936Smrg AC_MSG_RESULT([$enable_shared]) 7915d769e936Smrg 7916d769e936Smrg AC_MSG_CHECKING([whether to build static libraries]) 7917d769e936Smrg # Make sure either enable_shared or enable_static is yes. 79187322289dSmrg test yes = "$enable_shared" || enable_static=yes 7919d769e936Smrg AC_MSG_RESULT([$enable_static]) 7920d769e936Smrg 79217322289dSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79227322289dSmrg _LT_TAGVAR(LD, $1)=$LD 7923d769e936Smrg 7924d769e936Smrg ## CAVEAT EMPTOR: 7925d769e936Smrg ## There is no encapsulation within the following macros, do not change 7926d769e936Smrg ## the running order or otherwise move them around unless you know exactly 7927d769e936Smrg ## what you are doing... 7928d769e936Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7929d769e936Smrg _LT_COMPILER_PIC($1) 7930d769e936Smrg _LT_COMPILER_C_O($1) 7931d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 7932d769e936Smrg _LT_LINKER_SHLIBS($1) 7933d769e936Smrg _LT_SYS_DYNAMIC_LINKER($1) 7934d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7935d769e936Smrg 7936d769e936Smrg _LT_CONFIG($1) 7937d769e936Smrg fi # test -n "$compiler" 7938d769e936Smrg 7939d769e936Smrg GCC=$lt_save_GCC 7940d769e936Smrg CC=$lt_save_CC 7941d769e936Smrg CFLAGS=$lt_save_CFLAGS 79427322289dSmrgfi # test yes != "$_lt_disable_FC" 79431d54945dSmrg 7944d769e936SmrgAC_LANG_POP 7945d769e936Smrg])# _LT_LANG_FC_CONFIG 79461d54945dSmrg 79471d54945dSmrg 7948d769e936Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7949d769e936Smrg# -------------------------- 7950d769e936Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7951d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79527322289dSmrg# to write the compiler configuration to 'libtool'. 7953d769e936Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7954d769e936Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7955d769e936SmrgAC_LANG_SAVE 79561d54945dSmrg 7957d769e936Smrg# Source file extension for Java test sources. 7958d769e936Smrgac_ext=java 79591d54945dSmrg 7960d769e936Smrg# Object file extension for compiled Java test sources. 7961d769e936Smrgobjext=o 7962d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 79631d54945dSmrg 7964d769e936Smrg# Code to be used in simple compile tests 7965d769e936Smrglt_simple_compile_test_code="class foo {}" 79661d54945dSmrg 7967d769e936Smrg# Code to be used in simple link tests 7968d769e936Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7969d769e936Smrg 7970d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7971d769e936Smrg_LT_TAG_COMPILER 7972d769e936Smrg 7973d769e936Smrg# save warnings/boilerplate of simple test code 7974d769e936Smrg_LT_COMPILER_BOILERPLATE 7975d769e936Smrg_LT_LINKER_BOILERPLATE 7976d769e936Smrg 7977d769e936Smrg# Allow CC to be a program name with arguments. 7978d769e936Smrglt_save_CC=$CC 7979d769e936Smrglt_save_CFLAGS=$CFLAGS 7980d769e936Smrglt_save_GCC=$GCC 7981d769e936SmrgGCC=yes 7982d769e936SmrgCC=${GCJ-"gcj"} 7983d769e936SmrgCFLAGS=$GCJFLAGS 7984d769e936Smrgcompiler=$CC 7985d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 79867322289dSmrg_LT_TAGVAR(LD, $1)=$LD 7987d769e936Smrg_LT_CC_BASENAME([$compiler]) 79881d54945dSmrg 7989d769e936Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7990d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79911d54945dSmrg 7992d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7993d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7994d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79951d54945dSmrg 7996d769e936Smrgif test -n "$compiler"; then 7997d769e936Smrg _LT_COMPILER_NO_RTTI($1) 7998d769e936Smrg _LT_COMPILER_PIC($1) 7999d769e936Smrg _LT_COMPILER_C_O($1) 8000d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 8001d769e936Smrg _LT_LINKER_SHLIBS($1) 8002d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80031d54945dSmrg 8004d769e936Smrg _LT_CONFIG($1) 8005d769e936Smrgfi 80061d54945dSmrg 8007d769e936SmrgAC_LANG_RESTORE 80081d54945dSmrg 8009d769e936SmrgGCC=$lt_save_GCC 8010d769e936SmrgCC=$lt_save_CC 8011d769e936SmrgCFLAGS=$lt_save_CFLAGS 8012d769e936Smrg])# _LT_LANG_GCJ_CONFIG 80131d54945dSmrg 80141d54945dSmrg 8015d769e936Smrg# _LT_LANG_GO_CONFIG([TAG]) 8016d769e936Smrg# -------------------------- 8017d769e936Smrg# Ensure that the configuration variables for the GNU Go compiler 8018d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80197322289dSmrg# to write the compiler configuration to 'libtool'. 8020d769e936Smrgm4_defun([_LT_LANG_GO_CONFIG], 8021d769e936Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8022d769e936SmrgAC_LANG_SAVE 80231d54945dSmrg 8024d769e936Smrg# Source file extension for Go test sources. 8025d769e936Smrgac_ext=go 80261d54945dSmrg 8027d769e936Smrg# Object file extension for compiled Go test sources. 8028d769e936Smrgobjext=o 8029d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 80301d54945dSmrg 8031d769e936Smrg# Code to be used in simple compile tests 8032d769e936Smrglt_simple_compile_test_code="package main; func main() { }" 80331d54945dSmrg 8034d769e936Smrg# Code to be used in simple link tests 8035d769e936Smrglt_simple_link_test_code='package main; func main() { }' 80361d54945dSmrg 8037d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8038d769e936Smrg_LT_TAG_COMPILER 80391d54945dSmrg 8040d769e936Smrg# save warnings/boilerplate of simple test code 8041d769e936Smrg_LT_COMPILER_BOILERPLATE 8042d769e936Smrg_LT_LINKER_BOILERPLATE 80431d54945dSmrg 8044d769e936Smrg# Allow CC to be a program name with arguments. 8045d769e936Smrglt_save_CC=$CC 8046d769e936Smrglt_save_CFLAGS=$CFLAGS 8047d769e936Smrglt_save_GCC=$GCC 8048d769e936SmrgGCC=yes 8049d769e936SmrgCC=${GOC-"gccgo"} 8050d769e936SmrgCFLAGS=$GOFLAGS 8051d769e936Smrgcompiler=$CC 8052d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 80537322289dSmrg_LT_TAGVAR(LD, $1)=$LD 8054d769e936Smrg_LT_CC_BASENAME([$compiler]) 80551d54945dSmrg 8056d769e936Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8057d769e936Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80581d54945dSmrg 8059d769e936Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8060d769e936Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8061d769e936Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80621d54945dSmrg 8063d769e936Smrgif test -n "$compiler"; then 8064d769e936Smrg _LT_COMPILER_NO_RTTI($1) 8065d769e936Smrg _LT_COMPILER_PIC($1) 8066d769e936Smrg _LT_COMPILER_C_O($1) 8067d769e936Smrg _LT_COMPILER_FILE_LOCKS($1) 8068d769e936Smrg _LT_LINKER_SHLIBS($1) 8069d769e936Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8070786a6f21Smrg 8071d769e936Smrg _LT_CONFIG($1) 8072d769e936Smrgfi 80731d54945dSmrg 8074d769e936SmrgAC_LANG_RESTORE 80751d54945dSmrg 8076d769e936SmrgGCC=$lt_save_GCC 8077d769e936SmrgCC=$lt_save_CC 8078d769e936SmrgCFLAGS=$lt_save_CFLAGS 8079d769e936Smrg])# _LT_LANG_GO_CONFIG 80801d54945dSmrg 80811d54945dSmrg 8082d769e936Smrg# _LT_LANG_RC_CONFIG([TAG]) 8083d769e936Smrg# ------------------------- 8084d769e936Smrg# Ensure that the configuration variables for the Windows resource compiler 8085d769e936Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80867322289dSmrg# to write the compiler configuration to 'libtool'. 8087d769e936Smrgm4_defun([_LT_LANG_RC_CONFIG], 8088d769e936Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8089d769e936SmrgAC_LANG_SAVE 80901d54945dSmrg 8091d769e936Smrg# Source file extension for RC test sources. 8092d769e936Smrgac_ext=rc 80931d54945dSmrg 8094d769e936Smrg# Object file extension for compiled RC test sources. 8095d769e936Smrgobjext=o 8096d769e936Smrg_LT_TAGVAR(objext, $1)=$objext 80971d54945dSmrg 8098d769e936Smrg# Code to be used in simple compile tests 8099d769e936Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81001d54945dSmrg 8101d769e936Smrg# Code to be used in simple link tests 81027322289dSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81031d54945dSmrg 8104d769e936Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8105d769e936Smrg_LT_TAG_COMPILER 8106786a6f21Smrg 8107d769e936Smrg# save warnings/boilerplate of simple test code 8108d769e936Smrg_LT_COMPILER_BOILERPLATE 8109d769e936Smrg_LT_LINKER_BOILERPLATE 81101d54945dSmrg 8111d769e936Smrg# Allow CC to be a program name with arguments. 81127322289dSmrglt_save_CC=$CC 8113d769e936Smrglt_save_CFLAGS=$CFLAGS 8114d769e936Smrglt_save_GCC=$GCC 8115d769e936SmrgGCC= 8116d769e936SmrgCC=${RC-"windres"} 8117d769e936SmrgCFLAGS= 8118d769e936Smrgcompiler=$CC 8119d769e936Smrg_LT_TAGVAR(compiler, $1)=$CC 8120d769e936Smrg_LT_CC_BASENAME([$compiler]) 8121d769e936Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81221d54945dSmrg 8123d769e936Smrgif test -n "$compiler"; then 8124d769e936Smrg : 8125d769e936Smrg _LT_CONFIG($1) 8126d769e936Smrgfi 8127d769e936Smrg 8128d769e936SmrgGCC=$lt_save_GCC 8129d769e936SmrgAC_LANG_RESTORE 8130d769e936SmrgCC=$lt_save_CC 8131d769e936SmrgCFLAGS=$lt_save_CFLAGS 8132d769e936Smrg])# _LT_LANG_RC_CONFIG 81331d54945dSmrg 81341d54945dSmrg 8135d769e936Smrg# LT_PROG_GCJ 8136d769e936Smrg# ----------- 8137d769e936SmrgAC_DEFUN([LT_PROG_GCJ], 8138d769e936Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8139d769e936Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8140d769e936Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81417322289dSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8142d769e936Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8143d769e936Smrg]) 8144d769e936Smrg 8145d769e936Smrg# Old name: 8146d769e936SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8147d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8148d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81491d54945dSmrg 81501d54945dSmrg 8151d769e936Smrg# LT_PROG_GO 8152d769e936Smrg# ---------- 8153d769e936SmrgAC_DEFUN([LT_PROG_GO], 8154d769e936Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8155d769e936Smrg]) 81561d54945dSmrg 81571d54945dSmrg 8158d769e936Smrg# LT_PROG_RC 8159d769e936Smrg# ---------- 8160d769e936SmrgAC_DEFUN([LT_PROG_RC], 8161d769e936Smrg[AC_CHECK_TOOL(RC, windres,) 8162ec713c28Smrg]) 81631d54945dSmrg 8164d769e936Smrg# Old name: 8165d769e936SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8166d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8167d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8168d769e936Smrg 8169d769e936Smrg 8170d769e936Smrg# _LT_DECL_EGREP 8171d769e936Smrg# -------------- 8172d769e936Smrg# If we don't have a new enough Autoconf to choose the best grep 8173d769e936Smrg# available, choose the one first in the user's PATH. 8174d769e936Smrgm4_defun([_LT_DECL_EGREP], 8175d769e936Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8176d769e936SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8177d769e936Smrgtest -z "$GREP" && GREP=grep 8178d769e936Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8179d769e936Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8180d769e936Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8181d769e936Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8182d769e936SmrgAC_SUBST([GREP]) 81831d54945dSmrg]) 81841d54945dSmrg 8185ba85709eSmrg 8186d769e936Smrg# _LT_DECL_OBJDUMP 8187d769e936Smrg# -------------- 8188d769e936Smrg# If we don't have a new enough Autoconf to choose the best objdump 8189d769e936Smrg# available, choose the one first in the user's PATH. 8190d769e936Smrgm4_defun([_LT_DECL_OBJDUMP], 8191d769e936Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8192d769e936Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8193d769e936Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8194d769e936SmrgAC_SUBST([OBJDUMP]) 8195d769e936Smrg]) 8196ba85709eSmrg 8197d769e936Smrg# _LT_DECL_DLLTOOL 8198ec713c28Smrg# ---------------- 8199d769e936Smrg# Ensure DLLTOOL variable is set. 8200d769e936Smrgm4_defun([_LT_DECL_DLLTOOL], 8201d769e936Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8202d769e936Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8203d769e936Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8204d769e936SmrgAC_SUBST([DLLTOOL]) 8205d769e936Smrg]) 8206ba85709eSmrg 8207d769e936Smrg# _LT_DECL_SED 8208d769e936Smrg# ------------ 8209d769e936Smrg# Check for a fully-functional sed program, that truncates 8210d769e936Smrg# as few characters as possible. Prefer GNU sed if found. 8211d769e936Smrgm4_defun([_LT_DECL_SED], 8212d769e936Smrg[AC_PROG_SED 8213d769e936Smrgtest -z "$SED" && SED=sed 8214d769e936SmrgXsed="$SED -e 1s/^X//" 8215d769e936Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8216d769e936Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8217d769e936Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8218d769e936Smrg])# _LT_DECL_SED 8219ba85709eSmrg 8220d769e936Smrgm4_ifndef([AC_PROG_SED], [ 8221ec713c28Smrg# NOTE: This macro has been submitted for inclusion into # 8222ec713c28Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8223ec713c28Smrg# a released version of Autoconf we should remove this # 8224d769e936Smrg# macro and use it instead. # 8225d769e936Smrg 8226d769e936Smrgm4_defun([AC_PROG_SED], 8227ec713c28Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8228ec713c28SmrgAC_CACHE_VAL(lt_cv_path_SED, 8229ec713c28Smrg[# Loop through the user's path and test for sed and gsed. 8230ec713c28Smrg# Then use that list of sed's as ones to test for truncation. 8231ec713c28Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8232ec713c28Smrgfor as_dir in $PATH 8233ec713c28Smrgdo 8234ec713c28Smrg IFS=$as_save_IFS 8235ec713c28Smrg test -z "$as_dir" && as_dir=. 8236ec713c28Smrg for lt_ac_prog in sed gsed; do 8237ec713c28Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8238d769e936Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8239ec713c28Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8240ec713c28Smrg fi 8241ec713c28Smrg done 8242ec713c28Smrg done 8243ec713c28Smrgdone 8244ec713c28SmrgIFS=$as_save_IFS 8245ec713c28Smrglt_ac_max=0 8246ec713c28Smrglt_ac_count=0 8247ec713c28Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8248ec713c28Smrg# along with /bin/sed that truncates output. 8249ec713c28Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82507322289dSmrg test ! -f "$lt_ac_sed" && continue 8251ec713c28Smrg cat /dev/null > conftest.in 8252ec713c28Smrg lt_ac_count=0 8253ec713c28Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8254ec713c28Smrg # Check for GNU sed and select it if it is found. 8255ec713c28Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8256ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 8257ec713c28Smrg break 8258ec713c28Smrg fi 8259ec713c28Smrg while true; do 8260ec713c28Smrg cat conftest.in conftest.in >conftest.tmp 8261ec713c28Smrg mv conftest.tmp conftest.in 8262ec713c28Smrg cp conftest.in conftest.nl 8263ec713c28Smrg echo >>conftest.nl 8264ec713c28Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8265ec713c28Smrg cmp -s conftest.out conftest.nl || break 8266ec713c28Smrg # 10000 chars as input seems more than enough 82677322289dSmrg test 10 -lt "$lt_ac_count" && break 8268ec713c28Smrg lt_ac_count=`expr $lt_ac_count + 1` 82697322289dSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8270ec713c28Smrg lt_ac_max=$lt_ac_count 8271ec713c28Smrg lt_cv_path_SED=$lt_ac_sed 8272ec713c28Smrg fi 8273ec713c28Smrg done 8274ec713c28Smrgdone 8275ec713c28Smrg]) 8276ec713c28SmrgSED=$lt_cv_path_SED 8277ec713c28SmrgAC_SUBST([SED]) 8278ec713c28SmrgAC_MSG_RESULT([$SED]) 8279d769e936Smrg])#AC_PROG_SED 8280d769e936Smrg])#m4_ifndef 8281d769e936Smrg 8282d769e936Smrg# Old name: 8283d769e936SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8284d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8285d769e936Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8286d769e936Smrg 8287d769e936Smrg 8288d769e936Smrg# _LT_CHECK_SHELL_FEATURES 8289d769e936Smrg# ------------------------ 8290d769e936Smrg# Find out whether the shell is Bourne or XSI compatible, 8291d769e936Smrg# or has some other useful features. 8292d769e936Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 82937322289dSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8294d769e936Smrg lt_unset=unset 8295d769e936Smrgelse 8296d769e936Smrg lt_unset=false 8297d769e936Smrgfi 8298d769e936Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8299d769e936Smrg 8300d769e936Smrg# test EBCDIC or ASCII 8301d769e936Smrgcase `echo X|tr X '\101'` in 8302d769e936Smrg A) # ASCII based system 8303d769e936Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8304d769e936Smrg lt_SP2NL='tr \040 \012' 8305d769e936Smrg lt_NL2SP='tr \015\012 \040\040' 8306d769e936Smrg ;; 8307d769e936Smrg *) # EBCDIC based system 8308d769e936Smrg lt_SP2NL='tr \100 \n' 8309d769e936Smrg lt_NL2SP='tr \r\n \100\100' 8310d769e936Smrg ;; 8311d769e936Smrgesac 8312d769e936Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8313d769e936Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8314d769e936Smrg])# _LT_CHECK_SHELL_FEATURES 8315d769e936Smrg 8316d769e936Smrg 8317d769e936Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8318d769e936Smrg# ----------------------------- 83197322289dSmrg# Determine what file name conversion functions should be used by 8320d769e936Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8321d769e936Smrg# for certain cross-compile configurations and native mingw. 8322d769e936Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8323d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8324d769e936SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8325d769e936SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8326d769e936SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8327d769e936Smrg[case $host in 8328d769e936Smrg *-*-mingw* ) 8329d769e936Smrg case $build in 8330d769e936Smrg *-*-mingw* ) # actually msys 8331d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8332d769e936Smrg ;; 8333d769e936Smrg *-*-cygwin* ) 8334d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8335d769e936Smrg ;; 8336d769e936Smrg * ) # otherwise, assume *nix 8337d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8338d769e936Smrg ;; 8339d769e936Smrg esac 8340d769e936Smrg ;; 8341d769e936Smrg *-*-cygwin* ) 8342d769e936Smrg case $build in 8343d769e936Smrg *-*-mingw* ) # actually msys 8344d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8345d769e936Smrg ;; 8346d769e936Smrg *-*-cygwin* ) 8347d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8348d769e936Smrg ;; 8349d769e936Smrg * ) # otherwise, assume *nix 8350d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8351d769e936Smrg ;; 8352d769e936Smrg esac 8353d769e936Smrg ;; 8354d769e936Smrg * ) # unhandled hosts (and "normal" native builds) 8355d769e936Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8356d769e936Smrg ;; 8357d769e936Smrgesac 8358d769e936Smrg]) 8359d769e936Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8360d769e936SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8361d769e936Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8362d769e936Smrg [0], [convert $build file names to $host format])dnl 8363d769e936Smrg 8364d769e936SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8365d769e936SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8366d769e936Smrg[#assume ordinary cross tools, or native build. 8367d769e936Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8368d769e936Smrgcase $host in 8369d769e936Smrg *-*-mingw* ) 8370d769e936Smrg case $build in 8371d769e936Smrg *-*-mingw* ) # actually msys 8372d769e936Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8373d769e936Smrg ;; 8374d769e936Smrg esac 8375d769e936Smrg ;; 8376d769e936Smrgesac 8377d769e936Smrg]) 8378d769e936Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8379d769e936SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8380d769e936Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8381d769e936Smrg [0], [convert $build files to toolchain format])dnl 8382d769e936Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8383d769e936Smrg 8384d769e936Smrg# Helper functions for option handling. -*- Autoconf -*- 8385d769e936Smrg# 83867322289dSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 83877322289dSmrg# Foundation, Inc. 8388d769e936Smrg# Written by Gary V. Vaughan, 2004 8389d769e936Smrg# 8390d769e936Smrg# This file is free software; the Free Software Foundation gives 8391d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8392d769e936Smrg# modifications, as long as this notice is preserved. 8393d769e936Smrg 83947322289dSmrg# serial 8 ltoptions.m4 8395d769e936Smrg 8396d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8397d769e936SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8398d769e936Smrg 8399d769e936Smrg 8400d769e936Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8401d769e936Smrg# ------------------------------------------ 8402d769e936Smrgm4_define([_LT_MANGLE_OPTION], 8403d769e936Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8404d769e936Smrg 8405d769e936Smrg 8406d769e936Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8407d769e936Smrg# --------------------------------------- 8408d769e936Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8409d769e936Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8410d769e936Smrg# saved as a flag. 8411d769e936Smrgm4_define([_LT_SET_OPTION], 8412d769e936Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8413d769e936Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8414d769e936Smrg _LT_MANGLE_DEFUN([$1], [$2]), 84157322289dSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8416d769e936Smrg]) 8417d769e936Smrg 8418d769e936Smrg 8419d769e936Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8420d769e936Smrg# ------------------------------------------------------------ 8421d769e936Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8422d769e936Smrgm4_define([_LT_IF_OPTION], 8423d769e936Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8424d769e936Smrg 8425d769e936Smrg 8426d769e936Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8427d769e936Smrg# ------------------------------------------------------- 8428d769e936Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8429d769e936Smrg# are set. 8430d769e936Smrgm4_define([_LT_UNLESS_OPTIONS], 8431d769e936Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8432d769e936Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8433d769e936Smrg [m4_define([$0_found])])])[]dnl 8434d769e936Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8435d769e936Smrg])[]dnl 8436d769e936Smrg]) 8437d769e936Smrg 8438d769e936Smrg 8439d769e936Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8440d769e936Smrg# ---------------------------------------- 8441d769e936Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8442d769e936Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8443d769e936Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8444d769e936Smrg# the unknown option and exit. 8445d769e936Smrgm4_defun([_LT_SET_OPTIONS], 8446d769e936Smrg[# Set options 8447d769e936Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8448d769e936Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8449d769e936Smrg 8450d769e936Smrgm4_if([$1],[LT_INIT],[ 8451d769e936Smrg dnl 8452d769e936Smrg dnl Simply set some default values (i.e off) if boolean options were not 8453d769e936Smrg dnl specified: 8454d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8455d769e936Smrg ]) 8456d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8457d769e936Smrg ]) 8458d769e936Smrg dnl 8459d769e936Smrg dnl If no reference was made to various pairs of opposing options, then 8460d769e936Smrg dnl we run the default mode handler for the pair. For example, if neither 84617322289dSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8462d769e936Smrg dnl archives by default: 8463d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8464d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8465d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8466d769e936Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 84677322289dSmrg [_LT_ENABLE_FAST_INSTALL]) 84687322289dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 84697322289dSmrg [_LT_WITH_AIX_SONAME([aix])]) 8470d769e936Smrg ]) 8471d769e936Smrg])# _LT_SET_OPTIONS 8472d769e936Smrg 8473d769e936Smrg 8474d769e936Smrg 8475d769e936Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8476d769e936Smrg# ----------------------------------------- 8477d769e936Smrgm4_define([_LT_MANGLE_DEFUN], 8478d769e936Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8479d769e936Smrg 8480d769e936Smrg 8481d769e936Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8482d769e936Smrg# ----------------------------------------------- 8483d769e936Smrgm4_define([LT_OPTION_DEFINE], 8484d769e936Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8485d769e936Smrg])# LT_OPTION_DEFINE 8486d769e936Smrg 8487d769e936Smrg 8488d769e936Smrg# dlopen 8489d769e936Smrg# ------ 8490d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8491d769e936Smrg]) 8492d769e936Smrg 8493d769e936SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8494d769e936Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8495d769e936SmrgAC_DIAGNOSE([obsolete], 8496d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 84977322289dSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 8498d769e936Smrg]) 8499d769e936Smrg 8500d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8501d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8502d769e936Smrg 8503d769e936Smrg 8504d769e936Smrg# win32-dll 8505d769e936Smrg# --------- 8506d769e936Smrg# Declare package support for building win32 dll's. 8507d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8508d769e936Smrg[enable_win32_dll=yes 8509d769e936Smrg 8510d769e936Smrgcase $host in 8511d769e936Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8512d769e936Smrg AC_CHECK_TOOL(AS, as, false) 8513d769e936Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8514d769e936Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8515d769e936Smrg ;; 8516d769e936Smrgesac 8517d769e936Smrg 8518d769e936Smrgtest -z "$AS" && AS=as 8519d769e936Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8520d769e936Smrg 8521d769e936Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8522d769e936Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8523d769e936Smrg 8524d769e936Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8525d769e936Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8526d769e936Smrg])# win32-dll 8527d769e936Smrg 8528d769e936SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8529d769e936Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8530d769e936Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8531d769e936SmrgAC_DIAGNOSE([obsolete], 8532d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85337322289dSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8534d769e936Smrg]) 8535d769e936Smrg 8536d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8537d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8538d769e936Smrg 8539d769e936Smrg 8540d769e936Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8541d769e936Smrg# ---------------------------- 85427322289dSmrg# implement the --enable-shared flag, and supports the 'shared' and 85437322289dSmrg# 'disable-shared' LT_INIT options. 85447322289dSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8545d769e936Smrgm4_define([_LT_ENABLE_SHARED], 8546d769e936Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8547d769e936SmrgAC_ARG_ENABLE([shared], 8548d769e936Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8549d769e936Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8550d769e936Smrg [p=${PACKAGE-default} 8551d769e936Smrg case $enableval in 8552d769e936Smrg yes) enable_shared=yes ;; 8553d769e936Smrg no) enable_shared=no ;; 8554d769e936Smrg *) 8555d769e936Smrg enable_shared=no 8556d769e936Smrg # Look at the argument we got. We use all the common list separators. 85577322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8558d769e936Smrg for pkg in $enableval; do 85597322289dSmrg IFS=$lt_save_ifs 8560d769e936Smrg if test "X$pkg" = "X$p"; then 8561d769e936Smrg enable_shared=yes 8562d769e936Smrg fi 8563d769e936Smrg done 85647322289dSmrg IFS=$lt_save_ifs 8565d769e936Smrg ;; 8566d769e936Smrg esac], 8567d769e936Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8568d769e936Smrg 8569d769e936Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8570d769e936Smrg [Whether or not to build shared libraries]) 8571d769e936Smrg])# _LT_ENABLE_SHARED 8572d769e936Smrg 8573d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8574d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8575d769e936Smrg 8576d769e936Smrg# Old names: 8577d769e936SmrgAC_DEFUN([AC_ENABLE_SHARED], 8578d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8579d769e936Smrg]) 8580d769e936Smrg 8581d769e936SmrgAC_DEFUN([AC_DISABLE_SHARED], 8582d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8583d769e936Smrg]) 8584d769e936Smrg 8585d769e936SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8586d769e936SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8587d769e936Smrg 8588d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8589d769e936Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8590d769e936Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8591d769e936Smrg 8592d769e936Smrg 8593d769e936Smrg 8594d769e936Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8595d769e936Smrg# ---------------------------- 85967322289dSmrg# implement the --enable-static flag, and support the 'static' and 85977322289dSmrg# 'disable-static' LT_INIT options. 85987322289dSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8599d769e936Smrgm4_define([_LT_ENABLE_STATIC], 8600d769e936Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8601d769e936SmrgAC_ARG_ENABLE([static], 8602d769e936Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8603d769e936Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8604d769e936Smrg [p=${PACKAGE-default} 8605d769e936Smrg case $enableval in 8606d769e936Smrg yes) enable_static=yes ;; 8607d769e936Smrg no) enable_static=no ;; 8608d769e936Smrg *) 8609d769e936Smrg enable_static=no 8610d769e936Smrg # Look at the argument we got. We use all the common list separators. 86117322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8612d769e936Smrg for pkg in $enableval; do 86137322289dSmrg IFS=$lt_save_ifs 8614d769e936Smrg if test "X$pkg" = "X$p"; then 8615d769e936Smrg enable_static=yes 8616d769e936Smrg fi 8617d769e936Smrg done 86187322289dSmrg IFS=$lt_save_ifs 8619d769e936Smrg ;; 8620d769e936Smrg esac], 8621d769e936Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8622d769e936Smrg 8623d769e936Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8624d769e936Smrg [Whether or not to build static libraries]) 8625d769e936Smrg])# _LT_ENABLE_STATIC 8626d769e936Smrg 8627d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8628d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8629d769e936Smrg 8630d769e936Smrg# Old names: 8631d769e936SmrgAC_DEFUN([AC_ENABLE_STATIC], 8632d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8633d769e936Smrg]) 8634d769e936Smrg 8635d769e936SmrgAC_DEFUN([AC_DISABLE_STATIC], 8636d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8637d769e936Smrg]) 8638d769e936Smrg 8639d769e936SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8640d769e936SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8641d769e936Smrg 8642d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8643d769e936Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8644d769e936Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8645d769e936Smrg 8646d769e936Smrg 8647d769e936Smrg 8648d769e936Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8649d769e936Smrg# ---------------------------------- 86507322289dSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 86517322289dSmrg# and 'disable-fast-install' LT_INIT options. 86527322289dSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8653d769e936Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8654d769e936Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8655d769e936SmrgAC_ARG_ENABLE([fast-install], 8656d769e936Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8657d769e936Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8658d769e936Smrg [p=${PACKAGE-default} 8659d769e936Smrg case $enableval in 8660d769e936Smrg yes) enable_fast_install=yes ;; 8661d769e936Smrg no) enable_fast_install=no ;; 8662d769e936Smrg *) 8663d769e936Smrg enable_fast_install=no 8664d769e936Smrg # Look at the argument we got. We use all the common list separators. 86657322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8666d769e936Smrg for pkg in $enableval; do 86677322289dSmrg IFS=$lt_save_ifs 8668d769e936Smrg if test "X$pkg" = "X$p"; then 8669d769e936Smrg enable_fast_install=yes 8670d769e936Smrg fi 8671d769e936Smrg done 86727322289dSmrg IFS=$lt_save_ifs 8673d769e936Smrg ;; 8674d769e936Smrg esac], 8675d769e936Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8676d769e936Smrg 8677d769e936Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8678d769e936Smrg [Whether or not to optimize for fast installation])dnl 8679d769e936Smrg])# _LT_ENABLE_FAST_INSTALL 8680d769e936Smrg 8681d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8682d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8683d769e936Smrg 8684d769e936Smrg# Old names: 8685d769e936SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8686d769e936Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8687d769e936SmrgAC_DIAGNOSE([obsolete], 8688d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86897322289dSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 8690d769e936Smrg]) 8691d769e936Smrg 8692d769e936SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8693d769e936Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8694d769e936SmrgAC_DIAGNOSE([obsolete], 8695d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86967322289dSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8697d769e936Smrg]) 8698d769e936Smrg 8699d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8700d769e936Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8701d769e936Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8702d769e936Smrg 8703d769e936Smrg 87047322289dSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 87057322289dSmrg# ---------------------------------- 87067322289dSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 87077322289dSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 87087322289dSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 87097322289dSmrgm4_define([_LT_WITH_AIX_SONAME], 87107322289dSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 87117322289dSmrgshared_archive_member_spec= 87127322289dSmrgcase $host,$enable_shared in 87137322289dSmrgpower*-*-aix[[5-9]]*,yes) 87147322289dSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 87157322289dSmrg AC_ARG_WITH([aix-soname], 87167322289dSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 87177322289dSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 87187322289dSmrg [case $withval in 87197322289dSmrg aix|svr4|both) 87207322289dSmrg ;; 87217322289dSmrg *) 87227322289dSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 87237322289dSmrg ;; 87247322289dSmrg esac 87257322289dSmrg lt_cv_with_aix_soname=$with_aix_soname], 87267322289dSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 87277322289dSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 87287322289dSmrg with_aix_soname=$lt_cv_with_aix_soname]) 87297322289dSmrg AC_MSG_RESULT([$with_aix_soname]) 87307322289dSmrg if test aix != "$with_aix_soname"; then 87317322289dSmrg # For the AIX way of multilib, we name the shared archive member 87327322289dSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 87337322289dSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 87347322289dSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 87357322289dSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 87367322289dSmrg if test 64 = "${OBJECT_MODE-32}"; then 87377322289dSmrg shared_archive_member_spec=shr_64 87387322289dSmrg else 87397322289dSmrg shared_archive_member_spec=shr 87407322289dSmrg fi 87417322289dSmrg fi 87427322289dSmrg ;; 87437322289dSmrg*) 87447322289dSmrg with_aix_soname=aix 87457322289dSmrg ;; 87467322289dSmrgesac 87477322289dSmrg 87487322289dSmrg_LT_DECL([], [shared_archive_member_spec], [0], 87497322289dSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 87507322289dSmrg])# _LT_WITH_AIX_SONAME 87517322289dSmrg 87527322289dSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 87537322289dSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 87547322289dSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 87557322289dSmrg 87567322289dSmrg 8757d769e936Smrg# _LT_WITH_PIC([MODE]) 8758d769e936Smrg# -------------------- 87597322289dSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8760d769e936Smrg# LT_INIT options. 87617322289dSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8762d769e936Smrgm4_define([_LT_WITH_PIC], 8763d769e936Smrg[AC_ARG_WITH([pic], 8764d769e936Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8765d769e936Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8766d769e936Smrg [lt_p=${PACKAGE-default} 8767d769e936Smrg case $withval in 8768d769e936Smrg yes|no) pic_mode=$withval ;; 8769d769e936Smrg *) 8770d769e936Smrg pic_mode=default 8771d769e936Smrg # Look at the argument we got. We use all the common list separators. 87727322289dSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8773d769e936Smrg for lt_pkg in $withval; do 87747322289dSmrg IFS=$lt_save_ifs 8775d769e936Smrg if test "X$lt_pkg" = "X$lt_p"; then 8776d769e936Smrg pic_mode=yes 8777d769e936Smrg fi 8778d769e936Smrg done 87797322289dSmrg IFS=$lt_save_ifs 8780d769e936Smrg ;; 8781d769e936Smrg esac], 87827322289dSmrg [pic_mode=m4_default([$1], [default])]) 8783d769e936Smrg 8784d769e936Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8785d769e936Smrg])# _LT_WITH_PIC 8786d769e936Smrg 8787d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8788d769e936SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8789d769e936Smrg 8790d769e936Smrg# Old name: 8791d769e936SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8792d769e936Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8793d769e936SmrgAC_DIAGNOSE([obsolete], 8794d769e936Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 87957322289dSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 8796d769e936Smrg]) 8797d769e936Smrg 8798d769e936Smrgdnl aclocal-1.4 backwards compatibility: 8799d769e936Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8800d769e936Smrg 8801d769e936Smrg 8802d769e936Smrgm4_define([_LTDL_MODE], []) 8803d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8804d769e936Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8805d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8806d769e936Smrg [m4_define([_LTDL_MODE], [recursive])]) 8807d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8808d769e936Smrg [m4_define([_LTDL_MODE], [subproject])]) 8809d769e936Smrg 8810d769e936Smrgm4_define([_LTDL_TYPE], []) 8811d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8812d769e936Smrg [m4_define([_LTDL_TYPE], [installable])]) 8813d769e936SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8814d769e936Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8815d769e936Smrg 8816d769e936Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8817d769e936Smrg# 88187322289dSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 88197322289dSmrg# Foundation, Inc. 8820d769e936Smrg# Written by Gary V. Vaughan, 2004 8821d769e936Smrg# 8822d769e936Smrg# This file is free software; the Free Software Foundation gives 8823d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8824d769e936Smrg# modifications, as long as this notice is preserved. 8825d769e936Smrg 8826d769e936Smrg# serial 6 ltsugar.m4 8827d769e936Smrg 8828d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8829d769e936SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8830d769e936Smrg 8831d769e936Smrg 8832d769e936Smrg# lt_join(SEP, ARG1, [ARG2...]) 8833d769e936Smrg# ----------------------------- 8834d769e936Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8835d769e936Smrg# associated separator. 8836d769e936Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8837d769e936Smrg# versions in m4sugar had bugs. 8838d769e936Smrgm4_define([lt_join], 8839d769e936Smrg[m4_if([$#], [1], [], 8840d769e936Smrg [$#], [2], [[$2]], 8841d769e936Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8842d769e936Smrgm4_define([_lt_join], 8843d769e936Smrg[m4_if([$#$2], [2], [], 8844d769e936Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8845d769e936Smrg 8846d769e936Smrg 8847d769e936Smrg# lt_car(LIST) 8848d769e936Smrg# lt_cdr(LIST) 8849d769e936Smrg# ------------ 8850d769e936Smrg# Manipulate m4 lists. 8851d769e936Smrg# These macros are necessary as long as will still need to support 88527322289dSmrg# Autoconf-2.59, which quotes differently. 8853d769e936Smrgm4_define([lt_car], [[$1]]) 8854d769e936Smrgm4_define([lt_cdr], 8855d769e936Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8856d769e936Smrg [$#], 1, [], 8857d769e936Smrg [m4_dquote(m4_shift($@))])]) 8858d769e936Smrgm4_define([lt_unquote], $1) 8859d769e936Smrg 8860d769e936Smrg 8861d769e936Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8862d769e936Smrg# ------------------------------------------ 88637322289dSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8864d769e936Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8865d769e936Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8866d769e936Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8867d769e936Smrg# than defined and empty). 8868d769e936Smrg# 8869d769e936Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8870d769e936Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8871d769e936Smrgm4_define([lt_append], 8872d769e936Smrg[m4_define([$1], 8873d769e936Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8874d769e936Smrg 8875d769e936Smrg 8876d769e936Smrg 8877d769e936Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8878d769e936Smrg# ---------------------------------------------------------- 8879d769e936Smrg# Produce a SEP delimited list of all paired combinations of elements of 8880d769e936Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8881d769e936Smrg# has the form PREFIXmINFIXSUFFIXn. 8882d769e936Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8883d769e936Smrgm4_define([lt_combine], 8884d769e936Smrg[m4_if(m4_eval([$# > 3]), [1], 8885d769e936Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8886d769e936Smrg[[m4_foreach([_Lt_prefix], [$2], 8887d769e936Smrg [m4_foreach([_Lt_suffix], 8888d769e936Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8889d769e936Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8890d769e936Smrg 8891d769e936Smrg 8892d769e936Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8893d769e936Smrg# ----------------------------------------------------------------------- 8894d769e936Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8895d769e936Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8896d769e936Smrgm4_define([lt_if_append_uniq], 8897d769e936Smrg[m4_ifdef([$1], 8898d769e936Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8899d769e936Smrg [lt_append([$1], [$2], [$3])$4], 8900d769e936Smrg [$5])], 8901d769e936Smrg [lt_append([$1], [$2], [$3])$4])]) 8902d769e936Smrg 8903d769e936Smrg 8904d769e936Smrg# lt_dict_add(DICT, KEY, VALUE) 8905d769e936Smrg# ----------------------------- 8906d769e936Smrgm4_define([lt_dict_add], 8907d769e936Smrg[m4_define([$1($2)], [$3])]) 8908d769e936Smrg 8909d769e936Smrg 8910d769e936Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8911d769e936Smrg# -------------------------------------------- 8912d769e936Smrgm4_define([lt_dict_add_subkey], 8913d769e936Smrg[m4_define([$1($2:$3)], [$4])]) 8914d769e936Smrg 8915d769e936Smrg 8916d769e936Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8917d769e936Smrg# ---------------------------------- 8918d769e936Smrgm4_define([lt_dict_fetch], 8919d769e936Smrg[m4_ifval([$3], 8920d769e936Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8921d769e936Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8922d769e936Smrg 8923d769e936Smrg 8924d769e936Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8925d769e936Smrg# ----------------------------------------------------------------- 8926d769e936Smrgm4_define([lt_if_dict_fetch], 8927d769e936Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8928d769e936Smrg [$5], 8929d769e936Smrg [$6])]) 8930d769e936Smrg 8931d769e936Smrg 8932d769e936Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8933d769e936Smrg# -------------------------------------------------------------- 8934d769e936Smrgm4_define([lt_dict_filter], 8935d769e936Smrg[m4_if([$5], [], [], 8936d769e936Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8937d769e936Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8938d769e936Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8939d769e936Smrg]) 8940d769e936Smrg 8941d769e936Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8942d769e936Smrg# 89437322289dSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8944d769e936Smrg# Written by Scott James Remnant, 2004 8945d769e936Smrg# 8946d769e936Smrg# This file is free software; the Free Software Foundation gives 8947d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8948d769e936Smrg# modifications, as long as this notice is preserved. 8949d769e936Smrg 8950d769e936Smrg# @configure_input@ 8951d769e936Smrg 89527322289dSmrg# serial 4179 ltversion.m4 8953d769e936Smrg# This file is part of GNU Libtool 8954d769e936Smrg 89557322289dSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 89567322289dSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 8957d769e936Smrg 8958d769e936SmrgAC_DEFUN([LTVERSION_VERSION], 89597322289dSmrg[macro_version='2.4.6' 89607322289dSmrgmacro_revision='2.4.6' 8961d769e936Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8962d769e936Smrg_LT_DECL(, macro_revision, 0) 89631d54945dSmrg]) 8964786a6f21Smrg 8965d769e936Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8966d769e936Smrg# 89677322289dSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 89687322289dSmrg# Foundation, Inc. 8969d769e936Smrg# Written by Scott James Remnant, 2004. 8970d769e936Smrg# 8971d769e936Smrg# This file is free software; the Free Software Foundation gives 8972d769e936Smrg# unlimited permission to copy and/or distribute it, with or without 8973d769e936Smrg# modifications, as long as this notice is preserved. 8974d769e936Smrg 8975d769e936Smrg# serial 5 lt~obsolete.m4 8976d769e936Smrg 8977d769e936Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8978d769e936Smrg# 89797322289dSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8980d769e936Smrg# which have later been changed to m4_define as they aren't part of the 8981d769e936Smrg# exported API, or moved to Autoconf or Automake where they belong. 8982d769e936Smrg# 8983d769e936Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8984d769e936Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8985d769e936Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8986d769e936Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8987d769e936Smrg# and doesn't know about Autoconf macros at all.) 8988d769e936Smrg# 8989d769e936Smrg# So we provide this file, which has a silly filename so it's always 8990d769e936Smrg# included after everything else. This provides aclocal with the 8991d769e936Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8992d769e936Smrg# because those macros already exist, or will be overwritten later. 89937322289dSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8994d769e936Smrg# 8995d769e936Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8996d769e936Smrg# Yes, that means every name once taken will need to remain here until 8997d769e936Smrg# we give up compatibility with versions before 1.7, at which point 8998d769e936Smrg# we need to keep only those names which we still refer to. 8999d769e936Smrg 9000d769e936Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9001d769e936SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9002d769e936Smrg 9003d769e936Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9004d769e936Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9005d769e936Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9006d769e936Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9007d769e936Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9008d769e936Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9009d769e936Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9010d769e936Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9011d769e936Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9012d769e936Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9013d769e936Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9014d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9015d769e936Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9016d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9017d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9018d769e936Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9019d769e936Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9020d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9021d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9022d769e936Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9023d769e936Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9024d769e936Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9025d769e936Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9026d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9027d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9028d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9029d769e936Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9030d769e936Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9031d769e936Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9032d769e936Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9033d769e936Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9034d769e936Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9035d769e936Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9036d769e936Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9037d769e936Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9038d769e936Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9039d769e936Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9040d769e936Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9041d769e936Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9042d769e936Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9043d769e936Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9044d769e936Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9045d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9046d769e936Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9047d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9048d769e936Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9049d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9050d769e936Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9051d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9052d769e936Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9053d769e936Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9054d769e936Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9055d769e936Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9056d769e936Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9057d769e936Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9058d769e936Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9059d769e936Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9060d769e936Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9061d769e936Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9062d769e936Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9063d769e936Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9064d769e936Smrg 90651d54945dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9066d769e936Smrg# serial 1 (pkg-config-0.24) 90671d54945dSmrg# 90681d54945dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 90691d54945dSmrg# 90701d54945dSmrg# This program is free software; you can redistribute it and/or modify 90711d54945dSmrg# it under the terms of the GNU General Public License as published by 90721d54945dSmrg# the Free Software Foundation; either version 2 of the License, or 90731d54945dSmrg# (at your option) any later version. 90741d54945dSmrg# 90751d54945dSmrg# This program is distributed in the hope that it will be useful, but 90761d54945dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 90771d54945dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 90781d54945dSmrg# General Public License for more details. 90791d54945dSmrg# 90801d54945dSmrg# You should have received a copy of the GNU General Public License 90811d54945dSmrg# along with this program; if not, write to the Free Software 90821d54945dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 90831d54945dSmrg# 90841d54945dSmrg# As a special exception to the GNU General Public License, if you 90851d54945dSmrg# distribute this file as part of a program that contains a 90861d54945dSmrg# configuration script generated by Autoconf, you may include it under 90871d54945dSmrg# the same distribution terms that you use for the rest of that program. 90881d54945dSmrg 90891d54945dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 90901d54945dSmrg# ---------------------------------- 90911d54945dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 90921d54945dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 90937322289dSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 90947322289dSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9095d769e936SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9096d769e936SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9097d769e936SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9098d769e936Smrg 90991d54945dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 91001d54945dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 91011d54945dSmrgfi 91021d54945dSmrgif test -n "$PKG_CONFIG"; then 91031d54945dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 91041d54945dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 91051d54945dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 91061d54945dSmrg AC_MSG_RESULT([yes]) 91071d54945dSmrg else 91081d54945dSmrg AC_MSG_RESULT([no]) 91091d54945dSmrg PKG_CONFIG="" 91101d54945dSmrg fi 91111d54945dSmrgfi[]dnl 91121d54945dSmrg])# PKG_PROG_PKG_CONFIG 91131d54945dSmrg 91141d54945dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 91151d54945dSmrg# 91161d54945dSmrg# Check to see whether a particular set of modules exists. Similar 91171d54945dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 91181d54945dSmrg# 9119d769e936Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9120d769e936Smrg# only at the first occurence in configure.ac, so if the first place 9121d769e936Smrg# it's called might be skipped (such as if it is within an "if", you 9122d769e936Smrg# have to call PKG_CHECK_EXISTS manually 91231d54945dSmrg# -------------------------------------------------------------- 91241d54945dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 91251d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91261d54945dSmrgif test -n "$PKG_CONFIG" && \ 91271d54945dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9128d769e936Smrg m4_default([$2], [:]) 91291d54945dSmrgm4_ifvaln([$3], [else 91301d54945dSmrg $3])dnl 91311d54945dSmrgfi]) 91321d54945dSmrg 91331d54945dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 91341d54945dSmrg# --------------------------------------------- 91351d54945dSmrgm4_define([_PKG_CONFIG], 9136ba85709eSmrg[if test -n "$$1"; then 9137ba85709eSmrg pkg_cv_[]$1="$$1" 9138ba85709eSmrg elif test -n "$PKG_CONFIG"; then 9139ba85709eSmrg PKG_CHECK_EXISTS([$3], 91407322289dSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 91417322289dSmrg test "x$?" != "x0" && pkg_failed=yes ], 9142ba85709eSmrg [pkg_failed=yes]) 9143ba85709eSmrg else 9144ba85709eSmrg pkg_failed=untried 91451d54945dSmrgfi[]dnl 91461d54945dSmrg])# _PKG_CONFIG 91471d54945dSmrg 91481d54945dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 91491d54945dSmrg# ----------------------------- 91501d54945dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 91511d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91521d54945dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 91531d54945dSmrg _pkg_short_errors_supported=yes 91541d54945dSmrgelse 91551d54945dSmrg _pkg_short_errors_supported=no 91561d54945dSmrgfi[]dnl 91571d54945dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 91581d54945dSmrg 91591d54945dSmrg 91601d54945dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 91611d54945dSmrg# [ACTION-IF-NOT-FOUND]) 91621d54945dSmrg# 91631d54945dSmrg# 91641d54945dSmrg# Note that if there is a possibility the first call to 91651d54945dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 91661d54945dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 91671d54945dSmrg# 91681d54945dSmrg# 91691d54945dSmrg# -------------------------------------------------------------- 91701d54945dSmrgAC_DEFUN([PKG_CHECK_MODULES], 91711d54945dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91721d54945dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 91731d54945dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 91741d54945dSmrg 91751d54945dSmrgpkg_failed=no 91761d54945dSmrgAC_MSG_CHECKING([for $1]) 91771d54945dSmrg 91781d54945dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 91791d54945dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 91801d54945dSmrg 91811d54945dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 91821d54945dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 91831d54945dSmrgSee the pkg-config man page for more details.]) 91841d54945dSmrg 91851d54945dSmrgif test $pkg_failed = yes; then 9186d769e936Smrg AC_MSG_RESULT([no]) 91871d54945dSmrg _PKG_SHORT_ERRORS_SUPPORTED 91881d54945dSmrg if test $_pkg_short_errors_supported = yes; then 91897322289dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 91901d54945dSmrg else 91917322289dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 91921d54945dSmrg fi 91931d54945dSmrg # Put the nasty error message in config.log where it belongs 91941d54945dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 91951d54945dSmrg 9196d769e936Smrg m4_default([$4], [AC_MSG_ERROR( 91971d54945dSmrg[Package requirements ($2) were not met: 91981d54945dSmrg 91991d54945dSmrg$$1_PKG_ERRORS 92001d54945dSmrg 92011d54945dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 92021d54945dSmrginstalled software in a non-standard prefix. 92031d54945dSmrg 92047322289dSmrg_PKG_TEXT])[]dnl 9205d769e936Smrg ]) 92061d54945dSmrgelif test $pkg_failed = untried; then 9207d769e936Smrg AC_MSG_RESULT([no]) 9208d769e936Smrg m4_default([$4], [AC_MSG_FAILURE( 92091d54945dSmrg[The pkg-config script could not be found or is too old. Make sure it 92101d54945dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 92111d54945dSmrgpath to pkg-config. 92121d54945dSmrg 92131d54945dSmrg_PKG_TEXT 92141d54945dSmrg 92157322289dSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9216d769e936Smrg ]) 92171d54945dSmrgelse 92181d54945dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 92191d54945dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 92201d54945dSmrg AC_MSG_RESULT([yes]) 9221d769e936Smrg $3 92221d54945dSmrgfi[]dnl 92231d54945dSmrg])# PKG_CHECK_MODULES 92241d54945dSmrg 92257322289dSmrg 92267322289dSmrg# PKG_INSTALLDIR(DIRECTORY) 92277322289dSmrg# ------------------------- 92287322289dSmrg# Substitutes the variable pkgconfigdir as the location where a module 92297322289dSmrg# should install pkg-config .pc files. By default the directory is 92307322289dSmrg# $libdir/pkgconfig, but the default can be changed by passing 92317322289dSmrg# DIRECTORY. The user can override through the --with-pkgconfigdir 92327322289dSmrg# parameter. 92337322289dSmrgAC_DEFUN([PKG_INSTALLDIR], 92347322289dSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 92357322289dSmrgm4_pushdef([pkg_description], 92367322289dSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 92377322289dSmrgAC_ARG_WITH([pkgconfigdir], 92387322289dSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 92397322289dSmrg [with_pkgconfigdir=]pkg_default) 92407322289dSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 92417322289dSmrgm4_popdef([pkg_default]) 92427322289dSmrgm4_popdef([pkg_description]) 92437322289dSmrg]) dnl PKG_INSTALLDIR 92447322289dSmrg 92457322289dSmrg 92467322289dSmrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 92477322289dSmrg# ------------------------- 92487322289dSmrg# Substitutes the variable noarch_pkgconfigdir as the location where a 92497322289dSmrg# module should install arch-independent pkg-config .pc files. By 92507322289dSmrg# default the directory is $datadir/pkgconfig, but the default can be 92517322289dSmrg# changed by passing DIRECTORY. The user can override through the 92527322289dSmrg# --with-noarch-pkgconfigdir parameter. 92537322289dSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 92547322289dSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 92557322289dSmrgm4_pushdef([pkg_description], 92567322289dSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 92577322289dSmrgAC_ARG_WITH([noarch-pkgconfigdir], 92587322289dSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 92597322289dSmrg [with_noarch_pkgconfigdir=]pkg_default) 92607322289dSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 92617322289dSmrgm4_popdef([pkg_default]) 92627322289dSmrgm4_popdef([pkg_description]) 92637322289dSmrg]) dnl PKG_NOARCH_INSTALLDIR 92647322289dSmrg 92657322289dSmrg 92667322289dSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 92677322289dSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 92687322289dSmrg# ------------------------------------------- 92697322289dSmrg# Retrieves the value of the pkg-config variable for the given module. 92707322289dSmrgAC_DEFUN([PKG_CHECK_VAR], 92717322289dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92727322289dSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 92737322289dSmrg 92747322289dSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 92757322289dSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 92767322289dSmrg 92777322289dSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 92787322289dSmrg])# PKG_CHECK_VAR 92797322289dSmrg 9280786a6f21Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 92811d54945dSmrgdnl 9282d769e936Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 92837322289dSmrgdnl 9284ba85709eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9285d769e936Smrgdnl copy of this software and associated documentation files (the "Software"), 9286d769e936Smrgdnl to deal in the Software without restriction, including without limitation 9287d769e936Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9288d769e936Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9289d769e936Smrgdnl Software is furnished to do so, subject to the following conditions: 9290ba85709eSmrgdnl 9291d769e936Smrgdnl The above copyright notice and this permission notice (including the next 9292d769e936Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9293d769e936Smrgdnl Software. 9294ba85709eSmrgdnl 9295d769e936Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9296d769e936Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9297d769e936Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9298d769e936Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9299d769e936Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9300d769e936Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9301d769e936Smrgdnl DEALINGS IN THE SOFTWARE. 9302ba85709eSmrg 9303ba85709eSmrg# XORG_MACROS_VERSION(required-version) 9304ba85709eSmrg# ------------------------------------- 9305ba85709eSmrg# Minimum version: 1.1.0 9306ba85709eSmrg# 9307ba85709eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9308ba85709eSmrg# your configure.ac with the minimum required version, such as: 9309ba85709eSmrg# XORG_MACROS_VERSION(1.1) 9310ba85709eSmrg# 9311d769e936Smrg# To ensure that this macro is defined, also add: 9312d769e936Smrg# m4_ifndef([XORG_MACROS_VERSION], 9313d769e936Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9314ba85709eSmrg# 9315ba85709eSmrg# 93167322289dSmrg# See the "minimum version" comment for each macro you use to see what 9317ba85709eSmrg# version you require. 9318d769e936Smrgm4_defun([XORG_MACROS_VERSION],[ 93197322289dSmrgm4_define([vers_have], [1.19.0]) 9320d769e936Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9321d769e936Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9322d769e936Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9323d769e936Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9324d769e936Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9325d769e936Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9326d769e936Smrgm4_undefine([vers_have]) 9327d769e936Smrgm4_undefine([maj_have]) 9328d769e936Smrgm4_undefine([maj_needed]) 9329ba85709eSmrg]) # XORG_MACROS_VERSION 93301d54945dSmrg 93311d54945dSmrg# XORG_PROG_RAWCPP() 93321d54945dSmrg# ------------------ 9333ba85709eSmrg# Minimum version: 1.0.0 9334ba85709eSmrg# 93351d54945dSmrg# Find cpp program and necessary flags for use in pre-processing text files 93361d54945dSmrg# such as man pages and config files 93371d54945dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 93381d54945dSmrgAC_REQUIRE([AC_PROG_CPP]) 93397322289dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 93401d54945dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 93411d54945dSmrg 93421d54945dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 93431d54945dSmrg# which is not the best choice for supporting other OS'es, but covers most 93441d54945dSmrg# of the ones we need for now. 93451d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9346d769e936SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 93471d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93481d54945dSmrg AC_MSG_RESULT([no]) 93491d54945dSmrgelse 93501d54945dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93511d54945dSmrg RAWCPPFLAGS=-undef 93521d54945dSmrg AC_MSG_RESULT([yes]) 9353786a6f21Smrg # under Cygwin unix is still defined even with -undef 9354786a6f21Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9355786a6f21Smrg RAWCPPFLAGS="-undef -ansi" 9356786a6f21Smrg AC_MSG_RESULT([yes, with -ansi]) 93571d54945dSmrg else 93581d54945dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 93591d54945dSmrg fi 93601d54945dSmrgfi 93611d54945dSmrgrm -f conftest.$ac_ext 93621d54945dSmrg 93631d54945dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9364d769e936SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 93651d54945dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93661d54945dSmrg AC_MSG_RESULT([no]) 93671d54945dSmrgelse 93681d54945dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93697322289dSmrg TRADITIONALCPPFLAGS="-traditional" 93701d54945dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 93711d54945dSmrg AC_MSG_RESULT([yes]) 93721d54945dSmrg else 93731d54945dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 93741d54945dSmrg fi 93751d54945dSmrgfi 93761d54945dSmrgrm -f conftest.$ac_ext 93771d54945dSmrgAC_SUBST(RAWCPPFLAGS) 93787322289dSmrgAC_SUBST(TRADITIONALCPPFLAGS) 93791d54945dSmrg]) # XORG_PROG_RAWCPP 93801d54945dSmrg 93811d54945dSmrg# XORG_MANPAGE_SECTIONS() 93821d54945dSmrg# ----------------------- 9383ba85709eSmrg# Minimum version: 1.0.0 9384ba85709eSmrg# 93851d54945dSmrg# Determine which sections man pages go in for the different man page types 93861d54945dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 93871d54945dSmrg# Not sure if there's any better way than just hardcoding by OS name. 93881d54945dSmrg# Override default settings by setting environment variables 9389d769e936Smrg# Added MAN_SUBSTS in version 1.8 9390d769e936Smrg# Added AC_PROG_SED in version 1.8 93911d54945dSmrg 93921d54945dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 93931d54945dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9394d769e936SmrgAC_REQUIRE([AC_PROG_SED]) 93951d54945dSmrg 93961d54945dSmrgif test x$APP_MAN_SUFFIX = x ; then 9397ba85709eSmrg APP_MAN_SUFFIX=1 93981d54945dSmrgfi 93991d54945dSmrgif test x$APP_MAN_DIR = x ; then 9400ba85709eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 94011d54945dSmrgfi 94021d54945dSmrg 94031d54945dSmrgif test x$LIB_MAN_SUFFIX = x ; then 9404ba85709eSmrg LIB_MAN_SUFFIX=3 94051d54945dSmrgfi 94061d54945dSmrgif test x$LIB_MAN_DIR = x ; then 9407ba85709eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 94081d54945dSmrgfi 94091d54945dSmrg 94101d54945dSmrgif test x$FILE_MAN_SUFFIX = x ; then 94111d54945dSmrg case $host_os in 94121d54945dSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 94131d54945dSmrg *) FILE_MAN_SUFFIX=5 ;; 94141d54945dSmrg esac 94151d54945dSmrgfi 94161d54945dSmrgif test x$FILE_MAN_DIR = x ; then 9417ba85709eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 94181d54945dSmrgfi 94191d54945dSmrg 94201d54945dSmrgif test x$MISC_MAN_SUFFIX = x ; then 94211d54945dSmrg case $host_os in 94221d54945dSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 94231d54945dSmrg *) MISC_MAN_SUFFIX=7 ;; 94241d54945dSmrg esac 94251d54945dSmrgfi 94261d54945dSmrgif test x$MISC_MAN_DIR = x ; then 9427ba85709eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 94281d54945dSmrgfi 94291d54945dSmrg 94301d54945dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 94311d54945dSmrg case $host_os in 94321d54945dSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 94331d54945dSmrg *) DRIVER_MAN_SUFFIX=4 ;; 94341d54945dSmrg esac 94351d54945dSmrgfi 94361d54945dSmrgif test x$DRIVER_MAN_DIR = x ; then 9437ba85709eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 94381d54945dSmrgfi 94391d54945dSmrg 94401d54945dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 94411d54945dSmrg case $host_os in 94421d54945dSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 94431d54945dSmrg *) ADMIN_MAN_SUFFIX=8 ;; 94441d54945dSmrg esac 94451d54945dSmrgfi 94461d54945dSmrgif test x$ADMIN_MAN_DIR = x ; then 94471d54945dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 94481d54945dSmrgfi 94491d54945dSmrg 94501d54945dSmrg 94511d54945dSmrgAC_SUBST([APP_MAN_SUFFIX]) 94521d54945dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 94531d54945dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 94541d54945dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 94551d54945dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 94561d54945dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 94571d54945dSmrgAC_SUBST([APP_MAN_DIR]) 94581d54945dSmrgAC_SUBST([LIB_MAN_DIR]) 94591d54945dSmrgAC_SUBST([FILE_MAN_DIR]) 94601d54945dSmrgAC_SUBST([MISC_MAN_DIR]) 94611d54945dSmrgAC_SUBST([DRIVER_MAN_DIR]) 94621d54945dSmrgAC_SUBST([ADMIN_MAN_DIR]) 9463d769e936Smrg 9464d769e936SmrgXORG_MAN_PAGE="X Version 11" 9465d769e936SmrgAC_SUBST([XORG_MAN_PAGE]) 9466d769e936SmrgMAN_SUBSTS="\ 9467d769e936Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9468d769e936Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9469d769e936Smrg -e 's|__xservername__|Xorg|g' \ 9470d769e936Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9471d769e936Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9472d769e936Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9473d769e936Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9474d769e936Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9475d769e936Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9476d769e936Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9477d769e936Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9478d769e936Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9479d769e936SmrgAC_SUBST([MAN_SUBSTS]) 9480d769e936Smrg 94811d54945dSmrg]) # XORG_MANPAGE_SECTIONS 94821d54945dSmrg 9483d769e936Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9484d769e936Smrg# ------------------------ 9485d769e936Smrg# Minimum version: 1.7.0 9486d769e936Smrg# 9487d769e936Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9488d769e936Smrg# provided by xorg-sgml-doctools, if installed. 9489d769e936SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9490d769e936SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9491d769e936SmrgXORG_SGML_PATH= 9492d769e936SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9493d769e936Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9494d769e936Smrg [m4_ifval([$1],[:], 9495d769e936Smrg [if test x"$cross_compiling" != x"yes" ; then 9496d769e936Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9497d769e936Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9498d769e936Smrg fi]) 9499d769e936Smrg ]) 9500d769e936Smrg 9501d769e936Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9502d769e936Smrg# the path and the name of the doc stylesheet 9503d769e936Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9504d769e936Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9505d769e936Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9506d769e936Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9507d769e936Smrgelse 9508d769e936Smrg AC_MSG_RESULT([no]) 9509d769e936Smrgfi 9510d769e936Smrg 9511d769e936SmrgAC_SUBST(XORG_SGML_PATH) 9512d769e936SmrgAC_SUBST(STYLESHEET_SRCDIR) 9513d769e936SmrgAC_SUBST(XSL_STYLESHEET) 9514d769e936SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9515d769e936Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9516d769e936Smrg 95171d54945dSmrg# XORG_CHECK_LINUXDOC 95181d54945dSmrg# ------------------- 9519ba85709eSmrg# Minimum version: 1.0.0 9520ba85709eSmrg# 95211d54945dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 95221d54945dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 95231d54945dSmrg# Whether or not the necessary tools and files are found can be checked 95241d54945dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 95251d54945dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9526d769e936SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9527d769e936SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 95281d54945dSmrg 95291d54945dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 95301d54945dSmrg 9531d769e936SmrgAC_MSG_CHECKING([whether to build documentation]) 95321d54945dSmrg 9533d769e936Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 95341d54945dSmrg BUILDDOC=yes 95351d54945dSmrgelse 95361d54945dSmrg BUILDDOC=no 95371d54945dSmrgfi 95381d54945dSmrg 95391d54945dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 95401d54945dSmrg 95411d54945dSmrgAC_MSG_RESULT([$BUILDDOC]) 95421d54945dSmrg 9543d769e936SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 95441d54945dSmrg 9545d769e936Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 95461d54945dSmrg BUILDPDFDOC=yes 95471d54945dSmrgelse 95481d54945dSmrg BUILDPDFDOC=no 95491d54945dSmrgfi 95501d54945dSmrg 95511d54945dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 95521d54945dSmrg 95531d54945dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 95541d54945dSmrg 9555d769e936SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9556ba85709eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 95571d54945dSmrgMAKE_PDF="$PS2PDF" 9558ba85709eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 95591d54945dSmrg 95601d54945dSmrgAC_SUBST(MAKE_TEXT) 95611d54945dSmrgAC_SUBST(MAKE_PS) 95621d54945dSmrgAC_SUBST(MAKE_PDF) 95631d54945dSmrgAC_SUBST(MAKE_HTML) 95641d54945dSmrg]) # XORG_CHECK_LINUXDOC 95651d54945dSmrg 9566ba85709eSmrg# XORG_CHECK_DOCBOOK 9567ba85709eSmrg# ------------------- 9568ba85709eSmrg# Minimum version: 1.0.0 9569ba85709eSmrg# 9570ba85709eSmrg# Checks for the ability to build output formats from SGML DocBook source. 9571ba85709eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9572ba85709eSmrg# indicates whether the necessary tools and files are found and, if set, 9573ba85709eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9574ba85709eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9575d769e936SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9576d769e936Smrg 9577ba85709eSmrgBUILDTXTDOC=no 9578ba85709eSmrgBUILDPDFDOC=no 9579ba85709eSmrgBUILDPSDOC=no 9580ba85709eSmrgBUILDHTMLDOC=no 9581ba85709eSmrg 9582ba85709eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9583ba85709eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9584ba85709eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9585ba85709eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9586ba85709eSmrg 9587d769e936SmrgAC_MSG_CHECKING([whether to build text documentation]) 9588d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9589ba85709eSmrg test x$BUILD_TXTDOC != xno; then 9590ba85709eSmrg BUILDTXTDOC=yes 9591ba85709eSmrgfi 9592ba85709eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9593ba85709eSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9594ba85709eSmrg 9595d769e936SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9596d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9597d769e936Smrg test x$BUILD_PDFDOC != xno; then 9598d769e936Smrg BUILDPDFDOC=yes 9599d769e936Smrgfi 9600d769e936SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9601d769e936SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9602d769e936Smrg 9603d769e936SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9604d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9605d769e936Smrg test x$BUILD_PSDOC != xno; then 9606d769e936Smrg BUILDPSDOC=yes 9607d769e936Smrgfi 9608d769e936SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9609d769e936SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9610d769e936Smrg 9611d769e936SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9612d769e936Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9613d769e936Smrg test x$BUILD_HTMLDOC != xno; then 9614d769e936Smrg BUILDHTMLDOC=yes 9615d769e936Smrgfi 9616d769e936SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9617d769e936SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9618d769e936Smrg 9619d769e936SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9620d769e936SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9621d769e936SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9622d769e936SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9623d769e936Smrg 9624d769e936SmrgAC_SUBST(MAKE_TEXT) 9625d769e936SmrgAC_SUBST(MAKE_PS) 9626d769e936SmrgAC_SUBST(MAKE_PDF) 9627d769e936SmrgAC_SUBST(MAKE_HTML) 9628d769e936Smrg]) # XORG_CHECK_DOCBOOK 9629d769e936Smrg 9630d769e936Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9631d769e936Smrg# ---------------- 9632d769e936Smrg# Minimum version: 1.5.0 9633d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9634d769e936Smrg# 9635d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9636d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9637d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9638d769e936Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9639d769e936Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9640d769e936Smrg# --with-xmlto assumes 'auto'. 9641d769e936Smrg# 9642d769e936Smrg# Interface to module: 9643d769e936Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9644d769e936Smrg# XMLTO: returns the path of the xmlto program found 9645d769e936Smrg# returns the path set by the user in the environment 9646d769e936Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9647d769e936Smrg# 'no' user instructs the module not to use xmlto 9648d769e936Smrg# 9649d769e936Smrg# Added in version 1.10.0 9650d769e936Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9651d769e936Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9652d769e936Smrg# 9653d769e936Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9654d769e936Smrg# 9655d769e936SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9656d769e936SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9657d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9658d769e936SmrgAC_ARG_WITH(xmlto, 9659d769e936Smrg AS_HELP_STRING([--with-xmlto], 9660d769e936Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9661d769e936Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9662d769e936Smrgm4_undefine([_defopt]) 9663d769e936Smrg 9664d769e936Smrgif test "x$use_xmlto" = x"auto"; then 9665d769e936Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9666d769e936Smrg if test "x$XMLTO" = "x"; then 9667d769e936Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9668d769e936Smrg have_xmlto=no 9669d769e936Smrg else 9670d769e936Smrg have_xmlto=yes 9671d769e936Smrg fi 9672d769e936Smrgelif test "x$use_xmlto" = x"yes" ; then 9673d769e936Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9674d769e936Smrg if test "x$XMLTO" = "x"; then 9675d769e936Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9676d769e936Smrg fi 9677d769e936Smrg have_xmlto=yes 9678d769e936Smrgelif test "x$use_xmlto" = x"no" ; then 9679d769e936Smrg if test "x$XMLTO" != "x"; then 9680d769e936Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9681d769e936Smrg fi 9682d769e936Smrg have_xmlto=no 9683d769e936Smrgelse 9684d769e936Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9685d769e936Smrgfi 9686d769e936Smrg 9687d769e936Smrg# Test for a minimum version of xmlto, if provided. 9688d769e936Smrgm4_ifval([$1], 9689d769e936Smrg[if test "$have_xmlto" = yes; then 9690d769e936Smrg # scrape the xmlto version 9691d769e936Smrg AC_MSG_CHECKING([the xmlto version]) 9692d769e936Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9693d769e936Smrg AC_MSG_RESULT([$xmlto_version]) 9694d769e936Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9695d769e936Smrg [if test "x$use_xmlto" = xauto; then 9696d769e936Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9697d769e936Smrg have_xmlto=no 9698d769e936Smrg else 9699d769e936Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9700d769e936Smrg fi]) 9701d769e936Smrgfi]) 9702d769e936Smrg 9703d769e936Smrg# Test for the ability of xmlto to generate a text target 9704d769e936Smrghave_xmlto_text=no 9705d769e936Smrgcat > conftest.xml << "EOF" 9706d769e936SmrgEOF 9707d769e936SmrgAS_IF([test "$have_xmlto" = yes], 9708d769e936Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9709d769e936Smrg [have_xmlto_text=yes], 9710d769e936Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9711d769e936Smrgrm -f conftest.xml 9712d769e936SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9713d769e936SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9714d769e936Smrg]) # XORG_WITH_XMLTO 9715d769e936Smrg 9716d769e936Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9717d769e936Smrg# -------------------------------------------- 9718d769e936Smrg# Minimum version: 1.12.0 9719d769e936Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9720d769e936Smrg# 9721d769e936Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9722d769e936Smrg# XML-based language used for the transformation of XML documents. 9723d769e936Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9724d769e936Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9725d769e936Smrg# The XSLT processor is often used as a standalone tool for transformations. 9726d769e936Smrg# It should not be assumed that this tool is used only to work with documnetation. 9727d769e936Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9728d769e936Smrg# 9729d769e936Smrg# Interface to module: 9730d769e936Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9731d769e936Smrg# XSLTPROC: returns the path of the xsltproc program found 9732d769e936Smrg# returns the path set by the user in the environment 9733d769e936Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9734d769e936Smrg# 'no' user instructs the module not to use xsltproc 9735d769e936Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9736d769e936Smrg# 9737d769e936Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9738d769e936Smrg# 9739d769e936SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9740d769e936SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9741d769e936Smrg# Preserves the interface, should it be implemented later 9742d769e936Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9743d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9744d769e936SmrgAC_ARG_WITH(xsltproc, 9745d769e936Smrg AS_HELP_STRING([--with-xsltproc], 9746d769e936Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9747d769e936Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9748d769e936Smrgm4_undefine([_defopt]) 9749d769e936Smrg 9750d769e936Smrgif test "x$use_xsltproc" = x"auto"; then 9751d769e936Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9752d769e936Smrg if test "x$XSLTPROC" = "x"; then 9753d769e936Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9754d769e936Smrg have_xsltproc=no 9755d769e936Smrg else 9756d769e936Smrg have_xsltproc=yes 9757d769e936Smrg fi 9758d769e936Smrgelif test "x$use_xsltproc" = x"yes" ; then 9759d769e936Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9760d769e936Smrg if test "x$XSLTPROC" = "x"; then 9761d769e936Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9762d769e936Smrg fi 9763d769e936Smrg have_xsltproc=yes 9764d769e936Smrgelif test "x$use_xsltproc" = x"no" ; then 9765d769e936Smrg if test "x$XSLTPROC" != "x"; then 9766d769e936Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9767d769e936Smrg fi 9768d769e936Smrg have_xsltproc=no 9769d769e936Smrgelse 9770d769e936Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9771d769e936Smrgfi 9772d769e936Smrg 9773d769e936SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9774d769e936Smrg]) # XORG_WITH_XSLTPROC 9775d769e936Smrg 9776d769e936Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9777d769e936Smrg# ---------------------------------------- 9778d769e936Smrg# Minimum version: 1.15.0 9779d769e936Smrg# 9780d769e936Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9781d769e936Smrg# scanning arbitrary text files, extracting information from those text files, 9782d769e936Smrg# and printing reports based on that information. 9783d769e936Smrg# 9784d769e936Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9785d769e936Smrg# 9786d769e936Smrg# Interface to module: 9787d769e936Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9788d769e936Smrg# PERL: returns the path of the perl program found 9789d769e936Smrg# returns the path set by the user in the environment 9790d769e936Smrg# --with-perl: 'yes' user instructs the module to use perl 9791d769e936Smrg# 'no' user instructs the module not to use perl 9792d769e936Smrg# have_perl: returns yes if perl found in PATH or no 9793d769e936Smrg# 9794d769e936Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9795d769e936Smrg# 9796d769e936SmrgAC_DEFUN([XORG_WITH_PERL],[ 9797d769e936SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9798d769e936Smrg# Preserves the interface, should it be implemented later 9799d769e936Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9800d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9801d769e936SmrgAC_ARG_WITH(perl, 9802d769e936Smrg AS_HELP_STRING([--with-perl], 9803d769e936Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9804d769e936Smrg [use_perl=$withval], [use_perl=]_defopt) 9805d769e936Smrgm4_undefine([_defopt]) 9806d769e936Smrg 9807d769e936Smrgif test "x$use_perl" = x"auto"; then 9808d769e936Smrg AC_PATH_PROG([PERL], [perl]) 9809d769e936Smrg if test "x$PERL" = "x"; then 9810d769e936Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9811d769e936Smrg have_perl=no 9812d769e936Smrg else 9813d769e936Smrg have_perl=yes 9814d769e936Smrg fi 9815d769e936Smrgelif test "x$use_perl" = x"yes" ; then 9816d769e936Smrg AC_PATH_PROG([PERL], [perl]) 9817d769e936Smrg if test "x$PERL" = "x"; then 9818d769e936Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9819d769e936Smrg fi 9820d769e936Smrg have_perl=yes 9821d769e936Smrgelif test "x$use_perl" = x"no" ; then 9822d769e936Smrg if test "x$PERL" != "x"; then 9823d769e936Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9824d769e936Smrg fi 9825d769e936Smrg have_perl=no 9826d769e936Smrgelse 9827d769e936Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9828d769e936Smrgfi 9829d769e936Smrg 9830d769e936SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9831d769e936Smrg]) # XORG_WITH_PERL 9832d769e936Smrg 9833d769e936Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9834d769e936Smrg# ---------------- 9835d769e936Smrg# Minimum version: 1.5.0 9836d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9837d769e936Smrg# 9838d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9839d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9840d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9841d769e936Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9842d769e936Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9843d769e936Smrg# --with-asciidoc assumes 'auto'. 9844d769e936Smrg# 9845d769e936Smrg# Interface to module: 9846d769e936Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9847d769e936Smrg# ASCIIDOC: returns the path of the asciidoc program found 9848d769e936Smrg# returns the path set by the user in the environment 9849d769e936Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9850d769e936Smrg# 'no' user instructs the module not to use asciidoc 9851d769e936Smrg# 9852d769e936Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9853d769e936Smrg# 9854d769e936SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9855d769e936SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9856d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9857d769e936SmrgAC_ARG_WITH(asciidoc, 9858d769e936Smrg AS_HELP_STRING([--with-asciidoc], 9859d769e936Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9860d769e936Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9861d769e936Smrgm4_undefine([_defopt]) 9862d769e936Smrg 9863d769e936Smrgif test "x$use_asciidoc" = x"auto"; then 9864d769e936Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9865d769e936Smrg if test "x$ASCIIDOC" = "x"; then 9866d769e936Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9867d769e936Smrg have_asciidoc=no 9868d769e936Smrg else 9869d769e936Smrg have_asciidoc=yes 9870d769e936Smrg fi 9871d769e936Smrgelif test "x$use_asciidoc" = x"yes" ; then 9872d769e936Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9873d769e936Smrg if test "x$ASCIIDOC" = "x"; then 9874d769e936Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9875d769e936Smrg fi 9876d769e936Smrg have_asciidoc=yes 9877d769e936Smrgelif test "x$use_asciidoc" = x"no" ; then 9878d769e936Smrg if test "x$ASCIIDOC" != "x"; then 9879d769e936Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9880d769e936Smrg fi 9881d769e936Smrg have_asciidoc=no 9882d769e936Smrgelse 9883d769e936Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9884d769e936Smrgfi 9885d769e936Smrgm4_ifval([$1], 9886d769e936Smrg[if test "$have_asciidoc" = yes; then 9887d769e936Smrg # scrape the asciidoc version 9888d769e936Smrg AC_MSG_CHECKING([the asciidoc version]) 9889d769e936Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9890d769e936Smrg AC_MSG_RESULT([$asciidoc_version]) 9891d769e936Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9892d769e936Smrg [if test "x$use_asciidoc" = xauto; then 9893d769e936Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9894d769e936Smrg have_asciidoc=no 9895d769e936Smrg else 9896d769e936Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9897d769e936Smrg fi]) 9898d769e936Smrgfi]) 9899d769e936SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9900d769e936Smrg]) # XORG_WITH_ASCIIDOC 9901d769e936Smrg 9902d769e936Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 99037322289dSmrg# ------------------------------------------- 9904d769e936Smrg# Minimum version: 1.5.0 9905d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99067322289dSmrg# Minimum version for optional DOT checking: 1.18.0 9907d769e936Smrg# 9908d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9909d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9910d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9911d769e936Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9912d769e936Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9913d769e936Smrg# --with-doxygen assumes 'auto'. 9914d769e936Smrg# 9915d769e936Smrg# Interface to module: 9916d769e936Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9917d769e936Smrg# DOXYGEN: returns the path of the doxygen program found 9918d769e936Smrg# returns the path set by the user in the environment 9919d769e936Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9920d769e936Smrg# 'no' user instructs the module not to use doxygen 9921d769e936Smrg# 9922d769e936Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9923d769e936Smrg# 9924d769e936SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9925d769e936SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 99267322289dSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9927d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 9928d769e936SmrgAC_ARG_WITH(doxygen, 9929d769e936Smrg AS_HELP_STRING([--with-doxygen], 9930d769e936Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9931d769e936Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9932d769e936Smrgm4_undefine([_defopt]) 9933d769e936Smrg 9934d769e936Smrgif test "x$use_doxygen" = x"auto"; then 9935d769e936Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9936d769e936Smrg if test "x$DOXYGEN" = "x"; then 9937d769e936Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9938d769e936Smrg have_doxygen=no 9939d769e936Smrg else 9940d769e936Smrg have_doxygen=yes 9941d769e936Smrg fi 9942d769e936Smrgelif test "x$use_doxygen" = x"yes" ; then 9943d769e936Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9944d769e936Smrg if test "x$DOXYGEN" = "x"; then 9945d769e936Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9946d769e936Smrg fi 9947d769e936Smrg have_doxygen=yes 9948d769e936Smrgelif test "x$use_doxygen" = x"no" ; then 9949d769e936Smrg if test "x$DOXYGEN" != "x"; then 9950d769e936Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9951d769e936Smrg fi 9952d769e936Smrg have_doxygen=no 9953d769e936Smrgelse 9954d769e936Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9955d769e936Smrgfi 9956d769e936Smrgm4_ifval([$1], 9957d769e936Smrg[if test "$have_doxygen" = yes; then 9958d769e936Smrg # scrape the doxygen version 9959d769e936Smrg AC_MSG_CHECKING([the doxygen version]) 9960d769e936Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9961d769e936Smrg AC_MSG_RESULT([$doxygen_version]) 9962d769e936Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9963d769e936Smrg [if test "x$use_doxygen" = xauto; then 9964d769e936Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9965d769e936Smrg have_doxygen=no 9966d769e936Smrg else 9967d769e936Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9968d769e936Smrg fi]) 9969d769e936Smrgfi]) 99707322289dSmrg 99717322289dSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 99727322289dSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 99737322289dSmrgdnl HAVE_DOT = @HAVE_DOT@ 99747322289dSmrgHAVE_DOT=no 99757322289dSmrgif test "x$have_doxygen" = "xyes"; then 99767322289dSmrg AC_PATH_PROG([DOT], [dot]) 99777322289dSmrg if test "x$DOT" != "x"; then 99787322289dSmrg HAVE_DOT=yes 99797322289dSmrg fi 99807322289dSmrgfi 99817322289dSmrg 99827322289dSmrgAC_SUBST([HAVE_DOT]) 99837322289dSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 9984d769e936SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9985d769e936Smrg]) # XORG_WITH_DOXYGEN 9986d769e936Smrg 9987d769e936Smrg# XORG_WITH_GROFF([DEFAULT]) 9988d769e936Smrg# ---------------- 9989d769e936Smrg# Minimum version: 1.6.0 9990d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9991d769e936Smrg# 9992d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 9993d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 9994d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9995d769e936Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9996d769e936Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9997d769e936Smrg# --with-groff assumes 'auto'. 9998d769e936Smrg# 9999d769e936Smrg# Interface to module: 10000d769e936Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10001d769e936Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10002d769e936Smrg# HAVE_GROFF_MS: the -ms macros package 10003d769e936Smrg# GROFF: returns the path of the groff program found 10004d769e936Smrg# returns the path set by the user in the environment 10005d769e936Smrg# --with-groff: 'yes' user instructs the module to use groff 10006d769e936Smrg# 'no' user instructs the module not to use groff 10007d769e936Smrg# 10008d769e936Smrg# Added in version 1.9.0: 10009d769e936Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10010d769e936Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10011d769e936Smrg# psselect from the psutils package. 10012d769e936Smrg# the ghostcript package. Refer to the grohtml man pages 10013d769e936Smrg# 10014d769e936Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10015d769e936Smrg# 10016d769e936Smrg# OS and distros often splits groff in a basic and full package, the former 10017d769e936Smrg# having the groff program and the later having devices, fonts and macros 10018d769e936Smrg# Checking for the groff executable is not enough. 10019d769e936Smrg# 10020d769e936Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10021d769e936Smrg# unset HAVE_GROFF or GROFF env variables. 10022d769e936Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10023d769e936Smrg# 10024d769e936SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10025d769e936SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10026d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10027d769e936SmrgAC_ARG_WITH(groff, 10028d769e936Smrg AS_HELP_STRING([--with-groff], 10029d769e936Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10030d769e936Smrg [use_groff=$withval], [use_groff=]_defopt) 10031d769e936Smrgm4_undefine([_defopt]) 10032d769e936Smrg 10033d769e936Smrgif test "x$use_groff" = x"auto"; then 10034d769e936Smrg AC_PATH_PROG([GROFF], [groff]) 10035d769e936Smrg if test "x$GROFF" = "x"; then 10036d769e936Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10037d769e936Smrg have_groff=no 10038d769e936Smrg else 10039d769e936Smrg have_groff=yes 10040d769e936Smrg fi 10041d769e936Smrgelif test "x$use_groff" = x"yes" ; then 10042d769e936Smrg AC_PATH_PROG([GROFF], [groff]) 10043d769e936Smrg if test "x$GROFF" = "x"; then 10044d769e936Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10045d769e936Smrg fi 10046d769e936Smrg have_groff=yes 10047d769e936Smrgelif test "x$use_groff" = x"no" ; then 10048d769e936Smrg if test "x$GROFF" != "x"; then 10049d769e936Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10050d769e936Smrg fi 10051d769e936Smrg have_groff=no 10052d769e936Smrgelse 10053d769e936Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10054d769e936Smrgfi 10055d769e936Smrg 10056d769e936Smrg# We have groff, test for the presence of the macro packages 10057d769e936Smrgif test "x$have_groff" = x"yes"; then 10058d769e936Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10059d769e936Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10060d769e936Smrg groff_ms_works=yes 10061d769e936Smrg else 10062d769e936Smrg groff_ms_works=no 10063d769e936Smrg fi 10064d769e936Smrg AC_MSG_RESULT([$groff_ms_works]) 10065d769e936Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10066d769e936Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10067d769e936Smrg groff_mm_works=yes 10068d769e936Smrg else 10069d769e936Smrg groff_mm_works=no 10070d769e936Smrg fi 10071d769e936Smrg AC_MSG_RESULT([$groff_mm_works]) 10072d769e936Smrgfi 10073d769e936Smrg 10074d769e936Smrg# We have groff, test for HTML dependencies, one command per package 10075d769e936Smrgif test "x$have_groff" = x"yes"; then 10076d769e936Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10077d769e936Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10078d769e936Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10079d769e936Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10080d769e936Smrg have_groff_html=yes 10081d769e936Smrg else 10082d769e936Smrg have_groff_html=no 10083d769e936Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10084d769e936Smrg fi 10085d769e936Smrgfi 10086d769e936Smrg 10087d769e936Smrg# Set Automake conditionals for Makefiles 10088d769e936SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10089d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10090d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10091d769e936SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10092d769e936Smrg]) # XORG_WITH_GROFF 10093d769e936Smrg 10094d769e936Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10095d769e936Smrg# --------------------------------------- 10096d769e936Smrg# Minimum version: 1.6.0 10097d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10098d769e936Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10099d769e936Smrg# 10100d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10101d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 10102d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10103d769e936Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10104d769e936Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10105d769e936Smrg# --with-fop assumes 'auto'. 10106d769e936Smrg# 10107d769e936Smrg# Interface to module: 10108d769e936Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10109d769e936Smrg# FOP: returns the path of the fop program found 10110d769e936Smrg# returns the path set by the user in the environment 10111d769e936Smrg# --with-fop: 'yes' user instructs the module to use fop 10112d769e936Smrg# 'no' user instructs the module not to use fop 10113d769e936Smrg# 10114d769e936Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10115d769e936Smrg# 10116d769e936SmrgAC_DEFUN([XORG_WITH_FOP],[ 10117d769e936SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10118d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 10119d769e936SmrgAC_ARG_WITH(fop, 10120d769e936Smrg AS_HELP_STRING([--with-fop], 10121d769e936Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10122d769e936Smrg [use_fop=$withval], [use_fop=]_defopt) 10123d769e936Smrgm4_undefine([_defopt]) 10124d769e936Smrg 10125d769e936Smrgif test "x$use_fop" = x"auto"; then 10126d769e936Smrg AC_PATH_PROG([FOP], [fop]) 10127d769e936Smrg if test "x$FOP" = "x"; then 10128d769e936Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10129d769e936Smrg have_fop=no 10130d769e936Smrg else 10131d769e936Smrg have_fop=yes 10132d769e936Smrg fi 10133d769e936Smrgelif test "x$use_fop" = x"yes" ; then 10134d769e936Smrg AC_PATH_PROG([FOP], [fop]) 10135d769e936Smrg if test "x$FOP" = "x"; then 10136d769e936Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10137d769e936Smrg fi 10138d769e936Smrg have_fop=yes 10139d769e936Smrgelif test "x$use_fop" = x"no" ; then 10140d769e936Smrg if test "x$FOP" != "x"; then 10141d769e936Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10142d769e936Smrg fi 10143d769e936Smrg have_fop=no 10144d769e936Smrgelse 10145d769e936Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10146d769e936Smrgfi 10147d769e936Smrg 10148d769e936Smrg# Test for a minimum version of fop, if provided. 10149d769e936Smrgm4_ifval([$1], 10150d769e936Smrg[if test "$have_fop" = yes; then 10151d769e936Smrg # scrape the fop version 10152d769e936Smrg AC_MSG_CHECKING([for fop minimum version]) 10153d769e936Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10154d769e936Smrg AC_MSG_RESULT([$fop_version]) 10155d769e936Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10156d769e936Smrg [if test "x$use_fop" = xauto; then 10157d769e936Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10158d769e936Smrg have_fop=no 10159d769e936Smrg else 10160d769e936Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10161d769e936Smrg fi]) 10162d769e936Smrgfi]) 10163d769e936SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10164d769e936Smrg]) # XORG_WITH_FOP 10165d769e936Smrg 101667322289dSmrg# XORG_WITH_M4([MIN-VERSION]) 101677322289dSmrg# --------------------------- 101687322289dSmrg# Minimum version: 1.19.0 101697322289dSmrg# 101707322289dSmrg# This macro attempts to locate an m4 macro processor which supports 101717322289dSmrg# -I option and is only useful for modules relying on M4 in order to 101727322289dSmrg# expand macros in source code files. 101737322289dSmrg# 101747322289dSmrg# Interface to module: 101757322289dSmrg# M4: returns the path of the m4 program found 101767322289dSmrg# returns the path set by the user in the environment 101777322289dSmrg# 101787322289dSmrgAC_DEFUN([XORG_WITH_M4], [ 101797322289dSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 101807322289dSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 101817322289dSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 101827322289dSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 101837322289dSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 101847322289dSmrg [$PATH:/usr/gnu/bin])]) 101857322289dSmrg 101867322289dSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 101877322289dSmrg]) # XORG_WITH_M4 101887322289dSmrg 10189d769e936Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10190d769e936Smrg# ---------------- 10191d769e936Smrg# Minimum version: 1.6.0 10192d769e936Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10193d769e936Smrg# 10194d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10195d769e936Smrg# not at the appropriate level. This macro enables a module to test for the 10196d769e936Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10197d769e936Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10198d769e936Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10199d769e936Smrg# --with-ps2pdf assumes 'auto'. 10200d769e936Smrg# 10201d769e936Smrg# Interface to module: 10202d769e936Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10203d769e936Smrg# PS2PDF: returns the path of the ps2pdf program found 10204d769e936Smrg# returns the path set by the user in the environment 10205d769e936Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10206d769e936Smrg# 'no' user instructs the module not to use ps2pdf 10207d769e936Smrg# 10208d769e936Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10209d769e936Smrg# 10210d769e936SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10211d769e936SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10212d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10213d769e936SmrgAC_ARG_WITH(ps2pdf, 10214d769e936Smrg AS_HELP_STRING([--with-ps2pdf], 10215d769e936Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10216d769e936Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10217d769e936Smrgm4_undefine([_defopt]) 10218d769e936Smrg 10219d769e936Smrgif test "x$use_ps2pdf" = x"auto"; then 10220d769e936Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10221d769e936Smrg if test "x$PS2PDF" = "x"; then 10222d769e936Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10223d769e936Smrg have_ps2pdf=no 10224d769e936Smrg else 10225d769e936Smrg have_ps2pdf=yes 10226d769e936Smrg fi 10227d769e936Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10228d769e936Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10229d769e936Smrg if test "x$PS2PDF" = "x"; then 10230d769e936Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10231d769e936Smrg fi 10232d769e936Smrg have_ps2pdf=yes 10233d769e936Smrgelif test "x$use_ps2pdf" = x"no" ; then 10234d769e936Smrg if test "x$PS2PDF" != "x"; then 10235d769e936Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10236d769e936Smrg fi 10237d769e936Smrg have_ps2pdf=no 10238d769e936Smrgelse 10239d769e936Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10240d769e936Smrgfi 10241d769e936SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10242d769e936Smrg]) # XORG_WITH_PS2PDF 10243d769e936Smrg 10244d769e936Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10245d769e936Smrg# ---------------- 10246d769e936Smrg# Minimum version: 1.6.0 10247d769e936Smrg# 10248d769e936Smrg# Documentation tools are not always available on all platforms and sometimes 10249d769e936Smrg# not at the appropriate level. This macro enables a builder to skip all 10250d769e936Smrg# documentation targets except traditional man pages. 10251d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10252d769e936Smrg# maximum flexibilty in controlling documentation building. 10253d769e936Smrg# Refer to: 10254d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 10255d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10256d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 10257d769e936Smrg# XORG_WITH_FOP --with-fop 10258d769e936Smrg# XORG_WITH_GROFF --with-groff 10259d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10260d769e936Smrg# 10261d769e936Smrg# Interface to module: 10262d769e936Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10263d769e936Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10264d769e936Smrg# 'no' user instructs the module not to generate docs 10265d769e936Smrg# parm1: specify the default value, yes or no. 10266d769e936Smrg# 10267d769e936SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10268d769e936Smrgm4_define([docs_default], m4_default([$1], [yes])) 10269d769e936SmrgAC_ARG_ENABLE(docs, 10270d769e936Smrg AS_HELP_STRING([--enable-docs], 10271d769e936Smrg [Enable building the documentation (default: ]docs_default[)]), 10272d769e936Smrg [build_docs=$enableval], [build_docs=]docs_default) 10273d769e936Smrgm4_undefine([docs_default]) 10274d769e936SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10275d769e936SmrgAC_MSG_CHECKING([whether to build documentation]) 10276d769e936SmrgAC_MSG_RESULT([$build_docs]) 10277d769e936Smrg]) # XORG_ENABLE_DOCS 10278d769e936Smrg 10279d769e936Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10280d769e936Smrg# ---------------- 10281d769e936Smrg# Minimum version: 1.6.0 10282d769e936Smrg# 10283d769e936Smrg# This macro enables a builder to skip all developer documentation. 10284d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10285d769e936Smrg# maximum flexibilty in controlling documentation building. 10286d769e936Smrg# Refer to: 10287d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 10288d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10289d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 10290d769e936Smrg# XORG_WITH_FOP --with-fop 10291d769e936Smrg# XORG_WITH_GROFF --with-groff 10292d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10293d769e936Smrg# 10294d769e936Smrg# Interface to module: 10295d769e936Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10296d769e936Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10297d769e936Smrg# 'no' user instructs the module not to generate developer docs 10298d769e936Smrg# parm1: specify the default value, yes or no. 10299d769e936Smrg# 10300d769e936SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10301d769e936Smrgm4_define([devel_default], m4_default([$1], [yes])) 10302d769e936SmrgAC_ARG_ENABLE(devel-docs, 10303d769e936Smrg AS_HELP_STRING([--enable-devel-docs], 10304d769e936Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10305d769e936Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10306d769e936Smrgm4_undefine([devel_default]) 10307d769e936SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10308d769e936SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10309d769e936SmrgAC_MSG_RESULT([$build_devel_docs]) 10310d769e936Smrg]) # XORG_ENABLE_DEVEL_DOCS 10311d769e936Smrg 10312d769e936Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10313d769e936Smrg# ---------------- 10314d769e936Smrg# Minimum version: 1.6.0 10315d769e936Smrg# 10316d769e936Smrg# This macro enables a builder to skip all functional specification targets. 10317d769e936Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10318d769e936Smrg# maximum flexibilty in controlling documentation building. 10319d769e936Smrg# Refer to: 10320d769e936Smrg# XORG_WITH_XMLTO --with-xmlto 10321d769e936Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10322d769e936Smrg# XORG_WITH_DOXYGEN --with-doxygen 10323d769e936Smrg# XORG_WITH_FOP --with-fop 10324d769e936Smrg# XORG_WITH_GROFF --with-groff 10325d769e936Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10326d769e936Smrg# 10327d769e936Smrg# Interface to module: 10328d769e936Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10329d769e936Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10330d769e936Smrg# 'no' user instructs the module not to generate specs 10331d769e936Smrg# parm1: specify the default value, yes or no. 10332d769e936Smrg# 10333d769e936SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10334d769e936Smrgm4_define([spec_default], m4_default([$1], [yes])) 10335d769e936SmrgAC_ARG_ENABLE(specs, 10336d769e936Smrg AS_HELP_STRING([--enable-specs], 10337d769e936Smrg [Enable building the specs (default: ]spec_default[)]), 10338d769e936Smrg [build_specs=$enableval], [build_specs=]spec_default) 10339d769e936Smrgm4_undefine([spec_default]) 10340d769e936SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10341d769e936SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10342d769e936SmrgAC_MSG_RESULT([$build_specs]) 10343d769e936Smrg]) # XORG_ENABLE_SPECS 10344d769e936Smrg 10345d769e936Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10346d769e936Smrg# ---------------------------------------------- 10347d769e936Smrg# Minimum version: 1.13.0 10348d769e936Smrg# 10349d769e936Smrg# This macro enables a builder to enable/disable unit testing 10350d769e936Smrg# It makes no assumption about the test cases implementation 10351d769e936Smrg# Test cases may or may not use Automake "Support for test suites" 10352d769e936Smrg# They may or may not use the software utility library GLib 10353d769e936Smrg# 10354d769e936Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10355d769e936Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10356d769e936Smrg# The variable enable_unit_tests is used by other macros in this file. 10357d769e936Smrg# 10358d769e936Smrg# Interface to module: 10359d769e936Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10360d769e936Smrg# enable_unit_tests: used in configure.ac for additional configuration 10361d769e936Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10362d769e936Smrg# 'no' user instructs the module not to build tests 10363d769e936Smrg# parm1: specify the default value, yes or no. 10364d769e936Smrg# 10365d769e936SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10366d769e936SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10367d769e936SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10368d769e936SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10369d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10370d769e936SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10371d769e936Smrg [Enable building unit test cases (default: ]_defopt[)]), 10372d769e936Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10373d769e936Smrgm4_undefine([_defopt]) 10374d769e936SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10375d769e936SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10376d769e936SmrgAC_MSG_RESULT([$enable_unit_tests]) 10377d769e936Smrg]) # XORG_ENABLE_UNIT_TESTS 10378d769e936Smrg 10379d769e936Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10380d769e936Smrg# ------------------------------------------------------ 10381d769e936Smrg# Minimum version: 1.17.0 10382d769e936Smrg# 10383d769e936Smrg# This macro enables a builder to enable/disable integration testing 10384d769e936Smrg# It makes no assumption about the test cases' implementation 10385d769e936Smrg# Test cases may or may not use Automake "Support for test suites" 10386d769e936Smrg# 10387d769e936Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10388d769e936Smrg# usually requires less dependencies and may be built and run under less 10389d769e936Smrg# stringent environments than integration tests. 10390d769e936Smrg# 10391d769e936Smrg# Interface to module: 10392d769e936Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10393d769e936Smrg# enable_integration_tests: used in configure.ac for additional configuration 10394d769e936Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10395d769e936Smrg# 'no' user instructs the module not to build tests 10396d769e936Smrg# parm1: specify the default value, yes or no. 10397d769e936Smrg# 10398d769e936SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10399d769e936SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10400d769e936Smrgm4_define([_defopt], m4_default([$1], [auto])) 10401d769e936SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10402d769e936Smrg [Enable building integration test cases (default: ]_defopt[)]), 10403d769e936Smrg [enable_integration_tests=$enableval], 10404d769e936Smrg [enable_integration_tests=]_defopt) 10405d769e936Smrgm4_undefine([_defopt]) 10406d769e936SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10407d769e936Smrg [test "x$enable_integration_tests" != xno]) 10408d769e936SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10409d769e936SmrgAC_MSG_RESULT([$enable_integration_tests]) 10410d769e936Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10411d769e936Smrg 10412d769e936Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10413d769e936Smrg# ---------------------------------------- 10414d769e936Smrg# Minimum version: 1.13.0 10415d769e936Smrg# 10416d769e936Smrg# GLib is a library which provides advanced data structures and functions. 10417d769e936Smrg# This macro enables a module to test for the presence of Glib. 10418d769e936Smrg# 10419d769e936Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10420d769e936Smrg# Otherwise the value of $enable_unit_tests is blank. 10421d769e936Smrg# 10422d769e936Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10423d769e936Smrg# test support usually requires less dependencies and may be built and run under 10424d769e936Smrg# less stringent environments than integration tests. 10425d769e936Smrg# 10426d769e936Smrg# Interface to module: 10427d769e936Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10428d769e936Smrg# with_glib: used in configure.ac to know if GLib has been found 10429d769e936Smrg# --with-glib: 'yes' user instructs the module to use glib 10430d769e936Smrg# 'no' user instructs the module not to use glib 10431d769e936Smrg# 10432d769e936SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10433d769e936SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10434d769e936Smrgm4_define([_defopt], m4_default([$2], [auto])) 10435d769e936SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10436d769e936Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10437d769e936Smrg [with_glib=$withval], [with_glib=]_defopt) 10438d769e936Smrgm4_undefine([_defopt]) 10439d769e936Smrg 10440d769e936Smrghave_glib=no 10441d769e936Smrg# Do not probe GLib if user explicitly disabled unit testing 10442d769e936Smrgif test "x$enable_unit_tests" != x"no"; then 10443d769e936Smrg # Do not probe GLib if user explicitly disabled it 10444d769e936Smrg if test "x$with_glib" != x"no"; then 10445d769e936Smrg m4_ifval( 10446d769e936Smrg [$1], 10447d769e936Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10448d769e936Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10449d769e936Smrg ) 10450d769e936Smrg fi 10451d769e936Smrgfi 10452d769e936Smrg 10453d769e936Smrg# Not having GLib when unit testing has been explicitly requested is an error 10454d769e936Smrgif test "x$enable_unit_tests" = x"yes"; then 10455d769e936Smrg if test "x$have_glib" = x"no"; then 10456d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10457d769e936Smrg fi 10458d769e936Smrgfi 10459d769e936Smrg 10460d769e936Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10461d769e936Smrgif test "x$enable_unit_tests" = x"no"; then 10462d769e936Smrg if test "x$with_glib" = x"yes"; then 10463d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10464d769e936Smrg fi 10465d769e936Smrgfi 10466d769e936Smrg 10467d769e936Smrg# Not having GLib when it has been explicitly requested is an error 10468d769e936Smrgif test "x$with_glib" = x"yes"; then 10469d769e936Smrg if test "x$have_glib" = x"no"; then 10470d769e936Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10471d769e936Smrg fi 10472d769e936Smrgfi 10473d769e936Smrg 10474d769e936SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10475d769e936Smrg]) # XORG_WITH_GLIB 10476d769e936Smrg 10477d769e936Smrg# XORG_LD_WRAP([required|optional]) 10478d769e936Smrg# --------------------------------- 10479d769e936Smrg# Minimum version: 1.13.0 10480d769e936Smrg# 10481d769e936Smrg# Check if linker supports -wrap, passed via compiler flags 10482d769e936Smrg# 10483d769e936Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10484d769e936Smrg# Otherwise the value of $enable_unit_tests is blank. 10485d769e936Smrg# 10486d769e936Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10487d769e936Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10488d769e936Smrg# available, an argument of "optional" allows use when some unit tests require 10489d769e936Smrg# ld -wrap and others do not. 10490d769e936Smrg# 10491d769e936SmrgAC_DEFUN([XORG_LD_WRAP],[ 10492d769e936SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10493d769e936Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10494d769e936Smrg void __wrap_exit(int status) { return; }], 10495d769e936Smrg [exit(0);])]) 10496d769e936Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10497d769e936Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10498d769e936Smrg if test "x$have_ld_wrap" = x"no"; then 10499d769e936Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10500d769e936Smrg fi 10501d769e936Smrgfi 10502d769e936SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10503d769e936Smrg# 10504d769e936Smrg]) # XORG_LD_WRAP 10505d769e936Smrg 10506d769e936Smrg# XORG_CHECK_LINKER_FLAGS 10507d769e936Smrg# ----------------------- 10508d769e936Smrg# SYNOPSIS 10509d769e936Smrg# 10510d769e936Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10511d769e936Smrg# 10512d769e936Smrg# DESCRIPTION 10513d769e936Smrg# 10514d769e936Smrg# Check whether the given linker FLAGS work with the current language's 10515d769e936Smrg# linker, or whether they give an error. 10516d769e936Smrg# 10517d769e936Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10518d769e936Smrg# success/failure. 10519d769e936Smrg# 10520d769e936Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10521d769e936Smrg# 10522d769e936Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10523d769e936Smrg# 10524d769e936Smrg# LICENSE 10525d769e936Smrg# 10526d769e936Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10527d769e936Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10528d769e936Smrg# Copyright (c) 2009 Matteo Frigo 10529d769e936Smrg# 10530d769e936Smrg# This program is free software: you can redistribute it and/or modify it 10531d769e936Smrg# under the terms of the GNU General Public License as published by the 10532d769e936Smrg# Free Software Foundation, either version 3 of the License, or (at your 10533d769e936Smrg# option) any later version. 10534d769e936Smrg# 10535d769e936Smrg# This program is distributed in the hope that it will be useful, but 10536d769e936Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10537d769e936Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10538d769e936Smrg# Public License for more details. 10539d769e936Smrg# 10540d769e936Smrg# You should have received a copy of the GNU General Public License along 10541d769e936Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10542d769e936Smrg# 10543d769e936Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10544d769e936Smrg# gives unlimited permission to copy, distribute and modify the configure 10545d769e936Smrg# scripts that are the output of Autoconf when processing the Macro. You 10546d769e936Smrg# need not follow the terms of the GNU General Public License when using 10547d769e936Smrg# or distributing such scripts, even though portions of the text of the 10548d769e936Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10549d769e936Smrg# all other use of the material that constitutes the Autoconf Macro. 10550d769e936Smrg# 10551d769e936Smrg# This special exception to the GPL applies to versions of the Autoconf 10552d769e936Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10553d769e936Smrg# modified version of the Autoconf Macro, you may extend this special 10554d769e936Smrg# exception to the GPL to apply to your modified version as well.# 10555d769e936SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10556d769e936Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10557d769e936Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10558d769e936SmrgAS_LITERAL_IF([$1], 10559d769e936Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10560d769e936Smrg ax_save_FLAGS=$LDFLAGS 10561d769e936Smrg LDFLAGS="$1" 10562d769e936Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10563d769e936Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10564d769e936Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10565d769e936Smrg LDFLAGS=$ax_save_FLAGS])], 10566d769e936Smrg [ax_save_FLAGS=$LDFLAGS 10567d769e936Smrg LDFLAGS="$1" 10568d769e936Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10569d769e936Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10570d769e936Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10571d769e936Smrg LDFLAGS=$ax_save_FLAGS]) 10572d769e936Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10573d769e936SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10574d769e936Smrgif test "x$xorg_check_linker_flags" = xyes; then 10575d769e936Smrg m4_default([$2], :) 10576d769e936Smrgelse 10577d769e936Smrg m4_default([$3], :) 10578d769e936Smrgfi 10579d769e936Smrg]) # XORG_CHECK_LINKER_FLAGS 10580d769e936Smrg 10581d769e936Smrg# XORG_MEMORY_CHECK_FLAGS 10582d769e936Smrg# ----------------------- 10583d769e936Smrg# Minimum version: 1.16.0 10584d769e936Smrg# 10585d769e936Smrg# This macro attempts to find appropriate memory checking functionality 10586d769e936Smrg# for various platforms which unit testing code may use to catch various 10587d769e936Smrg# forms of memory allocation and access errors in testing. 10588d769e936Smrg# 10589d769e936Smrg# Interface to module: 10590d769e936Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10591d769e936Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10592d769e936Smrg# 10593d769e936Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10594d769e936Smrg# 10595d769e936SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10596d769e936Smrg 10597d769e936SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10598d769e936SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10599d769e936Smrg [Environment variables to enable memory checking in tests]) 10600ba85709eSmrg 10601d769e936Smrg# Check for different types of support on different platforms 10602d769e936Smrgcase $host_os in 10603d769e936Smrg solaris*) 10604d769e936Smrg AC_CHECK_LIB([umem], [umem_alloc], 10605d769e936Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10606d769e936Smrg ;; 10607d769e936Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10608d769e936Smrg # both directly and inverted, so should not be 0 or 255. 10609d769e936Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10610d769e936Smrg ;; 10611d769e936Smrg darwin*) 10612d769e936Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10613d769e936Smrg ;; 10614d769e936Smrg *bsd*) 10615d769e936Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10616d769e936Smrg ;; 10617d769e936Smrgesac 10618ba85709eSmrg 10619d769e936Smrg# User supplied flags override default flags 10620d769e936Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10621d769e936Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10622ba85709eSmrgfi 10623ba85709eSmrg 10624d769e936SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10625d769e936Smrg]) # XORG_WITH_LINT 10626ba85709eSmrg 106271d54945dSmrg# XORG_CHECK_MALLOC_ZERO 106281d54945dSmrg# ---------------------- 10629ba85709eSmrg# Minimum version: 1.0.0 10630ba85709eSmrg# 106311d54945dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 106321d54945dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 106331d54945dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 106341d54945dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 106351d54945dSmrgAC_ARG_ENABLE(malloc0returnsnull, 10636d769e936Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 106371d54945dSmrg [malloc(0) returns NULL (default: auto)]), 106381d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 106391d54945dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 106401d54945dSmrg 106411d54945dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 106421d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 106437322289dSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 106447322289dSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10645d769e936Smrg#include <stdlib.h> 10646d769e936Smrg],[ 106471d54945dSmrg char *m0, *r0, *c0, *p; 106481d54945dSmrg m0 = malloc(0); 106491d54945dSmrg p = malloc(10); 106501d54945dSmrg r0 = realloc(p,0); 10651d769e936Smrg c0 = calloc(0,10); 10652d769e936Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10653d769e936Smrg])], 106547322289dSmrg [xorg_cv_malloc0_returns_null=yes], 106557322289dSmrg [xorg_cv_malloc0_returns_null=no])]) 106567322289dSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 106571d54945dSmrgfi 106581d54945dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 106591d54945dSmrg 106601d54945dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 106611d54945dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 106621d54945dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 106631d54945dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 106641d54945dSmrgelse 106651d54945dSmrg MALLOC_ZERO_CFLAGS="" 106661d54945dSmrg XMALLOC_ZERO_CFLAGS="" 106671d54945dSmrg XTMALLOC_ZERO_CFLAGS="" 106681d54945dSmrgfi 106691d54945dSmrg 106701d54945dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 106711d54945dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 106721d54945dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 106731d54945dSmrg]) # XORG_CHECK_MALLOC_ZERO 106741d54945dSmrg 10675ba85709eSmrg# XORG_WITH_LINT() 10676ba85709eSmrg# ---------------- 10677ba85709eSmrg# Minimum version: 1.1.0 10678ba85709eSmrg# 10679d769e936Smrg# This macro enables the use of a tool that flags some suspicious and 10680d769e936Smrg# non-portable constructs (likely to be bugs) in C language source code. 10681d769e936Smrg# It will attempt to locate the tool and use appropriate options. 10682d769e936Smrg# There are various lint type tools on different platforms. 10683d769e936Smrg# 10684d769e936Smrg# Interface to module: 10685d769e936Smrg# LINT: returns the path to the tool found on the platform 10686d769e936Smrg# or the value set to LINT on the configure cmd line 10687d769e936Smrg# also an Automake conditional 10688d769e936Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10689d769e936Smrg# 10690d769e936Smrg# --with-lint: 'yes' user instructs the module to use lint 10691d769e936Smrg# 'no' user instructs the module not to use lint (default) 10692d769e936Smrg# 10693d769e936Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10694d769e936Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10695ba85709eSmrg# 10696ba85709eSmrgAC_DEFUN([XORG_WITH_LINT],[ 10697ba85709eSmrg 10698d769e936SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10699d769e936SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10700d769e936SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10701ba85709eSmrg [Use a lint-style source code checker (default: disabled)])], 10702ba85709eSmrg [use_lint=$withval], [use_lint=no]) 10703d769e936Smrg 10704d769e936Smrg# Obtain platform specific info like program name and options 10705d769e936Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10706d769e936Smrgcase $host_os in 10707d769e936Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10708d769e936Smrg lint_name=splint 10709d769e936Smrg lint_options="-badflag" 10710d769e936Smrg ;; 10711d769e936Smrg *freebsd* | *netbsd*) 10712d769e936Smrg lint_name=lint 10713d769e936Smrg lint_options="-u -b" 10714d769e936Smrg ;; 10715d769e936Smrg *solaris*) 10716d769e936Smrg lint_name=lint 10717d769e936Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10718d769e936Smrg ;; 10719d769e936Smrgesac 10720d769e936Smrg 10721d769e936Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10722d769e936Smrgif test "x$use_lint" = x"yes" ; then 10723d769e936Smrg AC_PATH_PROG([LINT], [$lint_name]) 10724d769e936Smrg if test "x$LINT" = "x"; then 10725d769e936Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10726d769e936Smrg fi 10727d769e936Smrgelif test "x$use_lint" = x"no" ; then 10728d769e936Smrg if test "x$LINT" != "x"; then 10729d769e936Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10730d769e936Smrg fi 10731ba85709eSmrgelse 10732d769e936Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10733ba85709eSmrgfi 10734d769e936Smrg 10735d769e936Smrg# User supplied flags override default flags 10736d769e936Smrgif test "x$LINT_FLAGS" != "x"; then 10737d769e936Smrg lint_options=$LINT_FLAGS 10738ba85709eSmrgfi 10739ba85709eSmrg 10740d769e936SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10741d769e936SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10742ba85709eSmrg 10743ba85709eSmrg]) # XORG_WITH_LINT 10744ba85709eSmrg 10745ba85709eSmrg# XORG_LINT_LIBRARY(LIBNAME) 10746ba85709eSmrg# -------------------------- 10747ba85709eSmrg# Minimum version: 1.1.0 10748ba85709eSmrg# 10749ba85709eSmrg# Sets up flags for building lint libraries for checking programs that call 10750ba85709eSmrg# functions in the library. 10751ba85709eSmrg# 10752d769e936Smrg# Interface to module: 10753d769e936Smrg# LINTLIB - Automake variable with the name of lint library file to make 10754d769e936Smrg# MAKE_LINT_LIB - Automake conditional 10755d769e936Smrg# 10756d769e936Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10757d769e936Smrg# - 'no' user instructs the module not to create a lint library (default) 10758ba85709eSmrg 10759ba85709eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10760ba85709eSmrgAC_REQUIRE([XORG_WITH_LINT]) 10761d769e936SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10762ba85709eSmrg [Create lint library (default: disabled)])], 10763ba85709eSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10764d769e936Smrg 10765d769e936Smrgif test "x$make_lint_lib" = x"yes" ; then 10766d769e936Smrg LINTLIB=llib-l$1.ln 10767d769e936Smrg if test "x$LINT" = "x"; then 10768d769e936Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10769d769e936Smrg fi 10770d769e936Smrgelif test "x$make_lint_lib" != x"no" ; then 10771d769e936Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10772ba85709eSmrgfi 10773d769e936Smrg 10774ba85709eSmrgAC_SUBST(LINTLIB) 10775ba85709eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10776ba85709eSmrg 10777ba85709eSmrg]) # XORG_LINT_LIBRARY 10778ba85709eSmrg 10779d769e936Smrg# XORG_COMPILER_BRAND 10780d769e936Smrg# ------------------- 10781d769e936Smrg# Minimum version: 1.14.0 10782d769e936Smrg# 10783d769e936Smrg# Checks for various brands of compilers and sets flags as appropriate: 10784d769e936Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10785d769e936Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10786d769e936Smrg# clang compiler - sets CLANGCC to "yes" 10787d769e936Smrg# Intel compiler - sets INTELCC to "yes" 10788d769e936Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10789d769e936Smrg# 10790d769e936SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10791d769e936SmrgAC_LANG_CASE( 10792d769e936Smrg [C], [ 10793d769e936Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10794d769e936Smrg ], 10795d769e936Smrg [C++], [ 10796d769e936Smrg AC_REQUIRE([AC_PROG_CXX]) 10797d769e936Smrg ] 10798d769e936Smrg) 10799d769e936SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10800d769e936SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10801d769e936SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10802d769e936Smrg]) # XORG_COMPILER_BRAND 10803d769e936Smrg 10804d769e936Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10805d769e936Smrg# --------------- 10806d769e936Smrg# Minimum version: 1.16.0 10807d769e936Smrg# 10808d769e936Smrg# Test if the compiler works when passed the given flag as a command line argument. 10809d769e936Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10810d769e936Smrg# next flag in the list until there are no more options. 10811d769e936Smrg# 10812d769e936Smrg# Note that this does not guarantee that the compiler supports the flag as some 10813d769e936Smrg# compilers will simply ignore arguments that they do not understand, but we do 10814d769e936Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10815d769e936Smrg# -Werror=unused-command-line-argument 10816d769e936Smrg# 10817d769e936SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10818d769e936Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10819d769e936Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10820d769e936Smrg 10821d769e936SmrgAC_LANG_COMPILER_REQUIRE 10822d769e936Smrg 10823d769e936SmrgAC_LANG_CASE( 10824d769e936Smrg [C], [ 10825d769e936Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10826d769e936Smrg define([PREFIX], [C]) 10827d769e936Smrg define([CACHE_PREFIX], [cc]) 10828d769e936Smrg define([COMPILER], [$CC]) 10829d769e936Smrg ], 10830d769e936Smrg [C++], [ 10831d769e936Smrg define([PREFIX], [CXX]) 10832d769e936Smrg define([CACHE_PREFIX], [cxx]) 10833d769e936Smrg define([COMPILER], [$CXX]) 10834d769e936Smrg ] 10835d769e936Smrg) 10836d769e936Smrg 10837d769e936Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10838d769e936Smrg 10839d769e936Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10840d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10841d769e936Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10842d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10843d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10844d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10845d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10846d769e936Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10847d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10848d769e936Smrgfi 10849d769e936Smrg 10850d769e936Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10851d769e936Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10852d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10853d769e936Smrg fi 10854d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10855d769e936Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10856d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10857d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10858d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10859d769e936Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10860d769e936Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10861d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10862d769e936Smrgfi 10863d769e936Smrg 10864d769e936Smrgfound="no" 10865d769e936Smrgm4_foreach([flag], m4_cdr($@), [ 10866d769e936Smrg if test $found = "no" ; then 108677322289dSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10868d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10869d769e936Smrg fi 10870d769e936Smrg 108717322289dSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10872d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10873d769e936Smrg fi 10874d769e936Smrg 10875d769e936Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10876d769e936Smrg 10877d769e936Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10878d769e936Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10879d769e936Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10880d769e936Smrg AC_CACHE_VAL($cacheid, 10881d769e936Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10882d769e936Smrg [eval $cacheid=yes], 10883d769e936Smrg [eval $cacheid=no])]) 10884d769e936Smrg 10885d769e936Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10886d769e936Smrg 10887d769e936Smrg eval supported=\$$cacheid 10888d769e936Smrg AC_MSG_RESULT([$supported]) 10889d769e936Smrg if test "$supported" = "yes" ; then 10890d769e936Smrg $1="$$1 ]flag[" 10891d769e936Smrg found="yes" 10892d769e936Smrg fi 10893d769e936Smrg fi 10894d769e936Smrg]) 10895d769e936Smrg]) # XORG_TESTSET_CFLAG 10896d769e936Smrg 10897d769e936Smrg# XORG_COMPILER_FLAGS 10898d769e936Smrg# --------------- 10899d769e936Smrg# Minimum version: 1.16.0 10900d769e936Smrg# 10901d769e936Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10902d769e936Smrg# arguments supported by the selected compiler which do NOT alter the generated 10903d769e936Smrg# code. These arguments will cause the compiler to print various warnings 10904d769e936Smrg# during compilation AND turn a conservative set of warnings into errors. 10905d769e936Smrg# 10906d769e936Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10907d769e936Smrg# future versions of util-macros as options are added to new compilers. 10908d769e936Smrg# 10909d769e936SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10910d769e936SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10911d769e936Smrg 10912d769e936SmrgAC_ARG_ENABLE(selective-werror, 10913d769e936Smrg AS_HELP_STRING([--disable-selective-werror], 10914d769e936Smrg [Turn off selective compiler errors. (default: enabled)]), 10915d769e936Smrg [SELECTIVE_WERROR=$enableval], 10916d769e936Smrg [SELECTIVE_WERROR=yes]) 10917d769e936Smrg 10918d769e936SmrgAC_LANG_CASE( 10919d769e936Smrg [C], [ 10920d769e936Smrg define([PREFIX], [C]) 10921d769e936Smrg ], 10922d769e936Smrg [C++], [ 10923d769e936Smrg define([PREFIX], [CXX]) 10924d769e936Smrg ] 10925d769e936Smrg) 10926d769e936Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10927d769e936Smrgif test "x$SUNCC" = "xyes"; then 10928d769e936Smrg [BASE_]PREFIX[FLAGS]="-v" 10929d769e936Smrgelse 10930d769e936Smrg [BASE_]PREFIX[FLAGS]="" 10931d769e936Smrgfi 10932d769e936Smrg 10933d769e936Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10934d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10935d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10936d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10937d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10938d769e936Smrg 10939d769e936SmrgAC_LANG_CASE( 10940d769e936Smrg [C], [ 10941d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10942d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10943d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10944d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 109457322289dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10946d769e936Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10947d769e936Smrg ] 10948d769e936Smrg) 10949d769e936Smrg 10950d769e936Smrg# This chunk adds additional warnings that could catch undesired effects. 10951d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10952d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10953d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10954d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10955d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10956d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 109577322289dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10958d769e936Smrg 10959d769e936Smrg# These are currently disabled because they are noisy. They will be enabled 10960d769e936Smrg# in the future once the codebase is sufficiently modernized to silence 10961d769e936Smrg# them. For now, I don't want them to drown out the other warnings. 10962d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10963d769e936Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 109647322289dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10965d769e936Smrg 10966d769e936Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10967d769e936Smrg# when there are problems that should be fixed. 10968d769e936Smrg 10969d769e936Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10970d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10971d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10972d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10973d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10974d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10975d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10976d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10977d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10978d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10979d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10980d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10981d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10982d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10983d769e936Smrgelse 10984d769e936SmrgAC_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]) 10985d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10986d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10987d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10988d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10989d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10990d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10991d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10992d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10993d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10994d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10995d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10996d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10997d769e936SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10998d769e936Smrgfi 10999d769e936Smrg 11000d769e936SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11001d769e936Smrg]) # XORG_COMPILER_FLAGS 11002d769e936Smrg 11003786a6f21Smrg# XORG_CWARNFLAGS 11004786a6f21Smrg# --------------- 11005786a6f21Smrg# Minimum version: 1.2.0 11006d769e936Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11007786a6f21Smrg# 11008786a6f21Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11009786a6f21Smrg# 11010d769e936Smrg# This function is deprecated because it defines -fno-strict-aliasing 11011d769e936Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11012d769e936Smrg# is needed, then it should be added explicitly in the module when 11013d769e936Smrg# it is updated to use BASE_CFLAGS. 11014d769e936Smrg# 11015786a6f21SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11016d769e936SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11017d769e936SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11018d769e936SmrgAC_LANG_CASE( 11019d769e936Smrg [C], [ 11020d769e936Smrg CWARNFLAGS="$BASE_CFLAGS" 11021d769e936Smrg if test "x$GCC" = xyes ; then 11022d769e936Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11023d769e936Smrg fi 11024d769e936Smrg AC_SUBST(CWARNFLAGS) 11025d769e936Smrg ] 11026d769e936Smrg) 11027786a6f21Smrg]) # XORG_CWARNFLAGS 11028d769e936Smrg 11029d769e936Smrg# XORG_STRICT_OPTION 11030d769e936Smrg# ----------------------- 11031d769e936Smrg# Minimum version: 1.3.0 11032d769e936Smrg# 11033d769e936Smrg# Add configure option to enable strict compilation flags, such as treating 11034d769e936Smrg# warnings as fatal errors. 11035d769e936Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11036d769e936Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11037d769e936Smrg# 11038d769e936Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11039d769e936Smrg# when strict compilation is unconditionally desired. 11040d769e936SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11041d769e936SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11042d769e936SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11043d769e936Smrg 11044d769e936SmrgAC_ARG_ENABLE(strict-compilation, 11045d769e936Smrg AS_HELP_STRING([--enable-strict-compilation], 11046d769e936Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11047d769e936Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11048d769e936Smrg 11049d769e936SmrgAC_LANG_CASE( 11050d769e936Smrg [C], [ 11051d769e936Smrg define([PREFIX], [C]) 11052d769e936Smrg ], 11053d769e936Smrg [C++], [ 11054d769e936Smrg define([PREFIX], [CXX]) 11055d769e936Smrg ] 11056d769e936Smrg) 11057d769e936Smrg 11058d769e936Smrg[STRICT_]PREFIX[FLAGS]="" 11059d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11060d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11061d769e936Smrg 11062d769e936Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11063d769e936Smrg# activate it with -Werror, so we add it here explicitly. 11064d769e936SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11065d769e936Smrg 11066d769e936Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11067d769e936Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11068d769e936Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11069d769e936Smrgfi 11070d769e936SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11071d769e936SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11072d769e936SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11073d769e936Smrg]) # XORG_STRICT_OPTION 11074d769e936Smrg 11075d769e936Smrg# XORG_DEFAULT_OPTIONS 11076d769e936Smrg# -------------------- 11077d769e936Smrg# Minimum version: 1.3.0 11078d769e936Smrg# 11079d769e936Smrg# Defines default options for X.Org modules. 11080d769e936Smrg# 11081d769e936SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11082d769e936SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11083d769e936SmrgXORG_COMPILER_FLAGS 11084d769e936SmrgXORG_CWARNFLAGS 11085d769e936SmrgXORG_STRICT_OPTION 11086d769e936SmrgXORG_RELEASE_VERSION 11087d769e936SmrgXORG_CHANGELOG 11088d769e936SmrgXORG_INSTALL 11089d769e936SmrgXORG_MANPAGE_SECTIONS 11090d769e936Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11091d769e936Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11092d769e936Smrg]) # XORG_DEFAULT_OPTIONS 11093d769e936Smrg 11094d769e936Smrg# XORG_INSTALL() 11095d769e936Smrg# ---------------- 11096d769e936Smrg# Minimum version: 1.4.0 11097d769e936Smrg# 11098d769e936Smrg# Defines the variable INSTALL_CMD as the command to copy 11099d769e936Smrg# INSTALL from $prefix/share/util-macros. 11100d769e936Smrg# 11101d769e936SmrgAC_DEFUN([XORG_INSTALL], [ 11102d769e936SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11103d769e936Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11104d769e936SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11105d769e936Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11106d769e936Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11107d769e936Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11108d769e936SmrgAC_SUBST([INSTALL_CMD]) 11109d769e936Smrg]) # XORG_INSTALL 111101d54945dSmrgdnl Copyright 2005 Red Hat, Inc 111111d54945dSmrgdnl 111121d54945dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111131d54945dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 111141d54945dSmrgdnl the above copyright notice appear in all copies and that both that 111151d54945dSmrgdnl copyright notice and this permission notice appear in supporting 111161d54945dSmrgdnl documentation. 111171d54945dSmrgdnl 111181d54945dSmrgdnl The above copyright notice and this permission notice shall be included 111191d54945dSmrgdnl in all copies or substantial portions of the Software. 111201d54945dSmrgdnl 111211d54945dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111221d54945dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111231d54945dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111241d54945dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111251d54945dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111261d54945dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111271d54945dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 111281d54945dSmrgdnl 111291d54945dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 111301d54945dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 111311d54945dSmrgdnl other dealings in this Software without prior written authorization 111321d54945dSmrgdnl from the copyright holders. 111331d54945dSmrgdnl 111341d54945dSmrg 111351d54945dSmrg# XORG_RELEASE_VERSION 111361d54945dSmrg# -------------------- 11137d769e936Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 111387322289dSmrg 111391d54945dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11140ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11141ba85709eSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11142ba85709eSmrg [Major version of this package]) 11143ba85709eSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11144ba85709eSmrg if test "x$PVM" = "x"; then 11145ba85709eSmrg PVM="0" 11146ba85709eSmrg fi 11147ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11148ba85709eSmrg [$PVM], 11149ba85709eSmrg [Minor version of this package]) 11150ba85709eSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11151ba85709eSmrg if test "x$PVP" = "x"; then 11152ba85709eSmrg PVP="0" 11153ba85709eSmrg fi 11154ba85709eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11155ba85709eSmrg [$PVP], 11156ba85709eSmrg [Patch version of this package]) 111571d54945dSmrg]) 111581d54945dSmrg 11159786a6f21Smrg# XORG_CHANGELOG() 11160786a6f21Smrg# ---------------- 11161786a6f21Smrg# Minimum version: 1.2.0 11162786a6f21Smrg# 11163786a6f21Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11164786a6f21Smrg# ChangeLog from git. 11165786a6f21Smrg# 11166786a6f21Smrg# 11167786a6f21SmrgAC_DEFUN([XORG_CHANGELOG], [ 11168d769e936SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11169d769e936Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11170d769e936Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11171786a6f21Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11172786a6f21SmrgAC_SUBST([CHANGELOG_CMD]) 11173786a6f21Smrg]) # XORG_CHANGELOG 11174786a6f21Smrg 11175d769e936Smrgdnl Copyright 2005 Red Hat, Inc 11176d769e936Smrgdnl 11177d769e936Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11178d769e936Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11179d769e936Smrgdnl the above copyright notice appear in all copies and that both that 11180d769e936Smrgdnl copyright notice and this permission notice appear in supporting 11181d769e936Smrgdnl documentation. 11182d769e936Smrgdnl 11183d769e936Smrgdnl The above copyright notice and this permission notice shall be included 11184d769e936Smrgdnl in all copies or substantial portions of the Software. 11185d769e936Smrgdnl 11186d769e936Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11187d769e936Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11188d769e936Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11189d769e936Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11190d769e936Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11191d769e936Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11192d769e936Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11193d769e936Smrgdnl 11194d769e936Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11195d769e936Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11196d769e936Smrgdnl other dealings in this Software without prior written authorization 11197d769e936Smrgdnl from the copyright holders. 11198d769e936Smrgdnl 11199d769e936Smrg 112007322289dSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11201d769e936Smrg# -------------------------- 112027322289dSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 112037322289dSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11204d769e936Smrg 11205d769e936SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11206d769e936Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11207d769e936Smrg SAVE_CFLAGS="$CFLAGS" 11208d769e936Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11209d769e936Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11210d769e936Smrg#include "xorg-server.h" 11211d769e936Smrg#if !defined $1 11212d769e936Smrg#error $1 not defined 11213d769e936Smrg#endif 11214d769e936Smrg ]])], 11215d769e936Smrg [_EXT_CHECK=yes], 11216d769e936Smrg [_EXT_CHECK=no]) 11217d769e936Smrg CFLAGS="$SAVE_CFLAGS" 11218d769e936Smrg AC_MSG_CHECKING([if $1 is defined]) 11219d769e936Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11220d769e936Smrg if test "$_EXT_CHECK" != no; then 11221d769e936Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11222d769e936Smrg fi 11223d769e936Smrg]) 11224d769e936Smrg 112257322289dSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 112261d54945dSmrg# 112271d54945dSmrg# This file is free software; the Free Software Foundation 112281d54945dSmrg# gives unlimited permission to copy and/or distribute it, 112291d54945dSmrg# with or without modifications, as long as this notice is preserved. 112301d54945dSmrg 112311d54945dSmrg# AM_AUTOMAKE_VERSION(VERSION) 112321d54945dSmrg# ---------------------------- 112331d54945dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 112341d54945dSmrg# generated from the m4 files accompanying Automake X.Y. 11235ba85709eSmrg# (This private macro should not be called outside this file.) 11236ba85709eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 112377322289dSmrg[am__api_version='1.15' 11238ba85709eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11239ba85709eSmrgdnl require some minimum version. Point them to the right macro. 112407322289dSmrgm4_if([$1], [1.15], [], 11241ba85709eSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11242ba85709eSmrg]) 11243ba85709eSmrg 11244ba85709eSmrg# _AM_AUTOCONF_VERSION(VERSION) 11245ba85709eSmrg# ----------------------------- 11246ba85709eSmrg# aclocal traces this macro to find the Autoconf version. 11247ba85709eSmrg# This is a private macro too. Using m4_define simplifies 11248ba85709eSmrg# the logic in aclocal, which can simply ignore this definition. 11249ba85709eSmrgm4_define([_AM_AUTOCONF_VERSION], []) 112501d54945dSmrg 112511d54945dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 112521d54945dSmrg# ------------------------------- 11253ba85709eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11254786a6f21Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 112551d54945dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 112567322289dSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 11257ba85709eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 11258ba85709eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11259786a6f21Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 112601d54945dSmrg 112611d54945dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 112621d54945dSmrg 112637322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 112641d54945dSmrg# 112651d54945dSmrg# This file is free software; the Free Software Foundation 112661d54945dSmrg# gives unlimited permission to copy and/or distribute it, 112671d54945dSmrg# with or without modifications, as long as this notice is preserved. 112681d54945dSmrg 112691d54945dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 112707322289dSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 112717322289dSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 112721d54945dSmrg# 112731d54945dSmrg# Of course, Automake must honor this variable whenever it calls a 112741d54945dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 112751d54945dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 112761d54945dSmrg# depending on how configure is run. This is pretty annoying, since 112771d54945dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 112781d54945dSmrg# source directory, any form will work fine, but in subdirectories a 112791d54945dSmrg# relative path needs to be adjusted first. 112801d54945dSmrg# 112811d54945dSmrg# $ac_aux_dir/missing 112821d54945dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 112831d54945dSmrg# $top_srcdir/$ac_aux_dir/missing 112841d54945dSmrg# fails if $ac_aux_dir is absolute, 112851d54945dSmrg# fails when called from a subdirectory in a VPATH build with 112861d54945dSmrg# a relative $ac_aux_dir 112871d54945dSmrg# 112881d54945dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 112891d54945dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 112907322289dSmrg# harmless because $srcdir is '.', but things will broke when you 112911d54945dSmrg# start a VPATH build or use an absolute $srcdir. 112921d54945dSmrg# 112931d54945dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 112941d54945dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 112951d54945dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 112961d54945dSmrg# and then we would define $MISSING as 112971d54945dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 112981d54945dSmrg# This will work as long as MISSING is not called from configure, because 112991d54945dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 113001d54945dSmrg# However there are other variables, like CC, which are often used in 113011d54945dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 113021d54945dSmrg# 113031d54945dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 113041d54945dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 113051d54945dSmrg# configured tree to be moved without reconfiguration. 113061d54945dSmrg 113071d54945dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 113087322289dSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 113097322289dSmrg# Expand $ac_aux_dir to an absolute path. 113107322289dSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 113111d54945dSmrg]) 113121d54945dSmrg 113131d54945dSmrg# AM_CONDITIONAL -*- Autoconf -*- 113141d54945dSmrg 113157322289dSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 113161d54945dSmrg# 113171d54945dSmrg# This file is free software; the Free Software Foundation 113181d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113191d54945dSmrg# with or without modifications, as long as this notice is preserved. 113201d54945dSmrg 113211d54945dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 113221d54945dSmrg# ------------------------------------- 113231d54945dSmrg# Define a conditional. 113241d54945dSmrgAC_DEFUN([AM_CONDITIONAL], 113257322289dSmrg[AC_PREREQ([2.52])dnl 113267322289dSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 113277322289dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11328ba85709eSmrgAC_SUBST([$1_TRUE])dnl 11329ba85709eSmrgAC_SUBST([$1_FALSE])dnl 11330ba85709eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11331ba85709eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11332ec713c28Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 113331d54945dSmrgif $2; then 113341d54945dSmrg $1_TRUE= 113351d54945dSmrg $1_FALSE='#' 113361d54945dSmrgelse 113371d54945dSmrg $1_TRUE='#' 113381d54945dSmrg $1_FALSE= 113391d54945dSmrgfi 113401d54945dSmrgAC_CONFIG_COMMANDS_PRE( 113411d54945dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 113421d54945dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 113431d54945dSmrgUsually this means the macro was only invoked conditionally.]]) 113441d54945dSmrgfi])]) 113451d54945dSmrg 113467322289dSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 113471d54945dSmrg# 113481d54945dSmrg# This file is free software; the Free Software Foundation 113491d54945dSmrg# gives unlimited permission to copy and/or distribute it, 113501d54945dSmrg# with or without modifications, as long as this notice is preserved. 113511d54945dSmrg 113521d54945dSmrg 113537322289dSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 113541d54945dSmrg# written in clear, in which case automake, when reading aclocal.m4, 113551d54945dSmrg# will think it sees a *use*, and therefore will trigger all it's 113561d54945dSmrg# C support machinery. Also note that it means that autoscan, seeing 113571d54945dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 113581d54945dSmrg 113591d54945dSmrg 113601d54945dSmrg# _AM_DEPENDENCIES(NAME) 113611d54945dSmrg# ---------------------- 113621d54945dSmrg# See how the compiler implements dependency checking. 113637322289dSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 113641d54945dSmrg# We try a few techniques and use that to set a single cache variable. 113651d54945dSmrg# 113661d54945dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 113671d54945dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 113681d54945dSmrg# dependency, and given that the user is not expected to run this macro, 113691d54945dSmrg# just rely on AC_PROG_CC. 113701d54945dSmrgAC_DEFUN([_AM_DEPENDENCIES], 113711d54945dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 113721d54945dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 113731d54945dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 113741d54945dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 113751d54945dSmrg 113767322289dSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 113777322289dSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 113787322289dSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 113797322289dSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 113807322289dSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 113817322289dSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 113827322289dSmrg [depcc="$$1" am_compiler_list=]) 113831d54945dSmrg 113841d54945dSmrgAC_CACHE_CHECK([dependency style of $depcc], 113851d54945dSmrg [am_cv_$1_dependencies_compiler_type], 113861d54945dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 113871d54945dSmrg # We make a subdir and do the tests there. Otherwise we can end up 113881d54945dSmrg # making bogus files that we don't know about and never remove. For 113891d54945dSmrg # instance it was reported that on HP-UX the gcc test will end up 113907322289dSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 113917322289dSmrg # in D". 11392d769e936Smrg rm -rf conftest.dir 113931d54945dSmrg mkdir conftest.dir 113941d54945dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 113951d54945dSmrg # using a relative directory. 113961d54945dSmrg cp "$am_depcomp" conftest.dir 113971d54945dSmrg cd conftest.dir 113981d54945dSmrg # We will build objects and dependencies in a subdirectory because 113991d54945dSmrg # it helps to detect inapplicable dependency modes. For instance 114001d54945dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 114011d54945dSmrg # side effect of compilation, but ICC will put the dependencies in 114021d54945dSmrg # the current directory while Tru64 will put them in the object 114031d54945dSmrg # directory. 114041d54945dSmrg mkdir sub 114051d54945dSmrg 114061d54945dSmrg am_cv_$1_dependencies_compiler_type=none 114071d54945dSmrg if test "$am_compiler_list" = ""; then 114081d54945dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 114091d54945dSmrg fi 11410ec713c28Smrg am__universal=false 11411ec713c28Smrg m4_case([$1], [CC], 11412ec713c28Smrg [case " $depcc " in #( 11413ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11414ec713c28Smrg esac], 11415ec713c28Smrg [CXX], 11416ec713c28Smrg [case " $depcc " in #( 11417ec713c28Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11418ec713c28Smrg esac]) 11419ec713c28Smrg 114201d54945dSmrg for depmode in $am_compiler_list; do 114211d54945dSmrg # Setup a source with many dependencies, because some compilers 114221d54945dSmrg # like to wrap large dependency lists on column 80 (with \), and 114231d54945dSmrg # we should not choose a depcomp mode which is confused by this. 114241d54945dSmrg # 114251d54945dSmrg # We need to recreate these files for each test, as the compiler may 114261d54945dSmrg # overwrite some of them when testing with obscure command lines. 114271d54945dSmrg # This happens at least with the AIX C compiler. 114281d54945dSmrg : > sub/conftest.c 114291d54945dSmrg for i in 1 2 3 4 5 6; do 114301d54945dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 114317322289dSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 114327322289dSmrg # Solaris 10 /bin/sh. 114337322289dSmrg echo '/* dummy */' > sub/conftst$i.h 114341d54945dSmrg done 114351d54945dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 114361d54945dSmrg 114377322289dSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11438ec713c28Smrg # mode. It turns out that the SunPro C++ compiler does not properly 114397322289dSmrg # handle '-M -o', and we need to detect this. Also, some Intel 114407322289dSmrg # versions had trouble with output in subdirs. 11441ec713c28Smrg am__obj=sub/conftest.${OBJEXT-o} 11442ec713c28Smrg am__minus_obj="-o $am__obj" 114431d54945dSmrg case $depmode in 11444ec713c28Smrg gcc) 11445ec713c28Smrg # This depmode causes a compiler race in universal mode. 11446ec713c28Smrg test "$am__universal" = false || continue 11447ec713c28Smrg ;; 114481d54945dSmrg nosideeffect) 114497322289dSmrg # After this tag, mechanisms are not by side-effect, so they'll 114507322289dSmrg # only be used when explicitly requested. 114511d54945dSmrg if test "x$enable_dependency_tracking" = xyes; then 114521d54945dSmrg continue 114531d54945dSmrg else 114541d54945dSmrg break 114551d54945dSmrg fi 114561d54945dSmrg ;; 11457d769e936Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 114587322289dSmrg # This compiler won't grok '-c -o', but also, the minuso test has 11459ec713c28Smrg # not run yet. These depmodes are late enough in the game, and 11460ec713c28Smrg # so weak that their functioning should not be impacted. 11461ec713c28Smrg am__obj=conftest.${OBJEXT-o} 11462ec713c28Smrg am__minus_obj= 11463ec713c28Smrg ;; 114641d54945dSmrg none) break ;; 114651d54945dSmrg esac 114661d54945dSmrg if depmode=$depmode \ 11467ec713c28Smrg source=sub/conftest.c object=$am__obj \ 114681d54945dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11469ec713c28Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 114701d54945dSmrg >/dev/null 2>conftest.err && 11471ba85709eSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 114721d54945dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11473ec713c28Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 114741d54945dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 114751d54945dSmrg # icc doesn't choke on unknown options, it will just issue warnings 114761d54945dSmrg # or remarks (even with -Werror). So we grep stderr for any message 114771d54945dSmrg # that says an option was ignored or not supported. 114781d54945dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 114791d54945dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 114801d54945dSmrg # The diagnosis changed in icc 8.0: 114811d54945dSmrg # icc: Command line remark: option '-MP' not supported 114821d54945dSmrg if (grep 'ignoring option' conftest.err || 114831d54945dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 114841d54945dSmrg am_cv_$1_dependencies_compiler_type=$depmode 114851d54945dSmrg break 114861d54945dSmrg fi 114871d54945dSmrg fi 114881d54945dSmrg done 114891d54945dSmrg 114901d54945dSmrg cd .. 114911d54945dSmrg rm -rf conftest.dir 114921d54945dSmrgelse 114931d54945dSmrg am_cv_$1_dependencies_compiler_type=none 114941d54945dSmrgfi 114951d54945dSmrg]) 114961d54945dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 114971d54945dSmrgAM_CONDITIONAL([am__fastdep$1], [ 114981d54945dSmrg test "x$enable_dependency_tracking" != xno \ 114991d54945dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 115001d54945dSmrg]) 115011d54945dSmrg 115021d54945dSmrg 115031d54945dSmrg# AM_SET_DEPDIR 115041d54945dSmrg# ------------- 115051d54945dSmrg# Choose a directory name for dependency files. 115067322289dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 115071d54945dSmrgAC_DEFUN([AM_SET_DEPDIR], 115081d54945dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 115091d54945dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 115101d54945dSmrg]) 115111d54945dSmrg 115121d54945dSmrg 115131d54945dSmrg# AM_DEP_TRACK 115141d54945dSmrg# ------------ 115151d54945dSmrgAC_DEFUN([AM_DEP_TRACK], 115167322289dSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 115177322289dSmrgAS_HELP_STRING( 115187322289dSmrg [--enable-dependency-tracking], 115197322289dSmrg [do not reject slow dependency extractors]) 115207322289dSmrgAS_HELP_STRING( 115217322289dSmrg [--disable-dependency-tracking], 115227322289dSmrg [speeds up one-time build])]) 115231d54945dSmrgif test "x$enable_dependency_tracking" != xno; then 115241d54945dSmrg am_depcomp="$ac_aux_dir/depcomp" 115251d54945dSmrg AMDEPBACKSLASH='\' 11526d769e936Smrg am__nodep='_no' 115271d54945dSmrgfi 115281d54945dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11529ba85709eSmrgAC_SUBST([AMDEPBACKSLASH])dnl 11530ba85709eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11531d769e936SmrgAC_SUBST([am__nodep])dnl 11532d769e936Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 115331d54945dSmrg]) 115341d54945dSmrg 115351d54945dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 115361d54945dSmrg 115377322289dSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 115381d54945dSmrg# 115391d54945dSmrg# This file is free software; the Free Software Foundation 115401d54945dSmrg# gives unlimited permission to copy and/or distribute it, 115411d54945dSmrg# with or without modifications, as long as this notice is preserved. 115421d54945dSmrg 115431d54945dSmrg 115441d54945dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 115451d54945dSmrg# ------------------------------ 115461d54945dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11547ec713c28Smrg[{ 115487322289dSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11549ec713c28Smrg # are listed without --file. Let's play safe and only enable the eval 11550ec713c28Smrg # if we detect the quoting. 11551ec713c28Smrg case $CONFIG_FILES in 11552ec713c28Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11553ec713c28Smrg *) set x $CONFIG_FILES ;; 11554ec713c28Smrg esac 11555ec713c28Smrg shift 11556ec713c28Smrg for mf 11557ec713c28Smrg do 11558ec713c28Smrg # Strip MF so we end up with the name of the file. 11559ec713c28Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11560ec713c28Smrg # Check whether this is an Automake generated Makefile or not. 115617322289dSmrg # We used to match only the files named 'Makefile.in', but 11562ec713c28Smrg # some people rename them; so instead we look at the file content. 11563ec713c28Smrg # Grep'ing the first line is not enough: some people post-process 11564ec713c28Smrg # each Makefile.in and add a new line on top of each file to say so. 11565ec713c28Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11566ec713c28Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11567ec713c28Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11568ec713c28Smrg dirpart=`AS_DIRNAME("$mf")` 11569ec713c28Smrg else 11570ec713c28Smrg continue 11571ec713c28Smrg fi 11572ec713c28Smrg # Extract the definition of DEPDIR, am__include, and am__quote 115737322289dSmrg # from the Makefile without running 'make'. 11574ec713c28Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11575ec713c28Smrg test -z "$DEPDIR" && continue 11576ec713c28Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 115777322289dSmrg test -z "$am__include" && continue 11578ec713c28Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11579ec713c28Smrg # Find all dependency output files, they are included files with 11580ec713c28Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11581ec713c28Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11582ec713c28Smrg # expansion. 11583ec713c28Smrg for file in `sed -n " 11584ec713c28Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 115857322289dSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11586ec713c28Smrg # Make sure the directory exists. 11587ec713c28Smrg test -f "$dirpart/$file" && continue 11588ec713c28Smrg fdir=`AS_DIRNAME(["$file"])` 11589ec713c28Smrg AS_MKDIR_P([$dirpart/$fdir]) 11590ec713c28Smrg # echo "creating $dirpart/$file" 11591ec713c28Smrg echo '# dummy' > "$dirpart/$file" 11592ec713c28Smrg done 115931d54945dSmrg done 11594ec713c28Smrg} 115951d54945dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 115961d54945dSmrg 115971d54945dSmrg 115981d54945dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 115991d54945dSmrg# ----------------------------- 116001d54945dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 116011d54945dSmrg# 116021d54945dSmrg# This code is only required when automatic dependency tracking 116037322289dSmrg# is enabled. FIXME. This creates each '.P' file that we will 116041d54945dSmrg# need in order to bootstrap the dependency handling code. 116051d54945dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 116061d54945dSmrg[AC_CONFIG_COMMANDS([depfiles], 116071d54945dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 116081d54945dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 116091d54945dSmrg]) 116101d54945dSmrg 116111d54945dSmrg# Do all the work for Automake. -*- Autoconf -*- 116121d54945dSmrg 116137322289dSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 116141d54945dSmrg# 116151d54945dSmrg# This file is free software; the Free Software Foundation 116161d54945dSmrg# gives unlimited permission to copy and/or distribute it, 116171d54945dSmrg# with or without modifications, as long as this notice is preserved. 116181d54945dSmrg 116191d54945dSmrg# This macro actually does too much. Some checks are only needed if 116201d54945dSmrg# your package does certain things. But this isn't really a big deal. 116211d54945dSmrg 116227322289dSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 116237322289dSmrgm4_define([AC_PROG_CC], 116247322289dSmrgm4_defn([AC_PROG_CC]) 116257322289dSmrg[_AM_PROG_CC_C_O 116267322289dSmrg]) 116277322289dSmrg 116281d54945dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 116291d54945dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 116301d54945dSmrg# ----------------------------------------------- 116311d54945dSmrg# The call with PACKAGE and VERSION arguments is the old style 116321d54945dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 116331d54945dSmrg# and VERSION should now be passed to AC_INIT and removed from 116341d54945dSmrg# the call to AM_INIT_AUTOMAKE. 116351d54945dSmrg# We support both call styles for the transition. After 116361d54945dSmrg# the next Automake release, Autoconf can make the AC_INIT 116371d54945dSmrg# arguments mandatory, and then we can depend on a new Autoconf 116381d54945dSmrg# release and drop the old call support. 116391d54945dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 116407322289dSmrg[AC_PREREQ([2.65])dnl 116411d54945dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 116421d54945dSmrgdnl the ones we care about. 116431d54945dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 116441d54945dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 116451d54945dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11646ba85709eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11647ba85709eSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11648ba85709eSmrg # is not polluted with repeated "-I." 11649ba85709eSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11650ba85709eSmrg # test to see if srcdir already configured 11651ba85709eSmrg if test -f $srcdir/config.status; then 11652ba85709eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11653ba85709eSmrg fi 116541d54945dSmrgfi 116551d54945dSmrg 116561d54945dSmrg# test whether we have cygpath 116571d54945dSmrgif test -z "$CYGPATH_W"; then 116581d54945dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 116591d54945dSmrg CYGPATH_W='cygpath -w' 116601d54945dSmrg else 116611d54945dSmrg CYGPATH_W=echo 116621d54945dSmrg fi 116631d54945dSmrgfi 116641d54945dSmrgAC_SUBST([CYGPATH_W]) 116651d54945dSmrg 116661d54945dSmrg# Define the identity of the package. 116671d54945dSmrgdnl Distinguish between old-style and new-style calls. 116681d54945dSmrgm4_ifval([$2], 116697322289dSmrg[AC_DIAGNOSE([obsolete], 116707322289dSmrg [$0: two- and three-arguments forms are deprecated.]) 116717322289dSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 116721d54945dSmrg AC_SUBST([PACKAGE], [$1])dnl 116731d54945dSmrg AC_SUBST([VERSION], [$2])], 116741d54945dSmrg[_AM_SET_OPTIONS([$1])dnl 11675ba85709eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 116767322289dSmrgm4_if( 116777322289dSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 116787322289dSmrg [ok:ok],, 11679ba85709eSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 116801d54945dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 116811d54945dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 116821d54945dSmrg 116831d54945dSmrg_AM_IF_OPTION([no-define],, 116847322289dSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 116857322289dSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 116861d54945dSmrg 116871d54945dSmrg# Some tools Automake needs. 116881d54945dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 116891d54945dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 116907322289dSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 116917322289dSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 116927322289dSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 116937322289dSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 116947322289dSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11695ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11696ec713c28SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 116977322289dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 116987322289dSmrg# For better backward compatibility. To be removed once Automake 1.9.x 116997322289dSmrg# dies out for good. For more background, see: 117007322289dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 117017322289dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 117027322289dSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 117037322289dSmrg# We need awk for the "check" target (and possibly the TAP driver). The 117047322289dSmrg# system "awk" is bad on some platforms. 117051d54945dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 117061d54945dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 117071d54945dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 117081d54945dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11709ec713c28Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11710ec713c28Smrg [_AM_PROG_TAR([v7])])]) 117111d54945dSmrg_AM_IF_OPTION([no-dependencies],, 117121d54945dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 117137322289dSmrg [_AM_DEPENDENCIES([CC])], 117147322289dSmrg [m4_define([AC_PROG_CC], 117157322289dSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 117161d54945dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 117177322289dSmrg [_AM_DEPENDENCIES([CXX])], 117187322289dSmrg [m4_define([AC_PROG_CXX], 117197322289dSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11720ba85709eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 117217322289dSmrg [_AM_DEPENDENCIES([OBJC])], 117227322289dSmrg [m4_define([AC_PROG_OBJC], 117237322289dSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 117247322289dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 117257322289dSmrg [_AM_DEPENDENCIES([OBJCXX])], 117267322289dSmrg [m4_define([AC_PROG_OBJCXX], 117277322289dSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 117281d54945dSmrg]) 117297322289dSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 117307322289dSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 117317322289dSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 117327322289dSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11733ec713c28SmrgAC_CONFIG_COMMANDS_PRE(dnl 11734ec713c28Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11735ec713c28Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 117367322289dSmrg 117377322289dSmrg# POSIX will say in a future version that running "rm -f" with no argument 117387322289dSmrg# is OK; and we want to be able to make that assumption in our Makefile 117397322289dSmrg# recipes. So use an aggressive probe to check that the usage we want is 117407322289dSmrg# actually supported "in the wild" to an acceptable degree. 117417322289dSmrg# See automake bug#10828. 117427322289dSmrg# To make any issue more visible, cause the running configure to be aborted 117437322289dSmrg# by default if the 'rm' program in use doesn't match our expectations; the 117447322289dSmrg# user can still override this though. 117457322289dSmrgif rm -f && rm -fr && rm -rf; then : OK; else 117467322289dSmrg cat >&2 <<'END' 117477322289dSmrgOops! 117487322289dSmrg 117497322289dSmrgYour 'rm' program seems unable to run without file operands specified 117507322289dSmrgon the command line, even when the '-f' option is present. This is contrary 117517322289dSmrgto the behaviour of most rm programs out there, and not conforming with 117527322289dSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 117537322289dSmrg 117547322289dSmrgPlease tell bug-automake@gnu.org about your system, including the value 117557322289dSmrgof your $PATH and any error possibly output before this message. This 117567322289dSmrgcan help us improve future automake versions. 117577322289dSmrg 117587322289dSmrgEND 117597322289dSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 117607322289dSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 117617322289dSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 117627322289dSmrg echo >&2 117637322289dSmrg else 117647322289dSmrg cat >&2 <<'END' 117657322289dSmrgAborting the configuration process, to ensure you take notice of the issue. 117667322289dSmrg 117677322289dSmrgYou can download and install GNU coreutils to get an 'rm' implementation 117687322289dSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 117697322289dSmrg 117707322289dSmrgIf you want to complete the configuration process using your problematic 117717322289dSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 117727322289dSmrgto "yes", and re-run configure. 117737322289dSmrg 117747322289dSmrgEND 117757322289dSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 117767322289dSmrg fi 117777322289dSmrgfi 117787322289dSmrgdnl The trailing newline in this macro's definition is deliberate, for 117797322289dSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 117807322289dSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 117811d54945dSmrg]) 117821d54945dSmrg 117837322289dSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11784ec713c28Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11785ec713c28Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11786ec713c28Smrgm4_define([_AC_COMPILER_EXEEXT], 11787ec713c28Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11788ec713c28Smrg 117891d54945dSmrg# When config.status generates a header, we must update the stamp-h file. 117901d54945dSmrg# This file resides in the same directory as the config header 117911d54945dSmrg# that is generated. The stamp files are numbered to have different names. 117921d54945dSmrg 117931d54945dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 117941d54945dSmrg# loop where config.status creates the headers, so we can generate 117951d54945dSmrg# our stamp files there. 117961d54945dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 117971d54945dSmrg[# Compute $1's index in $config_headers. 11798ba85709eSmrg_am_arg=$1 117991d54945dSmrg_am_stamp_count=1 118001d54945dSmrgfor _am_header in $config_headers :; do 118011d54945dSmrg case $_am_header in 11802ba85709eSmrg $_am_arg | $_am_arg:* ) 118031d54945dSmrg break ;; 118041d54945dSmrg * ) 118051d54945dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 118061d54945dSmrg esac 118071d54945dSmrgdone 11808ba85709eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 118091d54945dSmrg 118107322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 118111d54945dSmrg# 118121d54945dSmrg# This file is free software; the Free Software Foundation 118131d54945dSmrg# gives unlimited permission to copy and/or distribute it, 118141d54945dSmrg# with or without modifications, as long as this notice is preserved. 118151d54945dSmrg 118161d54945dSmrg# AM_PROG_INSTALL_SH 118171d54945dSmrg# ------------------ 118181d54945dSmrg# Define $install_sh. 118191d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 118201d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 118217322289dSmrgif test x"${install_sh+set}" != xset; then 11822ec713c28Smrg case $am_aux_dir in 11823ec713c28Smrg *\ * | *\ *) 11824ec713c28Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11825ec713c28Smrg *) 11826ec713c28Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11827ec713c28Smrg esac 11828ec713c28Smrgfi 118297322289dSmrgAC_SUBST([install_sh])]) 118301d54945dSmrg 118317322289dSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 118321d54945dSmrg# 118331d54945dSmrg# This file is free software; the Free Software Foundation 118341d54945dSmrg# gives unlimited permission to copy and/or distribute it, 118351d54945dSmrg# with or without modifications, as long as this notice is preserved. 118361d54945dSmrg 118371d54945dSmrg# Check whether the underlying file-system supports filenames 118381d54945dSmrg# with a leading dot. For instance MS-DOS doesn't. 118391d54945dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 118401d54945dSmrg[rm -rf .tst 2>/dev/null 118411d54945dSmrgmkdir .tst 2>/dev/null 118421d54945dSmrgif test -d .tst; then 118431d54945dSmrg am__leading_dot=. 118441d54945dSmrgelse 118451d54945dSmrg am__leading_dot=_ 118461d54945dSmrgfi 118471d54945dSmrgrmdir .tst 2>/dev/null 118481d54945dSmrgAC_SUBST([am__leading_dot])]) 118491d54945dSmrg 118501d54945dSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 118511d54945dSmrg# From Jim Meyering 118521d54945dSmrg 118537322289dSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 118541d54945dSmrg# 118551d54945dSmrg# This file is free software; the Free Software Foundation 118561d54945dSmrg# gives unlimited permission to copy and/or distribute it, 118571d54945dSmrg# with or without modifications, as long as this notice is preserved. 118581d54945dSmrg 11859ec713c28Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11860ec713c28Smrg# ---------------------------------- 11861ec713c28Smrg# Control maintainer-specific portions of Makefiles. 118627322289dSmrg# Default is to disable them, unless 'enable' is passed literally. 118637322289dSmrg# For symmetry, 'disable' may be passed as well. Anyway, the user 11864ec713c28Smrg# can override the default with the --enable/--disable switch. 118651d54945dSmrgAC_DEFUN([AM_MAINTAINER_MODE], 11866ec713c28Smrg[m4_case(m4_default([$1], [disable]), 11867ec713c28Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11868ec713c28Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11869ec713c28Smrg [m4_define([am_maintainer_other], [enable]) 11870ec713c28Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11871d769e936SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11872ec713c28Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11873ec713c28Smrg AC_ARG_ENABLE([maintainer-mode], 118747322289dSmrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 118757322289dSmrg am_maintainer_other[ make rules and dependencies not useful 118767322289dSmrg (and sometimes confusing) to the casual installer])], 118777322289dSmrg [USE_MAINTAINER_MODE=$enableval], 118787322289dSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 118791d54945dSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11880ec713c28Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 118811d54945dSmrg MAINT=$MAINTAINER_MODE_TRUE 11882ec713c28Smrg AC_SUBST([MAINT])dnl 118831d54945dSmrg] 118841d54945dSmrg) 118851d54945dSmrg 118861d54945dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 118871d54945dSmrg 118887322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 118891d54945dSmrg# 118901d54945dSmrg# This file is free software; the Free Software Foundation 118911d54945dSmrg# gives unlimited permission to copy and/or distribute it, 118921d54945dSmrg# with or without modifications, as long as this notice is preserved. 118931d54945dSmrg 118941d54945dSmrg# AM_MAKE_INCLUDE() 118951d54945dSmrg# ----------------- 118961d54945dSmrg# Check to see how make treats includes. 118971d54945dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 118981d54945dSmrg[am_make=${MAKE-make} 118991d54945dSmrgcat > confinc << 'END' 119001d54945dSmrgam__doit: 11901ec713c28Smrg @echo this is the am__doit target 119021d54945dSmrg.PHONY: am__doit 119031d54945dSmrgEND 119041d54945dSmrg# If we don't find an include directive, just comment out the code. 119051d54945dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 119061d54945dSmrgam__include="#" 119071d54945dSmrgam__quote= 119081d54945dSmrg_am_result=none 119091d54945dSmrg# First try GNU make style include. 119101d54945dSmrgecho "include confinc" > confmf 119117322289dSmrg# Ignore all kinds of additional output from 'make'. 11912ec713c28Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11913ec713c28Smrg*the\ am__doit\ target*) 11914ec713c28Smrg am__include=include 11915ec713c28Smrg am__quote= 11916ec713c28Smrg _am_result=GNU 11917ec713c28Smrg ;; 11918ec713c28Smrgesac 119191d54945dSmrg# Now try BSD make style include. 119201d54945dSmrgif test "$am__include" = "#"; then 119211d54945dSmrg echo '.include "confinc"' > confmf 11922ec713c28Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11923ec713c28Smrg *the\ am__doit\ target*) 11924ec713c28Smrg am__include=.include 11925ec713c28Smrg am__quote="\"" 11926ec713c28Smrg _am_result=BSD 11927ec713c28Smrg ;; 11928ec713c28Smrg esac 119291d54945dSmrgfi 119301d54945dSmrgAC_SUBST([am__include]) 119311d54945dSmrgAC_SUBST([am__quote]) 119321d54945dSmrgAC_MSG_RESULT([$_am_result]) 119331d54945dSmrgrm -f confinc confmf 119341d54945dSmrg]) 119351d54945dSmrg 119361d54945dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 119371d54945dSmrg 119387322289dSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 119391d54945dSmrg# 119401d54945dSmrg# This file is free software; the Free Software Foundation 119411d54945dSmrg# gives unlimited permission to copy and/or distribute it, 119421d54945dSmrg# with or without modifications, as long as this notice is preserved. 119431d54945dSmrg 119441d54945dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 119451d54945dSmrg# ------------------------------ 119461d54945dSmrgAC_DEFUN([AM_MISSING_PROG], 119471d54945dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 119481d54945dSmrg$1=${$1-"${am_missing_run}$2"} 119491d54945dSmrgAC_SUBST($1)]) 119501d54945dSmrg 119511d54945dSmrg# AM_MISSING_HAS_RUN 119521d54945dSmrg# ------------------ 119537322289dSmrg# Define MISSING if not defined so far and test if it is modern enough. 119547322289dSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 119551d54945dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 119561d54945dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11957ba85709eSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11958ec713c28Smrgif test x"${MISSING+set}" != xset; then 11959ec713c28Smrg case $am_aux_dir in 11960ec713c28Smrg *\ * | *\ *) 11961ec713c28Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11962ec713c28Smrg *) 11963ec713c28Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11964ec713c28Smrg esac 11965ec713c28Smrgfi 119661d54945dSmrg# Use eval to expand $SHELL 119677322289dSmrgif eval "$MISSING --is-lightweight"; then 119687322289dSmrg am_missing_run="$MISSING " 119691d54945dSmrgelse 119701d54945dSmrg am_missing_run= 119717322289dSmrg AC_MSG_WARN(['missing' script is too old or missing]) 119721d54945dSmrgfi 119731d54945dSmrg]) 119741d54945dSmrg 119751d54945dSmrg# Helper functions for option handling. -*- Autoconf -*- 119761d54945dSmrg 119777322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 119781d54945dSmrg# 119791d54945dSmrg# This file is free software; the Free Software Foundation 119801d54945dSmrg# gives unlimited permission to copy and/or distribute it, 119811d54945dSmrg# with or without modifications, as long as this notice is preserved. 119821d54945dSmrg 119831d54945dSmrg# _AM_MANGLE_OPTION(NAME) 119841d54945dSmrg# ----------------------- 119851d54945dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 119861d54945dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 119871d54945dSmrg 119881d54945dSmrg# _AM_SET_OPTION(NAME) 11989d769e936Smrg# -------------------- 119901d54945dSmrg# Set option NAME. Presently that only means defining a flag for this option. 119911d54945dSmrgAC_DEFUN([_AM_SET_OPTION], 119927322289dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 119931d54945dSmrg 119941d54945dSmrg# _AM_SET_OPTIONS(OPTIONS) 11995d769e936Smrg# ------------------------ 119961d54945dSmrg# OPTIONS is a space-separated list of Automake options. 119971d54945dSmrgAC_DEFUN([_AM_SET_OPTIONS], 11998786a6f21Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 119991d54945dSmrg 120001d54945dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 120011d54945dSmrg# ------------------------------------------- 120021d54945dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 120031d54945dSmrgAC_DEFUN([_AM_IF_OPTION], 120041d54945dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 120051d54945dSmrg 120067322289dSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 120077322289dSmrg# 120087322289dSmrg# This file is free software; the Free Software Foundation 120097322289dSmrg# gives unlimited permission to copy and/or distribute it, 120107322289dSmrg# with or without modifications, as long as this notice is preserved. 120117322289dSmrg 120127322289dSmrg# _AM_PROG_CC_C_O 120137322289dSmrg# --------------- 120147322289dSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 120157322289dSmrg# to automatically call this. 120167322289dSmrgAC_DEFUN([_AM_PROG_CC_C_O], 120177322289dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 120187322289dSmrgAC_REQUIRE_AUX_FILE([compile])dnl 120197322289dSmrgAC_LANG_PUSH([C])dnl 120207322289dSmrgAC_CACHE_CHECK( 120217322289dSmrg [whether $CC understands -c and -o together], 120227322289dSmrg [am_cv_prog_cc_c_o], 120237322289dSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 120247322289dSmrg # Make sure it works both with $CC and with simple cc. 120257322289dSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 120267322289dSmrg # compilers refuse to overwrite an existing .o file with -o, 120277322289dSmrg # though they will create one. 120287322289dSmrg am_cv_prog_cc_c_o=yes 120297322289dSmrg for am_i in 1 2; do 120307322289dSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 120317322289dSmrg && test -f conftest2.$ac_objext; then 120327322289dSmrg : OK 120337322289dSmrg else 120347322289dSmrg am_cv_prog_cc_c_o=no 120357322289dSmrg break 120367322289dSmrg fi 120377322289dSmrg done 120387322289dSmrg rm -f core conftest* 120397322289dSmrg unset am_i]) 120407322289dSmrgif test "$am_cv_prog_cc_c_o" != yes; then 120417322289dSmrg # Losing compiler, so override with the script. 120427322289dSmrg # FIXME: It is wrong to rewrite CC. 120437322289dSmrg # But if we don't then we get into trouble of one sort or another. 120447322289dSmrg # A longer-term fix would be to have automake use am__CC in this case, 120457322289dSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 120467322289dSmrg CC="$am_aux_dir/compile $CC" 120477322289dSmrgfi 120487322289dSmrgAC_LANG_POP([C])]) 120497322289dSmrg 120507322289dSmrg# For backward compatibility. 120517322289dSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 120521d54945dSmrg 120537322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 120541d54945dSmrg# 120551d54945dSmrg# This file is free software; the Free Software Foundation 120561d54945dSmrg# gives unlimited permission to copy and/or distribute it, 120571d54945dSmrg# with or without modifications, as long as this notice is preserved. 120581d54945dSmrg 120597322289dSmrg# AM_RUN_LOG(COMMAND) 120607322289dSmrg# ------------------- 120617322289dSmrg# Run COMMAND, save the exit status in ac_status, and log it. 120627322289dSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 120637322289dSmrgAC_DEFUN([AM_RUN_LOG], 120647322289dSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 120657322289dSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 120667322289dSmrg ac_status=$? 120677322289dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 120687322289dSmrg (exit $ac_status); }]) 120697322289dSmrg 120707322289dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 120717322289dSmrg 120727322289dSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 120737322289dSmrg# 120747322289dSmrg# This file is free software; the Free Software Foundation 120757322289dSmrg# gives unlimited permission to copy and/or distribute it, 120767322289dSmrg# with or without modifications, as long as this notice is preserved. 120771d54945dSmrg 120781d54945dSmrg# AM_SANITY_CHECK 120791d54945dSmrg# --------------- 120801d54945dSmrgAC_DEFUN([AM_SANITY_CHECK], 120811d54945dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 12082ec713c28Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12083ec713c28Smrg# name. Accept space and tab only in the latter. 12084ec713c28Smrgam_lf=' 12085ec713c28Smrg' 12086ec713c28Smrgcase `pwd` in 12087ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12088ec713c28Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12089ec713c28Smrgesac 12090ec713c28Smrgcase $srcdir in 12091ec713c28Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 120927322289dSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12093ec713c28Smrgesac 12094ec713c28Smrg 120957322289dSmrg# Do 'set' in a subshell so we don't clobber the current shell's 120961d54945dSmrg# arguments. Must try -L first in case configure is actually a 120971d54945dSmrg# symlink; some systems play weird games with the mod time of symlinks 120981d54945dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 120991d54945dSmrg# directory). 121001d54945dSmrgif ( 121017322289dSmrg am_has_slept=no 121027322289dSmrg for am_try in 1 2; do 121037322289dSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 121047322289dSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 121057322289dSmrg if test "$[*]" = "X"; then 121067322289dSmrg # -L didn't work. 121077322289dSmrg set X `ls -t "$srcdir/configure" conftest.file` 121087322289dSmrg fi 121097322289dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 121107322289dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 121117322289dSmrg 121127322289dSmrg # If neither matched, then we have a broken ls. This can happen 121137322289dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 121147322289dSmrg # broken ls alias from the environment. This has actually 121157322289dSmrg # happened. Such a system could not be considered "sane". 121167322289dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 121177322289dSmrg alias in your environment]) 121187322289dSmrg fi 121197322289dSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 121207322289dSmrg break 121217322289dSmrg fi 121227322289dSmrg # Just in case. 121237322289dSmrg sleep 1 121247322289dSmrg am_has_slept=yes 121257322289dSmrg done 121261d54945dSmrg test "$[2]" = conftest.file 121271d54945dSmrg ) 121281d54945dSmrgthen 121291d54945dSmrg # Ok. 121301d54945dSmrg : 121311d54945dSmrgelse 121321d54945dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 121331d54945dSmrgCheck your system clock]) 121341d54945dSmrgfi 121357322289dSmrgAC_MSG_RESULT([yes]) 121367322289dSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 121377322289dSmrg# generated files are strictly newer. 121387322289dSmrgam_sleep_pid= 121397322289dSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 121407322289dSmrg ( sleep 1 ) & 121417322289dSmrg am_sleep_pid=$! 121427322289dSmrgfi 121437322289dSmrgAC_CONFIG_COMMANDS_PRE( 121447322289dSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 121457322289dSmrg if test -n "$am_sleep_pid"; then 121467322289dSmrg # Hide warnings about reused PIDs. 121477322289dSmrg wait $am_sleep_pid 2>/dev/null 121487322289dSmrg fi 121497322289dSmrg AC_MSG_RESULT([done])]) 121507322289dSmrgrm -f conftest.file 121517322289dSmrg]) 121521d54945dSmrg 121537322289dSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12154d769e936Smrg# 12155d769e936Smrg# This file is free software; the Free Software Foundation 12156d769e936Smrg# gives unlimited permission to copy and/or distribute it, 12157d769e936Smrg# with or without modifications, as long as this notice is preserved. 12158d769e936Smrg 12159d769e936Smrg# AM_SILENT_RULES([DEFAULT]) 12160d769e936Smrg# -------------------------- 12161d769e936Smrg# Enable less verbose build rules; with the default set to DEFAULT 121627322289dSmrg# ("yes" being less verbose, "no" or empty being verbose). 12163d769e936SmrgAC_DEFUN([AM_SILENT_RULES], 121647322289dSmrg[AC_ARG_ENABLE([silent-rules], [dnl 121657322289dSmrgAS_HELP_STRING( 121667322289dSmrg [--enable-silent-rules], 121677322289dSmrg [less verbose build output (undo: "make V=1")]) 121687322289dSmrgAS_HELP_STRING( 121697322289dSmrg [--disable-silent-rules], 121707322289dSmrg [verbose build output (undo: "make V=0")])dnl 121717322289dSmrg]) 121727322289dSmrgcase $enable_silent_rules in @%:@ ((( 121737322289dSmrg yes) AM_DEFAULT_VERBOSITY=0;; 121747322289dSmrg no) AM_DEFAULT_VERBOSITY=1;; 121757322289dSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12176d769e936Smrgesac 12177d769e936Smrgdnl 121787322289dSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12179d769e936Smrgdnl do not support nested variable expansions. 12180d769e936Smrgdnl See automake bug#9928 and bug#10237. 12181d769e936Smrgam_make=${MAKE-make} 12182d769e936SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12183d769e936Smrg [am_cv_make_support_nested_variables], 12184d769e936Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12185d769e936SmrgBAR0=false 12186d769e936SmrgBAR1=true 12187d769e936SmrgV=1 12188d769e936Smrgam__doit: 12189d769e936Smrg @$(TRUE) 12190d769e936Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12191d769e936Smrg am_cv_make_support_nested_variables=yes 12192d769e936Smrgelse 12193d769e936Smrg am_cv_make_support_nested_variables=no 12194d769e936Smrgfi]) 12195d769e936Smrgif test $am_cv_make_support_nested_variables = yes; then 121967322289dSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12197d769e936Smrg AM_V='$(V)' 12198d769e936Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12199d769e936Smrgelse 12200d769e936Smrg AM_V=$AM_DEFAULT_VERBOSITY 12201d769e936Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12202d769e936Smrgfi 12203d769e936SmrgAC_SUBST([AM_V])dnl 12204d769e936SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12205d769e936SmrgAC_SUBST([AM_DEFAULT_V])dnl 12206d769e936SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12207d769e936SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12208d769e936SmrgAM_BACKSLASH='\' 12209d769e936SmrgAC_SUBST([AM_BACKSLASH])dnl 12210d769e936Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12211d769e936Smrg]) 12212d769e936Smrg 122137322289dSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 122141d54945dSmrg# 122151d54945dSmrg# This file is free software; the Free Software Foundation 122161d54945dSmrg# gives unlimited permission to copy and/or distribute it, 122171d54945dSmrg# with or without modifications, as long as this notice is preserved. 122181d54945dSmrg 122191d54945dSmrg# AM_PROG_INSTALL_STRIP 122201d54945dSmrg# --------------------- 122217322289dSmrg# One issue with vendor 'install' (even GNU) is that you can't 122221d54945dSmrg# specify the program used to strip binaries. This is especially 122231d54945dSmrg# annoying in cross-compiling environments, where the build's strip 122241d54945dSmrg# is unlikely to handle the host's binaries. 122251d54945dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 122267322289dSmrg# always use install-sh in "make install-strip", and initialize 122271d54945dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 122281d54945dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 122291d54945dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 122307322289dSmrg# Installed binaries are usually stripped using 'strip' when the user 122317322289dSmrg# run "make install-strip". However 'strip' might not be the right 122321d54945dSmrg# tool to use in cross-compilation environments, therefore Automake 122337322289dSmrg# will honor the 'STRIP' environment variable to overrule this program. 122347322289dSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 122351d54945dSmrgif test "$cross_compiling" != no; then 122361d54945dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 122371d54945dSmrgfi 12238ba85709eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 122391d54945dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 122401d54945dSmrg 122417322289dSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 12242ba85709eSmrg# 12243ba85709eSmrg# This file is free software; the Free Software Foundation 12244ba85709eSmrg# gives unlimited permission to copy and/or distribute it, 12245ba85709eSmrg# with or without modifications, as long as this notice is preserved. 12246ba85709eSmrg 12247ba85709eSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 12248ba85709eSmrg# --------------------------- 12249ba85709eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12250ba85709eSmrg# This macro is traced by Automake. 12251ba85709eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12252ba85709eSmrg 12253ec713c28Smrg# AM_SUBST_NOTMAKE(VARIABLE) 12254d769e936Smrg# -------------------------- 12255ec713c28Smrg# Public sister of _AM_SUBST_NOTMAKE. 12256ec713c28SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12257ec713c28Smrg 122581d54945dSmrg# Check how to create a tarball. -*- Autoconf -*- 122591d54945dSmrg 122607322289dSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 122611d54945dSmrg# 122621d54945dSmrg# This file is free software; the Free Software Foundation 122631d54945dSmrg# gives unlimited permission to copy and/or distribute it, 122641d54945dSmrg# with or without modifications, as long as this notice is preserved. 122651d54945dSmrg 122661d54945dSmrg# _AM_PROG_TAR(FORMAT) 122671d54945dSmrg# -------------------- 122681d54945dSmrg# Check how to create a tarball in format FORMAT. 122697322289dSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 122701d54945dSmrg# 122711d54945dSmrg# Substitute a variable $(am__tar) that is a command 122721d54945dSmrg# writing to stdout a FORMAT-tarball containing the directory 122731d54945dSmrg# $tardir. 122741d54945dSmrg# tardir=directory && $(am__tar) > result.tar 122751d54945dSmrg# 122761d54945dSmrg# Substitute a variable $(am__untar) that extract such 122771d54945dSmrg# a tarball read from stdin. 122781d54945dSmrg# $(am__untar) < result.tar 122797322289dSmrg# 122801d54945dSmrgAC_DEFUN([_AM_PROG_TAR], 12281d769e936Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12282d769e936Smrg# in the wild :-( We should find a proper way to deprecate it ... 12283d769e936SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 122847322289dSmrg 122857322289dSmrg# We'll loop over all known methods to create a tar archive until one works. 122861d54945dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 122871d54945dSmrg 122887322289dSmrgm4_if([$1], [v7], 122897322289dSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 122907322289dSmrg 122917322289dSmrg [m4_case([$1], 122927322289dSmrg [ustar], 122937322289dSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 122947322289dSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 122957322289dSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 122967322289dSmrg # and bug#13588). 122977322289dSmrg am_max_uid=2097151 # 2^21 - 1 122987322289dSmrg am_max_gid=$am_max_uid 122997322289dSmrg # The $UID and $GID variables are not portable, so we need to resort 123007322289dSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 123017322289dSmrg # below are definitely unexpected, so allow the users to see them 123027322289dSmrg # (that is, avoid stderr redirection). 123037322289dSmrg am_uid=`id -u || echo unknown` 123047322289dSmrg am_gid=`id -g || echo unknown` 123057322289dSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 123067322289dSmrg if test $am_uid -le $am_max_uid; then 123077322289dSmrg AC_MSG_RESULT([yes]) 123087322289dSmrg else 123097322289dSmrg AC_MSG_RESULT([no]) 123107322289dSmrg _am_tools=none 123117322289dSmrg fi 123127322289dSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 123137322289dSmrg if test $am_gid -le $am_max_gid; then 123147322289dSmrg AC_MSG_RESULT([yes]) 123157322289dSmrg else 123167322289dSmrg AC_MSG_RESULT([no]) 123177322289dSmrg _am_tools=none 123187322289dSmrg fi], 123191d54945dSmrg 123207322289dSmrg [pax], 123217322289dSmrg [], 123227322289dSmrg 123237322289dSmrg [m4_fatal([Unknown tar format])]) 123247322289dSmrg 123257322289dSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 123267322289dSmrg 123277322289dSmrg # Go ahead even if we have the value already cached. We do so because we 123287322289dSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 123297322289dSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 123307322289dSmrg 123317322289dSmrg for _am_tool in $_am_tools; do 123327322289dSmrg case $_am_tool in 123337322289dSmrg gnutar) 123347322289dSmrg for _am_tar in tar gnutar gtar; do 123357322289dSmrg AM_RUN_LOG([$_am_tar --version]) && break 123367322289dSmrg done 123377322289dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 123387322289dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 123397322289dSmrg am__untar="$_am_tar -xf -" 123407322289dSmrg ;; 123417322289dSmrg plaintar) 123427322289dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 123437322289dSmrg # ustar tarball either. 123447322289dSmrg (tar --version) >/dev/null 2>&1 && continue 123457322289dSmrg am__tar='tar chf - "$$tardir"' 123467322289dSmrg am__tar_='tar chf - "$tardir"' 123477322289dSmrg am__untar='tar xf -' 123487322289dSmrg ;; 123497322289dSmrg pax) 123507322289dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 123517322289dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 123527322289dSmrg am__untar='pax -r' 123537322289dSmrg ;; 123547322289dSmrg cpio) 123557322289dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 123567322289dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 123577322289dSmrg am__untar='cpio -i -H $1 -d' 123587322289dSmrg ;; 123597322289dSmrg none) 123607322289dSmrg am__tar=false 123617322289dSmrg am__tar_=false 123627322289dSmrg am__untar=false 123637322289dSmrg ;; 123647322289dSmrg esac 123657322289dSmrg 123667322289dSmrg # If the value was cached, stop now. We just wanted to have am__tar 123677322289dSmrg # and am__untar set. 123687322289dSmrg test -n "${am_cv_prog_tar_$1}" && break 123697322289dSmrg 123707322289dSmrg # tar/untar a dummy directory, and stop if the command works. 123717322289dSmrg rm -rf conftest.dir 123727322289dSmrg mkdir conftest.dir 123737322289dSmrg echo GrepMe > conftest.dir/file 123747322289dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 123757322289dSmrg rm -rf conftest.dir 123767322289dSmrg if test -s conftest.tar; then 123777322289dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 123787322289dSmrg AM_RUN_LOG([cat conftest.dir/file]) 123797322289dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 123807322289dSmrg fi 123817322289dSmrg done 123821d54945dSmrg rm -rf conftest.dir 123831d54945dSmrg 123847322289dSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 123857322289dSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 123867322289dSmrg 123871d54945dSmrgAC_SUBST([am__tar]) 123881d54945dSmrgAC_SUBST([am__untar]) 123891d54945dSmrg]) # _AM_PROG_TAR 123901d54945dSmrg 12391