aclocal.m4 revision 084f91cc
1084f91ccSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2084f91ccSmrg 3084f91ccSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 49bd41f2cSmrg 59bd41f2cSmrg# This file is free software; the Free Software Foundation 69bd41f2cSmrg# gives unlimited permission to copy and/or distribute it, 79bd41f2cSmrg# with or without modifications, as long as this notice is preserved. 89bd41f2cSmrg 99bd41f2cSmrg# This program is distributed in the hope that it will be useful, 109bd41f2cSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 119bd41f2cSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 129bd41f2cSmrg# PARTICULAR PURPOSE. 139bd41f2cSmrg 14084f91ccSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15d075918cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16d075918cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17084f91ccSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18084f91ccSmrg[m4_warning([this file was generated for autoconf 2.71. 19d075918cSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20d075918cSmrgIf you have problems, you may need to regenerate the build system entirely. 21084f91ccSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 229bd41f2cSmrg 239bd41f2cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 249418810dSmrg# 25084f91ccSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 26084f91ccSmrg# Foundation, Inc. 279418810dSmrg# Written by Gordon Matzigkeit, 1996 289418810dSmrg# 299418810dSmrg# This file is free software; the Free Software Foundation gives 309418810dSmrg# unlimited permission to copy and/or distribute it, with or without 319418810dSmrg# modifications, as long as this notice is preserved. 329418810dSmrg 339418810dSmrgm4_define([_LT_COPYING], [dnl 34084f91ccSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 35084f91ccSmrg# This is free software; see the source for copying conditions. There is NO 36084f91ccSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 37084f91ccSmrg 38084f91ccSmrg# GNU Libtool is free software; you can redistribute it and/or modify 39084f91ccSmrg# it under the terms of the GNU General Public License as published by 40084f91ccSmrg# the Free Software Foundation; either version 2 of of the License, or 41084f91ccSmrg# (at your option) any later version. 429418810dSmrg# 43084f91ccSmrg# As a special exception to the GNU General Public License, if you 44084f91ccSmrg# distribute this file as part of a program or library that is built 45084f91ccSmrg# using GNU Libtool, you may include this file under the same 46084f91ccSmrg# distribution terms that you use for the rest of that program. 479418810dSmrg# 48084f91ccSmrg# GNU Libtool is distributed in the hope that it will be useful, but 49084f91ccSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 509418810dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 519418810dSmrg# GNU General Public License for more details. 529418810dSmrg# 539418810dSmrg# You should have received a copy of the GNU General Public License 54084f91ccSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 559418810dSmrg]) 569bd41f2cSmrg 57084f91ccSmrg# serial 59 LT_INIT 589bd41f2cSmrg 599bd41f2cSmrg 609418810dSmrg# LT_PREREQ(VERSION) 619418810dSmrg# ------------------ 629418810dSmrg# Complain and exit if this libtool version is less that VERSION. 639418810dSmrgm4_defun([LT_PREREQ], 649418810dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 659418810dSmrg [m4_default([$3], 669418810dSmrg [m4_fatal([Libtool version $1 or higher is required], 679418810dSmrg 63)])], 689418810dSmrg [$2])]) 699bd41f2cSmrg 709bd41f2cSmrg 719418810dSmrg# _LT_CHECK_BUILDDIR 729418810dSmrg# ------------------ 739418810dSmrg# Complain if the absolute build directory name contains unusual characters 749418810dSmrgm4_defun([_LT_CHECK_BUILDDIR], 759418810dSmrg[case `pwd` in 769418810dSmrg *\ * | *\ *) 779418810dSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 789418810dSmrgesac 799418810dSmrg]) 809418810dSmrg 819418810dSmrg 829418810dSmrg# LT_INIT([OPTIONS]) 839418810dSmrg# ------------------ 849418810dSmrgAC_DEFUN([LT_INIT], 85084f91ccSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 860da4cdccSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 879418810dSmrgAC_BEFORE([$0], [LT_LANG])dnl 889418810dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 899418810dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 909418810dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 919418810dSmrg 929418810dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 939418810dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 949418810dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 959418810dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 969418810dSmrgdnl unless we require an AC_DEFUNed macro: 979418810dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 989418810dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 999418810dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1009418810dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1019418810dSmrgm4_require([_LT_PROG_LTMAIN])dnl 1029418810dSmrg 1030da4cdccSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1040da4cdccSmrg 1059418810dSmrgdnl Parse OPTIONS 1069418810dSmrg_LT_SET_OPTIONS([$0], [$1]) 1079bd41f2cSmrg 1089bd41f2cSmrg# This can be used to rebuild libtool when needed 109084f91ccSmrgLIBTOOL_DEPS=$ltmain 1109bd41f2cSmrg 1119bd41f2cSmrg# Always use our own libtool. 1129bd41f2cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1139bd41f2cSmrgAC_SUBST(LIBTOOL)dnl 1149bd41f2cSmrg 1159418810dSmrg_LT_SETUP 1169bd41f2cSmrg 1179418810dSmrg# Only expand once: 1189418810dSmrgm4_define([LT_INIT]) 1199418810dSmrg])# LT_INIT 1209bd41f2cSmrg 1219418810dSmrg# Old names: 1229418810dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1239418810dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1249418810dSmrgdnl aclocal-1.4 backwards compatibility: 1259418810dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1269418810dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1279418810dSmrg 1289418810dSmrg 129084f91ccSmrg# _LT_PREPARE_CC_BASENAME 130084f91ccSmrg# ----------------------- 131084f91ccSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 132084f91ccSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133084f91ccSmrgfunc_cc_basename () 134084f91ccSmrg{ 135084f91ccSmrg for cc_temp in @S|@*""; do 136084f91ccSmrg case $cc_temp in 137084f91ccSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 138084f91ccSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 139084f91ccSmrg \-*) ;; 140084f91ccSmrg *) break;; 141084f91ccSmrg esac 142084f91ccSmrg done 143084f91ccSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 144084f91ccSmrg} 145084f91ccSmrg])# _LT_PREPARE_CC_BASENAME 146084f91ccSmrg 147084f91ccSmrg 1489418810dSmrg# _LT_CC_BASENAME(CC) 1499418810dSmrg# ------------------- 150084f91ccSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 151084f91ccSmrg# but that macro is also expanded into generated libtool script, which 152084f91ccSmrg# arranges for $SED and $ECHO to be set by different means. 1539418810dSmrgm4_defun([_LT_CC_BASENAME], 154084f91ccSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 155084f91ccSmrgAC_REQUIRE([_LT_DECL_SED])dnl 156084f91ccSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 157084f91ccSmrgfunc_cc_basename $1 158084f91ccSmrgcc_basename=$func_cc_basename_result 1599418810dSmrg]) 1609418810dSmrg 1619418810dSmrg 1629418810dSmrg# _LT_FILEUTILS_DEFAULTS 1639418810dSmrg# ---------------------- 1649418810dSmrg# It is okay to use these file commands and assume they have been set 165084f91ccSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1669418810dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1679418810dSmrg[: ${CP="cp -f"} 1689418810dSmrg: ${MV="mv -f"} 1699418810dSmrg: ${RM="rm -f"} 1709418810dSmrg])# _LT_FILEUTILS_DEFAULTS 1719418810dSmrg 1729418810dSmrg 1739418810dSmrg# _LT_SETUP 1749418810dSmrg# --------- 1759418810dSmrgm4_defun([_LT_SETUP], 1769418810dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1779bd41f2cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1780da4cdccSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1790da4cdccSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1800da4cdccSmrg 1810da4cdccSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1820da4cdccSmrgdnl 1839418810dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1849418810dSmrg_LT_DECL([], [host], [0])dnl 1859418810dSmrg_LT_DECL([], [host_os], [0])dnl 1869418810dSmrgdnl 1879418810dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1889418810dSmrg_LT_DECL([], [build], [0])dnl 1899418810dSmrg_LT_DECL([], [build_os], [0])dnl 1909418810dSmrgdnl 1919bd41f2cSmrgAC_REQUIRE([AC_PROG_CC])dnl 1929418810dSmrgAC_REQUIRE([LT_PATH_LD])dnl 1939418810dSmrgAC_REQUIRE([LT_PATH_NM])dnl 1949418810dSmrgdnl 1959bd41f2cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1969418810dSmrgtest -z "$LN_S" && LN_S="ln -s" 1979418810dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1989418810dSmrgdnl 1999418810dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2009418810dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2019418810dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2029bd41f2cSmrgdnl 2039418810dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2049418810dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2050da4cdccSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2069418810dSmrgm4_require([_LT_CMD_RELOAD])dnl 207084f91ccSmrgm4_require([_LT_DECL_FILECMD])dnl 2089418810dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2090da4cdccSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2109418810dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2119418810dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2120da4cdccSmrgm4_require([_LT_WITH_SYSROOT])dnl 213084f91ccSmrgm4_require([_LT_CMD_TRUNCATE])dnl 2149418810dSmrg 2159418810dSmrg_LT_CONFIG_LIBTOOL_INIT([ 216084f91ccSmrg# See if we are running on zsh, and set the options that allow our 2179418810dSmrg# commands through without removal of \ escapes INIT. 218084f91ccSmrgif test -n "\${ZSH_VERSION+set}"; then 2199418810dSmrg setopt NO_GLOB_SUBST 2209418810dSmrgfi 2219418810dSmrg]) 222084f91ccSmrgif test -n "${ZSH_VERSION+set}"; then 2239418810dSmrg setopt NO_GLOB_SUBST 2249418810dSmrgfi 2259418810dSmrg 2269418810dSmrg_LT_CHECK_OBJDIR 2279bd41f2cSmrg 2289418810dSmrgm4_require([_LT_TAG_COMPILER])dnl 2299bd41f2cSmrg 2309bd41f2cSmrgcase $host_os in 2319bd41f2cSmrgaix3*) 2329bd41f2cSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2339bd41f2cSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2349bd41f2cSmrg # vanish in a puff of smoke. 235084f91ccSmrg if test set != "${COLLECT_NAMES+set}"; then 2369bd41f2cSmrg COLLECT_NAMES= 2379bd41f2cSmrg export COLLECT_NAMES 2389bd41f2cSmrg fi 2399bd41f2cSmrg ;; 2409bd41f2cSmrgesac 2419bd41f2cSmrg 2429bd41f2cSmrg# Global variables: 2439418810dSmrgofile=libtool 2449bd41f2cSmrgcan_build_shared=yes 2459bd41f2cSmrg 246084f91ccSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 247084f91ccSmrg# ICC, which need '.lib'). 2489bd41f2cSmrglibext=a 2499bd41f2cSmrg 250084f91ccSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2519bd41f2cSmrg 252084f91ccSmrgold_CC=$CC 253084f91ccSmrgold_CFLAGS=$CFLAGS 2549bd41f2cSmrg 2559bd41f2cSmrg# Set sane defaults for various variables 2569bd41f2cSmrgtest -z "$CC" && CC=cc 2579bd41f2cSmrgtest -z "$LTCC" && LTCC=$CC 2589bd41f2cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2599bd41f2cSmrgtest -z "$LD" && LD=ld 2609bd41f2cSmrgtest -z "$ac_objext" && ac_objext=o 2619bd41f2cSmrg 2629bd41f2cSmrg_LT_CC_BASENAME([$compiler]) 2639bd41f2cSmrg 2649bd41f2cSmrg# Only perform the check for file, if the check method requires it 2659418810dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2669bd41f2cSmrgcase $deplibs_check_method in 2679bd41f2cSmrgfile_magic*) 2689bd41f2cSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2699418810dSmrg _LT_PATH_MAGIC 2709bd41f2cSmrg fi 2719bd41f2cSmrg ;; 2729bd41f2cSmrgesac 2739bd41f2cSmrg 2749418810dSmrg# Use C for the default configuration in the libtool script 2759418810dSmrgLT_SUPPORTED_TAG([CC]) 2769418810dSmrg_LT_LANG_C_CONFIG 2779418810dSmrg_LT_LANG_DEFAULT_CONFIG 2789418810dSmrg_LT_CONFIG_COMMANDS 2799418810dSmrg])# _LT_SETUP 280d075918cSmrg 2819bd41f2cSmrg 2820da4cdccSmrg# _LT_PREPARE_SED_QUOTE_VARS 2830da4cdccSmrg# -------------------------- 2840da4cdccSmrg# Define a few sed substitution that help us do robust quoting. 2850da4cdccSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2860da4cdccSmrg[# Backslashify metacharacters that are still active within 2870da4cdccSmrg# double-quoted strings. 2880da4cdccSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2890da4cdccSmrg 2900da4cdccSmrg# Same as above, but do not quote variable references. 2910da4cdccSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2920da4cdccSmrg 2930da4cdccSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2940da4cdccSmrg# double_quote_subst'ed string. 2950da4cdccSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2960da4cdccSmrg 2970da4cdccSmrg# Sed substitution to delay expansion of an escaped single quote. 2980da4cdccSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2990da4cdccSmrg 3000da4cdccSmrg# Sed substitution to avoid accidental globbing in evaled expressions 3010da4cdccSmrgno_glob_subst='s/\*/\\\*/g' 3020da4cdccSmrg]) 3030da4cdccSmrg 3049418810dSmrg# _LT_PROG_LTMAIN 3059418810dSmrg# --------------- 306084f91ccSmrg# Note that this code is called both from 'configure', and 'config.status' 3079418810dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 308084f91ccSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3099418810dSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3109418810dSmrgm4_defun([_LT_PROG_LTMAIN], 3119418810dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3129418810dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 313084f91ccSmrgltmain=$ac_aux_dir/ltmain.sh 3149418810dSmrg])# _LT_PROG_LTMAIN 3159bd41f2cSmrg 3169bd41f2cSmrg 3179418810dSmrg 3189418810dSmrg# So that we can recreate a full libtool script including additional 3199418810dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 320084f91ccSmrg# in macros and then make a single call at the end using the 'libtool' 3219418810dSmrg# label. 3229418810dSmrg 3239418810dSmrg 3249418810dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3259418810dSmrg# ---------------------------------------- 3269418810dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3279418810dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3289418810dSmrg[m4_ifval([$1], 3299418810dSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3309418810dSmrg [$1 3319418810dSmrg])])]) 3329418810dSmrg 3339418810dSmrg# Initialize. 3349418810dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3359418810dSmrg 3369418810dSmrg 3379418810dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3389418810dSmrg# ------------------------------ 3399418810dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3409418810dSmrgm4_define([_LT_CONFIG_LIBTOOL], 3419418810dSmrg[m4_ifval([$1], 3429418810dSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3439418810dSmrg [$1 3449418810dSmrg])])]) 3459418810dSmrg 3469418810dSmrg# Initialize. 3479418810dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3489418810dSmrg 3499418810dSmrg 3509418810dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3519418810dSmrg# ----------------------------------------------------- 3529418810dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3539418810dSmrg[_LT_CONFIG_LIBTOOL([$1]) 3549418810dSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3559418810dSmrg]) 3569418810dSmrg 3579418810dSmrg 3589418810dSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3599418810dSmrg# ----------------------------- 3609418810dSmrg# Add leading comment marks to the start of each line, and a trailing 3619418810dSmrg# full-stop to the whole comment if one is not present already. 3629418810dSmrgm4_define([_LT_FORMAT_COMMENT], 3639418810dSmrg[m4_ifval([$1], [ 3649418810dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3659418810dSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3669418810dSmrg)]) 3679418810dSmrg 3689418810dSmrg 3699418810dSmrg 3709418810dSmrg 3719418810dSmrg 3729418810dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3739418810dSmrg# ------------------------------------------------------------------- 3749418810dSmrg# CONFIGNAME is the name given to the value in the libtool script. 3759418810dSmrg# VARNAME is the (base) name used in the configure script. 3769418810dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3779418810dSmrg# VARNAME. Any other value will be used directly. 3789418810dSmrgm4_define([_LT_DECL], 3799418810dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3809418810dSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3819418810dSmrg [m4_ifval([$1], [$1], [$2])]) 3829418810dSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3839418810dSmrg m4_ifval([$4], 3849418810dSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3859418810dSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3869418810dSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3879418810dSmrg]) 3889418810dSmrg 3899418810dSmrg 3909418810dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3919418810dSmrg# -------------------------------------------------------- 3929418810dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3939418810dSmrg 3949418810dSmrg 3959418810dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3969418810dSmrg# ------------------------------------------------ 3979418810dSmrgm4_define([lt_decl_tag_varnames], 3989418810dSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3999418810dSmrg 4009418810dSmrg 4019418810dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4029418810dSmrg# --------------------------------------------------------- 4039418810dSmrgm4_define([_lt_decl_filter], 4049418810dSmrg[m4_case([$#], 4059418810dSmrg [0], [m4_fatal([$0: too few arguments: $#])], 4069418810dSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4079418810dSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4089418810dSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4099418810dSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4109418810dSmrg]) 4119418810dSmrg 4129418810dSmrg 4139418810dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4149418810dSmrg# -------------------------------------------------- 4159418810dSmrgm4_define([lt_decl_quote_varnames], 4169418810dSmrg[_lt_decl_filter([value], [1], $@)]) 4179418810dSmrg 4189418810dSmrg 4199418810dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4209418810dSmrg# --------------------------------------------------- 4219418810dSmrgm4_define([lt_decl_dquote_varnames], 4229418810dSmrg[_lt_decl_filter([value], [2], $@)]) 4239418810dSmrg 4249418810dSmrg 4259418810dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4269418810dSmrg# --------------------------------------------------- 4279418810dSmrgm4_define([lt_decl_varnames_tagged], 4289418810dSmrg[m4_assert([$# <= 2])dnl 4299418810dSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4309418810dSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4319418810dSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4329418810dSmrgm4_define([_lt_decl_varnames_tagged], 4339418810dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4349418810dSmrg 4359418810dSmrg 4369418810dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4379418810dSmrg# ------------------------------------------------ 4389418810dSmrgm4_define([lt_decl_all_varnames], 4399418810dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4409418810dSmrg m4_if([$2], [], 4419418810dSmrg m4_quote(lt_decl_varnames), 4429418810dSmrg m4_quote(m4_shift($@))))[]dnl 4439418810dSmrg]) 4449418810dSmrgm4_define([_lt_decl_all_varnames], 4459418810dSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4469418810dSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4479418810dSmrg]) 4489418810dSmrg 4499418810dSmrg 4509418810dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4519418810dSmrg# ------------------------------------ 452084f91ccSmrg# Quote a variable value, and forward it to 'config.status' so that its 453084f91ccSmrg# declaration there will have the same value as in 'configure'. VARNAME 4549418810dSmrg# must have a single quote delimited value for this to work. 4559418810dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4560da4cdccSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4579418810dSmrg 4589418810dSmrg 4599418810dSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4609418810dSmrg# ------------------------------ 4619418810dSmrg# We delimit libtool config variables with single quotes, so when 4629418810dSmrg# we write them to config.status, we have to be sure to quote all 4639418810dSmrg# embedded single quotes properly. In configure, this macro expands 4649418810dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4659418810dSmrg# 4660da4cdccSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4679418810dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4689418810dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4699418810dSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4709bd41f2cSmrg 4719bd41f2cSmrg 4729418810dSmrg# _LT_LIBTOOL_TAGS 4739418810dSmrg# ---------------- 4749418810dSmrg# Output comment and list of tags supported by the script 4759418810dSmrgm4_defun([_LT_LIBTOOL_TAGS], 4769418810dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 477084f91ccSmrgavailable_tags='_LT_TAGS'dnl 4789418810dSmrg]) 4799418810dSmrg 4809418810dSmrg 4819418810dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4829418810dSmrg# ----------------------------------- 4839418810dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4849418810dSmrg# expand to a commented shell variable setting: 4859418810dSmrg# 4869418810dSmrg# # Some comment about what VAR is for. 4879418810dSmrg# visible_name=$lt_internal_name 4889418810dSmrgm4_define([_LT_LIBTOOL_DECLARE], 4899418810dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4909418810dSmrg [description])))[]dnl 4919418810dSmrgm4_pushdef([_libtool_name], 4929418810dSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4939418810dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4949418810dSmrg [0], [_libtool_name=[$]$1], 4959418810dSmrg [1], [_libtool_name=$lt_[]$1], 4969418810dSmrg [2], [_libtool_name=$lt_[]$1], 4979418810dSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4989418810dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4999418810dSmrg]) 5009418810dSmrg 5019418810dSmrg 5029418810dSmrg# _LT_LIBTOOL_CONFIG_VARS 5039418810dSmrg# ----------------------- 5049418810dSmrg# Produce commented declarations of non-tagged libtool config variables 505084f91ccSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5069418810dSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5079418810dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5089418810dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5099418810dSmrg[m4_foreach([_lt_var], 5109418810dSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5119418810dSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5129418810dSmrg 5139418810dSmrg 5149418810dSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 5159418810dSmrg# ------------------------- 5169418810dSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 5179418810dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5189418810dSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5199418810dSmrg 5209418810dSmrg 5219418810dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5229418810dSmrg# ------------------------------ 5239418810dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5249418810dSmrg 5259418810dSmrg 5269418810dSmrg# _LT_CONFIG_COMMANDS 5279bd41f2cSmrg# ------------------- 5289418810dSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5299418810dSmrg# variables for single and double quote escaping we saved from calls 5309418810dSmrg# to _LT_DECL, we can put quote escaped variables declarations 531084f91ccSmrg# into 'config.status', and then the shell code to quote escape them in 532084f91ccSmrg# for loops in 'config.status'. Finally, any additional code accumulated 5339418810dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5349418810dSmrgm4_defun([_LT_CONFIG_COMMANDS], 5359418810dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5369418810dSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5379418810dSmrg dnl instead of duplicating it all over again into config.status, 5389418810dSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5399418810dSmrg dnl needs to know what name is stored there: 5409418810dSmrg [AC_CONFIG_COMMANDS([libtool], 5419418810dSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5429418810dSmrg dnl If the libtool generation code is destined for config.status, 5439418810dSmrg dnl expand the accumulated commands and init code now: 5449418810dSmrg [AC_CONFIG_COMMANDS([libtool], 5459418810dSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5469418810dSmrg])#_LT_CONFIG_COMMANDS 5479418810dSmrg 5489418810dSmrg 5499418810dSmrg# Initialize. 5509418810dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5519418810dSmrg[ 5529418810dSmrg 5539418810dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5549418810dSmrg# if CDPATH is set. 5559418810dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5569418810dSmrg 5579418810dSmrgsed_quote_subst='$sed_quote_subst' 5589418810dSmrgdouble_quote_subst='$double_quote_subst' 5599418810dSmrgdelay_variable_subst='$delay_variable_subst' 5609418810dSmrg_LT_CONFIG_STATUS_DECLARATIONS 5619418810dSmrgLTCC='$LTCC' 5629418810dSmrgLTCFLAGS='$LTCFLAGS' 5639418810dSmrgcompiler='$compiler_DEFAULT' 5649418810dSmrg 5650da4cdccSmrg# A function that is used when there is no print builtin or printf. 5660da4cdccSmrgfunc_fallback_echo () 5670da4cdccSmrg{ 5680da4cdccSmrg eval 'cat <<_LTECHO_EOF 5690da4cdccSmrg\$[]1 5700da4cdccSmrg_LTECHO_EOF' 5710da4cdccSmrg} 5720da4cdccSmrg 5739418810dSmrg# Quote evaled strings. 5749418810dSmrgfor var in lt_decl_all_varnames([[ \ 5759418810dSmrg]], lt_decl_quote_varnames); do 5760da4cdccSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5779418810dSmrg *[[\\\\\\\`\\"\\\$]]*) 578084f91ccSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5799418810dSmrg ;; 5809418810dSmrg *) 5819418810dSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5829418810dSmrg ;; 5839418810dSmrg esac 5849418810dSmrgdone 5859418810dSmrg 5869418810dSmrg# Double-quote double-evaled strings. 5879418810dSmrgfor var in lt_decl_all_varnames([[ \ 5889418810dSmrg]], lt_decl_dquote_varnames); do 5890da4cdccSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5909418810dSmrg *[[\\\\\\\`\\"\\\$]]*) 591084f91ccSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5929418810dSmrg ;; 5939418810dSmrg *) 5949418810dSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5959418810dSmrg ;; 5969418810dSmrg esac 5979418810dSmrgdone 5989418810dSmrg 5999418810dSmrg_LT_OUTPUT_LIBTOOL_INIT 6009418810dSmrg]) 6019418810dSmrg 6020da4cdccSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 6030da4cdccSmrg# ------------------------------------ 6040da4cdccSmrg# Generate a child script FILE with all initialization necessary to 6050da4cdccSmrg# reuse the environment learned by the parent script, and make the 6060da4cdccSmrg# file executable. If COMMENT is supplied, it is inserted after the 607084f91ccSmrg# '#!' sequence but before initialization text begins. After this 6080da4cdccSmrg# macro, additional text can be appended to FILE to form the body of 6090da4cdccSmrg# the child script. The macro ends with non-zero status if the 6100da4cdccSmrg# file could not be fully written (such as if the disk is full). 6110da4cdccSmrgm4_ifdef([AS_INIT_GENERATED], 6120da4cdccSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6130da4cdccSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 6140da4cdccSmrg[m4_require([AS_PREPARE])]dnl 6150da4cdccSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6160da4cdccSmrg[lt_write_fail=0 6170da4cdccSmrgcat >$1 <<_ASEOF || lt_write_fail=1 6180da4cdccSmrg#! $SHELL 6190da4cdccSmrg# Generated by $as_me. 6200da4cdccSmrg$2 6210da4cdccSmrgSHELL=\${CONFIG_SHELL-$SHELL} 6220da4cdccSmrgexport SHELL 6230da4cdccSmrg_ASEOF 6240da4cdccSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6250da4cdccSmrgAS_SHELL_SANITIZE 6260da4cdccSmrg_AS_PREPARE 6270da4cdccSmrgexec AS_MESSAGE_FD>&1 6280da4cdccSmrg_ASEOF 629084f91ccSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6300da4cdccSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6319418810dSmrg 6329418810dSmrg# LT_OUTPUT 6339418810dSmrg# --------- 6349418810dSmrg# This macro allows early generation of the libtool script (before 6359418810dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 6369418810dSmrg# tests. 6379418810dSmrgAC_DEFUN([LT_OUTPUT], 6389418810dSmrg[: ${CONFIG_LT=./config.lt} 6399418810dSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6400da4cdccSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6410da4cdccSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 6429418810dSmrg 6439418810dSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6440da4cdccSmrglt_cl_silent=false 6459418810dSmrgexec AS_MESSAGE_LOG_FD>>config.log 6469418810dSmrg{ 6479418810dSmrg echo 6489418810dSmrg AS_BOX([Running $as_me.]) 6499418810dSmrg} >&AS_MESSAGE_LOG_FD 6509418810dSmrg 6519418810dSmrglt_cl_help="\ 652084f91ccSmrg'$as_me' creates a local libtool stub from the current configuration, 6539418810dSmrgfor use in further configure time tests before the real libtool is 6549418810dSmrggenerated. 6559418810dSmrg 6569418810dSmrgUsage: $[0] [[OPTIONS]] 6579418810dSmrg 6589418810dSmrg -h, --help print this help, then exit 6599418810dSmrg -V, --version print version number, then exit 6609418810dSmrg -q, --quiet do not print progress messages 6619418810dSmrg -d, --debug don't remove temporary files 6629418810dSmrg 6639418810dSmrgReport bugs to <bug-libtool@gnu.org>." 6649418810dSmrg 6659418810dSmrglt_cl_version="\ 6669418810dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6679418810dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6689418810dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6699418810dSmrg 6700da4cdccSmrgCopyright (C) 2011 Free Software Foundation, Inc. 6719418810dSmrgThis config.lt script is free software; the Free Software Foundation 6729418810dSmrggives unlimited permision to copy, distribute and modify it." 6739418810dSmrg 674084f91ccSmrgwhile test 0 != $[#] 6759418810dSmrgdo 6769418810dSmrg case $[1] in 6779418810dSmrg --version | --v* | -V ) 6789418810dSmrg echo "$lt_cl_version"; exit 0 ;; 6799418810dSmrg --help | --h* | -h ) 6809418810dSmrg echo "$lt_cl_help"; exit 0 ;; 6819418810dSmrg --debug | --d* | -d ) 6829418810dSmrg debug=: ;; 6839418810dSmrg --quiet | --q* | --silent | --s* | -q ) 6849418810dSmrg lt_cl_silent=: ;; 6859418810dSmrg 6869418810dSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 687084f91ccSmrgTry '$[0] --help' for more information.]) ;; 6889418810dSmrg 6899418810dSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 690084f91ccSmrgTry '$[0] --help' for more information.]) ;; 6919418810dSmrg esac 6929418810dSmrg shift 6939418810dSmrgdone 6949418810dSmrg 6959418810dSmrgif $lt_cl_silent; then 6969418810dSmrg exec AS_MESSAGE_FD>/dev/null 6979418810dSmrgfi 6989418810dSmrg_LTEOF 6999418810dSmrg 7009418810dSmrgcat >>"$CONFIG_LT" <<_LTEOF 7019418810dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7029418810dSmrg_LTEOF 7039418810dSmrg 7049418810dSmrgcat >>"$CONFIG_LT" <<\_LTEOF 7059418810dSmrgAC_MSG_NOTICE([creating $ofile]) 7069418810dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 7079418810dSmrgAS_EXIT(0) 7089418810dSmrg_LTEOF 7099418810dSmrgchmod +x "$CONFIG_LT" 7109418810dSmrg 7119418810dSmrg# configure is writing to config.log, but config.lt does its own redirection, 7129418810dSmrg# appending to config.log, which fails on DOS, as config.log is still kept 7139418810dSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7149418810dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7150da4cdccSmrglt_cl_success=: 716084f91ccSmrgtest yes = "$silent" && 7170da4cdccSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 7180da4cdccSmrgexec AS_MESSAGE_LOG_FD>/dev/null 7190da4cdccSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7200da4cdccSmrgexec AS_MESSAGE_LOG_FD>>config.log 7210da4cdccSmrg$lt_cl_success || AS_EXIT(1) 7229418810dSmrg])# LT_OUTPUT 7239418810dSmrg 7249418810dSmrg 7259418810dSmrg# _LT_CONFIG(TAG) 7269418810dSmrg# --------------- 7279418810dSmrg# If TAG is the built-in tag, create an initial libtool script with a 7289418810dSmrg# default configuration from the untagged config vars. Otherwise add code 7299418810dSmrg# to config.status for appending the configuration named by TAG from the 7309418810dSmrg# matching tagged config vars. 7319418810dSmrgm4_defun([_LT_CONFIG], 7329418810dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7339418810dSmrg_LT_CONFIG_SAVE_COMMANDS([ 7349418810dSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7359418810dSmrg m4_if(_LT_TAG, [C], [ 736084f91ccSmrg # See if we are running on zsh, and set the options that allow our 7379418810dSmrg # commands through without removal of \ escapes. 738084f91ccSmrg if test -n "${ZSH_VERSION+set}"; then 7399418810dSmrg setopt NO_GLOB_SUBST 7409418810dSmrg fi 7419418810dSmrg 742084f91ccSmrg cfgfile=${ofile}T 7439418810dSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7449418810dSmrg $RM "$cfgfile" 7459418810dSmrg 7469418810dSmrg cat <<_LT_EOF >> "$cfgfile" 7479418810dSmrg#! $SHELL 748084f91ccSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7499418810dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7509418810dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 751084f91ccSmrg 752084f91ccSmrg# Provide generalized library-building support services. 753084f91ccSmrg# Written by Gordon Matzigkeit, 1996 754084f91ccSmrg 7559418810dSmrg_LT_COPYING 7569418810dSmrg_LT_LIBTOOL_TAGS 7579418810dSmrg 758084f91ccSmrg# Configured defaults for sys_lib_dlsearch_path munging. 759084f91ccSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 760084f91ccSmrg 7619418810dSmrg# ### BEGIN LIBTOOL CONFIG 7629418810dSmrg_LT_LIBTOOL_CONFIG_VARS 7639418810dSmrg_LT_LIBTOOL_TAG_VARS 7649418810dSmrg# ### END LIBTOOL CONFIG 7659418810dSmrg 766084f91ccSmrg_LT_EOF 767084f91ccSmrg 768084f91ccSmrg cat <<'_LT_EOF' >> "$cfgfile" 769084f91ccSmrg 770084f91ccSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 771084f91ccSmrg 772084f91ccSmrg_LT_PREPARE_MUNGE_PATH_LIST 773084f91ccSmrg_LT_PREPARE_CC_BASENAME 774084f91ccSmrg 775084f91ccSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 776084f91ccSmrg 7779418810dSmrg_LT_EOF 7789418810dSmrg 7799418810dSmrg case $host_os in 7809418810dSmrg aix3*) 7819418810dSmrg cat <<\_LT_EOF >> "$cfgfile" 7829418810dSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7839418810dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7849418810dSmrg# vanish in a puff of smoke. 785084f91ccSmrgif test set != "${COLLECT_NAMES+set}"; then 7869418810dSmrg COLLECT_NAMES= 7879418810dSmrg export COLLECT_NAMES 7889418810dSmrgfi 7899418810dSmrg_LT_EOF 7909418810dSmrg ;; 7919418810dSmrg esac 7929418810dSmrg 7939418810dSmrg _LT_PROG_LTMAIN 7949418810dSmrg 7959418810dSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7969418810dSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7979418810dSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7989418810dSmrg # is reportedly fixed, but why not run on old versions too? 799084f91ccSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 8000da4cdccSmrg || (rm -f "$cfgfile"; exit 1) 8019418810dSmrg 8020da4cdccSmrg mv -f "$cfgfile" "$ofile" || 8039418810dSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8049418810dSmrg chmod +x "$ofile" 8059418810dSmrg], 8069418810dSmrg[cat <<_LT_EOF >> "$ofile" 8079418810dSmrg 8089418810dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8099418810dSmrgdnl in a comment (ie after a #). 8109418810dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8119418810dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8129418810dSmrg# ### END LIBTOOL TAG CONFIG: $1 8139418810dSmrg_LT_EOF 8149418810dSmrg])dnl /m4_if 8159418810dSmrg], 8169418810dSmrg[m4_if([$1], [], [ 8179418810dSmrg PACKAGE='$PACKAGE' 8189418810dSmrg VERSION='$VERSION' 8199418810dSmrg RM='$RM' 8209418810dSmrg ofile='$ofile'], []) 8219418810dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8229418810dSmrg])# _LT_CONFIG 8239418810dSmrg 8249418810dSmrg 8259418810dSmrg# LT_SUPPORTED_TAG(TAG) 8269418810dSmrg# --------------------- 8279418810dSmrg# Trace this macro to discover what tags are supported by the libtool 8289418810dSmrg# --tag option, using: 8299418810dSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8309418810dSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8319418810dSmrg 8329418810dSmrg 8339418810dSmrg# C support is built-in for now 8349418810dSmrgm4_define([_LT_LANG_C_enabled], []) 8359418810dSmrgm4_define([_LT_TAGS], []) 8369418810dSmrg 8379418810dSmrg 8389418810dSmrg# LT_LANG(LANG) 8399418810dSmrg# ------------- 8409418810dSmrg# Enable libtool support for the given language if not already enabled. 8419418810dSmrgAC_DEFUN([LT_LANG], 8429418810dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8439418810dSmrgm4_case([$1], 8449418810dSmrg [C], [_LT_LANG(C)], 8459418810dSmrg [C++], [_LT_LANG(CXX)], 8460da4cdccSmrg [Go], [_LT_LANG(GO)], 8479418810dSmrg [Java], [_LT_LANG(GCJ)], 8489418810dSmrg [Fortran 77], [_LT_LANG(F77)], 8499418810dSmrg [Fortran], [_LT_LANG(FC)], 8509418810dSmrg [Windows Resource], [_LT_LANG(RC)], 8519418810dSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8529418810dSmrg [_LT_LANG($1)], 8539418810dSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8549418810dSmrg])# LT_LANG 8559418810dSmrg 8569418810dSmrg 8579418810dSmrg# _LT_LANG(LANGNAME) 8589418810dSmrg# ------------------ 8599418810dSmrgm4_defun([_LT_LANG], 8609418810dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8619418810dSmrg [LT_SUPPORTED_TAG([$1])dnl 8629418810dSmrg m4_append([_LT_TAGS], [$1 ])dnl 8639418810dSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8649418810dSmrg _LT_LANG_$1_CONFIG($1)])dnl 8659418810dSmrg])# _LT_LANG 8669418810dSmrg 8679418810dSmrg 8680da4cdccSmrgm4_ifndef([AC_PROG_GO], [ 8690da4cdccSmrg# NOTE: This macro has been submitted for inclusion into # 8700da4cdccSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8710da4cdccSmrg# a released version of Autoconf we should remove this # 8720da4cdccSmrg# macro and use it instead. # 8730da4cdccSmrgm4_defun([AC_PROG_GO], 8740da4cdccSmrg[AC_LANG_PUSH(Go)dnl 8750da4cdccSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8760da4cdccSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8770da4cdccSmrg_AC_ARG_VAR_LDFLAGS()dnl 8780da4cdccSmrgAC_CHECK_TOOL(GOC, gccgo) 8790da4cdccSmrgif test -z "$GOC"; then 8800da4cdccSmrg if test -n "$ac_tool_prefix"; then 8810da4cdccSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8820da4cdccSmrg fi 8830da4cdccSmrgfi 8840da4cdccSmrgif test -z "$GOC"; then 8850da4cdccSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8860da4cdccSmrgfi 8870da4cdccSmrg])#m4_defun 8880da4cdccSmrg])#m4_ifndef 8890da4cdccSmrg 8900da4cdccSmrg 8919418810dSmrg# _LT_LANG_DEFAULT_CONFIG 8929418810dSmrg# ----------------------- 8939418810dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8949418810dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8959418810dSmrg [LT_LANG(CXX)], 8969418810dSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8979418810dSmrg 8989418810dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8999418810dSmrg [LT_LANG(F77)], 9009418810dSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 9019418810dSmrg 9029418810dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9039418810dSmrg [LT_LANG(FC)], 9049418810dSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 9059418810dSmrg 9069418810dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9079418810dSmrgdnl pulling things in needlessly. 9089418810dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9099418810dSmrg [LT_LANG(GCJ)], 9109418810dSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9119418810dSmrg [LT_LANG(GCJ)], 9129418810dSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9139418810dSmrg [LT_LANG(GCJ)], 9149418810dSmrg [m4_ifdef([AC_PROG_GCJ], 9159418810dSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9169418810dSmrg m4_ifdef([A][M_PROG_GCJ], 9179418810dSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9189418810dSmrg m4_ifdef([LT_PROG_GCJ], 9199418810dSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9209418810dSmrg 9210da4cdccSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9220da4cdccSmrg [LT_LANG(GO)], 9230da4cdccSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9240da4cdccSmrg 9259418810dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9269418810dSmrg [LT_LANG(RC)], 9279418810dSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9289418810dSmrg])# _LT_LANG_DEFAULT_CONFIG 9299418810dSmrg 9309418810dSmrg# Obsolete macros: 9319418810dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9329418810dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9339418810dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9349418810dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9350da4cdccSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9369418810dSmrgdnl aclocal-1.4 backwards compatibility: 9379418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9389418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9399418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9409418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9410da4cdccSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9429418810dSmrg 9439418810dSmrg 9449418810dSmrg# _LT_TAG_COMPILER 9459418810dSmrg# ---------------- 9469418810dSmrgm4_defun([_LT_TAG_COMPILER], 9479bd41f2cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 9489bd41f2cSmrg 9499418810dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9509418810dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9519418810dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9529418810dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9539418810dSmrg 9549bd41f2cSmrg# If no C compiler was specified, use CC. 9559bd41f2cSmrgLTCC=${LTCC-"$CC"} 9569bd41f2cSmrg 9579bd41f2cSmrg# If no C compiler flags were specified, use CFLAGS. 9589bd41f2cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9599bd41f2cSmrg 9609bd41f2cSmrg# Allow CC to be a program name with arguments. 9619bd41f2cSmrgcompiler=$CC 9629418810dSmrg])# _LT_TAG_COMPILER 9639bd41f2cSmrg 9649bd41f2cSmrg 9659bd41f2cSmrg# _LT_COMPILER_BOILERPLATE 9669bd41f2cSmrg# ------------------------ 9679bd41f2cSmrg# Check for compiler boilerplate output or warnings with 9689bd41f2cSmrg# the simple compiler test code. 9699418810dSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 9709418810dSmrg[m4_require([_LT_DECL_SED])dnl 9719bd41f2cSmrgac_outfile=conftest.$ac_objext 9729bd41f2cSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9739bd41f2cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9749bd41f2cSmrg_lt_compiler_boilerplate=`cat conftest.err` 9759418810dSmrg$RM conftest* 9769bd41f2cSmrg])# _LT_COMPILER_BOILERPLATE 9779bd41f2cSmrg 9789bd41f2cSmrg 9799bd41f2cSmrg# _LT_LINKER_BOILERPLATE 9809bd41f2cSmrg# ---------------------- 9819bd41f2cSmrg# Check for linker boilerplate output or warnings with 9829bd41f2cSmrg# the simple link test code. 9839418810dSmrgm4_defun([_LT_LINKER_BOILERPLATE], 9849418810dSmrg[m4_require([_LT_DECL_SED])dnl 9859bd41f2cSmrgac_outfile=conftest.$ac_objext 9869bd41f2cSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9879bd41f2cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9889bd41f2cSmrg_lt_linker_boilerplate=`cat conftest.err` 9899418810dSmrg$RM -r conftest* 9909bd41f2cSmrg])# _LT_LINKER_BOILERPLATE 9919bd41f2cSmrg 992d075918cSmrg# _LT_REQUIRED_DARWIN_CHECKS 9939418810dSmrg# ------------------------- 9949418810dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 995d075918cSmrg case $host_os in 996d075918cSmrg rhapsody* | darwin*) 997d075918cSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 998d075918cSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9999418810dSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 10009418810dSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 10019418810dSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10029418810dSmrg _LT_DECL([], [DSYMUTIL], [1], 10039418810dSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10049418810dSmrg _LT_DECL([], [NMEDIT], [1], 10059418810dSmrg [Tool to change global to local symbols on Mac OS X]) 10069418810dSmrg _LT_DECL([], [LIPO], [1], 10079418810dSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 10089418810dSmrg _LT_DECL([], [OTOOL], [1], 10099418810dSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10109418810dSmrg _LT_DECL([], [OTOOL64], [1], 10119418810dSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1012d075918cSmrg 1013d075918cSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1014d075918cSmrg [lt_cv_apple_cc_single_mod=no 1015084f91ccSmrg if test -z "$LT_MULTI_MODULE"; then 10169418810dSmrg # By default we will add the -single_module flag. You can override 10179418810dSmrg # by either setting the environment variable LT_MULTI_MODULE 10189418810dSmrg # non-empty at configure time, or by adding -multi_module to the 10199418810dSmrg # link flags. 10209418810dSmrg rm -rf libconftest.dylib* 10219418810dSmrg echo "int foo(void){return 1;}" > conftest.c 10229418810dSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10239418810dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10249418810dSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10259418810dSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10269418810dSmrg _lt_result=$? 10270da4cdccSmrg # If there is a non-empty error log, and "single_module" 10280da4cdccSmrg # appears in it, assume the flag caused a linker warning 10290da4cdccSmrg if test -s conftest.err && $GREP single_module conftest.err; then 10300da4cdccSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10310da4cdccSmrg # Otherwise, if the output was created with a 0 exit code from 10320da4cdccSmrg # the compiler, it worked. 1033084f91ccSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10349418810dSmrg lt_cv_apple_cc_single_mod=yes 10359418810dSmrg else 10369418810dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10379418810dSmrg fi 10389418810dSmrg rm -rf libconftest.dylib* 10399418810dSmrg rm -f conftest.* 1040d075918cSmrg fi]) 10410da4cdccSmrg 1042d075918cSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1043d075918cSmrg [lt_cv_ld_exported_symbols_list], 1044d075918cSmrg [lt_cv_ld_exported_symbols_list=no 1045d075918cSmrg save_LDFLAGS=$LDFLAGS 1046d075918cSmrg echo "_main" > conftest.sym 1047d075918cSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1048d075918cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10499418810dSmrg [lt_cv_ld_exported_symbols_list=yes], 10509418810dSmrg [lt_cv_ld_exported_symbols_list=no]) 1051084f91ccSmrg LDFLAGS=$save_LDFLAGS 1052d075918cSmrg ]) 10530da4cdccSmrg 10540da4cdccSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10550da4cdccSmrg [lt_cv_ld_force_load=no 10560da4cdccSmrg cat > conftest.c << _LT_EOF 10570da4cdccSmrgint forced_loaded() { return 2;} 10580da4cdccSmrg_LT_EOF 10590da4cdccSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10600da4cdccSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1061084f91ccSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1062084f91ccSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10630da4cdccSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10640da4cdccSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10650da4cdccSmrg cat > conftest.c << _LT_EOF 10660da4cdccSmrgint main() { return 0;} 10670da4cdccSmrg_LT_EOF 10680da4cdccSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10690da4cdccSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10700da4cdccSmrg _lt_result=$? 10710da4cdccSmrg if test -s conftest.err && $GREP force_load conftest.err; then 10720da4cdccSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1073084f91ccSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10740da4cdccSmrg lt_cv_ld_force_load=yes 10750da4cdccSmrg else 10760da4cdccSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10770da4cdccSmrg fi 10780da4cdccSmrg rm -f conftest.err libconftest.a conftest conftest.c 10790da4cdccSmrg rm -rf conftest.dSYM 10800da4cdccSmrg ]) 1081d075918cSmrg case $host_os in 10829418810dSmrg rhapsody* | darwin1.[[012]]) 1083084f91ccSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1084d075918cSmrg darwin1.*) 1085084f91ccSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1086084f91ccSmrg darwin*) 1087084f91ccSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 1088084f91ccSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1089084f91ccSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1090084f91ccSmrg *) 1091084f91ccSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1092d075918cSmrg esac 1093d075918cSmrg ;; 1094d075918cSmrg esac 1095084f91ccSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1096d075918cSmrg _lt_dar_single_mod='$single_module' 1097d075918cSmrg fi 1098084f91ccSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1099084f91ccSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1100d075918cSmrg else 1101084f91ccSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1102d075918cSmrg fi 1103084f91ccSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11049418810dSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1105d075918cSmrg else 1106d075918cSmrg _lt_dsymutil= 1107d075918cSmrg fi 1108d075918cSmrg ;; 1109d075918cSmrg esac 1110d075918cSmrg]) 11119bd41f2cSmrg 11129418810dSmrg 11130da4cdccSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11140da4cdccSmrg# --------------------------------- 11159418810dSmrg# Checks for linker and compiler features on darwin 11169418810dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11179418810dSmrg[ 11189418810dSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11199418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11209418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 11219418810dSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11229418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1123084f91ccSmrg if test yes = "$lt_cv_ld_force_load"; then 1124084f91ccSmrg _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\"`' 11250da4cdccSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11260da4cdccSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11270da4cdccSmrg else 11280da4cdccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11290da4cdccSmrg fi 11309418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1131084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11329418810dSmrg case $cc_basename in 1133084f91ccSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11349418810dSmrg *) _lt_dar_can_shared=$GCC ;; 11359418810dSmrg esac 1136084f91ccSmrg if test yes = "$_lt_dar_can_shared"; then 11370da4cdccSmrg output_verbose_link_cmd=func_echo_all 1138084f91ccSmrg _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" 1139084f91ccSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1140084f91ccSmrg _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" 1141084f91ccSmrg _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" 11429418810dSmrg m4_if([$1], [CXX], 1143084f91ccSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1144084f91ccSmrg _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" 1145084f91ccSmrg _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" 11469418810dSmrg fi 11479418810dSmrg],[]) 11489418810dSmrg else 11499418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 11509418810dSmrg fi 11519418810dSmrg]) 11529418810dSmrg 11530da4cdccSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11540da4cdccSmrg# ---------------------------------- 11559bd41f2cSmrg# Links a minimal program and checks the executable 11569bd41f2cSmrg# for the system default hardcoded library path. In most cases, 11579bd41f2cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 11589bd41f2cSmrg# the location of the communication and MPI libs are included too. 11599bd41f2cSmrg# If we don't find anything, use the default library path according 11609bd41f2cSmrg# to the aix ld manual. 11610da4cdccSmrg# Store the results from the different compilers for each TAGNAME. 11620da4cdccSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 11639418810dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11649418810dSmrg[m4_require([_LT_DECL_SED])dnl 1165084f91ccSmrgif test set = "${lt_cv_aix_libpath+set}"; then 11660da4cdccSmrg aix_libpath=$lt_cv_aix_libpath 11670da4cdccSmrgelse 11680da4cdccSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11690da4cdccSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11700da4cdccSmrg lt_aix_libpath_sed='[ 11710da4cdccSmrg /Import File Strings/,/^$/ { 11720da4cdccSmrg /^0/ { 11730da4cdccSmrg s/^0 *\([^ ]*\) *$/\1/ 11740da4cdccSmrg p 11750da4cdccSmrg } 11760da4cdccSmrg }]' 11770da4cdccSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11780da4cdccSmrg # Check for a 64-bit object if we didn't find anything. 11790da4cdccSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11800da4cdccSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11810da4cdccSmrg fi],[]) 11820da4cdccSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183084f91ccSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11840da4cdccSmrg fi 11850da4cdccSmrg ]) 11860da4cdccSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11870da4cdccSmrgfi 11889418810dSmrg])# _LT_SYS_MODULE_PATH_AIX 11899bd41f2cSmrg 11909bd41f2cSmrg 11919418810dSmrg# _LT_SHELL_INIT(ARG) 11929418810dSmrg# ------------------- 11939418810dSmrgm4_define([_LT_SHELL_INIT], 11940da4cdccSmrg[m4_divert_text([M4SH-INIT], [$1 11950da4cdccSmrg])])# _LT_SHELL_INIT 11960da4cdccSmrg 11979bd41f2cSmrg 11989bd41f2cSmrg 11999418810dSmrg# _LT_PROG_ECHO_BACKSLASH 12009418810dSmrg# ----------------------- 12010da4cdccSmrg# Find how we can fake an echo command that does not interpret backslash. 12020da4cdccSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1203084f91ccSmrg# of the generated configure script that will find a shell with a builtin 1204084f91ccSmrg# printf (that we can use as an echo command). 12059418810dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12060da4cdccSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12070da4cdccSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12080da4cdccSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12090da4cdccSmrg 12100da4cdccSmrgAC_MSG_CHECKING([how to print strings]) 12110da4cdccSmrg# Test print first, because it will be a builtin if present. 12120da4cdccSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12130da4cdccSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12140da4cdccSmrg ECHO='print -r --' 12150da4cdccSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12160da4cdccSmrg ECHO='printf %s\n' 12179bd41f2cSmrgelse 12180da4cdccSmrg # Use this function as a fallback that always works. 12190da4cdccSmrg func_fallback_echo () 12200da4cdccSmrg { 12210da4cdccSmrg eval 'cat <<_LTECHO_EOF 12220da4cdccSmrg$[]1 12230da4cdccSmrg_LTECHO_EOF' 12240da4cdccSmrg } 12250da4cdccSmrg ECHO='func_fallback_echo' 12269bd41f2cSmrgfi 12279bd41f2cSmrg 12280da4cdccSmrg# func_echo_all arg... 12290da4cdccSmrg# Invoke $ECHO with all args, space-separated. 12300da4cdccSmrgfunc_echo_all () 12310da4cdccSmrg{ 1232084f91ccSmrg $ECHO "$*" 12330da4cdccSmrg} 12349bd41f2cSmrg 1235084f91ccSmrgcase $ECHO in 12360da4cdccSmrg printf*) AC_MSG_RESULT([printf]) ;; 12370da4cdccSmrg print*) AC_MSG_RESULT([print -r]) ;; 12380da4cdccSmrg *) AC_MSG_RESULT([cat]) ;; 12390da4cdccSmrgesac 12409bd41f2cSmrg 12410da4cdccSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 12420da4cdccSmrg[_AS_DETECT_SUGGESTED([ 12430da4cdccSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12440da4cdccSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12450da4cdccSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12460da4cdccSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12470da4cdccSmrg PATH=/empty FPATH=/empty; export PATH FPATH 12480da4cdccSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12490da4cdccSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12509bd41f2cSmrg 12519418810dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12520da4cdccSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12539418810dSmrg])# _LT_PROG_ECHO_BACKSLASH 12549bd41f2cSmrg 12559bd41f2cSmrg 12560da4cdccSmrg# _LT_WITH_SYSROOT 12570da4cdccSmrg# ---------------- 12580da4cdccSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1259084f91ccSmrg[m4_require([_LT_DECL_SED])dnl 1260084f91ccSmrgAC_MSG_CHECKING([for sysroot]) 12610da4cdccSmrgAC_ARG_WITH([sysroot], 1262084f91ccSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1263084f91ccSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 1264084f91ccSmrg if not specified).])], 12650da4cdccSmrg[], [with_sysroot=no]) 12660da4cdccSmrg 12670da4cdccSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 12680da4cdccSmrgdnl in case the user passed a directory name. 12690da4cdccSmrglt_sysroot= 1270084f91ccSmrgcase $with_sysroot in #( 12710da4cdccSmrg yes) 1272084f91ccSmrg if test yes = "$GCC"; then 12730da4cdccSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12740da4cdccSmrg fi 12750da4cdccSmrg ;; #( 12760da4cdccSmrg /*) 1277084f91ccSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 12780da4cdccSmrg ;; #( 12790da4cdccSmrg no|'') 12800da4cdccSmrg ;; #( 12810da4cdccSmrg *) 1282084f91ccSmrg AC_MSG_RESULT([$with_sysroot]) 12830da4cdccSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12840da4cdccSmrg ;; 12850da4cdccSmrgesac 12860da4cdccSmrg 12870da4cdccSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12880da4cdccSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1289084f91ccSmrg[dependent libraries, and where our libraries should be installed.])]) 12900da4cdccSmrg 12919418810dSmrg# _LT_ENABLE_LOCK 12929418810dSmrg# --------------- 12939418810dSmrgm4_defun([_LT_ENABLE_LOCK], 12949bd41f2cSmrg[AC_ARG_ENABLE([libtool-lock], 12959418810dSmrg [AS_HELP_STRING([--disable-libtool-lock], 12969418810dSmrg [avoid locking (might break parallel builds)])]) 1297084f91ccSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12989bd41f2cSmrg 12999bd41f2cSmrg# Some flags need to be propagated to the compiler or linker for good 13009bd41f2cSmrg# libtool support. 13019bd41f2cSmrgcase $host in 13029bd41f2cSmrgia64-*-hpux*) 1303084f91ccSmrg # Find out what ABI is being produced by ac_compile, and set mode 1304084f91ccSmrg # options accordingly. 13059bd41f2cSmrg echo 'int i;' > conftest.$ac_ext 13069bd41f2cSmrg if AC_TRY_EVAL(ac_compile); then 1307084f91ccSmrg case `$FILECMD conftest.$ac_objext` in 13089418810dSmrg *ELF-32*) 1309084f91ccSmrg HPUX_IA64_MODE=32 13109418810dSmrg ;; 13119418810dSmrg *ELF-64*) 1312084f91ccSmrg HPUX_IA64_MODE=64 13139418810dSmrg ;; 13149bd41f2cSmrg esac 13159bd41f2cSmrg fi 13169bd41f2cSmrg rm -rf conftest* 13179bd41f2cSmrg ;; 13189bd41f2cSmrg*-*-irix6*) 1319084f91ccSmrg # Find out what ABI is being produced by ac_compile, and set linker 1320084f91ccSmrg # options accordingly. 13210da4cdccSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13229bd41f2cSmrg if AC_TRY_EVAL(ac_compile); then 1323084f91ccSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 1324084f91ccSmrg case `$FILECMD conftest.$ac_objext` in 13259418810dSmrg *32-bit*) 13269418810dSmrg LD="${LD-ld} -melf32bsmip" 13279418810dSmrg ;; 13289418810dSmrg *N32*) 13299418810dSmrg LD="${LD-ld} -melf32bmipn32" 13309418810dSmrg ;; 13319418810dSmrg *64-bit*) 13329418810dSmrg LD="${LD-ld} -melf64bmip" 13339418810dSmrg ;; 13349418810dSmrg esac 13359418810dSmrg else 1336084f91ccSmrg case `$FILECMD conftest.$ac_objext` in 13379418810dSmrg *32-bit*) 13389418810dSmrg LD="${LD-ld} -32" 13399418810dSmrg ;; 13409418810dSmrg *N32*) 13419418810dSmrg LD="${LD-ld} -n32" 13429418810dSmrg ;; 13439418810dSmrg *64-bit*) 13449418810dSmrg LD="${LD-ld} -64" 13459418810dSmrg ;; 13469418810dSmrg esac 13479418810dSmrg fi 13489bd41f2cSmrg fi 13499bd41f2cSmrg rm -rf conftest* 13509bd41f2cSmrg ;; 13519bd41f2cSmrg 1352084f91ccSmrgmips64*-*linux*) 1353084f91ccSmrg # Find out what ABI is being produced by ac_compile, and set linker 1354084f91ccSmrg # options accordingly. 1355084f91ccSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1356084f91ccSmrg if AC_TRY_EVAL(ac_compile); then 1357084f91ccSmrg emul=elf 1358084f91ccSmrg case `$FILECMD conftest.$ac_objext` in 1359084f91ccSmrg *32-bit*) 1360084f91ccSmrg emul="${emul}32" 1361084f91ccSmrg ;; 1362084f91ccSmrg *64-bit*) 1363084f91ccSmrg emul="${emul}64" 1364084f91ccSmrg ;; 1365084f91ccSmrg esac 1366084f91ccSmrg case `$FILECMD conftest.$ac_objext` in 1367084f91ccSmrg *MSB*) 1368084f91ccSmrg emul="${emul}btsmip" 1369084f91ccSmrg ;; 1370084f91ccSmrg *LSB*) 1371084f91ccSmrg emul="${emul}ltsmip" 1372084f91ccSmrg ;; 1373084f91ccSmrg esac 1374084f91ccSmrg case `$FILECMD conftest.$ac_objext` in 1375084f91ccSmrg *N32*) 1376084f91ccSmrg emul="${emul}n32" 1377084f91ccSmrg ;; 1378084f91ccSmrg esac 1379084f91ccSmrg LD="${LD-ld} -m $emul" 1380084f91ccSmrg fi 1381084f91ccSmrg rm -rf conftest* 1382084f91ccSmrg ;; 1383084f91ccSmrg 1384084f91ccSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13859418810dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1386084f91ccSmrg # Find out what ABI is being produced by ac_compile, and set linker 1387084f91ccSmrg # options accordingly. Note that the listed cases only cover the 1388084f91ccSmrg # situations where additional linker options are needed (such as when 1389084f91ccSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1390084f91ccSmrg # vice versa); the common cases where no linker options are needed do 1391084f91ccSmrg # not appear in the list. 13929bd41f2cSmrg echo 'int i;' > conftest.$ac_ext 13939bd41f2cSmrg if AC_TRY_EVAL(ac_compile); then 1394084f91ccSmrg case `$FILECMD conftest.o` in 13959418810dSmrg *32-bit*) 13969418810dSmrg case $host in 13979418810dSmrg x86_64-*kfreebsd*-gnu) 13989418810dSmrg LD="${LD-ld} -m elf_i386_fbsd" 13999418810dSmrg ;; 14009418810dSmrg x86_64-*linux*) 1401084f91ccSmrg case `$FILECMD conftest.o` in 1402084f91ccSmrg *x86-64*) 1403084f91ccSmrg LD="${LD-ld} -m elf32_x86_64" 1404084f91ccSmrg ;; 1405084f91ccSmrg *) 1406084f91ccSmrg LD="${LD-ld} -m elf_i386" 1407084f91ccSmrg ;; 1408084f91ccSmrg esac 14099418810dSmrg ;; 1410084f91ccSmrg powerpc64le-*linux*) 1411084f91ccSmrg LD="${LD-ld} -m elf32lppclinux" 1412084f91ccSmrg ;; 1413084f91ccSmrg powerpc64-*linux*) 14149418810dSmrg LD="${LD-ld} -m elf32ppclinux" 14159418810dSmrg ;; 14169418810dSmrg s390x-*linux*) 14179418810dSmrg LD="${LD-ld} -m elf_s390" 14189418810dSmrg ;; 14199418810dSmrg sparc64-*linux*) 14209418810dSmrg LD="${LD-ld} -m elf32_sparc" 14219418810dSmrg ;; 14229418810dSmrg esac 14239418810dSmrg ;; 14249418810dSmrg *64-bit*) 14259418810dSmrg case $host in 14269418810dSmrg x86_64-*kfreebsd*-gnu) 14279418810dSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 14289418810dSmrg ;; 14299418810dSmrg x86_64-*linux*) 14309418810dSmrg LD="${LD-ld} -m elf_x86_64" 14319418810dSmrg ;; 1432084f91ccSmrg powerpcle-*linux*|powerpc64le-*linux*) 1433084f91ccSmrg LD="${LD-ld} -m elf64lppc" 1434084f91ccSmrg ;; 1435084f91ccSmrg powerpc-*linux*|powerpc64-*linux*) 14369418810dSmrg LD="${LD-ld} -m elf64ppc" 14379418810dSmrg ;; 14389418810dSmrg s390*-*linux*|s390*-*tpf*) 14399418810dSmrg LD="${LD-ld} -m elf64_s390" 14409418810dSmrg ;; 14419418810dSmrg sparc*-*linux*) 14429418810dSmrg LD="${LD-ld} -m elf64_sparc" 14439418810dSmrg ;; 14449418810dSmrg esac 14459418810dSmrg ;; 14469bd41f2cSmrg esac 14479bd41f2cSmrg fi 14489bd41f2cSmrg rm -rf conftest* 14499bd41f2cSmrg ;; 14509bd41f2cSmrg 14519bd41f2cSmrg*-*-sco3.2v5*) 14529bd41f2cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1453084f91ccSmrg SAVE_CFLAGS=$CFLAGS 14549bd41f2cSmrg CFLAGS="$CFLAGS -belf" 14559bd41f2cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14569bd41f2cSmrg [AC_LANG_PUSH(C) 14579418810dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14589bd41f2cSmrg AC_LANG_POP]) 1459084f91ccSmrg if test yes != "$lt_cv_cc_needs_belf"; then 14609bd41f2cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1461084f91ccSmrg CFLAGS=$SAVE_CFLAGS 14629bd41f2cSmrg fi 14639bd41f2cSmrg ;; 14640da4cdccSmrg*-*solaris*) 1465084f91ccSmrg # Find out what ABI is being produced by ac_compile, and set linker 1466084f91ccSmrg # options accordingly. 14679bd41f2cSmrg echo 'int i;' > conftest.$ac_ext 14689bd41f2cSmrg if AC_TRY_EVAL(ac_compile); then 1469084f91ccSmrg case `$FILECMD conftest.o` in 14709bd41f2cSmrg *64-bit*) 14719bd41f2cSmrg case $lt_cv_prog_gnu_ld in 14720da4cdccSmrg yes*) 14730da4cdccSmrg case $host in 1474084f91ccSmrg i?86-*-solaris*|x86_64-*-solaris*) 14750da4cdccSmrg LD="${LD-ld} -m elf_x86_64" 14760da4cdccSmrg ;; 14770da4cdccSmrg sparc*-*-solaris*) 14780da4cdccSmrg LD="${LD-ld} -m elf64_sparc" 14790da4cdccSmrg ;; 14800da4cdccSmrg esac 14810da4cdccSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14820da4cdccSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1483084f91ccSmrg LD=${LD-ld}_sol2 14840da4cdccSmrg fi 14850da4cdccSmrg ;; 1486d075918cSmrg *) 14879418810dSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1488d075918cSmrg LD="${LD-ld} -64" 1489d075918cSmrg fi 1490d075918cSmrg ;; 14919bd41f2cSmrg esac 14929bd41f2cSmrg ;; 14939bd41f2cSmrg esac 14949bd41f2cSmrg fi 14959bd41f2cSmrg rm -rf conftest* 14969bd41f2cSmrg ;; 14979bd41f2cSmrgesac 14989bd41f2cSmrg 1499084f91ccSmrgneed_locks=$enable_libtool_lock 15009418810dSmrg])# _LT_ENABLE_LOCK 15019418810dSmrg 15029418810dSmrg 15030da4cdccSmrg# _LT_PROG_AR 15040da4cdccSmrg# ----------- 15050da4cdccSmrgm4_defun([_LT_PROG_AR], 15060da4cdccSmrg[AC_CHECK_TOOLS(AR, [ar], false) 15070da4cdccSmrg: ${AR=ar} 15080da4cdccSmrg_LT_DECL([], [AR], [1], [The archiver]) 1509084f91ccSmrg 1510084f91ccSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1511084f91ccSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1512084f91ccSmrg# higher priority because thats what people were doing historically (setting 1513084f91ccSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1514084f91ccSmrg# variable obsoleted/removed. 1515084f91ccSmrg 1516084f91ccSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1517084f91ccSmrglt_ar_flags=$AR_FLAGS 1518084f91ccSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1519084f91ccSmrg 1520084f91ccSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1521084f91ccSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1522084f91ccSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1523084f91ccSmrg [Flags to create an archive]) 15240da4cdccSmrg 15250da4cdccSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15260da4cdccSmrg [lt_cv_ar_at_file=no 15270da4cdccSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15280da4cdccSmrg [echo conftest.$ac_objext > conftest.lst 15290da4cdccSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15300da4cdccSmrg AC_TRY_EVAL([lt_ar_try]) 1531084f91ccSmrg if test 0 -eq "$ac_status"; then 15320da4cdccSmrg # Ensure the archiver fails upon bogus file names. 15330da4cdccSmrg rm -f conftest.$ac_objext libconftest.a 15340da4cdccSmrg AC_TRY_EVAL([lt_ar_try]) 1535084f91ccSmrg if test 0 -ne "$ac_status"; then 15360da4cdccSmrg lt_cv_ar_at_file=@ 15370da4cdccSmrg fi 15380da4cdccSmrg fi 15390da4cdccSmrg rm -f conftest.* libconftest.a 15400da4cdccSmrg ]) 15410da4cdccSmrg ]) 15420da4cdccSmrg 1543084f91ccSmrgif test no = "$lt_cv_ar_at_file"; then 15440da4cdccSmrg archiver_list_spec= 15450da4cdccSmrgelse 15460da4cdccSmrg archiver_list_spec=$lt_cv_ar_at_file 15470da4cdccSmrgfi 15480da4cdccSmrg_LT_DECL([], [archiver_list_spec], [1], 15490da4cdccSmrg [How to feed a file listing to the archiver]) 15500da4cdccSmrg])# _LT_PROG_AR 15510da4cdccSmrg 15520da4cdccSmrg 15539418810dSmrg# _LT_CMD_OLD_ARCHIVE 15549418810dSmrg# ------------------- 15559418810dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15560da4cdccSmrg[_LT_PROG_AR 15579418810dSmrg 15589418810dSmrgAC_CHECK_TOOL(STRIP, strip, :) 15599418810dSmrgtest -z "$STRIP" && STRIP=: 15609418810dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15619bd41f2cSmrg 15629418810dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15639418810dSmrgtest -z "$RANLIB" && RANLIB=: 15649418810dSmrg_LT_DECL([], [RANLIB], [1], 15659418810dSmrg [Commands used to install an old-style archive]) 15669418810dSmrg 15679418810dSmrg# Determine commands to create old-style static archives. 15689418810dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15699418810dSmrgold_postinstall_cmds='chmod 644 $oldlib' 15709418810dSmrgold_postuninstall_cmds= 15719418810dSmrg 15729418810dSmrgif test -n "$RANLIB"; then 15739418810dSmrg case $host_os in 1574084f91ccSmrg bitrig* | openbsd*) 15750da4cdccSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15769418810dSmrg ;; 15779418810dSmrg *) 15780da4cdccSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15799418810dSmrg ;; 15809418810dSmrg esac 15810da4cdccSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15829418810dSmrgfi 15830da4cdccSmrg 15840da4cdccSmrgcase $host_os in 15850da4cdccSmrg darwin*) 15860da4cdccSmrg lock_old_archive_extraction=yes ;; 15870da4cdccSmrg *) 15880da4cdccSmrg lock_old_archive_extraction=no ;; 15890da4cdccSmrgesac 15909418810dSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15919418810dSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15929418810dSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15939418810dSmrg [Commands used to build an old-style archive]) 15940da4cdccSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 15950da4cdccSmrg [Whether to use a lock for old archive extraction]) 15969418810dSmrg])# _LT_CMD_OLD_ARCHIVE 15979bd41f2cSmrg 15989bd41f2cSmrg 15999418810dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16009bd41f2cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 16019bd41f2cSmrg# ---------------------------------------------------------------- 16029bd41f2cSmrg# Check whether the given compiler option works 16039418810dSmrgAC_DEFUN([_LT_COMPILER_OPTION], 16049418810dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16059418810dSmrgm4_require([_LT_DECL_SED])dnl 16069bd41f2cSmrgAC_CACHE_CHECK([$1], [$2], 16079bd41f2cSmrg [$2=no 16089418810dSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 16099bd41f2cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1610084f91ccSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16119bd41f2cSmrg # Insert the option either (1) after the last *FLAGS variable, or 16129bd41f2cSmrg # (2) before a word containing "conftest.", or (3) at the end. 16139bd41f2cSmrg # Note that $ac_compile itself does not contain backslashes and begins 16149bd41f2cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16159bd41f2cSmrg # The option is referenced via a variable to avoid confusing sed. 16169bd41f2cSmrg lt_compile=`echo "$ac_compile" | $SED \ 16179bd41f2cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16189bd41f2cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16199bd41f2cSmrg -e 's:$: $lt_compiler_flag:'` 16200da4cdccSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16219bd41f2cSmrg (eval "$lt_compile" 2>conftest.err) 16229bd41f2cSmrg ac_status=$? 16239bd41f2cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 16240da4cdccSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16259bd41f2cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 16269bd41f2cSmrg # The compiler can only warn and ignore the option if not recognized 16279bd41f2cSmrg # So say no if there are warnings other than the usual output. 16280da4cdccSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16299bd41f2cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16309bd41f2cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16319bd41f2cSmrg $2=yes 16329bd41f2cSmrg fi 16339bd41f2cSmrg fi 16349418810dSmrg $RM conftest* 16359bd41f2cSmrg]) 16369bd41f2cSmrg 1637084f91ccSmrgif test yes = "[$]$2"; then 16389418810dSmrg m4_if([$5], , :, [$5]) 16399bd41f2cSmrgelse 16409418810dSmrg m4_if([$6], , :, [$6]) 16419bd41f2cSmrgfi 16429418810dSmrg])# _LT_COMPILER_OPTION 16439bd41f2cSmrg 16449418810dSmrg# Old name: 16459418810dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16469418810dSmrgdnl aclocal-1.4 backwards compatibility: 16479418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16489bd41f2cSmrg 16499418810dSmrg 16509418810dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16519418810dSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16529418810dSmrg# ---------------------------------------------------- 16539418810dSmrg# Check whether the given linker option works 16549418810dSmrgAC_DEFUN([_LT_LINKER_OPTION], 16559418810dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16569418810dSmrgm4_require([_LT_DECL_SED])dnl 16579bd41f2cSmrgAC_CACHE_CHECK([$1], [$2], 16589bd41f2cSmrg [$2=no 1659084f91ccSmrg save_LDFLAGS=$LDFLAGS 16609bd41f2cSmrg LDFLAGS="$LDFLAGS $3" 16619bd41f2cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16629bd41f2cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16639bd41f2cSmrg # The linker can only warn and ignore the option if not recognized 16649bd41f2cSmrg # So say no if there are warnings 16659bd41f2cSmrg if test -s conftest.err; then 16669bd41f2cSmrg # Append any errors to the config.log. 16679bd41f2cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16680da4cdccSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16699bd41f2cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16709bd41f2cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 16719bd41f2cSmrg $2=yes 16729bd41f2cSmrg fi 16739bd41f2cSmrg else 16749bd41f2cSmrg $2=yes 16759bd41f2cSmrg fi 16769bd41f2cSmrg fi 16779418810dSmrg $RM -r conftest* 1678084f91ccSmrg LDFLAGS=$save_LDFLAGS 16799bd41f2cSmrg]) 16809bd41f2cSmrg 1681084f91ccSmrgif test yes = "[$]$2"; then 16829418810dSmrg m4_if([$4], , :, [$4]) 16839bd41f2cSmrgelse 16849418810dSmrg m4_if([$5], , :, [$5]) 16859bd41f2cSmrgfi 16869418810dSmrg])# _LT_LINKER_OPTION 16879bd41f2cSmrg 16889418810dSmrg# Old name: 16899418810dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16909418810dSmrgdnl aclocal-1.4 backwards compatibility: 16919418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16929bd41f2cSmrg 16939418810dSmrg 16949418810dSmrg# LT_CMD_MAX_LEN 16959418810dSmrg#--------------- 16969418810dSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16979418810dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16989418810dSmrg# find the maximum length of command line arguments 16999bd41f2cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 17009bd41f2cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 17019bd41f2cSmrg i=0 1702084f91ccSmrg teststring=ABCD 17039bd41f2cSmrg 17049bd41f2cSmrg case $build_os in 17059bd41f2cSmrg msdosdjgpp*) 17069bd41f2cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 17079bd41f2cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 17089bd41f2cSmrg # during glob expansion). Even if it were fixed, the result of this 17099bd41f2cSmrg # check would be larger than it should be. 17109bd41f2cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17119bd41f2cSmrg ;; 17129bd41f2cSmrg 17139bd41f2cSmrg gnu*) 17149bd41f2cSmrg # Under GNU Hurd, this test is not required because there is 17159bd41f2cSmrg # no limit to the length of command line arguments. 17169bd41f2cSmrg # Libtool will interpret -1 as no limit whatsoever 17179bd41f2cSmrg lt_cv_sys_max_cmd_len=-1; 17189bd41f2cSmrg ;; 17199bd41f2cSmrg 17209418810dSmrg cygwin* | mingw* | cegcc*) 17219bd41f2cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17229bd41f2cSmrg # about 5 minutes as the teststring grows exponentially. 17239bd41f2cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 17249bd41f2cSmrg # you end up with a "frozen" computer, even though with patience 17259bd41f2cSmrg # the test eventually succeeds (with a max line length of 256k). 17269bd41f2cSmrg # Instead, let's just punt: use the minimum linelength reported by 17279bd41f2cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 17289bd41f2cSmrg lt_cv_sys_max_cmd_len=8192; 17299bd41f2cSmrg ;; 17309bd41f2cSmrg 17310da4cdccSmrg mint*) 17320da4cdccSmrg # On MiNT this can take a long time and run out of memory. 17330da4cdccSmrg lt_cv_sys_max_cmd_len=8192; 17340da4cdccSmrg ;; 17350da4cdccSmrg 1736084f91ccSmrg mint*) 1737084f91ccSmrg # On MiNT this can take a long time and run out of memory. 1738084f91ccSmrg lt_cv_sys_max_cmd_len=8192; 1739084f91ccSmrg ;; 1740084f91ccSmrg 17419bd41f2cSmrg amigaos*) 17429bd41f2cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 17439bd41f2cSmrg # So we just punt and use a minimum line length of 8192. 17449bd41f2cSmrg lt_cv_sys_max_cmd_len=8192; 17459bd41f2cSmrg ;; 17469bd41f2cSmrg 1747084f91ccSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17489bd41f2cSmrg # This has been around since 386BSD, at least. Likely further. 17499bd41f2cSmrg if test -x /sbin/sysctl; then 17509bd41f2cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17519bd41f2cSmrg elif test -x /usr/sbin/sysctl; then 17529bd41f2cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17539bd41f2cSmrg else 17549bd41f2cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17559bd41f2cSmrg fi 17569bd41f2cSmrg # And add a safety zone 17579bd41f2cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17589bd41f2cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17599bd41f2cSmrg ;; 17609bd41f2cSmrg 17619bd41f2cSmrg interix*) 17629bd41f2cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17639bd41f2cSmrg lt_cv_sys_max_cmd_len=196608 17649bd41f2cSmrg ;; 17659bd41f2cSmrg 17660da4cdccSmrg os2*) 17670da4cdccSmrg # The test takes a long time on OS/2. 17680da4cdccSmrg lt_cv_sys_max_cmd_len=8192 17690da4cdccSmrg ;; 17700da4cdccSmrg 17719bd41f2cSmrg osf*) 17729bd41f2cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17739bd41f2cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17749bd41f2cSmrg # nice to cause kernel panics so lets avoid the loop below. 17759bd41f2cSmrg # First set a reasonable default. 17769bd41f2cSmrg lt_cv_sys_max_cmd_len=16384 17779bd41f2cSmrg # 17789bd41f2cSmrg if test -x /sbin/sysconfig; then 17799bd41f2cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17809bd41f2cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17819bd41f2cSmrg esac 17829bd41f2cSmrg fi 17839bd41f2cSmrg ;; 17849bd41f2cSmrg sco3.2v5*) 17859bd41f2cSmrg lt_cv_sys_max_cmd_len=102400 17869bd41f2cSmrg ;; 17879bd41f2cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 17889bd41f2cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17899bd41f2cSmrg if test -n "$kargmax"; then 1790084f91ccSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 17919bd41f2cSmrg else 17929bd41f2cSmrg lt_cv_sys_max_cmd_len=32768 17939bd41f2cSmrg fi 17949bd41f2cSmrg ;; 17959bd41f2cSmrg *) 17969bd41f2cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1797084f91ccSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1798084f91ccSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17999bd41f2cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 18009bd41f2cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 18019bd41f2cSmrg else 18029418810dSmrg # Make teststring a little bigger before we do anything with it. 18039418810dSmrg # a 1K string should be a reasonable start. 1804084f91ccSmrg for i in 1 2 3 4 5 6 7 8; do 18059418810dSmrg teststring=$teststring$teststring 18069418810dSmrg done 18079bd41f2cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 18089418810dSmrg # If test is not a shell built-in, we'll probably end up computing a 18099418810dSmrg # maximum length that is only half of the actual maximum length, but 18109418810dSmrg # we can't tell. 1811084f91ccSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 18120da4cdccSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1813084f91ccSmrg test 17 != "$i" # 1/2 MB should be enough 18149bd41f2cSmrg do 18159bd41f2cSmrg i=`expr $i + 1` 18169bd41f2cSmrg teststring=$teststring$teststring 18179bd41f2cSmrg done 18189418810dSmrg # Only check the string length outside the loop. 18199418810dSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18209bd41f2cSmrg teststring= 18219418810dSmrg # Add a significant safety factor because C++ compilers can tack on 18229418810dSmrg # massive amounts of additional arguments before passing them to the 18239418810dSmrg # linker. It appears as though 1/2 is a usable value. 18249bd41f2cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18259bd41f2cSmrg fi 18269bd41f2cSmrg ;; 18279bd41f2cSmrg esac 18289bd41f2cSmrg]) 1829084f91ccSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 18309bd41f2cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18319bd41f2cSmrgelse 18329bd41f2cSmrg AC_MSG_RESULT(none) 18339bd41f2cSmrgfi 18349418810dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18359418810dSmrg_LT_DECL([], [max_cmd_len], [0], 18369418810dSmrg [What is the maximum length of a command?]) 18379418810dSmrg])# LT_CMD_MAX_LEN 18389bd41f2cSmrg 18399418810dSmrg# Old name: 18409418810dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18419418810dSmrgdnl aclocal-1.4 backwards compatibility: 18429418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18439bd41f2cSmrg 18449418810dSmrg 18459418810dSmrg# _LT_HEADER_DLFCN 18469418810dSmrg# ---------------- 18479418810dSmrgm4_defun([_LT_HEADER_DLFCN], 18489418810dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18499418810dSmrg])# _LT_HEADER_DLFCN 18509bd41f2cSmrg 18519bd41f2cSmrg 18529418810dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18539418810dSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18549418810dSmrg# ---------------------------------------------------------------- 18559418810dSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 18569418810dSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1857084f91ccSmrgif test yes = "$cross_compiling"; then : 18589bd41f2cSmrg [$4] 18599bd41f2cSmrgelse 18609bd41f2cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18619bd41f2cSmrg lt_status=$lt_dlunknown 18629418810dSmrg cat > conftest.$ac_ext <<_LT_EOF 18630da4cdccSmrg[#line $LINENO "configure" 18649bd41f2cSmrg#include "confdefs.h" 18659bd41f2cSmrg 18669bd41f2cSmrg#if HAVE_DLFCN_H 18679bd41f2cSmrg#include <dlfcn.h> 18689bd41f2cSmrg#endif 18699bd41f2cSmrg 18709bd41f2cSmrg#include <stdio.h> 18719bd41f2cSmrg 18729bd41f2cSmrg#ifdef RTLD_GLOBAL 18739bd41f2cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 18749bd41f2cSmrg#else 18759bd41f2cSmrg# ifdef DL_GLOBAL 18769bd41f2cSmrg# define LT_DLGLOBAL DL_GLOBAL 18779bd41f2cSmrg# else 18789bd41f2cSmrg# define LT_DLGLOBAL 0 18799bd41f2cSmrg# endif 18809bd41f2cSmrg#endif 18819bd41f2cSmrg 18829bd41f2cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18839bd41f2cSmrg find out it does not work in some platform. */ 18849bd41f2cSmrg#ifndef LT_DLLAZY_OR_NOW 18859bd41f2cSmrg# ifdef RTLD_LAZY 18869bd41f2cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18879bd41f2cSmrg# else 18889bd41f2cSmrg# ifdef DL_LAZY 18899bd41f2cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 18909bd41f2cSmrg# else 18919bd41f2cSmrg# ifdef RTLD_NOW 18929bd41f2cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18939bd41f2cSmrg# else 18949bd41f2cSmrg# ifdef DL_NOW 18959bd41f2cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 18969bd41f2cSmrg# else 18979bd41f2cSmrg# define LT_DLLAZY_OR_NOW 0 18989bd41f2cSmrg# endif 18999bd41f2cSmrg# endif 19009bd41f2cSmrg# endif 19019bd41f2cSmrg# endif 19029bd41f2cSmrg#endif 19039bd41f2cSmrg 1904084f91ccSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 19050da4cdccSmrg correspondingly for the symbols needed. */ 1906084f91ccSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 19070da4cdccSmrgint fnord () __attribute__((visibility("default"))); 19080da4cdccSmrg#endif 19090da4cdccSmrg 19100da4cdccSmrgint fnord () { return 42; } 19119bd41f2cSmrgint main () 19129bd41f2cSmrg{ 19139bd41f2cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 19149bd41f2cSmrg int status = $lt_dlunknown; 19159bd41f2cSmrg 19169bd41f2cSmrg if (self) 19179bd41f2cSmrg { 19189bd41f2cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19190da4cdccSmrg else 19200da4cdccSmrg { 19210da4cdccSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19220da4cdccSmrg else puts (dlerror ()); 19230da4cdccSmrg } 19249bd41f2cSmrg /* dlclose (self); */ 19259bd41f2cSmrg } 19269bd41f2cSmrg else 19279bd41f2cSmrg puts (dlerror ()); 19289bd41f2cSmrg 19299418810dSmrg return status; 19309bd41f2cSmrg}] 19319418810dSmrg_LT_EOF 1932084f91ccSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19339bd41f2cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19349bd41f2cSmrg lt_status=$? 19359bd41f2cSmrg case x$lt_status in 19369bd41f2cSmrg x$lt_dlno_uscore) $1 ;; 19379bd41f2cSmrg x$lt_dlneed_uscore) $2 ;; 19389bd41f2cSmrg x$lt_dlunknown|x*) $3 ;; 19399bd41f2cSmrg esac 19409bd41f2cSmrg else : 19419bd41f2cSmrg # compilation failed 19429bd41f2cSmrg $3 19439bd41f2cSmrg fi 19449bd41f2cSmrgfi 19459bd41f2cSmrgrm -fr conftest* 19469418810dSmrg])# _LT_TRY_DLOPEN_SELF 19479bd41f2cSmrg 19489bd41f2cSmrg 19499418810dSmrg# LT_SYS_DLOPEN_SELF 19509418810dSmrg# ------------------ 19519418810dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19529418810dSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1953084f91ccSmrgif test yes != "$enable_dlopen"; then 19549bd41f2cSmrg enable_dlopen=unknown 19559bd41f2cSmrg enable_dlopen_self=unknown 19569bd41f2cSmrg enable_dlopen_self_static=unknown 19579bd41f2cSmrgelse 19589bd41f2cSmrg lt_cv_dlopen=no 19599bd41f2cSmrg lt_cv_dlopen_libs= 19609bd41f2cSmrg 19619bd41f2cSmrg case $host_os in 19629bd41f2cSmrg beos*) 1963084f91ccSmrg lt_cv_dlopen=load_add_on 19649bd41f2cSmrg lt_cv_dlopen_libs= 19659bd41f2cSmrg lt_cv_dlopen_self=yes 19669bd41f2cSmrg ;; 19679bd41f2cSmrg 19689418810dSmrg mingw* | pw32* | cegcc*) 1969084f91ccSmrg lt_cv_dlopen=LoadLibrary 19709bd41f2cSmrg lt_cv_dlopen_libs= 19719418810dSmrg ;; 19729bd41f2cSmrg 19739bd41f2cSmrg cygwin*) 1974084f91ccSmrg lt_cv_dlopen=dlopen 19759bd41f2cSmrg lt_cv_dlopen_libs= 19769418810dSmrg ;; 19779bd41f2cSmrg 19789bd41f2cSmrg darwin*) 1979084f91ccSmrg # if libdl is installed we need to link against it 19809bd41f2cSmrg AC_CHECK_LIB([dl], [dlopen], 1981084f91ccSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1982084f91ccSmrg lt_cv_dlopen=dyld 19839bd41f2cSmrg lt_cv_dlopen_libs= 19849bd41f2cSmrg lt_cv_dlopen_self=yes 19859bd41f2cSmrg ]) 19869418810dSmrg ;; 19879bd41f2cSmrg 1988084f91ccSmrg tpf*) 1989084f91ccSmrg # Don't try to run any link tests for TPF. We know it's impossible 1990084f91ccSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 1991084f91ccSmrg lt_cv_dlopen=dlopen 1992084f91ccSmrg lt_cv_dlopen_libs= 1993084f91ccSmrg lt_cv_dlopen_self=no 1994084f91ccSmrg ;; 1995084f91ccSmrg 19969bd41f2cSmrg *) 19979bd41f2cSmrg AC_CHECK_FUNC([shl_load], 1998084f91ccSmrg [lt_cv_dlopen=shl_load], 19999bd41f2cSmrg [AC_CHECK_LIB([dld], [shl_load], 2000084f91ccSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 20019bd41f2cSmrg [AC_CHECK_FUNC([dlopen], 2002084f91ccSmrg [lt_cv_dlopen=dlopen], 20039bd41f2cSmrg [AC_CHECK_LIB([dl], [dlopen], 2004084f91ccSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 20059bd41f2cSmrg [AC_CHECK_LIB([svld], [dlopen], 2006084f91ccSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 20079bd41f2cSmrg [AC_CHECK_LIB([dld], [dld_link], 2008084f91ccSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 20099bd41f2cSmrg ]) 20109bd41f2cSmrg ]) 20119bd41f2cSmrg ]) 20129bd41f2cSmrg ]) 20139bd41f2cSmrg ]) 20149bd41f2cSmrg ;; 20159bd41f2cSmrg esac 20169bd41f2cSmrg 2017084f91ccSmrg if test no = "$lt_cv_dlopen"; then 20189bd41f2cSmrg enable_dlopen=no 2019084f91ccSmrg else 2020084f91ccSmrg enable_dlopen=yes 20219bd41f2cSmrg fi 20229bd41f2cSmrg 20239bd41f2cSmrg case $lt_cv_dlopen in 20249bd41f2cSmrg dlopen) 2025084f91ccSmrg save_CPPFLAGS=$CPPFLAGS 2026084f91ccSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20279bd41f2cSmrg 2028084f91ccSmrg save_LDFLAGS=$LDFLAGS 20299bd41f2cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20309bd41f2cSmrg 2031084f91ccSmrg save_LIBS=$LIBS 20329bd41f2cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 20339bd41f2cSmrg 20349bd41f2cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 20359bd41f2cSmrg lt_cv_dlopen_self, [dnl 20369418810dSmrg _LT_TRY_DLOPEN_SELF( 20379bd41f2cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20389bd41f2cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20399bd41f2cSmrg ]) 20409bd41f2cSmrg 2041084f91ccSmrg if test yes = "$lt_cv_dlopen_self"; then 20429bd41f2cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20439bd41f2cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20449418810dSmrg lt_cv_dlopen_self_static, [dnl 20459418810dSmrg _LT_TRY_DLOPEN_SELF( 20469bd41f2cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20479bd41f2cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20489bd41f2cSmrg ]) 20499bd41f2cSmrg fi 20509bd41f2cSmrg 2051084f91ccSmrg CPPFLAGS=$save_CPPFLAGS 2052084f91ccSmrg LDFLAGS=$save_LDFLAGS 2053084f91ccSmrg LIBS=$save_LIBS 20549bd41f2cSmrg ;; 20559bd41f2cSmrg esac 20569bd41f2cSmrg 20579bd41f2cSmrg case $lt_cv_dlopen_self in 20589bd41f2cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20599bd41f2cSmrg *) enable_dlopen_self=unknown ;; 20609bd41f2cSmrg esac 20619bd41f2cSmrg 20629bd41f2cSmrg case $lt_cv_dlopen_self_static in 20639bd41f2cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20649bd41f2cSmrg *) enable_dlopen_self_static=unknown ;; 20659bd41f2cSmrg esac 20669bd41f2cSmrgfi 20679418810dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20689418810dSmrg [Whether dlopen is supported]) 20699418810dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20709418810dSmrg [Whether dlopen of programs is supported]) 20719418810dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20729418810dSmrg [Whether dlopen of statically linked programs is supported]) 20739418810dSmrg])# LT_SYS_DLOPEN_SELF 20749bd41f2cSmrg 20759418810dSmrg# Old name: 20769418810dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20779418810dSmrgdnl aclocal-1.4 backwards compatibility: 20789418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20799bd41f2cSmrg 20809418810dSmrg 20819418810dSmrg# _LT_COMPILER_C_O([TAGNAME]) 20829418810dSmrg# --------------------------- 20839418810dSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 20849418810dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20859418810dSmrgm4_defun([_LT_COMPILER_C_O], 20869418810dSmrg[m4_require([_LT_DECL_SED])dnl 20879418810dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20889418810dSmrgm4_require([_LT_TAG_COMPILER])dnl 20899bd41f2cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20909418810dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20919418810dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20929418810dSmrg $RM -r conftest 2>/dev/null 20939bd41f2cSmrg mkdir conftest 20949bd41f2cSmrg cd conftest 20959bd41f2cSmrg mkdir out 20969bd41f2cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20979bd41f2cSmrg 20989bd41f2cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20999bd41f2cSmrg # Insert the option either (1) after the last *FLAGS variable, or 21009bd41f2cSmrg # (2) before a word containing "conftest.", or (3) at the end. 21019bd41f2cSmrg # Note that $ac_compile itself does not contain backslashes and begins 21029bd41f2cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 21039bd41f2cSmrg lt_compile=`echo "$ac_compile" | $SED \ 21049bd41f2cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 21059bd41f2cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 21069bd41f2cSmrg -e 's:$: $lt_compiler_flag:'` 21070da4cdccSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 21089bd41f2cSmrg (eval "$lt_compile" 2>out/conftest.err) 21099bd41f2cSmrg ac_status=$? 21109bd41f2cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 21110da4cdccSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 21129bd41f2cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 21139bd41f2cSmrg then 21149bd41f2cSmrg # The compiler can only warn and ignore the option if not recognized 21159bd41f2cSmrg # So say no if there are warnings 21160da4cdccSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21179bd41f2cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21189bd41f2cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21199418810dSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21209bd41f2cSmrg fi 21219bd41f2cSmrg fi 21229bd41f2cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21239418810dSmrg $RM conftest* 21249bd41f2cSmrg # SGI C++ compiler will create directory out/ii_files/ for 21259bd41f2cSmrg # template instantiation 21269418810dSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21279418810dSmrg $RM out/* && rmdir out 21289bd41f2cSmrg cd .. 21299418810dSmrg $RM -r conftest 21309418810dSmrg $RM conftest* 21319bd41f2cSmrg]) 21329418810dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21339418810dSmrg [Does compiler simultaneously support -c and -o options?]) 21349418810dSmrg])# _LT_COMPILER_C_O 21359bd41f2cSmrg 21369bd41f2cSmrg 21379418810dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21389418810dSmrg# ---------------------------------- 21399bd41f2cSmrg# Check to see if we can do hard links to lock some files if needed 21409418810dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21419418810dSmrg[m4_require([_LT_ENABLE_LOCK])dnl 21429418810dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21439418810dSmrg_LT_COMPILER_C_O([$1]) 21449bd41f2cSmrg 2145084f91ccSmrghard_links=nottested 2146084f91ccSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21479bd41f2cSmrg # do not overwrite the value of need_locks provided by the user 21489bd41f2cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 21499bd41f2cSmrg hard_links=yes 21509418810dSmrg $RM conftest* 21519bd41f2cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21529bd41f2cSmrg touch conftest.a 21539bd41f2cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 21549bd41f2cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21559bd41f2cSmrg AC_MSG_RESULT([$hard_links]) 2156084f91ccSmrg if test no = "$hard_links"; then 2157084f91ccSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21589bd41f2cSmrg need_locks=warn 21599bd41f2cSmrg fi 21609bd41f2cSmrgelse 21619bd41f2cSmrg need_locks=no 21629bd41f2cSmrgfi 21639418810dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21649418810dSmrg])# _LT_COMPILER_FILE_LOCKS 21659bd41f2cSmrg 21669bd41f2cSmrg 21679418810dSmrg# _LT_CHECK_OBJDIR 21689418810dSmrg# ---------------- 21699418810dSmrgm4_defun([_LT_CHECK_OBJDIR], 21709bd41f2cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21719bd41f2cSmrg[rm -f .libs 2>/dev/null 21729bd41f2cSmrgmkdir .libs 2>/dev/null 21739bd41f2cSmrgif test -d .libs; then 21749bd41f2cSmrg lt_cv_objdir=.libs 21759bd41f2cSmrgelse 21769bd41f2cSmrg # MS-DOS does not allow filenames that begin with a dot. 21779bd41f2cSmrg lt_cv_objdir=_libs 21789bd41f2cSmrgfi 21799bd41f2cSmrgrmdir .libs 2>/dev/null]) 21809bd41f2cSmrgobjdir=$lt_cv_objdir 21819418810dSmrg_LT_DECL([], [objdir], [0], 21829418810dSmrg [The name of the directory that contains temporary libtool files])dnl 21839418810dSmrgm4_pattern_allow([LT_OBJDIR])dnl 2184084f91ccSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2185084f91ccSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21869418810dSmrg])# _LT_CHECK_OBJDIR 21879bd41f2cSmrg 21889bd41f2cSmrg 21899418810dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21909418810dSmrg# -------------------------------------- 21919bd41f2cSmrg# Check hardcoding attributes. 21929418810dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21939bd41f2cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21949418810dSmrg_LT_TAGVAR(hardcode_action, $1)= 21959418810dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21969418810dSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2197084f91ccSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21989bd41f2cSmrg 21999418810dSmrg # We can hardcode non-existent directories. 2200084f91ccSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 22019bd41f2cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 22029bd41f2cSmrg # have to relink, otherwise we might link with an installed library 22039bd41f2cSmrg # when we should be linking with a yet-to-be-installed one 2204084f91ccSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2205084f91ccSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 22069bd41f2cSmrg # Linking always hardcodes the temporary library directory. 22079418810dSmrg _LT_TAGVAR(hardcode_action, $1)=relink 22089bd41f2cSmrg else 22099bd41f2cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 22109418810dSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 22119bd41f2cSmrg fi 22129bd41f2cSmrgelse 22139bd41f2cSmrg # We cannot hardcode anything, or else we can only hardcode existing 22149bd41f2cSmrg # directories. 22159418810dSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22169bd41f2cSmrgfi 22179418810dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 22189bd41f2cSmrg 2219084f91ccSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2220084f91ccSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22219bd41f2cSmrg # Fast installation is not supported 22229bd41f2cSmrg enable_fast_install=no 2223084f91ccSmrgelif test yes = "$shlibpath_overrides_runpath" || 2224084f91ccSmrg test no = "$enable_shared"; then 22259bd41f2cSmrg # Fast installation is not necessary 22269bd41f2cSmrg enable_fast_install=needless 22279bd41f2cSmrgfi 22289418810dSmrg_LT_TAGDECL([], [hardcode_action], [0], 22299418810dSmrg [How to hardcode a shared library path into an executable]) 22309418810dSmrg])# _LT_LINKER_HARDCODE_LIBPATH 22319bd41f2cSmrg 22329bd41f2cSmrg 22339418810dSmrg# _LT_CMD_STRIPLIB 22349418810dSmrg# ---------------- 22359418810dSmrgm4_defun([_LT_CMD_STRIPLIB], 22369418810dSmrg[m4_require([_LT_DECL_EGREP]) 22379418810dSmrgstriplib= 22389bd41f2cSmrgold_striplib= 22399bd41f2cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2240084f91ccSmrgif test -z "$STRIP"; then 2241084f91ccSmrg AC_MSG_RESULT([no]) 22429bd41f2cSmrgelse 2243084f91ccSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2244084f91ccSmrg old_striplib="$STRIP --strip-debug" 2245084f91ccSmrg striplib="$STRIP --strip-unneeded" 2246084f91ccSmrg AC_MSG_RESULT([yes]) 2247084f91ccSmrg else 2248084f91ccSmrg case $host_os in 2249084f91ccSmrg darwin*) 2250084f91ccSmrg # FIXME - insert some real tests, host_os isn't really good enough 22519418810dSmrg striplib="$STRIP -x" 22529418810dSmrg old_striplib="$STRIP -S" 22539418810dSmrg AC_MSG_RESULT([yes]) 2254084f91ccSmrg ;; 2255084f91ccSmrg freebsd*) 2256084f91ccSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2257084f91ccSmrg old_striplib="$STRIP --strip-debug" 2258084f91ccSmrg striplib="$STRIP --strip-unneeded" 2259084f91ccSmrg AC_MSG_RESULT([yes]) 2260084f91ccSmrg else 2261084f91ccSmrg AC_MSG_RESULT([no]) 2262084f91ccSmrg fi 2263084f91ccSmrg ;; 2264084f91ccSmrg *) 22659418810dSmrg AC_MSG_RESULT([no]) 2266084f91ccSmrg ;; 2267084f91ccSmrg esac 2268084f91ccSmrg fi 22699bd41f2cSmrgfi 22709418810dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22719418810dSmrg_LT_DECL([], [striplib], [1]) 22729418810dSmrg])# _LT_CMD_STRIPLIB 22739bd41f2cSmrg 22749bd41f2cSmrg 2275084f91ccSmrg# _LT_PREPARE_MUNGE_PATH_LIST 2276084f91ccSmrg# --------------------------- 2277084f91ccSmrg# Make sure func_munge_path_list() is defined correctly. 2278084f91ccSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2279084f91ccSmrg[[# func_munge_path_list VARIABLE PATH 2280084f91ccSmrg# ----------------------------------- 2281084f91ccSmrg# VARIABLE is name of variable containing _space_ separated list of 2282084f91ccSmrg# directories to be munged by the contents of PATH, which is string 2283084f91ccSmrg# having a format: 2284084f91ccSmrg# "DIR[:DIR]:" 2285084f91ccSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 2286084f91ccSmrg# ":DIR[:DIR]" 2287084f91ccSmrg# string "DIR[ DIR]" will be appended to VARIABLE 2288084f91ccSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2289084f91ccSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2290084f91ccSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 2291084f91ccSmrg# "DIR[:DIR]" 2292084f91ccSmrg# VARIABLE will be replaced by "DIR[ DIR]" 2293084f91ccSmrgfunc_munge_path_list () 2294084f91ccSmrg{ 2295084f91ccSmrg case x@S|@2 in 2296084f91ccSmrg x) 2297084f91ccSmrg ;; 2298084f91ccSmrg *:) 2299084f91ccSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2300084f91ccSmrg ;; 2301084f91ccSmrg x:*) 2302084f91ccSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2303084f91ccSmrg ;; 2304084f91ccSmrg *::*) 2305084f91ccSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2306084f91ccSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2307084f91ccSmrg ;; 2308084f91ccSmrg *) 2309084f91ccSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2310084f91ccSmrg ;; 2311084f91ccSmrg esac 2312084f91ccSmrg} 2313084f91ccSmrg]])# _LT_PREPARE_PATH_LIST 2314084f91ccSmrg 2315084f91ccSmrg 23169418810dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 23179bd41f2cSmrg# ----------------------------- 23189bd41f2cSmrg# PORTME Fill in your ld.so characteristics 23199418810dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 23209418810dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23219418810dSmrgm4_require([_LT_DECL_EGREP])dnl 23229418810dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23239418810dSmrgm4_require([_LT_DECL_OBJDUMP])dnl 23249418810dSmrgm4_require([_LT_DECL_SED])dnl 23250da4cdccSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2326084f91ccSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23279bd41f2cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23289418810dSmrgm4_if([$1], 23299418810dSmrg [], [ 2330084f91ccSmrgif test yes = "$GCC"; then 23319bd41f2cSmrg case $host_os in 2332084f91ccSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2333084f91ccSmrg *) lt_awk_arg='/^libraries:/' ;; 23349bd41f2cSmrg esac 23350da4cdccSmrg case $host_os in 2336084f91ccSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2337084f91ccSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23380da4cdccSmrg esac 23390da4cdccSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23400da4cdccSmrg case $lt_search_path_spec in 23410da4cdccSmrg *\;*) 23429bd41f2cSmrg # if the path contains ";" then we assume it to be the separator 23439bd41f2cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 23449bd41f2cSmrg # assumed that no part of a normal pathname contains ";" but that should 23459bd41f2cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 23460da4cdccSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23470da4cdccSmrg ;; 23480da4cdccSmrg *) 23490da4cdccSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23500da4cdccSmrg ;; 23510da4cdccSmrg esac 23529bd41f2cSmrg # Ok, now we have the path, separated by spaces, we can step through it 2353084f91ccSmrg # and add multilib dir if necessary... 23549bd41f2cSmrg lt_tmp_lt_search_path_spec= 2355084f91ccSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2356084f91ccSmrg # ...but if some path component already ends with the multilib dir we assume 2357084f91ccSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2358084f91ccSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2359084f91ccSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2360084f91ccSmrg lt_multi_os_dir= 2361084f91ccSmrg ;; 2362084f91ccSmrg esac 23639bd41f2cSmrg for lt_sys_path in $lt_search_path_spec; do 2364084f91ccSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2365084f91ccSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2366084f91ccSmrg elif test -n "$lt_multi_os_dir"; then 23679bd41f2cSmrg test -d "$lt_sys_path" && \ 23689bd41f2cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23699bd41f2cSmrg fi 23709bd41f2cSmrg done 23710da4cdccSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2372084f91ccSmrgBEGIN {RS = " "; FS = "/|\n";} { 2373084f91ccSmrg lt_foo = ""; 2374084f91ccSmrg lt_count = 0; 23759bd41f2cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 23769bd41f2cSmrg if ($lt_i != "" && $lt_i != ".") { 23779bd41f2cSmrg if ($lt_i == "..") { 23789bd41f2cSmrg lt_count++; 23799bd41f2cSmrg } else { 23809bd41f2cSmrg if (lt_count == 0) { 2381084f91ccSmrg lt_foo = "/" $lt_i lt_foo; 23829bd41f2cSmrg } else { 23839bd41f2cSmrg lt_count--; 23849bd41f2cSmrg } 23859bd41f2cSmrg } 23869bd41f2cSmrg } 23879bd41f2cSmrg } 23889bd41f2cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23899bd41f2cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23909bd41f2cSmrg}'` 23910da4cdccSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 23920da4cdccSmrg # for these hosts. 23930da4cdccSmrg case $host_os in 23940da4cdccSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2395084f91ccSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23960da4cdccSmrg esac 23970da4cdccSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23989bd41f2cSmrgelse 23999bd41f2cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 24009bd41f2cSmrgfi]) 24019418810dSmrglibrary_names_spec= 24029418810dSmrglibname_spec='lib$name' 24039418810dSmrgsoname_spec= 2404084f91ccSmrgshrext_cmds=.so 24059418810dSmrgpostinstall_cmds= 24069418810dSmrgpostuninstall_cmds= 24079418810dSmrgfinish_cmds= 24089418810dSmrgfinish_eval= 24099418810dSmrgshlibpath_var= 24109418810dSmrgshlibpath_overrides_runpath=unknown 24119418810dSmrgversion_type=none 24129418810dSmrgdynamic_linker="$host_os ld.so" 24139418810dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 24149bd41f2cSmrgneed_lib_prefix=unknown 24159bd41f2cSmrghardcode_into_libs=no 24169bd41f2cSmrg 24179bd41f2cSmrg# when you set need_version to no, make sure it does not cause -set_version 24189bd41f2cSmrg# flags to be left without arguments 24199bd41f2cSmrgneed_version=unknown 24209bd41f2cSmrg 2421084f91ccSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2422084f91ccSmrg[User-defined run-time library search path.]) 2423084f91ccSmrg 24249bd41f2cSmrgcase $host_os in 24259bd41f2cSmrgaix3*) 24260da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 2427084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24289bd41f2cSmrg shlibpath_var=LIBPATH 24299bd41f2cSmrg 24309bd41f2cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2431084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 24329bd41f2cSmrg ;; 24339bd41f2cSmrg 2434d075918cSmrgaix[[4-9]]*) 24350da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 24369bd41f2cSmrg need_lib_prefix=no 24379bd41f2cSmrg need_version=no 24389bd41f2cSmrg hardcode_into_libs=yes 2439084f91ccSmrg if test ia64 = "$host_cpu"; then 24409bd41f2cSmrg # AIX 5 supports IA64 2441084f91ccSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24429bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 24439bd41f2cSmrg else 24449bd41f2cSmrg # With GCC up to 2.95.x, collect2 would create an import file 24459bd41f2cSmrg # for dependence libraries. The import file would start with 2446084f91ccSmrg # the line '#! .'. This would cause the generated library to 2447084f91ccSmrg # depend on '.', always an invalid library. This was fixed in 24489bd41f2cSmrg # development snapshots of GCC prior to 3.0. 24499bd41f2cSmrg case $host_os in 24509bd41f2cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24519bd41f2cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24529bd41f2cSmrg echo ' yes ' 2453084f91ccSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24549bd41f2cSmrg : 24559bd41f2cSmrg else 24569bd41f2cSmrg can_build_shared=no 24579bd41f2cSmrg fi 24589bd41f2cSmrg ;; 24599bd41f2cSmrg esac 2460084f91ccSmrg # Using Import Files as archive members, it is possible to support 2461084f91ccSmrg # filename-based versioning of shared library archives on AIX. While 2462084f91ccSmrg # this would work for both with and without runtime linking, it will 2463084f91ccSmrg # prevent static linking of such archives. So we do filename-based 2464084f91ccSmrg # shared library versioning with .so extension only, which is used 2465084f91ccSmrg # when both runtime linking and shared linking is enabled. 2466084f91ccSmrg # Unfortunately, runtime linking may impact performance, so we do 2467084f91ccSmrg # not want this to be the default eventually. Also, we use the 2468084f91ccSmrg # versioned .so libs for executables only if there is the -brtl 2469084f91ccSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2470084f91ccSmrg # To allow for filename-based versioning support, we need to create 2471084f91ccSmrg # libNAME.so.V as an archive file, containing: 2472084f91ccSmrg # *) an Import File, referring to the versioned filename of the 2473084f91ccSmrg # archive as well as the shared archive member, telling the 2474084f91ccSmrg # bitwidth (32 or 64) of that shared object, and providing the 2475084f91ccSmrg # list of exported symbols of that shared object, eventually 2476084f91ccSmrg # decorated with the 'weak' keyword 2477084f91ccSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2478084f91ccSmrg # it being seen by the linker. 2479084f91ccSmrg # At run time we better use the real file rather than another symlink, 2480084f91ccSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2481084f91ccSmrg 2482084f91ccSmrg case $with_aix_soname,$aix_use_runtimelinking in 2483084f91ccSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24849bd41f2cSmrg # soname into executable. Probably we can add versioning support to 24859bd41f2cSmrg # collect2, so additional links can be useful in future. 2486084f91ccSmrg aix,yes) # traditional libtool 2487084f91ccSmrg dynamic_linker='AIX unversionable lib.so' 24889bd41f2cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24899bd41f2cSmrg # instead of lib<name>.a to let people know that these are not 24909bd41f2cSmrg # typical AIX shared libraries. 2491084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2492084f91ccSmrg ;; 2493084f91ccSmrg aix,no) # traditional AIX only 2494084f91ccSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24959bd41f2cSmrg # We preserve .a as extension for shared libraries through AIX4.2 24969bd41f2cSmrg # and later when we are not doing run time linking. 2497084f91ccSmrg library_names_spec='$libname$release.a $libname.a' 2498084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 2499084f91ccSmrg ;; 2500084f91ccSmrg svr4,*) # full svr4 only 2501084f91ccSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2502084f91ccSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2503084f91ccSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2504084f91ccSmrg shlibpath_overrides_runpath=yes 2505084f91ccSmrg ;; 2506084f91ccSmrg *,yes) # both, prefer svr4 2507084f91ccSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2508084f91ccSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2509084f91ccSmrg # unpreferred sharedlib libNAME.a needs extra handling 2510084f91ccSmrg 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"' 2511084f91ccSmrg 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"' 2512084f91ccSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2513084f91ccSmrg shlibpath_overrides_runpath=yes 2514084f91ccSmrg ;; 2515084f91ccSmrg *,no) # both, prefer aix 2516084f91ccSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2517084f91ccSmrg library_names_spec='$libname$release.a $libname.a' 2518084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 2519084f91ccSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2520084f91ccSmrg 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)' 2521084f91ccSmrg 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"' 2522084f91ccSmrg ;; 2523084f91ccSmrg esac 25249bd41f2cSmrg shlibpath_var=LIBPATH 25259bd41f2cSmrg fi 25269bd41f2cSmrg ;; 25279bd41f2cSmrg 25289bd41f2cSmrgamigaos*) 25299418810dSmrg case $host_cpu in 25309418810dSmrg powerpc) 25319418810dSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25329418810dSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2533084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25349418810dSmrg ;; 25359418810dSmrg m68k) 25369418810dSmrg library_names_spec='$libname.ixlibrary $libname.a' 25379418810dSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2538084f91ccSmrg 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' 25399418810dSmrg ;; 25409418810dSmrg esac 25419bd41f2cSmrg ;; 25429bd41f2cSmrg 25439bd41f2cSmrgbeos*) 2544084f91ccSmrg library_names_spec='$libname$shared_ext' 25459bd41f2cSmrg dynamic_linker="$host_os ld.so" 25469bd41f2cSmrg shlibpath_var=LIBRARY_PATH 25479bd41f2cSmrg ;; 25489bd41f2cSmrg 25499bd41f2cSmrgbsdi[[45]]*) 25500da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 25519bd41f2cSmrg need_version=no 2552084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2553084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 25549bd41f2cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25559bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 25569bd41f2cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25579bd41f2cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25589bd41f2cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 25599bd41f2cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25609bd41f2cSmrg # libtool to hard-code these into programs 25619bd41f2cSmrg ;; 25629bd41f2cSmrg 25639418810dSmrgcygwin* | mingw* | pw32* | cegcc*) 25649bd41f2cSmrg version_type=windows 2565084f91ccSmrg shrext_cmds=.dll 25669bd41f2cSmrg need_version=no 25679bd41f2cSmrg need_lib_prefix=no 25689bd41f2cSmrg 25690da4cdccSmrg case $GCC,$cc_basename in 25700da4cdccSmrg yes,*) 25710da4cdccSmrg # gcc 25729bd41f2cSmrg library_names_spec='$libname.dll.a' 25739bd41f2cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2574084f91ccSmrg postinstall_cmds='base_file=`basename \$file`~ 2575084f91ccSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25769bd41f2cSmrg dldir=$destdir/`dirname \$dlpath`~ 25779bd41f2cSmrg test -d \$dldir || mkdir -p \$dldir~ 25789bd41f2cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 25799418810dSmrg chmod a+x \$dldir/$dlname~ 25809418810dSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25819418810dSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25829418810dSmrg fi' 25839bd41f2cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25849bd41f2cSmrg dlpath=$dir/\$dldll~ 25859418810dSmrg $RM \$dlpath' 25869bd41f2cSmrg shlibpath_overrides_runpath=yes 25879bd41f2cSmrg 25889bd41f2cSmrg case $host_os in 25899bd41f2cSmrg cygwin*) 25909bd41f2cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2591084f91ccSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25920da4cdccSmrgm4_if([$1], [],[ 25930da4cdccSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25949bd41f2cSmrg ;; 25959418810dSmrg mingw* | cegcc*) 25969bd41f2cSmrg # MinGW DLLs use traditional 'lib' prefix 2597084f91ccSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25989bd41f2cSmrg ;; 25999bd41f2cSmrg pw32*) 26009bd41f2cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2601084f91ccSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26029bd41f2cSmrg ;; 26039bd41f2cSmrg esac 26040da4cdccSmrg dynamic_linker='Win32 ld.exe' 26050da4cdccSmrg ;; 26060da4cdccSmrg 2607084f91ccSmrg *,cl* | *,icl*) 2608084f91ccSmrg # Native MSVC or ICC 26090da4cdccSmrg libname_spec='$name' 2610084f91ccSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2611084f91ccSmrg library_names_spec='$libname.dll.lib' 26120da4cdccSmrg 26130da4cdccSmrg case $build_os in 26140da4cdccSmrg mingw*) 26150da4cdccSmrg sys_lib_search_path_spec= 26160da4cdccSmrg lt_save_ifs=$IFS 26170da4cdccSmrg IFS=';' 26180da4cdccSmrg for lt_path in $LIB 26190da4cdccSmrg do 26200da4cdccSmrg IFS=$lt_save_ifs 26210da4cdccSmrg # Let DOS variable expansion print the short 8.3 style file name. 26220da4cdccSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26230da4cdccSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26240da4cdccSmrg done 26250da4cdccSmrg IFS=$lt_save_ifs 26260da4cdccSmrg # Convert to MSYS style. 2627084f91ccSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26280da4cdccSmrg ;; 26290da4cdccSmrg cygwin*) 26300da4cdccSmrg # Convert to unix form, then to dos form, then back to unix form 26310da4cdccSmrg # but this time dos style (no spaces!) so that the unix form looks 26320da4cdccSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 26330da4cdccSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26340da4cdccSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26350da4cdccSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26360da4cdccSmrg ;; 26370da4cdccSmrg *) 2638084f91ccSmrg sys_lib_search_path_spec=$LIB 26390da4cdccSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26400da4cdccSmrg # It is most probably a Windows format PATH. 26410da4cdccSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26420da4cdccSmrg else 26430da4cdccSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26440da4cdccSmrg fi 26450da4cdccSmrg # FIXME: find the short name or the path components, as spaces are 26460da4cdccSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 26470da4cdccSmrg ;; 26480da4cdccSmrg esac 26490da4cdccSmrg 26500da4cdccSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2651084f91ccSmrg postinstall_cmds='base_file=`basename \$file`~ 2652084f91ccSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26530da4cdccSmrg dldir=$destdir/`dirname \$dlpath`~ 26540da4cdccSmrg test -d \$dldir || mkdir -p \$dldir~ 26550da4cdccSmrg $install_prog $dir/$dlname \$dldir/$dlname' 26560da4cdccSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26570da4cdccSmrg dlpath=$dir/\$dldll~ 26580da4cdccSmrg $RM \$dlpath' 26590da4cdccSmrg shlibpath_overrides_runpath=yes 26600da4cdccSmrg dynamic_linker='Win32 link.exe' 26619bd41f2cSmrg ;; 26629bd41f2cSmrg 26639bd41f2cSmrg *) 2664084f91ccSmrg # Assume MSVC and ICC wrapper 2665084f91ccSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26660da4cdccSmrg dynamic_linker='Win32 ld.exe' 26679bd41f2cSmrg ;; 26689bd41f2cSmrg esac 26699bd41f2cSmrg # FIXME: first we should search . and the directory the executable is in 26709bd41f2cSmrg shlibpath_var=PATH 26719bd41f2cSmrg ;; 26729bd41f2cSmrg 26739bd41f2cSmrgdarwin* | rhapsody*) 26749bd41f2cSmrg dynamic_linker="$host_os dyld" 26759bd41f2cSmrg version_type=darwin 26769bd41f2cSmrg need_lib_prefix=no 26779bd41f2cSmrg need_version=no 2678084f91ccSmrg library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' 2679084f91ccSmrg soname_spec='$libname$release$major$shared_ext' 26809bd41f2cSmrg shlibpath_overrides_runpath=yes 26819bd41f2cSmrg shlibpath_var=DYLD_LIBRARY_PATH 2682084f91ccSmrg shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' 26839418810dSmrgm4_if([$1], [],[ 26849418810dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26859bd41f2cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26869bd41f2cSmrg ;; 26879bd41f2cSmrg 26889bd41f2cSmrgdgux*) 26890da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 26909bd41f2cSmrg need_lib_prefix=no 26919bd41f2cSmrg need_version=no 2692084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2693084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 26949bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 26959bd41f2cSmrg ;; 26969bd41f2cSmrg 2697084f91ccSmrgfreebsd* | dragonfly* | midnightbsd*) 26989bd41f2cSmrg # DragonFly does not have aout. When/if they implement a new 26999bd41f2cSmrg # versioning mechanism, adjust this. 27009bd41f2cSmrg if test -x /usr/bin/objformat; then 27019bd41f2cSmrg objformat=`/usr/bin/objformat` 27029bd41f2cSmrg else 27039bd41f2cSmrg case $host_os in 27040da4cdccSmrg freebsd[[23]].*) objformat=aout ;; 27059bd41f2cSmrg *) objformat=elf ;; 27069bd41f2cSmrg esac 27079bd41f2cSmrg fi 2708084f91ccSmrg # Handle Gentoo/FreeBSD as it was Linux 2709084f91ccSmrg case $host_vendor in 2710084f91ccSmrg gentoo) 2711084f91ccSmrg version_type=linux ;; 2712084f91ccSmrg *) 2713084f91ccSmrg version_type=freebsd-$objformat ;; 2714084f91ccSmrg esac 2715084f91ccSmrg 27169bd41f2cSmrg case $version_type in 27179bd41f2cSmrg freebsd-elf*) 2718084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2719084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 27209bd41f2cSmrg need_version=no 27219bd41f2cSmrg need_lib_prefix=no 27229bd41f2cSmrg ;; 27239bd41f2cSmrg freebsd-*) 2724084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27259bd41f2cSmrg need_version=yes 27269bd41f2cSmrg ;; 2727084f91ccSmrg linux) 2728084f91ccSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2729084f91ccSmrg soname_spec='${libname}${release}${shared_ext}$major' 2730084f91ccSmrg need_lib_prefix=no 2731084f91ccSmrg need_version=no 2732084f91ccSmrg ;; 27339bd41f2cSmrg esac 27349bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 27359bd41f2cSmrg case $host_os in 27360da4cdccSmrg freebsd2.*) 27379bd41f2cSmrg shlibpath_overrides_runpath=yes 27389bd41f2cSmrg ;; 27399bd41f2cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27409bd41f2cSmrg shlibpath_overrides_runpath=yes 27419bd41f2cSmrg hardcode_into_libs=yes 27429bd41f2cSmrg ;; 27439bd41f2cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27449bd41f2cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27459bd41f2cSmrg shlibpath_overrides_runpath=no 27469bd41f2cSmrg hardcode_into_libs=yes 27479bd41f2cSmrg ;; 27489bd41f2cSmrg *) # from 4.6 on, and DragonFly 27499bd41f2cSmrg shlibpath_overrides_runpath=yes 27509bd41f2cSmrg hardcode_into_libs=yes 27519bd41f2cSmrg ;; 27529bd41f2cSmrg esac 27539bd41f2cSmrg ;; 27549bd41f2cSmrg 27550da4cdccSmrghaiku*) 27560da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 27570da4cdccSmrg need_lib_prefix=no 27580da4cdccSmrg need_version=no 27590da4cdccSmrg dynamic_linker="$host_os runtime_loader" 2760084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2761084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 27620da4cdccSmrg shlibpath_var=LIBRARY_PATH 2763084f91ccSmrg shlibpath_overrides_runpath=no 27640da4cdccSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27659bd41f2cSmrg hardcode_into_libs=yes 27669bd41f2cSmrg ;; 27679bd41f2cSmrg 27689bd41f2cSmrghpux9* | hpux10* | hpux11*) 27699bd41f2cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 27709bd41f2cSmrg # link against other versions. 27719bd41f2cSmrg version_type=sunos 27729bd41f2cSmrg need_lib_prefix=no 27739bd41f2cSmrg need_version=no 27749bd41f2cSmrg case $host_cpu in 27759bd41f2cSmrg ia64*) 27769bd41f2cSmrg shrext_cmds='.so' 27779bd41f2cSmrg hardcode_into_libs=yes 27789bd41f2cSmrg dynamic_linker="$host_os dld.so" 27799bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 27809bd41f2cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2781084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2782084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 2783084f91ccSmrg if test 32 = "$HPUX_IA64_MODE"; then 27849bd41f2cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2785084f91ccSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27869bd41f2cSmrg else 27879bd41f2cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2788084f91ccSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27899bd41f2cSmrg fi 27909bd41f2cSmrg ;; 27919418810dSmrg hppa*64*) 27929418810dSmrg shrext_cmds='.sl' 27939418810dSmrg hardcode_into_libs=yes 27949418810dSmrg dynamic_linker="$host_os dld.sl" 27959418810dSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27969418810dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2797084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2798084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 27999418810dSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 28009418810dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 28019418810dSmrg ;; 28029418810dSmrg *) 28039bd41f2cSmrg shrext_cmds='.sl' 28049bd41f2cSmrg dynamic_linker="$host_os dld.sl" 28059bd41f2cSmrg shlibpath_var=SHLIB_PATH 28069bd41f2cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2807084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2808084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 28099bd41f2cSmrg ;; 28109bd41f2cSmrg esac 28110da4cdccSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 28129bd41f2cSmrg postinstall_cmds='chmod 555 $lib' 28130da4cdccSmrg # or fails outright, so override atomically: 28140da4cdccSmrg install_override_mode=555 28159bd41f2cSmrg ;; 28169bd41f2cSmrg 28179bd41f2cSmrginterix[[3-9]]*) 28180da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 28199bd41f2cSmrg need_lib_prefix=no 28209bd41f2cSmrg need_version=no 2821084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2822084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 28239bd41f2cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 28249bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 28259bd41f2cSmrg shlibpath_overrides_runpath=no 28269bd41f2cSmrg hardcode_into_libs=yes 28279bd41f2cSmrg ;; 28289bd41f2cSmrg 28299bd41f2cSmrgirix5* | irix6* | nonstopux*) 28309bd41f2cSmrg case $host_os in 28319bd41f2cSmrg nonstopux*) version_type=nonstopux ;; 28329bd41f2cSmrg *) 2833084f91ccSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 28340da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 28359bd41f2cSmrg else 28369bd41f2cSmrg version_type=irix 28379bd41f2cSmrg fi ;; 28389bd41f2cSmrg esac 28399bd41f2cSmrg need_lib_prefix=no 28409bd41f2cSmrg need_version=no 2841084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 2842084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28439bd41f2cSmrg case $host_os in 28449bd41f2cSmrg irix5* | nonstopux*) 28459bd41f2cSmrg libsuff= shlibsuff= 28469bd41f2cSmrg ;; 28479bd41f2cSmrg *) 28489bd41f2cSmrg case $LD in # libtool.m4 will add one of these switches to LD 28499bd41f2cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28509bd41f2cSmrg libsuff= shlibsuff= libmagic=32-bit;; 28519bd41f2cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28529bd41f2cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28539bd41f2cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28549bd41f2cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28559bd41f2cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 28569bd41f2cSmrg esac 28579bd41f2cSmrg ;; 28589bd41f2cSmrg esac 28599bd41f2cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28609bd41f2cSmrg shlibpath_overrides_runpath=no 2861084f91ccSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2862084f91ccSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28639bd41f2cSmrg hardcode_into_libs=yes 28649bd41f2cSmrg ;; 28659bd41f2cSmrg 28669bd41f2cSmrg# No shared lib support for Linux oldld, aout, or coff. 28679bd41f2cSmrglinux*oldld* | linux*aout* | linux*coff*) 28689bd41f2cSmrg dynamic_linker=no 28699bd41f2cSmrg ;; 28709bd41f2cSmrg 2871084f91ccSmrglinux*android*) 2872084f91ccSmrg version_type=none # Android doesn't support versioned libraries. 2873084f91ccSmrg need_lib_prefix=no 2874084f91ccSmrg need_version=no 2875084f91ccSmrg library_names_spec='$libname$release$shared_ext' 2876084f91ccSmrg soname_spec='$libname$release$shared_ext' 2877084f91ccSmrg finish_cmds= 2878084f91ccSmrg shlibpath_var=LD_LIBRARY_PATH 2879084f91ccSmrg shlibpath_overrides_runpath=yes 2880084f91ccSmrg 2881084f91ccSmrg # This implies no fast_install, which is unacceptable. 2882084f91ccSmrg # Some rework will be needed to allow for fast_install 2883084f91ccSmrg # before this can be enabled. 2884084f91ccSmrg hardcode_into_libs=yes 2885084f91ccSmrg 2886084f91ccSmrg dynamic_linker='Android linker' 2887084f91ccSmrg # Don't embed -rpath directories since the linker doesn't support them. 2888084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2889084f91ccSmrg ;; 2890084f91ccSmrg 28910da4cdccSmrg# This must be glibc/ELF. 2892084f91ccSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28930da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 28949bd41f2cSmrg need_lib_prefix=no 28959bd41f2cSmrg need_version=no 2896084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2897084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 28989bd41f2cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28999bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 29009bd41f2cSmrg shlibpath_overrides_runpath=no 29010da4cdccSmrg 29029418810dSmrg # Some binutils ld are patched to set DT_RUNPATH 29030da4cdccSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 29040da4cdccSmrg [lt_cv_shlibpath_overrides_runpath=no 29050da4cdccSmrg save_LDFLAGS=$LDFLAGS 29060da4cdccSmrg save_libdir=$libdir 29070da4cdccSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 29080da4cdccSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 29090da4cdccSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 29100da4cdccSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 29110da4cdccSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 29120da4cdccSmrg LDFLAGS=$save_LDFLAGS 29130da4cdccSmrg libdir=$save_libdir 29140da4cdccSmrg ]) 29150da4cdccSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 29169418810dSmrg 29179bd41f2cSmrg # This implies no fast_install, which is unacceptable. 29189bd41f2cSmrg # Some rework will be needed to allow for fast_install 29199bd41f2cSmrg # before this can be enabled. 29209bd41f2cSmrg hardcode_into_libs=yes 29219bd41f2cSmrg 2922084f91ccSmrg # Ideally, we could use ldconfig to report *all* directores which are 2923084f91ccSmrg # searched for libraries, however this is still not possible. Aside from not 2924084f91ccSmrg # being certain /sbin/ldconfig is available, command 2925084f91ccSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2926084f91ccSmrg # even though it is searched at run-time. Try to do the best guess by 2927084f91ccSmrg # appending ld.so.conf contents (and includes) to the search path. 29289bd41f2cSmrg if test -f /etc/ld.so.conf; then 29290da4cdccSmrg 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' ' '` 2930084f91ccSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29319bd41f2cSmrg fi 29329bd41f2cSmrg 29339bd41f2cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29349bd41f2cSmrg # powerpc, because MkLinux only supported shared libraries with the 29359bd41f2cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 29369bd41f2cSmrg # most powerpc-linux boxes support dynamic linking these days and 29379bd41f2cSmrg # people can always --disable-shared, the test was removed, and we 29389bd41f2cSmrg # assume the GNU/Linux dynamic linker is in use. 29399bd41f2cSmrg dynamic_linker='GNU/Linux ld.so' 29409bd41f2cSmrg ;; 29419bd41f2cSmrg 29429bd41f2cSmrgnetbsd*) 29439bd41f2cSmrg version_type=sunos 29449bd41f2cSmrg need_lib_prefix=no 29459bd41f2cSmrg need_version=no 29469418810dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2947084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29489bd41f2cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29499bd41f2cSmrg dynamic_linker='NetBSD (a.out) ld.so' 29509bd41f2cSmrg else 2951084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2952084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 29539bd41f2cSmrg dynamic_linker='NetBSD ld.elf_so' 29549bd41f2cSmrg fi 29559bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 29569bd41f2cSmrg shlibpath_overrides_runpath=yes 29579bd41f2cSmrg hardcode_into_libs=yes 29589bd41f2cSmrg ;; 29599bd41f2cSmrg 29609bd41f2cSmrgnewsos6) 29610da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 2962084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29639bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 29649bd41f2cSmrg shlibpath_overrides_runpath=yes 29659bd41f2cSmrg ;; 29669bd41f2cSmrg 29679418810dSmrg*nto* | *qnx*) 29689418810dSmrg version_type=qnx 29699bd41f2cSmrg need_lib_prefix=no 29709bd41f2cSmrg need_version=no 2971084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2972084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 29739bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 29749418810dSmrg shlibpath_overrides_runpath=no 29759418810dSmrg hardcode_into_libs=yes 29769418810dSmrg dynamic_linker='ldqnx.so' 29779bd41f2cSmrg ;; 29789bd41f2cSmrg 2979084f91ccSmrgopenbsd* | bitrig*) 29809bd41f2cSmrg version_type=sunos 2981084f91ccSmrg sys_lib_dlsearch_path_spec=/usr/lib 29829bd41f2cSmrg need_lib_prefix=no 2983084f91ccSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2984084f91ccSmrg need_version=no 29859bd41f2cSmrg else 2986084f91ccSmrg need_version=yes 29879bd41f2cSmrg fi 2988084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2989084f91ccSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2990084f91ccSmrg shlibpath_var=LD_LIBRARY_PATH 2991084f91ccSmrg shlibpath_overrides_runpath=yes 29929bd41f2cSmrg ;; 29939bd41f2cSmrg 29949bd41f2cSmrgos2*) 29959bd41f2cSmrg libname_spec='$name' 2996084f91ccSmrg version_type=windows 2997084f91ccSmrg shrext_cmds=.dll 2998084f91ccSmrg need_version=no 29999bd41f2cSmrg need_lib_prefix=no 3000084f91ccSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 3001084f91ccSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 3002084f91ccSmrg v=$($ECHO $release$versuffix | tr -d .-); 3003084f91ccSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 3004084f91ccSmrg $ECHO $n$v`$shared_ext' 3005084f91ccSmrg library_names_spec='${libname}_dll.$libext' 30069bd41f2cSmrg dynamic_linker='OS/2 ld.exe' 3007084f91ccSmrg shlibpath_var=BEGINLIBPATH 3008084f91ccSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3009084f91ccSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3010084f91ccSmrg postinstall_cmds='base_file=`basename \$file`~ 3011084f91ccSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 3012084f91ccSmrg dldir=$destdir/`dirname \$dlpath`~ 3013084f91ccSmrg test -d \$dldir || mkdir -p \$dldir~ 3014084f91ccSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 3015084f91ccSmrg chmod a+x \$dldir/$dlname~ 3016084f91ccSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3017084f91ccSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3018084f91ccSmrg fi' 3019084f91ccSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3020084f91ccSmrg dlpath=$dir/\$dldll~ 3021084f91ccSmrg $RM \$dlpath' 30229bd41f2cSmrg ;; 30239bd41f2cSmrg 30249bd41f2cSmrgosf3* | osf4* | osf5*) 30259bd41f2cSmrg version_type=osf 30269bd41f2cSmrg need_lib_prefix=no 30279bd41f2cSmrg need_version=no 3028084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 3029084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30309bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 30319bd41f2cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3032084f91ccSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30339bd41f2cSmrg ;; 30349bd41f2cSmrg 30359bd41f2cSmrgrdos*) 30369bd41f2cSmrg dynamic_linker=no 30379bd41f2cSmrg ;; 30389bd41f2cSmrg 30399bd41f2cSmrgsolaris*) 30400da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 30419bd41f2cSmrg need_lib_prefix=no 30429bd41f2cSmrg need_version=no 3043084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3044084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 30459bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 30469bd41f2cSmrg shlibpath_overrides_runpath=yes 30479bd41f2cSmrg hardcode_into_libs=yes 30489bd41f2cSmrg # ldd complains unless libraries are executable 30499bd41f2cSmrg postinstall_cmds='chmod +x $lib' 30509bd41f2cSmrg ;; 30519bd41f2cSmrg 30529bd41f2cSmrgsunos4*) 30539bd41f2cSmrg version_type=sunos 3054084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30559bd41f2cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30569bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 30579bd41f2cSmrg shlibpath_overrides_runpath=yes 3058084f91ccSmrg if test yes = "$with_gnu_ld"; then 30599bd41f2cSmrg need_lib_prefix=no 30609bd41f2cSmrg fi 30619bd41f2cSmrg need_version=yes 30629bd41f2cSmrg ;; 30639bd41f2cSmrg 30649bd41f2cSmrgsysv4 | sysv4.3*) 30650da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 3066084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3067084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 30689bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 30699bd41f2cSmrg case $host_vendor in 30709bd41f2cSmrg sni) 30719bd41f2cSmrg shlibpath_overrides_runpath=no 30729bd41f2cSmrg need_lib_prefix=no 30739bd41f2cSmrg runpath_var=LD_RUN_PATH 30749bd41f2cSmrg ;; 30759bd41f2cSmrg siemens) 30769bd41f2cSmrg need_lib_prefix=no 30779bd41f2cSmrg ;; 30789bd41f2cSmrg motorola) 30799bd41f2cSmrg need_lib_prefix=no 30809bd41f2cSmrg need_version=no 30819bd41f2cSmrg shlibpath_overrides_runpath=no 30829bd41f2cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30839bd41f2cSmrg ;; 30849bd41f2cSmrg esac 30859bd41f2cSmrg ;; 30869bd41f2cSmrg 30879bd41f2cSmrgsysv4*MP*) 3088084f91ccSmrg if test -d /usr/nec; then 30890da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 3090084f91ccSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3091084f91ccSmrg soname_spec='$libname$shared_ext.$major' 30929bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 30939bd41f2cSmrg fi 30949bd41f2cSmrg ;; 30959bd41f2cSmrg 30969bd41f2cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3097084f91ccSmrg version_type=sco 30989bd41f2cSmrg need_lib_prefix=no 30999bd41f2cSmrg need_version=no 3100084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3101084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 31029bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 31039418810dSmrg shlibpath_overrides_runpath=yes 31049bd41f2cSmrg hardcode_into_libs=yes 3105084f91ccSmrg if test yes = "$with_gnu_ld"; then 31069bd41f2cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 31079bd41f2cSmrg else 31089bd41f2cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 31099bd41f2cSmrg case $host_os in 31109bd41f2cSmrg sco3.2v5*) 31119bd41f2cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 31129bd41f2cSmrg ;; 31139bd41f2cSmrg esac 31149bd41f2cSmrg fi 31159bd41f2cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 31169bd41f2cSmrg ;; 31179bd41f2cSmrg 31189418810dSmrgtpf*) 31199418810dSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 31200da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 31219418810dSmrg need_lib_prefix=no 31229418810dSmrg need_version=no 3123084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31249418810dSmrg shlibpath_var=LD_LIBRARY_PATH 31259418810dSmrg shlibpath_overrides_runpath=no 31269418810dSmrg hardcode_into_libs=yes 31279418810dSmrg ;; 31289418810dSmrg 31299bd41f2cSmrguts4*) 31300da4cdccSmrg version_type=linux # correct to gnu/linux during the next big refactor 3131084f91ccSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3132084f91ccSmrg soname_spec='$libname$release$shared_ext$major' 31339bd41f2cSmrg shlibpath_var=LD_LIBRARY_PATH 31349bd41f2cSmrg ;; 31359bd41f2cSmrg 31369bd41f2cSmrg*) 31379bd41f2cSmrg dynamic_linker=no 31389bd41f2cSmrg ;; 31399bd41f2cSmrgesac 31409bd41f2cSmrgAC_MSG_RESULT([$dynamic_linker]) 3141084f91ccSmrgtest no = "$dynamic_linker" && can_build_shared=no 31429bd41f2cSmrg 31439bd41f2cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3144084f91ccSmrgif test yes = "$GCC"; then 31459bd41f2cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31469bd41f2cSmrgfi 31479bd41f2cSmrg 3148084f91ccSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3149084f91ccSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31509418810dSmrgfi 3151084f91ccSmrg 3152084f91ccSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3153084f91ccSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31549418810dSmrgfi 31559bd41f2cSmrg 3156084f91ccSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3157084f91ccSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3158084f91ccSmrg 3159084f91ccSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3160084f91ccSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3161084f91ccSmrg 3162084f91ccSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3163084f91ccSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3164084f91ccSmrg 31659418810dSmrg_LT_DECL([], [variables_saved_for_relink], [1], 31669418810dSmrg [Variables whose values should be saved in libtool wrapper scripts and 31679418810dSmrg restored at link time]) 31689418810dSmrg_LT_DECL([], [need_lib_prefix], [0], 31699418810dSmrg [Do we need the "lib" prefix for modules?]) 31709418810dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31719418810dSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31729418810dSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31739418810dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31749418810dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31759418810dSmrg [Is shlibpath searched before the hard-coded library search path?]) 31769418810dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31779418810dSmrg_LT_DECL([], [library_names_spec], [1], 31789418810dSmrg [[List of archive names. First name is the real one, the rest are links. 31799418810dSmrg The last name is the one that the linker finds with -lNAME]]) 31809418810dSmrg_LT_DECL([], [soname_spec], [1], 31819418810dSmrg [[The coded name of the library, if different from the real name]]) 31820da4cdccSmrg_LT_DECL([], [install_override_mode], [1], 31830da4cdccSmrg [Permission mode override for installation of shared libraries]) 31849418810dSmrg_LT_DECL([], [postinstall_cmds], [2], 31859418810dSmrg [Command to use after installation of a shared archive]) 31869418810dSmrg_LT_DECL([], [postuninstall_cmds], [2], 31879418810dSmrg [Command to use after uninstallation of a shared archive]) 31889418810dSmrg_LT_DECL([], [finish_cmds], [2], 31899418810dSmrg [Commands used to finish a libtool library installation in a directory]) 31909418810dSmrg_LT_DECL([], [finish_eval], [1], 31919418810dSmrg [[As "finish_cmds", except a single script fragment to be evaled but 31929418810dSmrg not shown]]) 31939418810dSmrg_LT_DECL([], [hardcode_into_libs], [0], 31949418810dSmrg [Whether we should hardcode library paths into libraries]) 31959418810dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31969418810dSmrg [Compile-time system search path for libraries]) 3197084f91ccSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3198084f91ccSmrg [Detected run-time system search path for libraries]) 3199084f91ccSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3200084f91ccSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 32019418810dSmrg])# _LT_SYS_DYNAMIC_LINKER 32029418810dSmrg 32039418810dSmrg 32049418810dSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 32059bd41f2cSmrg# -------------------------- 3206084f91ccSmrg# find a file program that can recognize shared library 32079418810dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 32089418810dSmrg[m4_require([_LT_DECL_EGREP])dnl 32099bd41f2cSmrgAC_MSG_CHECKING([for $1]) 32109bd41f2cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 32119bd41f2cSmrg[case $MAGIC_CMD in 32129bd41f2cSmrg[[\\/*] | ?:[\\/]*]) 3213084f91ccSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 32149bd41f2cSmrg ;; 32159bd41f2cSmrg*) 3216084f91ccSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 3217084f91ccSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 32189bd41f2cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 32199bd41f2cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 32209bd41f2cSmrgdnl not every word. This closes a longstanding sh security hole. 32219418810dSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 32229bd41f2cSmrg for ac_dir in $ac_dummy; do 3223084f91ccSmrg IFS=$lt_save_ifs 32249bd41f2cSmrg test -z "$ac_dir" && ac_dir=. 3225084f91ccSmrg if test -f "$ac_dir/$1"; then 3226084f91ccSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32279bd41f2cSmrg if test -n "$file_magic_test_file"; then 32289bd41f2cSmrg case $deplibs_check_method in 32299bd41f2cSmrg "file_magic "*) 32309bd41f2cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3231084f91ccSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32329bd41f2cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32339bd41f2cSmrg $EGREP "$file_magic_regex" > /dev/null; then 32349bd41f2cSmrg : 32359bd41f2cSmrg else 32369418810dSmrg cat <<_LT_EOF 1>&2 32379bd41f2cSmrg 32389bd41f2cSmrg*** Warning: the command libtool uses to detect shared libraries, 32399bd41f2cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32409bd41f2cSmrg*** The result is that libtool may fail to recognize shared libraries 32419bd41f2cSmrg*** as such. This will affect the creation of libtool libraries that 32429bd41f2cSmrg*** depend on shared libraries, but programs linked with such libtool 32439bd41f2cSmrg*** libraries will work regardless of this problem. Nevertheless, you 32449bd41f2cSmrg*** may want to report the problem to your system manager and/or to 32459bd41f2cSmrg*** bug-libtool@gnu.org 32469bd41f2cSmrg 32479418810dSmrg_LT_EOF 32489bd41f2cSmrg fi ;; 32499bd41f2cSmrg esac 32509bd41f2cSmrg fi 32519bd41f2cSmrg break 32529bd41f2cSmrg fi 32539bd41f2cSmrg done 3254084f91ccSmrg IFS=$lt_save_ifs 3255084f91ccSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 32569bd41f2cSmrg ;; 32579bd41f2cSmrgesac]) 3258084f91ccSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32599bd41f2cSmrgif test -n "$MAGIC_CMD"; then 32609bd41f2cSmrg AC_MSG_RESULT($MAGIC_CMD) 32619bd41f2cSmrgelse 32629bd41f2cSmrg AC_MSG_RESULT(no) 32639bd41f2cSmrgfi 32649418810dSmrg_LT_DECL([], [MAGIC_CMD], [0], 32659418810dSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32669418810dSmrg])# _LT_PATH_TOOL_PREFIX 32679bd41f2cSmrg 32689418810dSmrg# Old name: 32699418810dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32709418810dSmrgdnl aclocal-1.4 backwards compatibility: 32719418810dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32729bd41f2cSmrg 32739418810dSmrg 32749418810dSmrg# _LT_PATH_MAGIC 32759418810dSmrg# -------------- 3276084f91ccSmrg# find a file program that can recognize a shared library 32779418810dSmrgm4_defun([_LT_PATH_MAGIC], 32789418810dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32799bd41f2cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32809bd41f2cSmrg if test -n "$ac_tool_prefix"; then 32819418810dSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32829bd41f2cSmrg else 32839bd41f2cSmrg MAGIC_CMD=: 32849bd41f2cSmrg fi 32859bd41f2cSmrgfi 32869418810dSmrg])# _LT_PATH_MAGIC 32879bd41f2cSmrg 32889bd41f2cSmrg 32899418810dSmrg# LT_PATH_LD 32909bd41f2cSmrg# ---------- 32919bd41f2cSmrg# find the pathname to the GNU or non-GNU linker 32929418810dSmrgAC_DEFUN([LT_PATH_LD], 32939418810dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 32949bd41f2cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32959bd41f2cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32969418810dSmrgm4_require([_LT_DECL_SED])dnl 32979418810dSmrgm4_require([_LT_DECL_EGREP])dnl 32980da4cdccSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32999418810dSmrg 33009418810dSmrgAC_ARG_WITH([gnu-ld], 33019418810dSmrg [AS_HELP_STRING([--with-gnu-ld], 33029418810dSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3303084f91ccSmrg [test no = "$withval" || with_gnu_ld=yes], 33049418810dSmrg [with_gnu_ld=no])dnl 33059418810dSmrg 33069bd41f2cSmrgac_prog=ld 3307084f91ccSmrgif test yes = "$GCC"; then 33089bd41f2cSmrg # Check if gcc -print-prog-name=ld gives a path. 33099bd41f2cSmrg AC_MSG_CHECKING([for ld used by $CC]) 33109bd41f2cSmrg case $host in 33119bd41f2cSmrg *-*-mingw*) 3312084f91ccSmrg # gcc leaves a trailing carriage return, which upsets mingw 33139bd41f2cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 33149bd41f2cSmrg *) 33159bd41f2cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 33169bd41f2cSmrg esac 33179bd41f2cSmrg case $ac_prog in 33189bd41f2cSmrg # Accept absolute paths. 33199bd41f2cSmrg [[\\/]]* | ?:[[\\/]]*) 33209bd41f2cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 33219bd41f2cSmrg # Canonicalize the pathname of ld 33229418810dSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 33239418810dSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 33249418810dSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 33259bd41f2cSmrg done 3326084f91ccSmrg test -z "$LD" && LD=$ac_prog 33279bd41f2cSmrg ;; 33289bd41f2cSmrg "") 33299bd41f2cSmrg # If it fails, then pretend we aren't using GCC. 33309bd41f2cSmrg ac_prog=ld 33319bd41f2cSmrg ;; 33329bd41f2cSmrg *) 33339bd41f2cSmrg # If it is relative, then search for the first ld in PATH. 33349bd41f2cSmrg with_gnu_ld=unknown 33359bd41f2cSmrg ;; 33369bd41f2cSmrg esac 3337084f91ccSmrgelif test yes = "$with_gnu_ld"; then 33389bd41f2cSmrg AC_MSG_CHECKING([for GNU ld]) 33399bd41f2cSmrgelse 33409bd41f2cSmrg AC_MSG_CHECKING([for non-GNU ld]) 33419bd41f2cSmrgfi 33429bd41f2cSmrgAC_CACHE_VAL(lt_cv_path_LD, 33439bd41f2cSmrg[if test -z "$LD"; then 3344084f91ccSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33459bd41f2cSmrg for ac_dir in $PATH; do 3346084f91ccSmrg IFS=$lt_save_ifs 33479bd41f2cSmrg test -z "$ac_dir" && ac_dir=. 33489bd41f2cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3349084f91ccSmrg lt_cv_path_LD=$ac_dir/$ac_prog 33509bd41f2cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 33519bd41f2cSmrg # but apparently some variants of GNU ld only accept -v. 33529bd41f2cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 33539bd41f2cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33549bd41f2cSmrg *GNU* | *'with BFD'*) 3355084f91ccSmrg test no != "$with_gnu_ld" && break 33569bd41f2cSmrg ;; 33579bd41f2cSmrg *) 3358084f91ccSmrg test yes != "$with_gnu_ld" && break 33599bd41f2cSmrg ;; 33609bd41f2cSmrg esac 33619bd41f2cSmrg fi 33629bd41f2cSmrg done 3363084f91ccSmrg IFS=$lt_save_ifs 33649bd41f2cSmrgelse 3365084f91ccSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33669bd41f2cSmrgfi]) 3367084f91ccSmrgLD=$lt_cv_path_LD 33689bd41f2cSmrgif test -n "$LD"; then 33699bd41f2cSmrg AC_MSG_RESULT($LD) 33709bd41f2cSmrgelse 33719bd41f2cSmrg AC_MSG_RESULT(no) 33729bd41f2cSmrgfi 33739bd41f2cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33749418810dSmrg_LT_PATH_LD_GNU 33759418810dSmrgAC_SUBST([LD]) 33769bd41f2cSmrg 33779418810dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33789418810dSmrg])# LT_PATH_LD 33799bd41f2cSmrg 33809418810dSmrg# Old names: 33819418810dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33829418810dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33839418810dSmrgdnl aclocal-1.4 backwards compatibility: 33849418810dSmrgdnl AC_DEFUN([AM_PROG_LD], []) 33859418810dSmrgdnl AC_DEFUN([AC_PROG_LD], []) 33869418810dSmrg 33879418810dSmrg 33889418810dSmrg# _LT_PATH_LD_GNU 33899418810dSmrg#- -------------- 33909418810dSmrgm4_defun([_LT_PATH_LD_GNU], 33919418810dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33929bd41f2cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33939bd41f2cSmrgcase `$LD -v 2>&1 </dev/null` in 33949bd41f2cSmrg*GNU* | *'with BFD'*) 33959bd41f2cSmrg lt_cv_prog_gnu_ld=yes 33969bd41f2cSmrg ;; 33979bd41f2cSmrg*) 33989bd41f2cSmrg lt_cv_prog_gnu_ld=no 33999bd41f2cSmrg ;; 34009bd41f2cSmrgesac]) 34019bd41f2cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 34029418810dSmrg])# _LT_PATH_LD_GNU 34039bd41f2cSmrg 34049bd41f2cSmrg 34059418810dSmrg# _LT_CMD_RELOAD 34069418810dSmrg# -------------- 34079bd41f2cSmrg# find reload flag for linker 34089bd41f2cSmrg# -- PORTME Some linkers may need a different reload flag. 34099418810dSmrgm4_defun([_LT_CMD_RELOAD], 34109bd41f2cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 34119bd41f2cSmrg lt_cv_ld_reload_flag, 34129bd41f2cSmrg [lt_cv_ld_reload_flag='-r']) 34139bd41f2cSmrgreload_flag=$lt_cv_ld_reload_flag 34149bd41f2cSmrgcase $reload_flag in 34159bd41f2cSmrg"" | " "*) ;; 34169bd41f2cSmrg*) reload_flag=" $reload_flag" ;; 34179bd41f2cSmrgesac 34189bd41f2cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 34199bd41f2cSmrgcase $host_os in 34200da4cdccSmrg cygwin* | mingw* | pw32* | cegcc*) 3421084f91ccSmrg if test yes != "$GCC"; then 34220da4cdccSmrg reload_cmds=false 34230da4cdccSmrg fi 34240da4cdccSmrg ;; 34259bd41f2cSmrg darwin*) 3426084f91ccSmrg if test yes = "$GCC"; then 3427084f91ccSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34289bd41f2cSmrg else 34299bd41f2cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34309bd41f2cSmrg fi 34319bd41f2cSmrg ;; 34329bd41f2cSmrgesac 34330da4cdccSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34340da4cdccSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34359418810dSmrg])# _LT_CMD_RELOAD 34369bd41f2cSmrg 34379bd41f2cSmrg 3438084f91ccSmrg# _LT_PATH_DD 3439084f91ccSmrg# ----------- 3440084f91ccSmrg# find a working dd 3441084f91ccSmrgm4_defun([_LT_PATH_DD], 3442084f91ccSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3443084f91ccSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3444084f91ccSmrgcat conftest.i conftest.i >conftest2.i 3445084f91ccSmrg: ${lt_DD:=$DD} 3446084f91ccSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3447084f91ccSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3448084f91ccSmrg cmp -s conftest.i conftest.out \ 3449084f91ccSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3450084f91ccSmrgfi]) 3451084f91ccSmrgrm -f conftest.i conftest2.i conftest.out]) 3452084f91ccSmrg])# _LT_PATH_DD 3453084f91ccSmrg 3454084f91ccSmrg 3455084f91ccSmrg# _LT_CMD_TRUNCATE 3456084f91ccSmrg# ---------------- 3457084f91ccSmrg# find command to truncate a binary pipe 3458084f91ccSmrgm4_defun([_LT_CMD_TRUNCATE], 3459084f91ccSmrg[m4_require([_LT_PATH_DD]) 3460084f91ccSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3461084f91ccSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3462084f91ccSmrgcat conftest.i conftest.i >conftest2.i 3463084f91ccSmrglt_cv_truncate_bin= 3464084f91ccSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3465084f91ccSmrg cmp -s conftest.i conftest.out \ 3466084f91ccSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3467084f91ccSmrgfi 3468084f91ccSmrgrm -f conftest.i conftest2.i conftest.out 3469084f91ccSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3470084f91ccSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3471084f91ccSmrg [Command to truncate a binary pipe]) 3472084f91ccSmrg])# _LT_CMD_TRUNCATE 3473084f91ccSmrg 3474084f91ccSmrg 34759418810dSmrg# _LT_CHECK_MAGIC_METHOD 34769418810dSmrg# ---------------------- 34779bd41f2cSmrg# how to check for library dependencies 34789bd41f2cSmrg# -- PORTME fill in with the dynamic library characteristics 34799418810dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34809418810dSmrg[m4_require([_LT_DECL_EGREP]) 34819418810dSmrgm4_require([_LT_DECL_OBJDUMP]) 34829418810dSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34839bd41f2cSmrglt_cv_deplibs_check_method, 34849bd41f2cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34859bd41f2cSmrglt_cv_file_magic_test_file= 34869bd41f2cSmrglt_cv_deplibs_check_method='unknown' 34879bd41f2cSmrg# Need to set the preceding variable on all platforms that support 34889bd41f2cSmrg# interlibrary dependencies. 34899bd41f2cSmrg# 'none' -- dependencies not supported. 3490084f91ccSmrg# 'unknown' -- same as none, but documents that we really don't know. 34919bd41f2cSmrg# 'pass_all' -- all dependencies passed with no checks. 34929bd41f2cSmrg# 'test_compile' -- check by making test program. 34939bd41f2cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3494084f91ccSmrg# that responds to the $file_magic_cmd with a given extended regex. 3495084f91ccSmrg# If you have 'file' or equivalent on your system and you're not sure 3496084f91ccSmrg# whether 'pass_all' will *always* work, you probably want this one. 34979bd41f2cSmrg 34989bd41f2cSmrgcase $host_os in 3499d075918cSmrgaix[[4-9]]*) 35009bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 35019bd41f2cSmrg ;; 35029bd41f2cSmrg 35039bd41f2cSmrgbeos*) 35049bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 35059bd41f2cSmrg ;; 35069bd41f2cSmrg 35079bd41f2cSmrgbsdi[[45]]*) 35089bd41f2cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3509084f91ccSmrg lt_cv_file_magic_cmd='$FILECMD -L' 35109bd41f2cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 35119bd41f2cSmrg ;; 35129bd41f2cSmrg 35139bd41f2cSmrgcygwin*) 35149bd41f2cSmrg # func_win32_libid is a shell function defined in ltmain.sh 35159bd41f2cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35169bd41f2cSmrg lt_cv_file_magic_cmd='func_win32_libid' 35179bd41f2cSmrg ;; 35189bd41f2cSmrg 35199bd41f2cSmrgmingw* | pw32*) 35209bd41f2cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 35219bd41f2cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 35229bd41f2cSmrg # unless we find 'file', for example because we are cross-compiling. 3523084f91ccSmrg if ( file / ) >/dev/null 2>&1; then 35249bd41f2cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35259bd41f2cSmrg lt_cv_file_magic_cmd='func_win32_libid' 35269bd41f2cSmrg else 35270da4cdccSmrg # Keep this pattern in sync with the one in func_win32_libid. 35280da4cdccSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35299bd41f2cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35309bd41f2cSmrg fi 35319bd41f2cSmrg ;; 35329bd41f2cSmrg 35330da4cdccSmrgcegcc*) 35349418810dSmrg # use the weaker test based on 'objdump'. See mingw*. 35359418810dSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35369418810dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35379418810dSmrg ;; 35389418810dSmrg 35399bd41f2cSmrgdarwin* | rhapsody*) 35409bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 35419bd41f2cSmrg ;; 35429bd41f2cSmrg 3543084f91ccSmrgfreebsd* | dragonfly* | midnightbsd*) 35449418810dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35459bd41f2cSmrg case $host_cpu in 35469bd41f2cSmrg i*86 ) 35479bd41f2cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 35489bd41f2cSmrg # Let's accept both of them until this is cleared up. 35499bd41f2cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3550084f91ccSmrg lt_cv_file_magic_cmd=$FILECMD 35519bd41f2cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35529bd41f2cSmrg ;; 35539bd41f2cSmrg esac 35549bd41f2cSmrg else 35559bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 35569bd41f2cSmrg fi 35579bd41f2cSmrg ;; 35589bd41f2cSmrg 35590da4cdccSmrghaiku*) 35600da4cdccSmrg lt_cv_deplibs_check_method=pass_all 35610da4cdccSmrg ;; 35620da4cdccSmrg 35639bd41f2cSmrghpux10.20* | hpux11*) 3564084f91ccSmrg lt_cv_file_magic_cmd=$FILECMD 35659bd41f2cSmrg case $host_cpu in 35669bd41f2cSmrg ia64*) 35679bd41f2cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35689bd41f2cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35699bd41f2cSmrg ;; 35709bd41f2cSmrg hppa*64*) 35710da4cdccSmrg [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]'] 35729bd41f2cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35739bd41f2cSmrg ;; 35749bd41f2cSmrg *) 35750da4cdccSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35769bd41f2cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35779bd41f2cSmrg ;; 35789bd41f2cSmrg esac 35799bd41f2cSmrg ;; 35809bd41f2cSmrg 35819bd41f2cSmrginterix[[3-9]]*) 35829bd41f2cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35839bd41f2cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35849bd41f2cSmrg ;; 35859bd41f2cSmrg 35869bd41f2cSmrgirix5* | irix6* | nonstopux*) 35879bd41f2cSmrg case $LD in 35889bd41f2cSmrg *-32|*"-32 ") libmagic=32-bit;; 35899bd41f2cSmrg *-n32|*"-n32 ") libmagic=N32;; 35909bd41f2cSmrg *-64|*"-64 ") libmagic=64-bit;; 35919bd41f2cSmrg *) libmagic=never-match;; 35929bd41f2cSmrg esac 35939bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 35949bd41f2cSmrg ;; 35959bd41f2cSmrg 35960da4cdccSmrg# This must be glibc/ELF. 3597084f91ccSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35989bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 35999bd41f2cSmrg ;; 36009bd41f2cSmrg 36018746cb53Smrgnetbsd*) 36029418810dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 36039bd41f2cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36049bd41f2cSmrg else 36059bd41f2cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 36069bd41f2cSmrg fi 36079bd41f2cSmrg ;; 36089bd41f2cSmrg 36099bd41f2cSmrgnewos6*) 36109bd41f2cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3611084f91ccSmrg lt_cv_file_magic_cmd=$FILECMD 36129bd41f2cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 36139bd41f2cSmrg ;; 36149bd41f2cSmrg 36159418810dSmrg*nto* | *qnx*) 36169418810dSmrg lt_cv_deplibs_check_method=pass_all 36179bd41f2cSmrg ;; 36189bd41f2cSmrg 3619084f91ccSmrgopenbsd* | bitrig*) 3620084f91ccSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 36219bd41f2cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 36229bd41f2cSmrg else 36239bd41f2cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36249bd41f2cSmrg fi 36259bd41f2cSmrg ;; 36269bd41f2cSmrg 36279bd41f2cSmrgosf3* | osf4* | osf5*) 36289bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36299bd41f2cSmrg ;; 36309bd41f2cSmrg 36319bd41f2cSmrgrdos*) 36329bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36339bd41f2cSmrg ;; 36349bd41f2cSmrg 36359bd41f2cSmrgsolaris*) 36369bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36379bd41f2cSmrg ;; 36389bd41f2cSmrg 36399418810dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36409418810dSmrg lt_cv_deplibs_check_method=pass_all 36419418810dSmrg ;; 36429418810dSmrg 36439bd41f2cSmrgsysv4 | sysv4.3*) 36449bd41f2cSmrg case $host_vendor in 36459bd41f2cSmrg motorola) 36469bd41f2cSmrg 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]]' 36479bd41f2cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36489bd41f2cSmrg ;; 36499bd41f2cSmrg ncr) 36509bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36519bd41f2cSmrg ;; 36529bd41f2cSmrg sequent) 36539bd41f2cSmrg lt_cv_file_magic_cmd='/bin/file' 36549bd41f2cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36559bd41f2cSmrg ;; 36569bd41f2cSmrg sni) 36579bd41f2cSmrg lt_cv_file_magic_cmd='/bin/file' 36589bd41f2cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36599bd41f2cSmrg lt_cv_file_magic_test_file=/lib/libc.so 36609bd41f2cSmrg ;; 36619bd41f2cSmrg siemens) 36629bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36639bd41f2cSmrg ;; 36649bd41f2cSmrg pc) 36659bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36669bd41f2cSmrg ;; 36679bd41f2cSmrg esac 36689bd41f2cSmrg ;; 36699bd41f2cSmrg 36709418810dSmrgtpf*) 36719bd41f2cSmrg lt_cv_deplibs_check_method=pass_all 36729bd41f2cSmrg ;; 3673084f91ccSmrgos2*) 3674084f91ccSmrg lt_cv_deplibs_check_method=pass_all 3675084f91ccSmrg ;; 36769bd41f2cSmrgesac 36779bd41f2cSmrg]) 36780da4cdccSmrg 36790da4cdccSmrgfile_magic_glob= 36800da4cdccSmrgwant_nocaseglob=no 36810da4cdccSmrgif test "$build" = "$host"; then 36820da4cdccSmrg case $host_os in 36830da4cdccSmrg mingw* | pw32*) 36840da4cdccSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36850da4cdccSmrg want_nocaseglob=yes 36860da4cdccSmrg else 36870da4cdccSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36880da4cdccSmrg fi 36890da4cdccSmrg ;; 36900da4cdccSmrg esac 36910da4cdccSmrgfi 36920da4cdccSmrg 36939bd41f2cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 36949bd41f2cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 36959bd41f2cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36969418810dSmrg 36979418810dSmrg_LT_DECL([], [deplibs_check_method], [1], 36989418810dSmrg [Method to check whether dependent libraries are shared objects]) 36999418810dSmrg_LT_DECL([], [file_magic_cmd], [1], 37000da4cdccSmrg [Command to use when deplibs_check_method = "file_magic"]) 37010da4cdccSmrg_LT_DECL([], [file_magic_glob], [1], 37020da4cdccSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 37030da4cdccSmrg_LT_DECL([], [want_nocaseglob], [1], 37040da4cdccSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 37059418810dSmrg])# _LT_CHECK_MAGIC_METHOD 37069bd41f2cSmrg 37079bd41f2cSmrg 37089418810dSmrg# LT_PATH_NM 37099bd41f2cSmrg# ---------- 37109418810dSmrg# find the pathname to a BSD- or MS-compatible name lister 37119418810dSmrgAC_DEFUN([LT_PATH_NM], 37129418810dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 37139418810dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 37149bd41f2cSmrg[if test -n "$NM"; then 37159bd41f2cSmrg # Let the user override the test. 3716084f91ccSmrg lt_cv_path_NM=$NM 37179bd41f2cSmrgelse 3718084f91ccSmrg lt_nm_to_check=${ac_tool_prefix}nm 37199bd41f2cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 37209bd41f2cSmrg lt_nm_to_check="$lt_nm_to_check nm" 37219bd41f2cSmrg fi 37229bd41f2cSmrg for lt_tmp_nm in $lt_nm_to_check; do 3723084f91ccSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 37249bd41f2cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3725084f91ccSmrg IFS=$lt_save_ifs 37269bd41f2cSmrg test -z "$ac_dir" && ac_dir=. 3727084f91ccSmrg tmp_nm=$ac_dir/$lt_tmp_nm 3728084f91ccSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37299bd41f2cSmrg # Check to see if the nm accepts a BSD-compat flag. 3730084f91ccSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37319bd41f2cSmrg # nm: unknown option "B" ignored 37329bd41f2cSmrg # Tru64's nm complains that /dev/null is an invalid object file 3733084f91ccSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3734084f91ccSmrg case $build_os in 3735084f91ccSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3736084f91ccSmrg *) lt_bad_file=/dev/null ;; 3737084f91ccSmrg esac 3738084f91ccSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3739084f91ccSmrg *$lt_bad_file* | *'Invalid file or object type'*) 37409bd41f2cSmrg lt_cv_path_NM="$tmp_nm -B" 3741084f91ccSmrg break 2 37429bd41f2cSmrg ;; 37439bd41f2cSmrg *) 3744084f91ccSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 37459bd41f2cSmrg */dev/null*) 37469bd41f2cSmrg lt_cv_path_NM="$tmp_nm -p" 3747084f91ccSmrg break 2 37489bd41f2cSmrg ;; 37499bd41f2cSmrg *) 37509bd41f2cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37519bd41f2cSmrg continue # so that we can try to find one that supports BSD flags 37529bd41f2cSmrg ;; 37539bd41f2cSmrg esac 37549bd41f2cSmrg ;; 37559bd41f2cSmrg esac 37569bd41f2cSmrg fi 37579bd41f2cSmrg done 3758084f91ccSmrg IFS=$lt_save_ifs 37599bd41f2cSmrg done 37609418810dSmrg : ${lt_cv_path_NM=no} 37619bd41f2cSmrgfi]) 3762084f91ccSmrgif test no != "$lt_cv_path_NM"; then 3763084f91ccSmrg NM=$lt_cv_path_NM 37649418810dSmrgelse 37659418810dSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 37660da4cdccSmrg if test -n "$DUMPBIN"; then : 37670da4cdccSmrg # Let the user override the test. 37680da4cdccSmrg else 37690da4cdccSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3770084f91ccSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 37710da4cdccSmrg *COFF*) 3772084f91ccSmrg DUMPBIN="$DUMPBIN -symbols -headers" 37730da4cdccSmrg ;; 37740da4cdccSmrg *) 37750da4cdccSmrg DUMPBIN=: 37760da4cdccSmrg ;; 37770da4cdccSmrg esac 37780da4cdccSmrg fi 37799418810dSmrg AC_SUBST([DUMPBIN]) 3780084f91ccSmrg if test : != "$DUMPBIN"; then 3781084f91ccSmrg NM=$DUMPBIN 37829418810dSmrg fi 37839418810dSmrgfi 37849418810dSmrgtest -z "$NM" && NM=nm 37859418810dSmrgAC_SUBST([NM]) 37869418810dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37879418810dSmrg 37889418810dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37899418810dSmrg [lt_cv_nm_interface="BSD nm" 37909418810dSmrg echo "int some_variable = 0;" > conftest.$ac_ext 37910da4cdccSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37929418810dSmrg (eval "$ac_compile" 2>conftest.err) 37939418810dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37940da4cdccSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37959418810dSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37969418810dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37970da4cdccSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37989418810dSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 37999418810dSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 38009418810dSmrg lt_cv_nm_interface="MS dumpbin" 38019418810dSmrg fi 38029418810dSmrg rm -f conftest*]) 38039418810dSmrg])# LT_PATH_NM 38049bd41f2cSmrg 38059418810dSmrg# Old names: 38069418810dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 38079418810dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 38089418810dSmrgdnl aclocal-1.4 backwards compatibility: 38099418810dSmrgdnl AC_DEFUN([AM_PROG_NM], []) 38109418810dSmrgdnl AC_DEFUN([AC_PROG_NM], []) 38119bd41f2cSmrg 38120da4cdccSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38130da4cdccSmrg# -------------------------------- 38140da4cdccSmrg# how to determine the name of the shared library 38150da4cdccSmrg# associated with a specific link library. 38160da4cdccSmrg# -- PORTME fill in with the dynamic library characteristics 38170da4cdccSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 38180da4cdccSmrg[m4_require([_LT_DECL_EGREP]) 38190da4cdccSmrgm4_require([_LT_DECL_OBJDUMP]) 38200da4cdccSmrgm4_require([_LT_DECL_DLLTOOL]) 38210da4cdccSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 38220da4cdccSmrglt_cv_sharedlib_from_linklib_cmd, 38230da4cdccSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 38240da4cdccSmrg 38250da4cdccSmrgcase $host_os in 38260da4cdccSmrgcygwin* | mingw* | pw32* | cegcc*) 3827084f91ccSmrg # two different shell functions defined in ltmain.sh; 3828084f91ccSmrg # decide which one to use based on capabilities of $DLLTOOL 38290da4cdccSmrg case `$DLLTOOL --help 2>&1` in 38300da4cdccSmrg *--identify-strict*) 38310da4cdccSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38320da4cdccSmrg ;; 38330da4cdccSmrg *) 38340da4cdccSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38350da4cdccSmrg ;; 38360da4cdccSmrg esac 38370da4cdccSmrg ;; 38380da4cdccSmrg*) 38390da4cdccSmrg # fallback: assume linklib IS sharedlib 3840084f91ccSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38410da4cdccSmrg ;; 38420da4cdccSmrgesac 38430da4cdccSmrg]) 38440da4cdccSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38450da4cdccSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38460da4cdccSmrg 38470da4cdccSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38480da4cdccSmrg [Command to associate shared and link libraries]) 38490da4cdccSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38500da4cdccSmrg 38510da4cdccSmrg 38520da4cdccSmrg# _LT_PATH_MANIFEST_TOOL 38530da4cdccSmrg# ---------------------- 38540da4cdccSmrg# locate the manifest tool 38550da4cdccSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38560da4cdccSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38570da4cdccSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38580da4cdccSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38590da4cdccSmrg [lt_cv_path_mainfest_tool=no 38600da4cdccSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38610da4cdccSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38620da4cdccSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 38630da4cdccSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38640da4cdccSmrg lt_cv_path_mainfest_tool=yes 38650da4cdccSmrg fi 38660da4cdccSmrg rm -f conftest*]) 3867084f91ccSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 38680da4cdccSmrg MANIFEST_TOOL=: 38690da4cdccSmrgfi 38700da4cdccSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38710da4cdccSmrg])# _LT_PATH_MANIFEST_TOOL 38720da4cdccSmrg 38739418810dSmrg 3874084f91ccSmrg# _LT_DLL_DEF_P([FILE]) 3875084f91ccSmrg# --------------------- 3876084f91ccSmrg# True iff FILE is a Windows DLL '.def' file. 3877084f91ccSmrg# Keep in sync with func_dll_def_p in the libtool script 3878084f91ccSmrgAC_DEFUN([_LT_DLL_DEF_P], 3879084f91ccSmrg[dnl 3880084f91ccSmrg test DEF = "`$SED -n dnl 3881084f91ccSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3882084f91ccSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3883084f91ccSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3884084f91ccSmrg -e q dnl Only consider the first "real" line 3885084f91ccSmrg $1`" dnl 3886084f91ccSmrg])# _LT_DLL_DEF_P 3887084f91ccSmrg 3888084f91ccSmrg 38899418810dSmrg# LT_LIB_M 38909418810dSmrg# -------- 38919bd41f2cSmrg# check for math library 38929418810dSmrgAC_DEFUN([LT_LIB_M], 38939bd41f2cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38949bd41f2cSmrgLIBM= 38959bd41f2cSmrgcase $host in 38960da4cdccSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38979bd41f2cSmrg # These system don't have libm, or don't need it 38989bd41f2cSmrg ;; 38999bd41f2cSmrg*-ncr-sysv4.3*) 3900084f91ccSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 39019bd41f2cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 39029bd41f2cSmrg ;; 39039bd41f2cSmrg*) 3904084f91ccSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 39059bd41f2cSmrg ;; 39069bd41f2cSmrgesac 39079418810dSmrgAC_SUBST([LIBM]) 39089418810dSmrg])# LT_LIB_M 39099bd41f2cSmrg 39109418810dSmrg# Old name: 39119418810dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 39129418810dSmrgdnl aclocal-1.4 backwards compatibility: 39139418810dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 39149bd41f2cSmrg 39159bd41f2cSmrg 39169418810dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 39179418810dSmrg# ------------------------------- 39189418810dSmrgm4_defun([_LT_COMPILER_NO_RTTI], 39199418810dSmrg[m4_require([_LT_TAG_COMPILER])dnl 39209bd41f2cSmrg 39219418810dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 39229bd41f2cSmrg 3923084f91ccSmrgif test yes = "$GCC"; then 39240da4cdccSmrg case $cc_basename in 39250da4cdccSmrg nvcc*) 39260da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39270da4cdccSmrg *) 39280da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39290da4cdccSmrg esac 39309bd41f2cSmrg 39319418810dSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39329418810dSmrg lt_cv_prog_compiler_rtti_exceptions, 39339418810dSmrg [-fno-rtti -fno-exceptions], [], 39349418810dSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39359418810dSmrgfi 39369418810dSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39379418810dSmrg [Compiler flag to turn off builtin functions]) 39389418810dSmrg])# _LT_COMPILER_NO_RTTI 39399bd41f2cSmrg 39409bd41f2cSmrg 39419418810dSmrg# _LT_CMD_GLOBAL_SYMBOLS 39429418810dSmrg# ---------------------- 39439418810dSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39449418810dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39459418810dSmrgAC_REQUIRE([AC_PROG_CC])dnl 39460da4cdccSmrgAC_REQUIRE([AC_PROG_AWK])dnl 39479418810dSmrgAC_REQUIRE([LT_PATH_NM])dnl 39489418810dSmrgAC_REQUIRE([LT_PATH_LD])dnl 39499418810dSmrgm4_require([_LT_DECL_SED])dnl 39509418810dSmrgm4_require([_LT_DECL_EGREP])dnl 39519418810dSmrgm4_require([_LT_TAG_COMPILER])dnl 39529bd41f2cSmrg 39539418810dSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39549418810dSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39559418810dSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39569bd41f2cSmrg[ 39579418810dSmrg# These are sane defaults that work on at least a few old systems. 39589418810dSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39599bd41f2cSmrg 39609418810dSmrg# Character class describing NM global symbol codes. 39619418810dSmrgsymcode='[[BCDEGRST]]' 39629bd41f2cSmrg 39639418810dSmrg# Regexp to match symbols that can be accessed directly from C. 39649418810dSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39659bd41f2cSmrg 39669418810dSmrg# Define system-specific variables. 39679418810dSmrgcase $host_os in 39689418810dSmrgaix*) 39699418810dSmrg symcode='[[BCDT]]' 39709418810dSmrg ;; 39719418810dSmrgcygwin* | mingw* | pw32* | cegcc*) 39729418810dSmrg symcode='[[ABCDGISTW]]' 39739418810dSmrg ;; 39749418810dSmrghpux*) 3975084f91ccSmrg if test ia64 = "$host_cpu"; then 39769418810dSmrg symcode='[[ABCDEGRST]]' 39779418810dSmrg fi 39789418810dSmrg ;; 39799418810dSmrgirix* | nonstopux*) 39809418810dSmrg symcode='[[BCDEGRST]]' 39819418810dSmrg ;; 39829418810dSmrgosf*) 39839418810dSmrg symcode='[[BCDEGQRST]]' 39849418810dSmrg ;; 39859418810dSmrgsolaris*) 39869418810dSmrg symcode='[[BDRT]]' 39879418810dSmrg ;; 39889418810dSmrgsco3.2v5*) 39899418810dSmrg symcode='[[DT]]' 39909418810dSmrg ;; 39919418810dSmrgsysv4.2uw2*) 39929418810dSmrg symcode='[[DT]]' 39939418810dSmrg ;; 39949418810dSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39959418810dSmrg symcode='[[ABDT]]' 39969418810dSmrg ;; 39979418810dSmrgsysv4) 39989418810dSmrg symcode='[[DFNSTU]]' 39999418810dSmrg ;; 40009418810dSmrgesac 40019bd41f2cSmrg 40029418810dSmrg# If we're using GNU nm, then use its standard symbol codes. 40039418810dSmrgcase `$NM -V 2>&1` in 40049418810dSmrg*GNU* | *'with BFD'*) 40059418810dSmrg symcode='[[ABCDGIRSTW]]' ;; 40069418810dSmrgesac 40079bd41f2cSmrg 4008084f91ccSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4009084f91ccSmrg # Gets list of data symbols to import. 4010084f91ccSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 4011084f91ccSmrg # Adjust the below global symbol transforms to fixup imported variables. 4012084f91ccSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 4013084f91ccSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 4014084f91ccSmrg lt_c_name_lib_hook="\ 4015084f91ccSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4016084f91ccSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4017084f91ccSmrgelse 4018084f91ccSmrg # Disable hooks by default. 4019084f91ccSmrg lt_cv_sys_global_symbol_to_import= 4020084f91ccSmrg lt_cdecl_hook= 4021084f91ccSmrg lt_c_name_hook= 4022084f91ccSmrg lt_c_name_lib_hook= 4023084f91ccSmrgfi 4024084f91ccSmrg 40259418810dSmrg# Transform an extracted symbol line into a proper C declaration. 40269418810dSmrg# Some systems (esp. on ia64) link data and code symbols differently, 40279418810dSmrg# so use this general approach. 4028084f91ccSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 4029084f91ccSmrg$lt_cdecl_hook\ 4030084f91ccSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4031084f91ccSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40329bd41f2cSmrg 40339418810dSmrg# Transform an extracted symbol line into symbol name and symbol address 4034084f91ccSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4035084f91ccSmrg$lt_c_name_hook\ 4036084f91ccSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4037084f91ccSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4038084f91ccSmrg 4039084f91ccSmrg# Transform an extracted symbol line into symbol name with lib prefix and 4040084f91ccSmrg# symbol address. 4041084f91ccSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4042084f91ccSmrg$lt_c_name_lib_hook\ 4043084f91ccSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4044084f91ccSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4045084f91ccSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40469bd41f2cSmrg 40479418810dSmrg# Handle CRLF in mingw tool chain 40489418810dSmrgopt_cr= 40499418810dSmrgcase $build_os in 40509418810dSmrgmingw*) 40519418810dSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40529418810dSmrg ;; 40539418810dSmrgesac 40549bd41f2cSmrg 40559418810dSmrg# Try without a prefix underscore, then with it. 40569418810dSmrgfor ac_symprfx in "" "_"; do 40579bd41f2cSmrg 40589418810dSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40599418810dSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40609bd41f2cSmrg 40619418810dSmrg # Write the raw and C identifiers. 40629418810dSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4063084f91ccSmrg # Fake it for dumpbin and say T for any non-static function, 4064084f91ccSmrg # D for any global variable and I for any imported variable. 4065084f91ccSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 40669418810dSmrg # which start with @ or ?. 40679418810dSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40689418810dSmrg" {last_section=section; section=\$ 3};"\ 40690da4cdccSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40709418810dSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4071084f91ccSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4072084f91ccSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4073084f91ccSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40749418810dSmrg" \$ 0!~/External *\|/{next};"\ 40759418810dSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40769418810dSmrg" {if(hide[section]) next};"\ 4077084f91ccSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4078084f91ccSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4079084f91ccSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4080084f91ccSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40819418810dSmrg" ' prfx=^$ac_symprfx]" 40829418810dSmrg else 4083084f91ccSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40849bd41f2cSmrg fi 4085084f91ccSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 40869bd41f2cSmrg 40879418810dSmrg # Check to see that the pipe works correctly. 40889418810dSmrg pipe_works=no 40899bd41f2cSmrg 40909418810dSmrg rm -f conftest* 40919418810dSmrg cat > conftest.$ac_ext <<_LT_EOF 40929418810dSmrg#ifdef __cplusplus 40939418810dSmrgextern "C" { 40949418810dSmrg#endif 40959418810dSmrgchar nm_test_var; 40969418810dSmrgvoid nm_test_func(void); 40979418810dSmrgvoid nm_test_func(void){} 40989418810dSmrg#ifdef __cplusplus 40999418810dSmrg} 41009418810dSmrg#endif 41019418810dSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 41029418810dSmrg_LT_EOF 41039bd41f2cSmrg 41049418810dSmrg if AC_TRY_EVAL(ac_compile); then 41059418810dSmrg # Now try to grab the symbols. 41069418810dSmrg nlist=conftest.nm 41070da4cdccSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 41089418810dSmrg # Try sorting and uniquifying the output. 41099418810dSmrg if sort "$nlist" | uniq > "$nlist"T; then 41109418810dSmrg mv -f "$nlist"T "$nlist" 41119418810dSmrg else 41129418810dSmrg rm -f "$nlist"T 41139418810dSmrg fi 41149bd41f2cSmrg 41159418810dSmrg # Make sure that we snagged all the symbols we need. 41169418810dSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 41179418810dSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 41189418810dSmrg cat <<_LT_EOF > conftest.$ac_ext 41190da4cdccSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4120084f91ccSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4121084f91ccSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 41220da4cdccSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 41230da4cdccSmrg# define LT@&t@_DLSYM_CONST 4124084f91ccSmrg#elif defined __osf__ 41250da4cdccSmrg/* This system does not cope well with relocations in const data. */ 41260da4cdccSmrg# define LT@&t@_DLSYM_CONST 41270da4cdccSmrg#else 41280da4cdccSmrg# define LT@&t@_DLSYM_CONST const 41290da4cdccSmrg#endif 41300da4cdccSmrg 41319418810dSmrg#ifdef __cplusplus 41329418810dSmrgextern "C" { 41339418810dSmrg#endif 41349bd41f2cSmrg 41359418810dSmrg_LT_EOF 41369418810dSmrg # Now generate the symbol file. 41379418810dSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41389bd41f2cSmrg 41399418810dSmrg cat <<_LT_EOF >> conftest.$ac_ext 41409bd41f2cSmrg 41419418810dSmrg/* The mapping between symbol names and symbols. */ 41420da4cdccSmrgLT@&t@_DLSYM_CONST struct { 41439418810dSmrg const char *name; 41449418810dSmrg void *address; 41459418810dSmrg} 41469418810dSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41479418810dSmrg{ 41489418810dSmrg { "@PROGRAM@", (void *) 0 }, 41499418810dSmrg_LT_EOF 4150084f91ccSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41519418810dSmrg cat <<\_LT_EOF >> conftest.$ac_ext 41529418810dSmrg {0, (void *) 0} 41539418810dSmrg}; 41549bd41f2cSmrg 41559418810dSmrg/* This works around a problem in FreeBSD linker */ 41569418810dSmrg#ifdef FREEBSD_WORKAROUND 41579418810dSmrgstatic const void *lt_preloaded_setup() { 41589418810dSmrg return lt__PROGRAM__LTX_preloaded_symbols; 41599418810dSmrg} 41609418810dSmrg#endif 41619bd41f2cSmrg 41629418810dSmrg#ifdef __cplusplus 41639418810dSmrg} 41649418810dSmrg#endif 41659418810dSmrg_LT_EOF 41669418810dSmrg # Now try linking the two files. 41679418810dSmrg mv conftest.$ac_objext conftstm.$ac_objext 41680da4cdccSmrg lt_globsym_save_LIBS=$LIBS 41690da4cdccSmrg lt_globsym_save_CFLAGS=$CFLAGS 4170084f91ccSmrg LIBS=conftstm.$ac_objext 41719418810dSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4172084f91ccSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41739418810dSmrg pipe_works=yes 41749418810dSmrg fi 41750da4cdccSmrg LIBS=$lt_globsym_save_LIBS 41760da4cdccSmrg CFLAGS=$lt_globsym_save_CFLAGS 41779418810dSmrg else 41789418810dSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41799418810dSmrg fi 41809418810dSmrg else 41819418810dSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41829418810dSmrg fi 41839bd41f2cSmrg else 41849418810dSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41859bd41f2cSmrg fi 41869bd41f2cSmrg else 41879418810dSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41889418810dSmrg cat conftest.$ac_ext >&5 41899bd41f2cSmrg fi 41909418810dSmrg rm -rf conftest* conftst* 41919bd41f2cSmrg 41929418810dSmrg # Do not use the global_symbol_pipe unless it works. 4193084f91ccSmrg if test yes = "$pipe_works"; then 41949418810dSmrg break 41959418810dSmrg else 41969418810dSmrg lt_cv_sys_global_symbol_pipe= 41979418810dSmrg fi 41989418810dSmrgdone 41999418810dSmrg]) 42009418810dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 42019418810dSmrg lt_cv_sys_global_symbol_to_cdecl= 42029418810dSmrgfi 42039418810dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 42049418810dSmrg AC_MSG_RESULT(failed) 42059bd41f2cSmrgelse 42069418810dSmrg AC_MSG_RESULT(ok) 42079bd41f2cSmrgfi 42089bd41f2cSmrg 42090da4cdccSmrg# Response file support. 42100da4cdccSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 42110da4cdccSmrg nm_file_list_spec='@' 42120da4cdccSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 42130da4cdccSmrg nm_file_list_spec='@' 42140da4cdccSmrgfi 42150da4cdccSmrg 42169418810dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 42179418810dSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 42189418810dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 42199418810dSmrg [Transform the output of nm in a proper C declaration]) 4220084f91ccSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4221084f91ccSmrg [Transform the output of nm into a list of symbols to manually relocate]) 42229418810dSmrg_LT_DECL([global_symbol_to_c_name_address], 42239418810dSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 42249418810dSmrg [Transform the output of nm in a C name address pair]) 42259418810dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42269418810dSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42279418810dSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4228084f91ccSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4229084f91ccSmrg [The name lister interface]) 42300da4cdccSmrg_LT_DECL([], [nm_file_list_spec], [1], 42310da4cdccSmrg [Specify filename containing input files for $NM]) 42329418810dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 42339bd41f2cSmrg 42349bd41f2cSmrg 42359418810dSmrg# _LT_COMPILER_PIC([TAGNAME]) 42369418810dSmrg# --------------------------- 42379418810dSmrgm4_defun([_LT_COMPILER_PIC], 42389418810dSmrg[m4_require([_LT_TAG_COMPILER])dnl 42399418810dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42409418810dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42419418810dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42429bd41f2cSmrg 42439418810dSmrgm4_if([$1], [CXX], [ 42449418810dSmrg # C++ specific cases for pic, static, wl, etc. 4245084f91ccSmrg if test yes = "$GXX"; then 42469418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42479418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42489bd41f2cSmrg 42499418810dSmrg case $host_os in 42509418810dSmrg aix*) 42519418810dSmrg # All AIX code is PIC. 4252084f91ccSmrg if test ia64 = "$host_cpu"; then 42539418810dSmrg # AIX 5 now supports IA64 processor 42549418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42559bd41f2cSmrg fi 4256084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42579bd41f2cSmrg ;; 42589bd41f2cSmrg 42599418810dSmrg amigaos*) 42609bd41f2cSmrg case $host_cpu in 42619418810dSmrg powerpc) 42629418810dSmrg # see comment about AmigaOS4 .so support 42639418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42649418810dSmrg ;; 42659418810dSmrg m68k) 42669418810dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4267084f91ccSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4268084f91ccSmrg # like '-m68040'. 42699418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42709bd41f2cSmrg ;; 42719bd41f2cSmrg esac 42729bd41f2cSmrg ;; 42739bd41f2cSmrg 42749418810dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42759418810dSmrg # PIC is the default for these OSes. 42769418810dSmrg ;; 42779418810dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42789418810dSmrg # This hack is so that the source file can tell whether it is being 42799418810dSmrg # built for inclusion in a dll (and should export symbols for example). 42809418810dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42819418810dSmrg # (--disable-auto-import) libraries 42829418810dSmrg m4_if([$1], [GCJ], [], 42839418810dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4284084f91ccSmrg case $host_os in 4285084f91ccSmrg os2*) 4286084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4287084f91ccSmrg ;; 4288084f91ccSmrg esac 42899418810dSmrg ;; 42909418810dSmrg darwin* | rhapsody*) 42919418810dSmrg # PIC is the default on this platform 42929418810dSmrg # Common symbols not allowed in MH_DYLIB files 42939418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42949418810dSmrg ;; 42959418810dSmrg *djgpp*) 42969418810dSmrg # DJGPP does not support shared libraries at all 42979418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42989418810dSmrg ;; 42990da4cdccSmrg haiku*) 43000da4cdccSmrg # PIC is the default for Haiku. 43010da4cdccSmrg # The "-static" flag exists, but is broken. 43020da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 43030da4cdccSmrg ;; 43049418810dSmrg interix[[3-9]]*) 43059418810dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 43069418810dSmrg # Instead, we relocate shared libraries at runtime. 43079418810dSmrg ;; 43089418810dSmrg sysv4*MP*) 43099418810dSmrg if test -d /usr/nec; then 43109418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43119418810dSmrg fi 43129418810dSmrg ;; 43139418810dSmrg hpux*) 43149418810dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 43159418810dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 43169418810dSmrg # sets the default TLS model and affects inlining. 43179418810dSmrg case $host_cpu in 43189418810dSmrg hppa*64*) 43199bd41f2cSmrg ;; 43209bd41f2cSmrg *) 43219418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43229bd41f2cSmrg ;; 43239418810dSmrg esac 43249418810dSmrg ;; 43259418810dSmrg *qnx* | *nto*) 43269418810dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43279418810dSmrg # it will coredump. 43289418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43299418810dSmrg ;; 43309418810dSmrg *) 43319418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43329418810dSmrg ;; 43339bd41f2cSmrg esac 43349418810dSmrg else 43359418810dSmrg case $host_os in 43369418810dSmrg aix[[4-9]]*) 43379418810dSmrg # All AIX code is PIC. 4338084f91ccSmrg if test ia64 = "$host_cpu"; then 43399418810dSmrg # AIX 5 now supports IA64 processor 43409418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43419418810dSmrg else 43429418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43439418810dSmrg fi 43449bd41f2cSmrg ;; 43459418810dSmrg chorus*) 43469418810dSmrg case $cc_basename in 43479418810dSmrg cxch68*) 43489418810dSmrg # Green Hills C++ Compiler 43499418810dSmrg # _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" 43509bd41f2cSmrg ;; 43519bd41f2cSmrg esac 43529bd41f2cSmrg ;; 43530da4cdccSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43540da4cdccSmrg # This hack is so that the source file can tell whether it is being 43550da4cdccSmrg # built for inclusion in a dll (and should export symbols for example). 43560da4cdccSmrg m4_if([$1], [GCJ], [], 43570da4cdccSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43580da4cdccSmrg ;; 43599418810dSmrg dgux*) 43609418810dSmrg case $cc_basename in 43619418810dSmrg ec++*) 43629418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43639418810dSmrg ;; 43649418810dSmrg ghcx*) 43659418810dSmrg # Green Hills C++ Compiler 43669418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43679418810dSmrg ;; 43689418810dSmrg *) 43699418810dSmrg ;; 43709bd41f2cSmrg esac 43719bd41f2cSmrg ;; 4372084f91ccSmrg freebsd* | dragonfly* | midnightbsd*) 43739418810dSmrg # FreeBSD uses GNU C++ 43749bd41f2cSmrg ;; 43759418810dSmrg hpux9* | hpux10* | hpux11*) 43769418810dSmrg case $cc_basename in 43779418810dSmrg CC*) 43789418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4379084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4380084f91ccSmrg if test ia64 != "$host_cpu"; then 43819418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43829418810dSmrg fi 43839418810dSmrg ;; 43849418810dSmrg aCC*) 43859418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4386084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43879418810dSmrg case $host_cpu in 43889418810dSmrg hppa*64*|ia64*) 43899418810dSmrg # +Z the default 43909418810dSmrg ;; 43919418810dSmrg *) 43929418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43939418810dSmrg ;; 43949418810dSmrg esac 43959418810dSmrg ;; 43969418810dSmrg *) 43979418810dSmrg ;; 43989418810dSmrg esac 43999bd41f2cSmrg ;; 44009418810dSmrg interix*) 44019418810dSmrg # This is c89, which is MS Visual C++ (no shared libs) 44029418810dSmrg # Anyone wants to do a port? 44039bd41f2cSmrg ;; 44049418810dSmrg irix5* | irix6* | nonstopux*) 44059418810dSmrg case $cc_basename in 44069418810dSmrg CC*) 44079418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44089418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44099418810dSmrg # CC pic flag -KPIC is the default. 44109418810dSmrg ;; 44119418810dSmrg *) 44129418810dSmrg ;; 44139418810dSmrg esac 44149bd41f2cSmrg ;; 4415084f91ccSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 44169418810dSmrg case $cc_basename in 44179418810dSmrg KCC*) 44189418810dSmrg # KAI C++ Compiler 44199418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44209418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44219418810dSmrg ;; 44229418810dSmrg ecpc* ) 4423084f91ccSmrg # old Intel C++ for x86_64, which still supported -KPIC. 44249418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44259418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44269418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44279418810dSmrg ;; 44289418810dSmrg icpc* ) 44299418810dSmrg # Intel C++, used to be incompatible with GCC. 44309418810dSmrg # ICC 10 doesn't accept -KPIC any more. 44319418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44329418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44339418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44349418810dSmrg ;; 44359418810dSmrg pgCC* | pgcpp*) 44369418810dSmrg # Portland Group C++ compiler 44379418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44389418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44399418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44409418810dSmrg ;; 44419418810dSmrg cxx*) 44429418810dSmrg # Compaq C++ 44439418810dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44449418810dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44459418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44469418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44479418810dSmrg ;; 44480da4cdccSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44490da4cdccSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44509418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44519418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44529418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44539418810dSmrg ;; 44549418810dSmrg *) 4455084f91ccSmrg case `$CC -V 2>&1 | $SED 5q` in 44569418810dSmrg *Sun\ C*) 44579418810dSmrg # Sun C++ 5.9 44589418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44599418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44609418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44619418810dSmrg ;; 44629418810dSmrg esac 44639418810dSmrg ;; 44649418810dSmrg esac 44659bd41f2cSmrg ;; 44669418810dSmrg lynxos*) 44679bd41f2cSmrg ;; 44689418810dSmrg m88k*) 44699bd41f2cSmrg ;; 44709418810dSmrg mvs*) 44719418810dSmrg case $cc_basename in 44729418810dSmrg cxx*) 44739418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44749418810dSmrg ;; 44759418810dSmrg *) 44769418810dSmrg ;; 44779418810dSmrg esac 44789bd41f2cSmrg ;; 44798746cb53Smrg netbsd*) 44809bd41f2cSmrg ;; 44819418810dSmrg *qnx* | *nto*) 44829418810dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44839418810dSmrg # it will coredump. 44849418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44859418810dSmrg ;; 44869418810dSmrg osf3* | osf4* | osf5*) 44879418810dSmrg case $cc_basename in 44889418810dSmrg KCC*) 44899418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44909418810dSmrg ;; 44919418810dSmrg RCC*) 44929418810dSmrg # Rational C++ 2.4.1 44939418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44949418810dSmrg ;; 44959418810dSmrg cxx*) 44969418810dSmrg # Digital/Compaq C++ 44979418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44989418810dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44999418810dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 45009418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45019418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 45029418810dSmrg ;; 45039418810dSmrg *) 45049418810dSmrg ;; 45059418810dSmrg esac 45069bd41f2cSmrg ;; 45079418810dSmrg psos*) 45089bd41f2cSmrg ;; 45099418810dSmrg solaris*) 45109418810dSmrg case $cc_basename in 45110da4cdccSmrg CC* | sunCC*) 45129418810dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 45139418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45149418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45159418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 45169418810dSmrg ;; 45179418810dSmrg gcx*) 45189418810dSmrg # Green Hills C++ Compiler 45199418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 45209418810dSmrg ;; 45219418810dSmrg *) 45229418810dSmrg ;; 45239418810dSmrg esac 45249bd41f2cSmrg ;; 45259418810dSmrg sunos4*) 45269418810dSmrg case $cc_basename in 45279418810dSmrg CC*) 45289418810dSmrg # Sun C++ 4.x 45299418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45309418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45319418810dSmrg ;; 45329418810dSmrg lcc*) 45339418810dSmrg # Lucid 45349418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45359418810dSmrg ;; 45369bd41f2cSmrg *) 45379bd41f2cSmrg ;; 45389bd41f2cSmrg esac 45399bd41f2cSmrg ;; 45409418810dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45419418810dSmrg case $cc_basename in 45429418810dSmrg CC*) 45439418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45449418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45459418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45469418810dSmrg ;; 45479418810dSmrg esac 45489bd41f2cSmrg ;; 45499418810dSmrg tandem*) 45509418810dSmrg case $cc_basename in 45519418810dSmrg NCC*) 45529418810dSmrg # NonStop-UX NCC 3.20 45539418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45549418810dSmrg ;; 45559bd41f2cSmrg *) 45569bd41f2cSmrg ;; 45579418810dSmrg esac 45589bd41f2cSmrg ;; 45599418810dSmrg vxworks*) 45609bd41f2cSmrg ;; 45619bd41f2cSmrg *) 45629418810dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45639bd41f2cSmrg ;; 45649bd41f2cSmrg esac 45659418810dSmrg fi 45669418810dSmrg], 45679418810dSmrg[ 4568084f91ccSmrg if test yes = "$GCC"; then 45699418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45709418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45719418810dSmrg 45729418810dSmrg case $host_os in 45739418810dSmrg aix*) 45749418810dSmrg # All AIX code is PIC. 4575084f91ccSmrg if test ia64 = "$host_cpu"; then 45769418810dSmrg # AIX 5 now supports IA64 processor 45779418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45789418810dSmrg fi 4579084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45809418810dSmrg ;; 45819418810dSmrg 45829418810dSmrg amigaos*) 45839418810dSmrg case $host_cpu in 45849418810dSmrg powerpc) 45859418810dSmrg # see comment about AmigaOS4 .so support 45869418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45879418810dSmrg ;; 45889418810dSmrg m68k) 45899418810dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4590084f91ccSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4591084f91ccSmrg # like '-m68040'. 45929418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45939418810dSmrg ;; 45949418810dSmrg esac 45959418810dSmrg ;; 45969418810dSmrg 45979418810dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45989418810dSmrg # PIC is the default for these OSes. 45999418810dSmrg ;; 46009418810dSmrg 46019418810dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46029418810dSmrg # This hack is so that the source file can tell whether it is being 46039418810dSmrg # built for inclusion in a dll (and should export symbols for example). 46049418810dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 46059418810dSmrg # (--disable-auto-import) libraries 46069418810dSmrg m4_if([$1], [GCJ], [], 46079418810dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4608084f91ccSmrg case $host_os in 4609084f91ccSmrg os2*) 4610084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4611084f91ccSmrg ;; 4612084f91ccSmrg esac 46139418810dSmrg ;; 46149418810dSmrg 46159418810dSmrg darwin* | rhapsody*) 46169418810dSmrg # PIC is the default on this platform 46179418810dSmrg # Common symbols not allowed in MH_DYLIB files 46189418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46199418810dSmrg ;; 46209418810dSmrg 46210da4cdccSmrg haiku*) 46220da4cdccSmrg # PIC is the default for Haiku. 46230da4cdccSmrg # The "-static" flag exists, but is broken. 46240da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46250da4cdccSmrg ;; 46260da4cdccSmrg 46279418810dSmrg hpux*) 46289418810dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46299418810dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46309418810dSmrg # sets the default TLS model and affects inlining. 46319418810dSmrg case $host_cpu in 46329418810dSmrg hppa*64*) 46339418810dSmrg # +Z the default 46349bd41f2cSmrg ;; 46359bd41f2cSmrg *) 46369418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46379bd41f2cSmrg ;; 46389418810dSmrg esac 46399418810dSmrg ;; 46409418810dSmrg 46419418810dSmrg interix[[3-9]]*) 46429418810dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46439418810dSmrg # Instead, we relocate shared libraries at runtime. 46449418810dSmrg ;; 46459418810dSmrg 46469418810dSmrg msdosdjgpp*) 46479418810dSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46489418810dSmrg # on systems that don't support them. 46499418810dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46509418810dSmrg enable_shared=no 46519418810dSmrg ;; 46529418810dSmrg 46539418810dSmrg *nto* | *qnx*) 46549418810dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46559418810dSmrg # it will coredump. 46569418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46579418810dSmrg ;; 46589418810dSmrg 46599418810dSmrg sysv4*MP*) 46609418810dSmrg if test -d /usr/nec; then 46619418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46629418810dSmrg fi 46639418810dSmrg ;; 46649418810dSmrg 46659418810dSmrg *) 46669418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46679418810dSmrg ;; 46689bd41f2cSmrg esac 46690da4cdccSmrg 46700da4cdccSmrg case $cc_basename in 46710da4cdccSmrg nvcc*) # Cuda Compiler Driver 2.2 46720da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46730da4cdccSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46740da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46750da4cdccSmrg fi 46760da4cdccSmrg ;; 46770da4cdccSmrg esac 46789418810dSmrg else 46799418810dSmrg # PORTME Check for flag to pass linker flags through the system compiler. 46809418810dSmrg case $host_os in 46819418810dSmrg aix*) 46829418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4683084f91ccSmrg if test ia64 = "$host_cpu"; then 46849418810dSmrg # AIX 5 now supports IA64 processor 46859418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46869418810dSmrg else 46879418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46889418810dSmrg fi 46899418810dSmrg ;; 46909418810dSmrg 4691084f91ccSmrg darwin* | rhapsody*) 4692084f91ccSmrg # PIC is the default on this platform 4693084f91ccSmrg # Common symbols not allowed in MH_DYLIB files 4694084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4695084f91ccSmrg case $cc_basename in 4696084f91ccSmrg nagfor*) 4697084f91ccSmrg # NAG Fortran compiler 4698084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4699084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4700084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4701084f91ccSmrg ;; 4702084f91ccSmrg esac 4703084f91ccSmrg ;; 4704084f91ccSmrg 47059418810dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 47069418810dSmrg # This hack is so that the source file can tell whether it is being 47079418810dSmrg # built for inclusion in a dll (and should export symbols for example). 47089418810dSmrg m4_if([$1], [GCJ], [], 47099418810dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4710084f91ccSmrg case $host_os in 4711084f91ccSmrg os2*) 4712084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4713084f91ccSmrg ;; 4714084f91ccSmrg esac 47159418810dSmrg ;; 47169418810dSmrg 47179418810dSmrg hpux9* | hpux10* | hpux11*) 47189418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47199418810dSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 47209418810dSmrg # not for PA HP-UX. 47219418810dSmrg case $host_cpu in 47229418810dSmrg hppa*64*|ia64*) 47239418810dSmrg # +Z the default 47249bd41f2cSmrg ;; 47259bd41f2cSmrg *) 47269418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47279bd41f2cSmrg ;; 47289418810dSmrg esac 47299418810dSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4730084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47319418810dSmrg ;; 47329bd41f2cSmrg 47339418810dSmrg irix5* | irix6* | nonstopux*) 47349418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47359418810dSmrg # PIC (with -KPIC) is the default. 47369418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47379418810dSmrg ;; 47389bd41f2cSmrg 4739084f91ccSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47409418810dSmrg case $cc_basename in 4741084f91ccSmrg # old Intel for x86_64, which still supported -KPIC. 47429418810dSmrg ecc*) 47439418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47449418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47459418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47469418810dSmrg ;; 47479418810dSmrg # icc used to be incompatible with GCC. 47489418810dSmrg # ICC 10 doesn't accept -KPIC any more. 47499418810dSmrg icc* | ifort*) 47509418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47519418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47529418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47539418810dSmrg ;; 47549418810dSmrg # Lahey Fortran 8.1. 47559418810dSmrg lf95*) 47569418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47579418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47589418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47599418810dSmrg ;; 47600da4cdccSmrg nagfor*) 47610da4cdccSmrg # NAG Fortran compiler 47620da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47630da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47640da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47650da4cdccSmrg ;; 4766084f91ccSmrg tcc*) 4767084f91ccSmrg # Fabrice Bellard et al's Tiny C Compiler 4768084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4769084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4770084f91ccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4771084f91ccSmrg ;; 47720da4cdccSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47739418810dSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 47749418810dSmrg # which looks to be a dead project) 47759418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47769418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47779418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47789418810dSmrg ;; 47799418810dSmrg ccc*) 47809418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47819418810dSmrg # All Alpha code is PIC. 47829418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47839418810dSmrg ;; 47840da4cdccSmrg xl* | bgxl* | bgf* | mpixl*) 47850da4cdccSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47869418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47879418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47889418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47899418810dSmrg ;; 47909418810dSmrg *) 4791084f91ccSmrg case `$CC -V 2>&1 | $SED 5q` in 47920da4cdccSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47930da4cdccSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47940da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47950da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47960da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47970da4cdccSmrg ;; 47980da4cdccSmrg *Sun\ F* | *Sun*Fortran*) 47990da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48000da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48010da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48020da4cdccSmrg ;; 48039418810dSmrg *Sun\ C*) 48049418810dSmrg # Sun C 5.9 48059418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48069418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48079418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48089418810dSmrg ;; 48090da4cdccSmrg *Intel*\ [[CF]]*Compiler*) 48100da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48110da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 48120da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 48130da4cdccSmrg ;; 48140da4cdccSmrg *Portland\ Group*) 48150da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48160da4cdccSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 48179418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48189418810dSmrg ;; 48199418810dSmrg esac 48209418810dSmrg ;; 48219418810dSmrg esac 48229418810dSmrg ;; 48239bd41f2cSmrg 48249418810dSmrg newsos6) 48259418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48269418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48279418810dSmrg ;; 48289bd41f2cSmrg 48299418810dSmrg *nto* | *qnx*) 48309418810dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48319418810dSmrg # it will coredump. 48329418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48339418810dSmrg ;; 48349bd41f2cSmrg 48359418810dSmrg osf3* | osf4* | osf5*) 48369418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48379418810dSmrg # All OSF/1 code is PIC. 48389418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48399418810dSmrg ;; 48409bd41f2cSmrg 48419418810dSmrg rdos*) 48429418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48439418810dSmrg ;; 48449bd41f2cSmrg 48459418810dSmrg solaris*) 48469418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48479418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48489418810dSmrg case $cc_basename in 48490da4cdccSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48509418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48519418810dSmrg *) 48529418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48539418810dSmrg esac 48549418810dSmrg ;; 48559bd41f2cSmrg 48569418810dSmrg sunos4*) 48579418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48589418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48599418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48609418810dSmrg ;; 48619bd41f2cSmrg 48629418810dSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 48639418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48649418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48659418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48669418810dSmrg ;; 48679bd41f2cSmrg 48689418810dSmrg sysv4*MP*) 4869084f91ccSmrg if test -d /usr/nec; then 48709418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48719418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48729418810dSmrg fi 48739418810dSmrg ;; 48749bd41f2cSmrg 48759418810dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48769418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48779418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48789418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48799418810dSmrg ;; 48809bd41f2cSmrg 48819418810dSmrg unicos*) 48829418810dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48839418810dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48849418810dSmrg ;; 48859bd41f2cSmrg 48869418810dSmrg uts4*) 48879418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48889418810dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48899418810dSmrg ;; 48909bd41f2cSmrg 48919418810dSmrg *) 48929418810dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48939418810dSmrg ;; 48949418810dSmrg esac 48959418810dSmrg fi 48969418810dSmrg]) 48979418810dSmrgcase $host_os in 4898084f91ccSmrg # For platforms that do not support PIC, -DPIC is meaningless: 48999418810dSmrg *djgpp*) 49009418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 49019418810dSmrg ;; 49029418810dSmrg *) 49039418810dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 49049418810dSmrg ;; 49059418810dSmrgesac 49060da4cdccSmrg 49070da4cdccSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 49080da4cdccSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 49090da4cdccSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 49100da4cdccSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 49119bd41f2cSmrg 49129418810dSmrg# 49139418810dSmrg# Check to make sure the PIC flag actually works. 49149418810dSmrg# 49159418810dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 49169418810dSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 49179418810dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 49189418810dSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 49199418810dSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 49209418810dSmrg "" | " "*) ;; 49219418810dSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 49229418810dSmrg esac], 49239418810dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49249418810dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49259418810dSmrgfi 49269418810dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49279418810dSmrg [Additional compiler flags for building library objects]) 4928d075918cSmrg 49290da4cdccSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49300da4cdccSmrg [How to pass a linker flag through the compiler]) 49319418810dSmrg# 49329418810dSmrg# Check to make sure the static flag actually works. 49339418810dSmrg# 49349418810dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49359418810dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49369418810dSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49379418810dSmrg $lt_tmp_static_flag, 49389418810dSmrg [], 49399418810dSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49409418810dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49419418810dSmrg [Compiler flag to prevent dynamic linking]) 49429418810dSmrg])# _LT_COMPILER_PIC 49439bd41f2cSmrg 49449418810dSmrg 49459418810dSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 49469418810dSmrg# ---------------------------- 49479418810dSmrg# See if the linker supports building shared libraries. 49489418810dSmrgm4_defun([_LT_LINKER_SHLIBS], 49499418810dSmrg[AC_REQUIRE([LT_PATH_LD])dnl 49509418810dSmrgAC_REQUIRE([LT_PATH_NM])dnl 49510da4cdccSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49529418810dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49539418810dSmrgm4_require([_LT_DECL_EGREP])dnl 49549418810dSmrgm4_require([_LT_DECL_SED])dnl 49559418810dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49569418810dSmrgm4_require([_LT_TAG_COMPILER])dnl 49579418810dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49589418810dSmrgm4_if([$1], [CXX], [ 49599418810dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49600da4cdccSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49619418810dSmrg case $host_os in 49629418810dSmrg aix[[4-9]]*) 49639418810dSmrg # If we're using GNU nm, then we don't want the "-C" option. 4964084f91ccSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4965084f91ccSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4966084f91ccSmrg # weak defined symbols like other global defined symbols, whereas 4967084f91ccSmrg # GNU nm marks them as "W". 4968084f91ccSmrg # While the 'weak' keyword is ignored in the Export File, we need 4969084f91ccSmrg # it in the Import File for the 'aix-soname' feature, so we have 4970084f91ccSmrg # to replace the "-B" option with "-P" for AIX nm. 49719418810dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4972084f91ccSmrg _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' 49739418810dSmrg else 4974084f91ccSmrg _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 == "L") || (\$ 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' 49759bd41f2cSmrg fi 49769bd41f2cSmrg ;; 49779418810dSmrg pw32*) 4978084f91ccSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49790da4cdccSmrg ;; 49809418810dSmrg cygwin* | mingw* | cegcc*) 49810da4cdccSmrg case $cc_basename in 4982084f91ccSmrg cl* | icl*) 49830da4cdccSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49840da4cdccSmrg ;; 49850da4cdccSmrg *) 49860da4cdccSmrg _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' 49870da4cdccSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49880da4cdccSmrg ;; 49890da4cdccSmrg esac 49900da4cdccSmrg ;; 49919418810dSmrg *) 49929418810dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49930da4cdccSmrg ;; 49949418810dSmrg esac 49959418810dSmrg], [ 49969418810dSmrg runpath_var= 49979418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 49989418810dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 49999418810dSmrg _LT_TAGVAR(archive_cmds, $1)= 50009418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 50019418810dSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 50029418810dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 50039418810dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 50049418810dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 50059418810dSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 50069418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 50079418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 50089418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 50099418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50109418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 50119418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 50129418810dSmrg _LT_TAGVAR(inherit_rpath, $1)=no 50139418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 50149418810dSmrg _LT_TAGVAR(module_cmds, $1)= 50159418810dSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 50169418810dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 50179418810dSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 50189418810dSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 50199418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50209418810dSmrg # include_expsyms should be a list of space-separated symbols to be *always* 50219418810dSmrg # included in the symbol list 50229418810dSmrg _LT_TAGVAR(include_expsyms, $1)= 50239418810dSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5024084f91ccSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 5025084f91ccSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5026084f91ccSmrg # as well as any symbol that contains 'd'. 50279418810dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50289418810dSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50299418810dSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 50309418810dSmrg # the symbol is explicitly referenced. Since portable code cannot 50319418810dSmrg # rely on this symbol name, it's probably fine to never include it in 50329418810dSmrg # preloaded symbol tables. 50339418810dSmrg # Exclude shared library initialization/finalization symbols. 50349418810dSmrgdnl Note also adjust exclude_expsyms for C++ above. 50359418810dSmrg extract_expsyms_cmds= 50369bd41f2cSmrg 50379418810dSmrg case $host_os in 50389418810dSmrg cygwin* | mingw* | pw32* | cegcc*) 5039084f91ccSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 50409418810dSmrg # When not using gcc, we currently assume that we are using 5041084f91ccSmrg # Microsoft Visual C++ or Intel C++ Compiler. 5042084f91ccSmrg if test yes != "$GCC"; then 50439418810dSmrg with_gnu_ld=no 50449bd41f2cSmrg fi 50459bd41f2cSmrg ;; 50469418810dSmrg interix*) 5047084f91ccSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 50489418810dSmrg with_gnu_ld=yes 50499418810dSmrg ;; 5050084f91ccSmrg openbsd* | bitrig*) 50519418810dSmrg with_gnu_ld=no 50529418810dSmrg ;; 50539bd41f2cSmrg esac 50549bd41f2cSmrg 50559418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 50560da4cdccSmrg 50570da4cdccSmrg # On some targets, GNU ld is compatible enough with the native linker 50580da4cdccSmrg # that we're better off using the native interface for both. 50590da4cdccSmrg lt_use_gnu_ld_interface=no 5060084f91ccSmrg if test yes = "$with_gnu_ld"; then 50610da4cdccSmrg case $host_os in 50620da4cdccSmrg aix*) 50630da4cdccSmrg # The AIX port of GNU ld has always aspired to compatibility 50640da4cdccSmrg # with the native linker. However, as the warning in the GNU ld 50650da4cdccSmrg # block says, versions before 2.19.5* couldn't really create working 50660da4cdccSmrg # shared libraries, regardless of the interface used. 50670da4cdccSmrg case `$LD -v 2>&1` in 50680da4cdccSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50690da4cdccSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50700da4cdccSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50710da4cdccSmrg *) 50720da4cdccSmrg lt_use_gnu_ld_interface=yes 50730da4cdccSmrg ;; 50740da4cdccSmrg esac 50750da4cdccSmrg ;; 50760da4cdccSmrg *) 50770da4cdccSmrg lt_use_gnu_ld_interface=yes 50780da4cdccSmrg ;; 50790da4cdccSmrg esac 50800da4cdccSmrg fi 50810da4cdccSmrg 5082084f91ccSmrg if test yes = "$lt_use_gnu_ld_interface"; then 50839418810dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5084084f91ccSmrg wlarc='$wl' 50859bd41f2cSmrg 50869418810dSmrg # Set some defaults for GNU ld with shared library support. These 50879418810dSmrg # are reset later if shared libraries are not supported. Putting them 50889418810dSmrg # here allows them to be overridden if necessary. 50899418810dSmrg runpath_var=LD_RUN_PATH 5090084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5091084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50929418810dSmrg # ancient GNU ld didn't support --whole-archive et. al. 50939418810dSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5094084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50959418810dSmrg else 50969418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50979418810dSmrg fi 50989418810dSmrg supports_anon_versioning=no 5099084f91ccSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 51000da4cdccSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 51019418810dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 51029418810dSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 51039418810dSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 51049418810dSmrg *\ 2.11.*) ;; # other 2.11 versions 51059418810dSmrg *) supports_anon_versioning=yes ;; 51069418810dSmrg esac 51079bd41f2cSmrg 51089418810dSmrg # See if GNU ld supports shared libraries. 51099418810dSmrg case $host_os in 51109418810dSmrg aix[[3-9]]*) 51119418810dSmrg # On AIX/PPC, the GNU linker is very broken 5112084f91ccSmrg if test ia64 != "$host_cpu"; then 51139418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51149418810dSmrg cat <<_LT_EOF 1>&2 51159bd41f2cSmrg 51160da4cdccSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 51179418810dSmrg*** to be unable to reliably create shared libraries on AIX. 51189418810dSmrg*** Therefore, libtool is disabling shared libraries support. If you 51190da4cdccSmrg*** really care for shared libraries, you may want to install binutils 51200da4cdccSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 51210da4cdccSmrg*** You will then need to restart the configuration process. 51229bd41f2cSmrg 51239418810dSmrg_LT_EOF 51249418810dSmrg fi 51259418810dSmrg ;; 51269bd41f2cSmrg 51279418810dSmrg amigaos*) 51289418810dSmrg case $host_cpu in 51299418810dSmrg powerpc) 51309418810dSmrg # see comment about AmigaOS4 .so support 5131084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51329418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51339418810dSmrg ;; 51349418810dSmrg m68k) 51359418810dSmrg _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)' 51369418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51379418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51389418810dSmrg ;; 51399418810dSmrg esac 51409418810dSmrg ;; 51419bd41f2cSmrg 51429418810dSmrg beos*) 51439418810dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51449418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51459418810dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51469418810dSmrg # support --undefined. This deserves some investigation. FIXME 5147084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51489418810dSmrg else 51499418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51509418810dSmrg fi 51519418810dSmrg ;; 51529bd41f2cSmrg 51539418810dSmrg cygwin* | mingw* | pw32* | cegcc*) 51549418810dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51559418810dSmrg # as there is no search path for DLLs. 51569418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5157084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51589418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51599418810dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 51609418810dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51610da4cdccSmrg _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' 51620da4cdccSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51639418810dSmrg 51649418810dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5165084f91ccSmrg _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' 5166084f91ccSmrg # If the export-symbols file already is a .def file, use it as 5167084f91ccSmrg # is; otherwise, prepend EXPORTS... 5168084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5169084f91ccSmrg cp $export_symbols $output_objdir/$soname.def; 5170084f91ccSmrg else 5171084f91ccSmrg echo EXPORTS > $output_objdir/$soname.def; 5172084f91ccSmrg cat $export_symbols >> $output_objdir/$soname.def; 5173084f91ccSmrg fi~ 5174084f91ccSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51759418810dSmrg else 51769418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51779418810dSmrg fi 51789418810dSmrg ;; 51799bd41f2cSmrg 51800da4cdccSmrg haiku*) 5181084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51820da4cdccSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51830da4cdccSmrg ;; 51840da4cdccSmrg 5185084f91ccSmrg os2*) 5186084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5187084f91ccSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5188084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5189084f91ccSmrg shrext_cmds=.dll 5190084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5191084f91ccSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5192084f91ccSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5193084f91ccSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5194084f91ccSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5195084f91ccSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5196084f91ccSmrg emximp -o $lib $output_objdir/$libname.def' 5197084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5198084f91ccSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5199084f91ccSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5200084f91ccSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5201084f91ccSmrg prefix_cmds="$SED"~ 5202084f91ccSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5203084f91ccSmrg prefix_cmds="$prefix_cmds -e 1d"; 5204084f91ccSmrg fi~ 5205084f91ccSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5206084f91ccSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5207084f91ccSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5208084f91ccSmrg emximp -o $lib $output_objdir/$libname.def' 5209084f91ccSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5210084f91ccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5211084f91ccSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5212084f91ccSmrg ;; 5213084f91ccSmrg 52149418810dSmrg interix[[3-9]]*) 52159418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 52169418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5217084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5218084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 52199418810dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 52209418810dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 52219418810dSmrg # default) and relocated if they conflict, which is a slow very memory 52229418810dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 52239418810dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 52249418810dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5225084f91ccSmrg _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' 5226084f91ccSmrg _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' 52279418810dSmrg ;; 52289bd41f2cSmrg 52290da4cdccSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52309418810dSmrg tmp_diet=no 5231084f91ccSmrg if test linux-dietlibc = "$host_os"; then 52329418810dSmrg case $cc_basename in 52339418810dSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52349418810dSmrg esac 52359418810dSmrg fi 52369418810dSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5237084f91ccSmrg && test no = "$tmp_diet" 52389418810dSmrg then 52390da4cdccSmrg tmp_addflag=' $pic_flag' 52409418810dSmrg tmp_sharedflag='-shared' 52419418810dSmrg case $cc_basename,$host_cpu in 52429418810dSmrg pgcc*) # Portland Group C compiler 5243084f91ccSmrg _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' 52449418810dSmrg tmp_addflag=' $pic_flag' 52459418810dSmrg ;; 52460da4cdccSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 52470da4cdccSmrg # Portland Group f77 and f90 compilers 5248084f91ccSmrg _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' 52499418810dSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 52509418810dSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52519418810dSmrg tmp_addflag=' -i_dynamic' ;; 52529418810dSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52539418810dSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52549418810dSmrg ifc* | ifort*) # Intel Fortran compiler 52559418810dSmrg tmp_addflag=' -nofor_main' ;; 52569418810dSmrg lf95*) # Lahey Fortran 8.1 52579418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52589418810dSmrg tmp_sharedflag='--shared' ;; 5259084f91ccSmrg nagfor*) # NAGFOR 5.3 5260084f91ccSmrg tmp_sharedflag='-Wl,-shared' ;; 52610da4cdccSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52629418810dSmrg tmp_sharedflag='-qmkshrobj' 52639418810dSmrg tmp_addflag= ;; 52640da4cdccSmrg nvcc*) # Cuda Compiler Driver 2.2 5265084f91ccSmrg _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' 52660da4cdccSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52670da4cdccSmrg ;; 52689418810dSmrg esac 5269084f91ccSmrg case `$CC -V 2>&1 | $SED 5q` in 52709418810dSmrg *Sun\ C*) # Sun C 5.9 5271084f91ccSmrg _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' 52729418810dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52739418810dSmrg tmp_sharedflag='-G' ;; 52749418810dSmrg *Sun\ F*) # Sun Fortran 8.3 52759418810dSmrg tmp_sharedflag='-G' ;; 52769418810dSmrg esac 5277084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52789bd41f2cSmrg 5279084f91ccSmrg if test yes = "$supports_anon_versioning"; then 52809418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5281084f91ccSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5282084f91ccSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5283084f91ccSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52849418810dSmrg fi 52859bd41f2cSmrg 52869418810dSmrg case $cc_basename in 5287084f91ccSmrg tcc*) 5288084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5289084f91ccSmrg ;; 52900da4cdccSmrg xlf* | bgf* | bgxlf* | mpixlf*) 52919418810dSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52929418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5293084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52940da4cdccSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5295084f91ccSmrg if test yes = "$supports_anon_versioning"; then 52969418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5297084f91ccSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5298084f91ccSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5299084f91ccSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 53009418810dSmrg fi 53019418810dSmrg ;; 53029418810dSmrg esac 53039418810dSmrg else 53049418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53059418810dSmrg fi 53069418810dSmrg ;; 53079bd41f2cSmrg 53088746cb53Smrg netbsd*) 53099418810dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53109418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 53119418810dSmrg wlarc= 53129418810dSmrg else 5313084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5314084f91ccSmrg _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' 53159418810dSmrg fi 53169418810dSmrg ;; 53179bd41f2cSmrg 53189418810dSmrg solaris*) 53199418810dSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 53209418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53219418810dSmrg cat <<_LT_EOF 1>&2 53229bd41f2cSmrg 53239418810dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 53249418810dSmrg*** create shared libraries on Solaris systems. Therefore, libtool 53259418810dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53269418810dSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 53279418810dSmrg*** your PATH or compiler configuration so that the native linker is 53289418810dSmrg*** used, and then restart. 53299bd41f2cSmrg 53309418810dSmrg_LT_EOF 53319418810dSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5332084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5333084f91ccSmrg _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' 53349418810dSmrg else 53359418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53369418810dSmrg fi 53379418810dSmrg ;; 53389bd41f2cSmrg 53399418810dSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53409418810dSmrg case `$LD -v 2>&1` in 53419418810dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53429418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53439418810dSmrg cat <<_LT_EOF 1>&2 53449bd41f2cSmrg 5345084f91ccSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53469418810dSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53479418810dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53489418810dSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53499418810dSmrg*** your PATH or compiler configuration so that the native linker is 53509418810dSmrg*** used, and then restart. 53519bd41f2cSmrg 53529418810dSmrg_LT_EOF 53539418810dSmrg ;; 53549418810dSmrg *) 53559418810dSmrg # For security reasons, it is highly recommended that you always 53569418810dSmrg # use absolute paths for naming shared libraries, and exclude the 53579418810dSmrg # DT_RUNPATH tag from executables and libraries. But doing so 53589418810dSmrg # requires that you compile everything twice, which is a pain. 53599418810dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5360084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5361084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5362084f91ccSmrg _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' 53639418810dSmrg else 53649418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53659418810dSmrg fi 53669418810dSmrg ;; 53679418810dSmrg esac 53689418810dSmrg ;; 53699bd41f2cSmrg 53709418810dSmrg sunos4*) 53719418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53729418810dSmrg wlarc= 53739418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53749418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53759418810dSmrg ;; 53769bd41f2cSmrg 53779418810dSmrg *) 53789418810dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5379084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5380084f91ccSmrg _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' 53819418810dSmrg else 53829418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53839418810dSmrg fi 53849418810dSmrg ;; 53859418810dSmrg esac 53869bd41f2cSmrg 5387084f91ccSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53889418810dSmrg runpath_var= 53899418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53909418810dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53919418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53929418810dSmrg fi 53939418810dSmrg else 53949418810dSmrg # PORTME fill in a description of your system's linker (not GNU ld) 53959418810dSmrg case $host_os in 53969418810dSmrg aix3*) 53979418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53989418810dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 53999418810dSmrg _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' 54009418810dSmrg # Note: this linker hardcodes the directories in LIBPATH if there 54019418810dSmrg # are no directories specified by -L. 54029418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5403084f91ccSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 54049418810dSmrg # Neither direct hardcoding nor static linking is supported with a 54059418810dSmrg # broken collect2. 54069418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54079418810dSmrg fi 54089418810dSmrg ;; 54099bd41f2cSmrg 54109418810dSmrg aix[[4-9]]*) 5411084f91ccSmrg if test ia64 = "$host_cpu"; then 54129418810dSmrg # On IA64, the linker does run time linking by default, so we don't 54139418810dSmrg # have to do anything special. 54149418810dSmrg aix_use_runtimelinking=no 54159418810dSmrg exp_sym_flag='-Bexport' 5416084f91ccSmrg no_entry_flag= 54179418810dSmrg else 54189418810dSmrg # If we're using GNU nm, then we don't want the "-C" option. 5419084f91ccSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5420084f91ccSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5421084f91ccSmrg # weak defined symbols like other global defined symbols, whereas 5422084f91ccSmrg # GNU nm marks them as "W". 5423084f91ccSmrg # While the 'weak' keyword is ignored in the Export File, we need 5424084f91ccSmrg # it in the Import File for the 'aix-soname' feature, so we have 5425084f91ccSmrg # to replace the "-B" option with "-P" for AIX nm. 54269418810dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5427084f91ccSmrg _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' 54289418810dSmrg else 5429084f91ccSmrg _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 == "L") || (\$ 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' 54309418810dSmrg fi 54319418810dSmrg aix_use_runtimelinking=no 54329bd41f2cSmrg 54339418810dSmrg # Test if we are trying to use run time linking or normal 54349418810dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5435084f91ccSmrg # have runtime linking enabled, and use it for executables. 5436084f91ccSmrg # For shared libraries, we enable/disable runtime linking 5437084f91ccSmrg # depending on the kind of the shared library created - 5438084f91ccSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 5439084f91ccSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5440084f91ccSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 5441084f91ccSmrg # lib.a static archive 5442084f91ccSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5443084f91ccSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 5444084f91ccSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5445084f91ccSmrg # lib.a(lib.so.V) shared, rtl:no 5446084f91ccSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5447084f91ccSmrg # lib.a static archive 54489418810dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54499418810dSmrg for ld_flag in $LDFLAGS; do 5450084f91ccSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54519418810dSmrg aix_use_runtimelinking=yes 54529418810dSmrg break 54539418810dSmrg fi 54549418810dSmrg done 5455084f91ccSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5456084f91ccSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5457084f91ccSmrg # so we don't have lib.a shared libs to link our executables. 5458084f91ccSmrg # We have to force runtime linking in this case. 5459084f91ccSmrg aix_use_runtimelinking=yes 5460084f91ccSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5461084f91ccSmrg fi 54629418810dSmrg ;; 54639418810dSmrg esac 54649bd41f2cSmrg 54659418810dSmrg exp_sym_flag='-bexport' 54669418810dSmrg no_entry_flag='-bnoentry' 54679418810dSmrg fi 54689418810dSmrg 54699418810dSmrg # When large executables or shared objects are built, AIX ld can 54709418810dSmrg # have problems creating the table of contents. If linking a library 54719418810dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 54729418810dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54739418810dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54749bd41f2cSmrg 54759418810dSmrg _LT_TAGVAR(archive_cmds, $1)='' 54769418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 54779418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54789418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54799418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5480084f91ccSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5481084f91ccSmrg case $with_aix_soname,$aix_use_runtimelinking in 5482084f91ccSmrg aix,*) ;; # traditional, no import file 5483084f91ccSmrg svr4,* | *,yes) # use import file 5484084f91ccSmrg # The Import File defines what to hardcode. 5485084f91ccSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5486084f91ccSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5487084f91ccSmrg ;; 5488084f91ccSmrg esac 54899bd41f2cSmrg 5490084f91ccSmrg if test yes = "$GCC"; then 54919418810dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54929418810dSmrg # We only want to do this on AIX 4.2 and lower, the check 54939418810dSmrg # below for broken collect2 doesn't work under 4.3+ 5494084f91ccSmrg collect2name=`$CC -print-prog-name=collect2` 54959418810dSmrg if test -f "$collect2name" && 54969418810dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54979418810dSmrg then 54989418810dSmrg # We have reworked collect2 54999418810dSmrg : 55009418810dSmrg else 55019418810dSmrg # We have old collect2 55029418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55039418810dSmrg # It fails to find uninstalled libraries when the uninstalled 55049418810dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 55059418810dSmrg # to unsupported forces relinking 55069418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55079418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55089418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55099418810dSmrg fi 55109418810dSmrg ;; 55119418810dSmrg esac 55129418810dSmrg shared_flag='-shared' 5513084f91ccSmrg if test yes = "$aix_use_runtimelinking"; then 5514084f91ccSmrg shared_flag="$shared_flag "'$wl-G' 55159418810dSmrg fi 5516084f91ccSmrg # Need to ensure runtime linking is disabled for the traditional 5517084f91ccSmrg # shared library, or the linker may eventually find shared libraries 5518084f91ccSmrg # /with/ Import File - we do not want to mix them. 5519084f91ccSmrg shared_flag_aix='-shared' 5520084f91ccSmrg shared_flag_svr4='-shared $wl-G' 55219418810dSmrg else 55229418810dSmrg # not using gcc 5523084f91ccSmrg if test ia64 = "$host_cpu"; then 55249418810dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55259418810dSmrg # chokes on -Wl,-G. The following line is correct: 55269418810dSmrg shared_flag='-G' 55279418810dSmrg else 5528084f91ccSmrg if test yes = "$aix_use_runtimelinking"; then 5529084f91ccSmrg shared_flag='$wl-G' 55309418810dSmrg else 5531084f91ccSmrg shared_flag='$wl-bM:SRE' 55329418810dSmrg fi 5533084f91ccSmrg shared_flag_aix='$wl-bM:SRE' 5534084f91ccSmrg shared_flag_svr4='$wl-G' 55359418810dSmrg fi 55369418810dSmrg fi 55379bd41f2cSmrg 5538084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55399418810dSmrg # It seems that -bexpall does not export symbols beginning with 55409418810dSmrg # underscore (_), so it is better to generate a list of symbols to export. 55419418810dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5542084f91ccSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55439418810dSmrg # Warning - without using the other runtime loading flags (-brtl), 55449418810dSmrg # -berok will link without error, but may produce a broken library. 55459418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55469418810dSmrg # Determine the default libpath from the value encoded in an 55479418810dSmrg # empty executable. 55480da4cdccSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5549084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5550084f91ccSmrg _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 55519418810dSmrg else 5552084f91ccSmrg if test ia64 = "$host_cpu"; then 5553084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55549418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5555084f91ccSmrg _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" 55569418810dSmrg else 55579418810dSmrg # Determine the default libpath from the value encoded in an 55589418810dSmrg # empty executable. 55590da4cdccSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5560084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55619418810dSmrg # Warning - without using the other run time loading flags, 55629418810dSmrg # -berok will link without error, but may produce a broken library. 5563084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5564084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5565084f91ccSmrg if test yes = "$with_gnu_ld"; then 55660da4cdccSmrg # We only use this code for GNU lds that support --whole-archive. 5567084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55680da4cdccSmrg else 55690da4cdccSmrg # Exported symbols can be pulled into shared objects from archives 55700da4cdccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55710da4cdccSmrg fi 55729418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5573084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5574084f91ccSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5575084f91ccSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5576084f91ccSmrg if test svr4 != "$with_aix_soname"; then 5577084f91ccSmrg # This is similar to how AIX traditionally builds its shared libraries. 5578084f91ccSmrg _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' 5579084f91ccSmrg fi 5580084f91ccSmrg if test aix != "$with_aix_soname"; then 5581084f91ccSmrg _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' 5582084f91ccSmrg else 5583084f91ccSmrg # used by -dlpreopen to get the symbols 5584084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5585084f91ccSmrg fi 5586084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55879418810dSmrg fi 55889418810dSmrg fi 55899418810dSmrg ;; 55909bd41f2cSmrg 55919418810dSmrg amigaos*) 55929418810dSmrg case $host_cpu in 55939418810dSmrg powerpc) 55949418810dSmrg # see comment about AmigaOS4 .so support 5595084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55969418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55979418810dSmrg ;; 55989418810dSmrg m68k) 55999418810dSmrg _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)' 56009418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56019418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56029418810dSmrg ;; 56039418810dSmrg esac 56049418810dSmrg ;; 56059bd41f2cSmrg 56069418810dSmrg bsdi[[45]]*) 56079418810dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 56089418810dSmrg ;; 56099bd41f2cSmrg 56109418810dSmrg cygwin* | mingw* | pw32* | cegcc*) 56119418810dSmrg # When not using gcc, we currently assume that we are using 5612084f91ccSmrg # Microsoft Visual C++ or Intel C++ Compiler. 56139418810dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 56149418810dSmrg # no search path for DLLs. 56150da4cdccSmrg case $cc_basename in 5616084f91ccSmrg cl* | icl*) 5617084f91ccSmrg # Native MSVC or ICC 56180da4cdccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56190da4cdccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56200da4cdccSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 56210da4cdccSmrg _LT_TAGVAR(file_list_spec, $1)='@' 56220da4cdccSmrg # Tell ltmain to make .lib files, not .a files. 56230da4cdccSmrg libext=lib 56240da4cdccSmrg # Tell ltmain to make .dll files, not .so files. 5625084f91ccSmrg shrext_cmds=.dll 56260da4cdccSmrg # FIXME: Setting linknames here is a bad hack. 5627084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5628084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5629084f91ccSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 5630084f91ccSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5631084f91ccSmrg else 5632084f91ccSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5633084f91ccSmrg fi~ 5634084f91ccSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5635084f91ccSmrg linknames=' 56360da4cdccSmrg # The linker will not automatically build a static lib if we build a DLL. 56370da4cdccSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56380da4cdccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56390da4cdccSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56400da4cdccSmrg _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' 56410da4cdccSmrg # Don't use ranlib 56420da4cdccSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56430da4cdccSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5644084f91ccSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5645084f91ccSmrg case $lt_outputfile in 5646084f91ccSmrg *.exe|*.EXE) ;; 5647084f91ccSmrg *) 5648084f91ccSmrg lt_outputfile=$lt_outputfile.exe 5649084f91ccSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 5650084f91ccSmrg ;; 5651084f91ccSmrg esac~ 5652084f91ccSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5653084f91ccSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5654084f91ccSmrg $RM "$lt_outputfile.manifest"; 5655084f91ccSmrg fi' 56560da4cdccSmrg ;; 56570da4cdccSmrg *) 5658084f91ccSmrg # Assume MSVC and ICC wrapper 56590da4cdccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56600da4cdccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56610da4cdccSmrg # Tell ltmain to make .lib files, not .a files. 56620da4cdccSmrg libext=lib 56630da4cdccSmrg # Tell ltmain to make .dll files, not .so files. 5664084f91ccSmrg shrext_cmds=.dll 56650da4cdccSmrg # FIXME: Setting linknames here is a bad hack. 56660da4cdccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56670da4cdccSmrg # The linker will automatically build a .lib file if we build a DLL. 56680da4cdccSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56690da4cdccSmrg # FIXME: Should let the user specify the lib program. 56700da4cdccSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56710da4cdccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56720da4cdccSmrg ;; 56730da4cdccSmrg esac 56749418810dSmrg ;; 56759bd41f2cSmrg 56769418810dSmrg darwin* | rhapsody*) 56779418810dSmrg _LT_DARWIN_LINKER_FEATURES($1) 56789418810dSmrg ;; 56799bd41f2cSmrg 56809418810dSmrg dgux*) 56819418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56829418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56839418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56849418810dSmrg ;; 56859bd41f2cSmrg 56869418810dSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56879418810dSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 56889418810dSmrg # does not break anything, and helps significantly (at the cost of a little 56899418810dSmrg # extra space). 56909418810dSmrg freebsd2.2*) 56919418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56929418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56939418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56949418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56959418810dSmrg ;; 56969bd41f2cSmrg 56979418810dSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56980da4cdccSmrg freebsd2.*) 56999418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 57009418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57019418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57029418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57039418810dSmrg ;; 57049bd41f2cSmrg 57059418810dSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5706084f91ccSmrg freebsd* | dragonfly* | midnightbsd*) 57070da4cdccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 57089418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 57099418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57109418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57119418810dSmrg ;; 57129bd41f2cSmrg 57139418810dSmrg hpux9*) 5714084f91ccSmrg if test yes = "$GCC"; then 5715084f91ccSmrg _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' 57169418810dSmrg else 5717084f91ccSmrg _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' 57189418810dSmrg fi 5719084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57209418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57219418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57229bd41f2cSmrg 57239418810dSmrg # hardcode_minus_L: Not really in the search PATH, 57249418810dSmrg # but as the default location of the library. 57259418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5726084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57279418810dSmrg ;; 57289bd41f2cSmrg 57299418810dSmrg hpux10*) 5730084f91ccSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5731084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57329418810dSmrg else 57339418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57349418810dSmrg fi 5735084f91ccSmrg if test no = "$with_gnu_ld"; then 5736084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57379418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57389418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57399418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5740084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57419418810dSmrg # hardcode_minus_L: Not really in the search PATH, 57429418810dSmrg # but as the default location of the library. 57439418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57449418810dSmrg fi 57459418810dSmrg ;; 57469bd41f2cSmrg 57479418810dSmrg hpux11*) 5748084f91ccSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57499418810dSmrg case $host_cpu in 57509418810dSmrg hppa*64*) 5751084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57529418810dSmrg ;; 57539418810dSmrg ia64*) 5754084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57559418810dSmrg ;; 57569418810dSmrg *) 5757084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57589418810dSmrg ;; 57599418810dSmrg esac 57609418810dSmrg else 57619418810dSmrg case $host_cpu in 57629418810dSmrg hppa*64*) 5763084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57649418810dSmrg ;; 57659418810dSmrg ia64*) 5766084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57679418810dSmrg ;; 57689418810dSmrg *) 57690da4cdccSmrg m4_if($1, [], [ 57700da4cdccSmrg # Older versions of the 11.00 compiler do not understand -b yet 57710da4cdccSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57720da4cdccSmrg _LT_LINKER_OPTION([if $CC understands -b], 57730da4cdccSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5774084f91ccSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57750da4cdccSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5776084f91ccSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57779418810dSmrg ;; 57789418810dSmrg esac 57799418810dSmrg fi 5780084f91ccSmrg if test no = "$with_gnu_ld"; then 5781084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57829418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57839bd41f2cSmrg 57849418810dSmrg case $host_cpu in 57859418810dSmrg hppa*64*|ia64*) 57869418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57879418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57889418810dSmrg ;; 57899418810dSmrg *) 57909418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57919418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5792084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57939418810dSmrg 57949418810dSmrg # hardcode_minus_L: Not really in the search PATH, 57959418810dSmrg # but as the default location of the library. 57969418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57979418810dSmrg ;; 57989418810dSmrg esac 57999418810dSmrg fi 58009bd41f2cSmrg ;; 58019418810dSmrg 58029418810dSmrg irix5* | irix6* | nonstopux*) 5803084f91ccSmrg if test yes = "$GCC"; then 5804084f91ccSmrg _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' 58059418810dSmrg # Try to use the -exported_symbol ld option, if it does not 58069418810dSmrg # work, assume that -exports_file does not work either and 58079418810dSmrg # implicitly export all symbols. 58080da4cdccSmrg # This should be the same for all languages, so no per-tag cache variable. 58090da4cdccSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 58100da4cdccSmrg [lt_cv_irix_exported_symbol], 5811084f91ccSmrg [save_LDFLAGS=$LDFLAGS 5812084f91ccSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 58130da4cdccSmrg AC_LINK_IFELSE( 58140da4cdccSmrg [AC_LANG_SOURCE( 58150da4cdccSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 58160da4cdccSmrg [C++], [[int foo (void) { return 0; }]], 58170da4cdccSmrg [Fortran 77], [[ 58180da4cdccSmrg subroutine foo 58190da4cdccSmrg end]], 58200da4cdccSmrg [Fortran], [[ 58210da4cdccSmrg subroutine foo 58220da4cdccSmrg end]])])], 58230da4cdccSmrg [lt_cv_irix_exported_symbol=yes], 58240da4cdccSmrg [lt_cv_irix_exported_symbol=no]) 5825084f91ccSmrg LDFLAGS=$save_LDFLAGS]) 5826084f91ccSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 5827084f91ccSmrg _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' 58280da4cdccSmrg fi 58299418810dSmrg else 5830084f91ccSmrg _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' 5831084f91ccSmrg _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' 58329418810dSmrg fi 58339418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5834084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58359418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58369418810dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58379418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58389bd41f2cSmrg ;; 58399bd41f2cSmrg 5840084f91ccSmrg linux*) 5841084f91ccSmrg case $cc_basename in 5842084f91ccSmrg tcc*) 5843084f91ccSmrg # Fabrice Bellard et al's Tiny C Compiler 5844084f91ccSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5845084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5846084f91ccSmrg ;; 5847084f91ccSmrg esac 5848084f91ccSmrg ;; 5849084f91ccSmrg 5850084f91ccSmrg netbsd*) 5851084f91ccSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5852084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5853084f91ccSmrg else 58549418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58559418810dSmrg fi 58569418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58579418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58589418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58599418810dSmrg ;; 58609bd41f2cSmrg 58619418810dSmrg newsos6) 58629418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58639418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5864084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58659418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58669418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58679418810dSmrg ;; 58689bd41f2cSmrg 58699418810dSmrg *nto* | *qnx*) 58709418810dSmrg ;; 58719bd41f2cSmrg 5872084f91ccSmrg openbsd* | bitrig*) 58739418810dSmrg if test -f /usr/libexec/ld.so; then 58749418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58759418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58769418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5877084f91ccSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58789418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5879084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5880084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5881084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58829418810dSmrg else 5883084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5884084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58859418810dSmrg fi 58869418810dSmrg else 58879418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58889418810dSmrg fi 58899418810dSmrg ;; 58909bd41f2cSmrg 58919418810dSmrg os2*) 58929418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58939418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58949418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5895084f91ccSmrg shrext_cmds=.dll 5896084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5897084f91ccSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5898084f91ccSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5899084f91ccSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5900084f91ccSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5901084f91ccSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5902084f91ccSmrg emximp -o $lib $output_objdir/$libname.def' 5903084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5904084f91ccSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5905084f91ccSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5906084f91ccSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5907084f91ccSmrg prefix_cmds="$SED"~ 5908084f91ccSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5909084f91ccSmrg prefix_cmds="$prefix_cmds -e 1d"; 5910084f91ccSmrg fi~ 5911084f91ccSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5912084f91ccSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5913084f91ccSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5914084f91ccSmrg emximp -o $lib $output_objdir/$libname.def' 5915084f91ccSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5916084f91ccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5917084f91ccSmrg _LT_TAGVAR(file_list_spec, $1)='@' 59189418810dSmrg ;; 59199bd41f2cSmrg 59209418810dSmrg osf3*) 5921084f91ccSmrg if test yes = "$GCC"; then 5922084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5923084f91ccSmrg _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' 59249418810dSmrg else 59259418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5926084f91ccSmrg _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' 59279418810dSmrg fi 59289418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5929084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59309418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59319418810dSmrg ;; 59329bd41f2cSmrg 59339418810dSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5934084f91ccSmrg if test yes = "$GCC"; then 5935084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5936084f91ccSmrg _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' 5937084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59389418810dSmrg else 59399418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5940084f91ccSmrg _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' 59419418810dSmrg _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~ 5942084f91ccSmrg $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' 59439bd41f2cSmrg 59449418810dSmrg # Both c and cxx compiler support -rpath directly 59459418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59469418810dSmrg fi 59479418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59489418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59499418810dSmrg ;; 59509bd41f2cSmrg 59519418810dSmrg solaris*) 59529418810dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5953084f91ccSmrg if test yes = "$GCC"; then 5954084f91ccSmrg wlarc='$wl' 5955084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59569418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5957084f91ccSmrg $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' 59589418810dSmrg else 59599418810dSmrg case `$CC -V 2>&1` in 59609418810dSmrg *"Compilers 5.0"*) 59619418810dSmrg wlarc='' 5962084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59639418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5964084f91ccSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59659418810dSmrg ;; 59669418810dSmrg *) 5967084f91ccSmrg wlarc='$wl' 5968084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59699418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5970084f91ccSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59719418810dSmrg ;; 59729418810dSmrg esac 59739418810dSmrg fi 59749418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59759418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59769418810dSmrg case $host_os in 59779418810dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59789418810dSmrg *) 59799418810dSmrg # The compiler driver will combine and reorder linker options, 5980084f91ccSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59819418810dSmrg # but is careful enough not to reorder. 59829418810dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5983084f91ccSmrg if test yes = "$GCC"; then 5984084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59859418810dSmrg else 59869418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59879418810dSmrg fi 59889418810dSmrg ;; 59899418810dSmrg esac 59909418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59919418810dSmrg ;; 59929bd41f2cSmrg 59939418810dSmrg sunos4*) 5994084f91ccSmrg if test sequent = "$host_vendor"; then 59959418810dSmrg # Use $CC to link under sequent, because it throws in some extra .o 59969418810dSmrg # files that make .init and .fini sections work. 5997084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59989418810dSmrg else 59999418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 60009418810dSmrg fi 60019418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60029418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60039418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60049418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60059418810dSmrg ;; 60069bd41f2cSmrg 60079418810dSmrg sysv4) 60089418810dSmrg case $host_vendor in 60099418810dSmrg sni) 60109418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60119418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 60129418810dSmrg ;; 60139418810dSmrg siemens) 60149418810dSmrg ## LD is ld it makes a PLAMLIB 60159418810dSmrg ## CC just makes a GrossModule. 60169418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 60179418810dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 60189418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 60199418810dSmrg ;; 60209418810dSmrg motorola) 60219418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60229418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 60239418810dSmrg ;; 60249418810dSmrg esac 60259418810dSmrg runpath_var='LD_RUN_PATH' 60269418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60279418810dSmrg ;; 60289bd41f2cSmrg 60299418810dSmrg sysv4.3*) 60309418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60319418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60329418810dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60339418810dSmrg ;; 60349bd41f2cSmrg 60359418810dSmrg sysv4*MP*) 60369418810dSmrg if test -d /usr/nec; then 60379418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60389418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60399418810dSmrg runpath_var=LD_RUN_PATH 60409418810dSmrg hardcode_runpath_var=yes 60419418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60429418810dSmrg fi 60439418810dSmrg ;; 60449bd41f2cSmrg 60459418810dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6046084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60479418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60489418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60499418810dSmrg runpath_var='LD_RUN_PATH' 60509bd41f2cSmrg 6051084f91ccSmrg if test yes = "$GCC"; then 6052084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6053084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60549418810dSmrg else 6055084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6056084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60579418810dSmrg fi 60589418810dSmrg ;; 60599bd41f2cSmrg 60609418810dSmrg sysv5* | sco3.2v5* | sco5v6*) 6061084f91ccSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 60629418810dSmrg # link with -lc, and that would cause any symbols used from libc to 60639418810dSmrg # always be unresolved, which means just about no library would 60649418810dSmrg # ever link correctly. If we're not using GNU ld we use -z text 60659418810dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 60669418810dSmrg # as -z defs. 6067084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6068084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60699418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60709418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6071084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60729418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60739418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6074084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60759418810dSmrg runpath_var='LD_RUN_PATH' 60769bd41f2cSmrg 6077084f91ccSmrg if test yes = "$GCC"; then 6078084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6079084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60809418810dSmrg else 6081084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6082084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60839418810dSmrg fi 60849418810dSmrg ;; 60859bd41f2cSmrg 60869418810dSmrg uts4*) 60879418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60889418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60899418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60909418810dSmrg ;; 60919bd41f2cSmrg 60929418810dSmrg *) 60939418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60949418810dSmrg ;; 60959418810dSmrg esac 60969bd41f2cSmrg 6097084f91ccSmrg if test sni = "$host_vendor"; then 60989418810dSmrg case $host in 60999418810dSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6100084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 61019418810dSmrg ;; 61029418810dSmrg esac 61039418810dSmrg fi 61049418810dSmrg fi 61059418810dSmrg]) 61069418810dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6107084f91ccSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 61089bd41f2cSmrg 61099418810dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 61109bd41f2cSmrg 61119418810dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 61129418810dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 61139418810dSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 61149418810dSmrg [The commands to extract the exported symbol list from a shared archive]) 61159bd41f2cSmrg 61169418810dSmrg# 61179418810dSmrg# Do we need to explicitly link libc? 61189418810dSmrg# 61199418810dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 61209418810dSmrgx|xyes) 61219418810dSmrg # Assume -lc should be added 61229418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61239bd41f2cSmrg 6124084f91ccSmrg if test yes,yes = "$GCC,$enable_shared"; then 61259418810dSmrg case $_LT_TAGVAR(archive_cmds, $1) in 61269418810dSmrg *'~'*) 61279418810dSmrg # FIXME: we may have to deal with multi-command sequences. 61289418810dSmrg ;; 61299418810dSmrg '$CC '*) 61309418810dSmrg # Test whether the compiler implicitly links with -lc since on some 61319418810dSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61329418810dSmrg # to ld, don't add -lc before -lgcc. 61330da4cdccSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61340da4cdccSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61350da4cdccSmrg [$RM conftest* 61360da4cdccSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61370da4cdccSmrg 61380da4cdccSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61390da4cdccSmrg soname=conftest 61400da4cdccSmrg lib=conftest 61410da4cdccSmrg libobjs=conftest.$ac_objext 61420da4cdccSmrg deplibs= 61430da4cdccSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61440da4cdccSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61450da4cdccSmrg compiler_flags=-v 61460da4cdccSmrg linker_flags=-v 61470da4cdccSmrg verstring= 61480da4cdccSmrg output_objdir=. 61490da4cdccSmrg libname=conftest 61500da4cdccSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61510da4cdccSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 61520da4cdccSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61530da4cdccSmrg then 61540da4cdccSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61550da4cdccSmrg else 61560da4cdccSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61570da4cdccSmrg fi 61580da4cdccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61590da4cdccSmrg else 61600da4cdccSmrg cat conftest.err 1>&5 61610da4cdccSmrg fi 61620da4cdccSmrg $RM conftest* 61630da4cdccSmrg ]) 61640da4cdccSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61659418810dSmrg ;; 61669418810dSmrg esac 61679418810dSmrg fi 61689418810dSmrg ;; 61699418810dSmrgesac 61709bd41f2cSmrg 61719418810dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61729418810dSmrg [Whether or not to add -lc for building shared libraries]) 61739418810dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61749418810dSmrg [enable_shared_with_static_runtimes], [0], 61759418810dSmrg [Whether or not to disallow shared libs when runtime libs are static]) 61769418810dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61779418810dSmrg [Compiler flag to allow reflexive dlopens]) 61789418810dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61799418810dSmrg [Compiler flag to generate shared objects directly from archives]) 61809418810dSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 61819418810dSmrg [Whether the compiler copes with passing no objects directly]) 61829418810dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61839418810dSmrg [Create an old-style archive from a shared archive]) 61849418810dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61859418810dSmrg [Create a temporary old-style archive to link instead of a shared archive]) 61869418810dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61879418810dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61889418810dSmrg_LT_TAGDECL([], [module_cmds], [2], 61899418810dSmrg [Commands used to build a loadable module if different from building 61909418810dSmrg a shared archive.]) 61919418810dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61929418810dSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 61939418810dSmrg [Whether we are building with GNU ld or not]) 61949418810dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61959418810dSmrg [Flag that allows shared libraries with undefined symbols to be built]) 61969418810dSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 61979418810dSmrg [Flag that enforces no undefined symbols]) 61989418810dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61999418810dSmrg [Flag to hardcode $libdir into a binary during linking. 62009418810dSmrg This must work even if $libdir does not exist]) 62019418810dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 62029418810dSmrg [Whether we need a single "-rpath" flag with a separated argument]) 62039418810dSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6204084f91ccSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 62059418810dSmrg DIR into the resulting binary]) 62069418810dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6207084f91ccSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 62089418810dSmrg DIR into the resulting binary and the resulting library dependency is 6209084f91ccSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 62109418810dSmrg library is relocated]) 62119418810dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 62129418810dSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 62139418810dSmrg into the resulting binary]) 62149418810dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 62159418810dSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 62169418810dSmrg into the resulting binary]) 62179418810dSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 62189418810dSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 62199418810dSmrg into the library and all subsequent libraries and executables linked 62209418810dSmrg against it]) 62219418810dSmrg_LT_TAGDECL([], [inherit_rpath], [0], 62229418810dSmrg [Set to yes if linker adds runtime paths of dependent libraries 62239418810dSmrg to runtime path list]) 62249418810dSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 62259418810dSmrg [Whether libtool must link a program against all its dependency libraries]) 62269418810dSmrg_LT_TAGDECL([], [always_export_symbols], [0], 62279418810dSmrg [Set to "yes" if exported symbols are required]) 62289418810dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62299418810dSmrg [The commands to list exported symbols]) 62309418810dSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 62319418810dSmrg [Symbols that should not be listed in the preloaded symbols]) 62329418810dSmrg_LT_TAGDECL([], [include_expsyms], [1], 62339418810dSmrg [Symbols that must always be exported]) 62349418810dSmrg_LT_TAGDECL([], [prelink_cmds], [2], 62359418810dSmrg [Commands necessary for linking programs (against libraries) with templates]) 62360da4cdccSmrg_LT_TAGDECL([], [postlink_cmds], [2], 62370da4cdccSmrg [Commands necessary for finishing linking programs]) 62389418810dSmrg_LT_TAGDECL([], [file_list_spec], [1], 62399418810dSmrg [Specify filename containing input files]) 62409418810dSmrgdnl FIXME: Not yet implemented 62419418810dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62429418810dSmrgdnl [Compiler flag to generate thread safe objects]) 62439418810dSmrg])# _LT_LINKER_SHLIBS 62449418810dSmrg 62459418810dSmrg 62469418810dSmrg# _LT_LANG_C_CONFIG([TAG]) 62479418810dSmrg# ------------------------ 62489418810dSmrg# Ensure that the configuration variables for a C compiler are suitably 62499418810dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6250084f91ccSmrg# the compiler configuration to 'libtool'. 62519418810dSmrgm4_defun([_LT_LANG_C_CONFIG], 62529418810dSmrg[m4_require([_LT_DECL_EGREP])dnl 6253084f91ccSmrglt_save_CC=$CC 62549418810dSmrgAC_LANG_PUSH(C) 62559bd41f2cSmrg 62569418810dSmrg# Source file extension for C test sources. 62579418810dSmrgac_ext=c 62589bd41f2cSmrg 62599418810dSmrg# Object file extension for compiled C test sources. 62609418810dSmrgobjext=o 62619418810dSmrg_LT_TAGVAR(objext, $1)=$objext 62629bd41f2cSmrg 62639418810dSmrg# Code to be used in simple compile tests 62649418810dSmrglt_simple_compile_test_code="int some_variable = 0;" 62659bd41f2cSmrg 62669418810dSmrg# Code to be used in simple link tests 62679418810dSmrglt_simple_link_test_code='int main(){return(0);}' 62689bd41f2cSmrg 62699418810dSmrg_LT_TAG_COMPILER 62709418810dSmrg# Save the default compiler, since it gets overwritten when the other 62719418810dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62729418810dSmrgcompiler_DEFAULT=$CC 62739bd41f2cSmrg 62749418810dSmrg# save warnings/boilerplate of simple test code 62759418810dSmrg_LT_COMPILER_BOILERPLATE 62769418810dSmrg_LT_LINKER_BOILERPLATE 62779bd41f2cSmrg 62789418810dSmrgif test -n "$compiler"; then 62799418810dSmrg _LT_COMPILER_NO_RTTI($1) 62809418810dSmrg _LT_COMPILER_PIC($1) 62819418810dSmrg _LT_COMPILER_C_O($1) 62829418810dSmrg _LT_COMPILER_FILE_LOCKS($1) 62839418810dSmrg _LT_LINKER_SHLIBS($1) 62849418810dSmrg _LT_SYS_DYNAMIC_LINKER($1) 62859418810dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 62869418810dSmrg LT_SYS_DLOPEN_SELF 62879418810dSmrg _LT_CMD_STRIPLIB 62889418810dSmrg 6289084f91ccSmrg # Report what library types will actually be built 62909418810dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62919418810dSmrg AC_MSG_RESULT([$can_build_shared]) 62929418810dSmrg 62939418810dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6294084f91ccSmrg test no = "$can_build_shared" && enable_shared=no 62959418810dSmrg 62969418810dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 62979418810dSmrg # are all built from PIC. 62989418810dSmrg case $host_os in 62999418810dSmrg aix3*) 6300084f91ccSmrg test yes = "$enable_shared" && enable_static=no 63019418810dSmrg if test -n "$RANLIB"; then 63029418810dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 63039418810dSmrg postinstall_cmds='$RANLIB $lib' 63049418810dSmrg fi 63059418810dSmrg ;; 63069bd41f2cSmrg 63079418810dSmrg aix[[4-9]]*) 6308084f91ccSmrg if test ia64 != "$host_cpu"; then 6309084f91ccSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6310084f91ccSmrg yes,aix,yes) ;; # shared object as lib.so file only 6311084f91ccSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 6312084f91ccSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6313084f91ccSmrg esac 63149418810dSmrg fi 63159418810dSmrg ;; 63169418810dSmrg esac 63179418810dSmrg AC_MSG_RESULT([$enable_shared]) 63189bd41f2cSmrg 63199418810dSmrg AC_MSG_CHECKING([whether to build static libraries]) 63209418810dSmrg # Make sure either enable_shared or enable_static is yes. 6321084f91ccSmrg test yes = "$enable_shared" || enable_static=yes 63229418810dSmrg AC_MSG_RESULT([$enable_static]) 63239bd41f2cSmrg 63249418810dSmrg _LT_CONFIG($1) 63259418810dSmrgfi 63269418810dSmrgAC_LANG_POP 6327084f91ccSmrgCC=$lt_save_CC 63289418810dSmrg])# _LT_LANG_C_CONFIG 63299bd41f2cSmrg 63309bd41f2cSmrg 63319418810dSmrg# _LT_LANG_CXX_CONFIG([TAG]) 63329418810dSmrg# -------------------------- 63339418810dSmrg# Ensure that the configuration variables for a C++ compiler are suitably 63349418810dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6335084f91ccSmrg# the compiler configuration to 'libtool'. 63369418810dSmrgm4_defun([_LT_LANG_CXX_CONFIG], 63370da4cdccSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63389418810dSmrgm4_require([_LT_DECL_EGREP])dnl 63390da4cdccSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6340084f91ccSmrgif test -n "$CXX" && ( test no != "$CXX" && 6341084f91ccSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6342084f91ccSmrg (test g++ != "$CXX"))); then 63430da4cdccSmrg AC_PROG_CXXCPP 63440da4cdccSmrgelse 63450da4cdccSmrg _lt_caught_CXX_error=yes 63460da4cdccSmrgfi 63479418810dSmrg 63489418810dSmrgAC_LANG_PUSH(C++) 63499418810dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63509418810dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 63519418810dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 63529418810dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63539418810dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 63549418810dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63559418810dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 63569418810dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63579418810dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63589418810dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63599418810dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63609418810dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63619418810dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 63629418810dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 63639418810dSmrg_LT_TAGVAR(module_cmds, $1)= 63649418810dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 63659418810dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63669418810dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63670da4cdccSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63680da4cdccSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63699418810dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 63709418810dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63719418810dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63729bd41f2cSmrg 63739418810dSmrg# Source file extension for C++ test sources. 63749418810dSmrgac_ext=cpp 63759bd41f2cSmrg 63769418810dSmrg# Object file extension for compiled C++ test sources. 63779418810dSmrgobjext=o 63789418810dSmrg_LT_TAGVAR(objext, $1)=$objext 63799418810dSmrg 63809418810dSmrg# No sense in running all these tests if we already determined that 63819418810dSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 63829418810dSmrg# are currently assumed to apply to all compilers on this platform, 63839418810dSmrg# and will be corrupted by setting them based on a non-working compiler. 6384084f91ccSmrgif test yes != "$_lt_caught_CXX_error"; then 63859418810dSmrg # Code to be used in simple compile tests 63869418810dSmrg lt_simple_compile_test_code="int some_variable = 0;" 63879418810dSmrg 63889418810dSmrg # Code to be used in simple link tests 63899418810dSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63909418810dSmrg 63919418810dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63929418810dSmrg _LT_TAG_COMPILER 63939418810dSmrg 63949418810dSmrg # save warnings/boilerplate of simple test code 63959418810dSmrg _LT_COMPILER_BOILERPLATE 63969418810dSmrg _LT_LINKER_BOILERPLATE 63979418810dSmrg 63989418810dSmrg # Allow CC to be a program name with arguments. 63999418810dSmrg lt_save_CC=$CC 64000da4cdccSmrg lt_save_CFLAGS=$CFLAGS 64019418810dSmrg lt_save_LD=$LD 64029418810dSmrg lt_save_GCC=$GCC 64039418810dSmrg GCC=$GXX 64049418810dSmrg lt_save_with_gnu_ld=$with_gnu_ld 64059418810dSmrg lt_save_path_LD=$lt_cv_path_LD 64069418810dSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 64079418810dSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 64089418810dSmrg else 64099418810dSmrg $as_unset lt_cv_prog_gnu_ld 64109418810dSmrg fi 64119418810dSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 64129418810dSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 64139418810dSmrg else 64149418810dSmrg $as_unset lt_cv_path_LD 64159418810dSmrg fi 64169418810dSmrg test -z "${LDCXX+set}" || LD=$LDCXX 64179418810dSmrg CC=${CXX-"c++"} 64180da4cdccSmrg CFLAGS=$CXXFLAGS 64199418810dSmrg compiler=$CC 64209418810dSmrg _LT_TAGVAR(compiler, $1)=$CC 64219418810dSmrg _LT_CC_BASENAME([$compiler]) 64229bd41f2cSmrg 64239418810dSmrg if test -n "$compiler"; then 64249418810dSmrg # We don't want -fno-exception when compiling C++ code, so set the 64259418810dSmrg # no_builtin_flag separately 6426084f91ccSmrg if test yes = "$GXX"; then 64279418810dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64289418810dSmrg else 64299418810dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64309418810dSmrg fi 64319bd41f2cSmrg 6432084f91ccSmrg if test yes = "$GXX"; then 64339418810dSmrg # Set up default GNU C++ configuration 64349bd41f2cSmrg 64359418810dSmrg LT_PATH_LD 64369bd41f2cSmrg 64379418810dSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64389418810dSmrg # archiving commands below assume that GNU ld is being used. 6439084f91ccSmrg if test yes = "$with_gnu_ld"; then 6440084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6441084f91ccSmrg _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' 64429bd41f2cSmrg 6443084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6444084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64459bd41f2cSmrg 64469418810dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 64479418810dSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64489418810dSmrg # investigate it a little bit more. (MM) 6449084f91ccSmrg wlarc='$wl' 64509bd41f2cSmrg 64519418810dSmrg # ancient GNU ld didn't support --whole-archive et. al. 64529418810dSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64539418810dSmrg $GREP 'no-whole-archive' > /dev/null; then 6454084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64559418810dSmrg else 64569418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64579418810dSmrg fi 64589418810dSmrg else 64599418810dSmrg with_gnu_ld=no 64609418810dSmrg wlarc= 64619418810dSmrg 64629418810dSmrg # A generic and very simple default shared library creation 64639418810dSmrg # command for GNU C++ for the case where it uses the native 64649418810dSmrg # linker, instead of GNU ld. If possible, this setting should 64659418810dSmrg # overridden to take advantage of the native linker features on 64669418810dSmrg # the platform it is being used on. 64679418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64689418810dSmrg fi 64699bd41f2cSmrg 64709418810dSmrg # Commands to make compiler produce verbose output that lists 64719418810dSmrg # what "hidden" libraries, object files and flags are used when 64729418810dSmrg # linking a shared library. 64730da4cdccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64749bd41f2cSmrg 64759418810dSmrg else 64769418810dSmrg GXX=no 64779418810dSmrg with_gnu_ld=no 64789418810dSmrg wlarc= 64799418810dSmrg fi 64809bd41f2cSmrg 64819418810dSmrg # PORTME: fill in a description of your system's C++ link characteristics 64829418810dSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64839418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 64849418810dSmrg case $host_os in 64859418810dSmrg aix3*) 64869418810dSmrg # FIXME: insert proper C++ library support 64879418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64889418810dSmrg ;; 64899418810dSmrg aix[[4-9]]*) 6490084f91ccSmrg if test ia64 = "$host_cpu"; then 64919418810dSmrg # On IA64, the linker does run time linking by default, so we don't 64929418810dSmrg # have to do anything special. 64939418810dSmrg aix_use_runtimelinking=no 64949418810dSmrg exp_sym_flag='-Bexport' 6495084f91ccSmrg no_entry_flag= 64969418810dSmrg else 64979418810dSmrg aix_use_runtimelinking=no 64989418810dSmrg 64999418810dSmrg # Test if we are trying to use run time linking or normal 65009418810dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6501084f91ccSmrg # have runtime linking enabled, and use it for executables. 6502084f91ccSmrg # For shared libraries, we enable/disable runtime linking 6503084f91ccSmrg # depending on the kind of the shared library created - 6504084f91ccSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 6505084f91ccSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6506084f91ccSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 6507084f91ccSmrg # lib.a static archive 6508084f91ccSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6509084f91ccSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 6510084f91ccSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6511084f91ccSmrg # lib.a(lib.so.V) shared, rtl:no 6512084f91ccSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6513084f91ccSmrg # lib.a static archive 65149418810dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 65159418810dSmrg for ld_flag in $LDFLAGS; do 65169418810dSmrg case $ld_flag in 65179418810dSmrg *-brtl*) 65189418810dSmrg aix_use_runtimelinking=yes 65199418810dSmrg break 65209418810dSmrg ;; 65219418810dSmrg esac 65229418810dSmrg done 6523084f91ccSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6524084f91ccSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6525084f91ccSmrg # so we don't have lib.a shared libs to link our executables. 6526084f91ccSmrg # We have to force runtime linking in this case. 6527084f91ccSmrg aix_use_runtimelinking=yes 6528084f91ccSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6529084f91ccSmrg fi 65309418810dSmrg ;; 65319418810dSmrg esac 65329bd41f2cSmrg 65339418810dSmrg exp_sym_flag='-bexport' 65349418810dSmrg no_entry_flag='-bnoentry' 65359418810dSmrg fi 65369bd41f2cSmrg 65379418810dSmrg # When large executables or shared objects are built, AIX ld can 65389418810dSmrg # have problems creating the table of contents. If linking a library 65399418810dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 65409418810dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65419418810dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65429418810dSmrg 65439418810dSmrg _LT_TAGVAR(archive_cmds, $1)='' 65449418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65459418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65469418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65479418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6548084f91ccSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6549084f91ccSmrg case $with_aix_soname,$aix_use_runtimelinking in 6550084f91ccSmrg aix,*) ;; # no import file 6551084f91ccSmrg svr4,* | *,yes) # use import file 6552084f91ccSmrg # The Import File defines what to hardcode. 6553084f91ccSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6554084f91ccSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6555084f91ccSmrg ;; 6556084f91ccSmrg esac 65579418810dSmrg 6558084f91ccSmrg if test yes = "$GXX"; then 65599418810dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65609418810dSmrg # We only want to do this on AIX 4.2 and lower, the check 65619418810dSmrg # below for broken collect2 doesn't work under 4.3+ 6562084f91ccSmrg collect2name=`$CC -print-prog-name=collect2` 65639418810dSmrg if test -f "$collect2name" && 65649418810dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65659418810dSmrg then 65669418810dSmrg # We have reworked collect2 65679418810dSmrg : 65689418810dSmrg else 65699418810dSmrg # We have old collect2 65709418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65719418810dSmrg # It fails to find uninstalled libraries when the uninstalled 65729418810dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 65739418810dSmrg # to unsupported forces relinking 65749418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65759418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65769418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65779418810dSmrg fi 65789418810dSmrg esac 65799418810dSmrg shared_flag='-shared' 6580084f91ccSmrg if test yes = "$aix_use_runtimelinking"; then 6581084f91ccSmrg shared_flag=$shared_flag' $wl-G' 65829418810dSmrg fi 6583084f91ccSmrg # Need to ensure runtime linking is disabled for the traditional 6584084f91ccSmrg # shared library, or the linker may eventually find shared libraries 6585084f91ccSmrg # /with/ Import File - we do not want to mix them. 6586084f91ccSmrg shared_flag_aix='-shared' 6587084f91ccSmrg shared_flag_svr4='-shared $wl-G' 65889418810dSmrg else 65899418810dSmrg # not using gcc 6590084f91ccSmrg if test ia64 = "$host_cpu"; then 65919418810dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65929418810dSmrg # chokes on -Wl,-G. The following line is correct: 65939418810dSmrg shared_flag='-G' 65949418810dSmrg else 6595084f91ccSmrg if test yes = "$aix_use_runtimelinking"; then 6596084f91ccSmrg shared_flag='$wl-G' 65979418810dSmrg else 6598084f91ccSmrg shared_flag='$wl-bM:SRE' 65999418810dSmrg fi 6600084f91ccSmrg shared_flag_aix='$wl-bM:SRE' 6601084f91ccSmrg shared_flag_svr4='$wl-G' 66029418810dSmrg fi 66039418810dSmrg fi 66049bd41f2cSmrg 6605084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 66069418810dSmrg # It seems that -bexpall does not export symbols beginning with 66079418810dSmrg # underscore (_), so it is better to generate a list of symbols to 66089418810dSmrg # export. 66099418810dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6610084f91ccSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 66119418810dSmrg # Warning - without using the other runtime loading flags (-brtl), 66129418810dSmrg # -berok will link without error, but may produce a broken library. 6613084f91ccSmrg # The "-G" linker flag allows undefined symbols. 6614084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 66159418810dSmrg # Determine the default libpath from the value encoded in an empty 66169418810dSmrg # executable. 66170da4cdccSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6618084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66199418810dSmrg 6620084f91ccSmrg _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 66219418810dSmrg else 6622084f91ccSmrg if test ia64 = "$host_cpu"; then 6623084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 66249418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6625084f91ccSmrg _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" 66269418810dSmrg else 66279418810dSmrg # Determine the default libpath from the value encoded in an 66289418810dSmrg # empty executable. 66290da4cdccSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6630084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66319418810dSmrg # Warning - without using the other run time loading flags, 66329418810dSmrg # -berok will link without error, but may produce a broken library. 6633084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6634084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6635084f91ccSmrg if test yes = "$with_gnu_ld"; then 66360da4cdccSmrg # We only use this code for GNU lds that support --whole-archive. 6637084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66380da4cdccSmrg else 66390da4cdccSmrg # Exported symbols can be pulled into shared objects from archives 66400da4cdccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66410da4cdccSmrg fi 66429418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6643084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6644084f91ccSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6645084f91ccSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6646084f91ccSmrg if test svr4 != "$with_aix_soname"; then 6647084f91ccSmrg # This is similar to how AIX traditionally builds its shared 6648084f91ccSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6649084f91ccSmrg _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' 6650084f91ccSmrg fi 6651084f91ccSmrg if test aix != "$with_aix_soname"; then 6652084f91ccSmrg _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' 6653084f91ccSmrg else 6654084f91ccSmrg # used by -dlpreopen to get the symbols 6655084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6656084f91ccSmrg fi 6657084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66589418810dSmrg fi 66599418810dSmrg fi 66609418810dSmrg ;; 66619bd41f2cSmrg 66629418810dSmrg beos*) 66639418810dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66649418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66659418810dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66669418810dSmrg # support --undefined. This deserves some investigation. FIXME 6667084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66689418810dSmrg else 66699418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66709418810dSmrg fi 66719418810dSmrg ;; 66729bd41f2cSmrg 66739418810dSmrg chorus*) 66749418810dSmrg case $cc_basename in 66759418810dSmrg *) 66769418810dSmrg # FIXME: insert proper C++ library support 66779418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66789418810dSmrg ;; 66799418810dSmrg esac 66809418810dSmrg ;; 66819bd41f2cSmrg 66829418810dSmrg cygwin* | mingw* | pw32* | cegcc*) 66830da4cdccSmrg case $GXX,$cc_basename in 6684084f91ccSmrg ,cl* | no,cl* | ,icl* | no,icl*) 6685084f91ccSmrg # Native MSVC or ICC 66860da4cdccSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66870da4cdccSmrg # no search path for DLLs. 66880da4cdccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66890da4cdccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66900da4cdccSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 66910da4cdccSmrg _LT_TAGVAR(file_list_spec, $1)='@' 66920da4cdccSmrg # Tell ltmain to make .lib files, not .a files. 66930da4cdccSmrg libext=lib 66940da4cdccSmrg # Tell ltmain to make .dll files, not .so files. 6695084f91ccSmrg shrext_cmds=.dll 66960da4cdccSmrg # FIXME: Setting linknames here is a bad hack. 6697084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6698084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6699084f91ccSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 6700084f91ccSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6701084f91ccSmrg else 6702084f91ccSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6703084f91ccSmrg fi~ 6704084f91ccSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6705084f91ccSmrg linknames=' 67060da4cdccSmrg # The linker will not automatically build a static lib if we build a DLL. 67070da4cdccSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 67080da4cdccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67090da4cdccSmrg # Don't use ranlib 67100da4cdccSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 67110da4cdccSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6712084f91ccSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6713084f91ccSmrg case $lt_outputfile in 6714084f91ccSmrg *.exe|*.EXE) ;; 6715084f91ccSmrg *) 6716084f91ccSmrg lt_outputfile=$lt_outputfile.exe 6717084f91ccSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 6718084f91ccSmrg ;; 6719084f91ccSmrg esac~ 6720084f91ccSmrg func_to_tool_file "$lt_outputfile"~ 6721084f91ccSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6722084f91ccSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6723084f91ccSmrg $RM "$lt_outputfile.manifest"; 6724084f91ccSmrg fi' 67250da4cdccSmrg ;; 67260da4cdccSmrg *) 67270da4cdccSmrg # g++ 67280da4cdccSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67290da4cdccSmrg # as there is no search path for DLLs. 67300da4cdccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6731084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67320da4cdccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67330da4cdccSmrg _LT_TAGVAR(always_export_symbols, $1)=no 67340da4cdccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67350da4cdccSmrg 67360da4cdccSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6737084f91ccSmrg _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' 6738084f91ccSmrg # If the export-symbols file already is a .def file, use it as 6739084f91ccSmrg # is; otherwise, prepend EXPORTS... 6740084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6741084f91ccSmrg cp $export_symbols $output_objdir/$soname.def; 6742084f91ccSmrg else 6743084f91ccSmrg echo EXPORTS > $output_objdir/$soname.def; 6744084f91ccSmrg cat $export_symbols >> $output_objdir/$soname.def; 6745084f91ccSmrg fi~ 6746084f91ccSmrg $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' 67470da4cdccSmrg else 67480da4cdccSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67490da4cdccSmrg fi 67500da4cdccSmrg ;; 67510da4cdccSmrg esac 67520da4cdccSmrg ;; 67539418810dSmrg darwin* | rhapsody*) 67549418810dSmrg _LT_DARWIN_LINKER_FEATURES($1) 67559418810dSmrg ;; 67569bd41f2cSmrg 6757084f91ccSmrg os2*) 6758084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6759084f91ccSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6760084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6761084f91ccSmrg shrext_cmds=.dll 6762084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6763084f91ccSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6764084f91ccSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6765084f91ccSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6766084f91ccSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6767084f91ccSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6768084f91ccSmrg emximp -o $lib $output_objdir/$libname.def' 6769084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6770084f91ccSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6771084f91ccSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6772084f91ccSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6773084f91ccSmrg prefix_cmds="$SED"~ 6774084f91ccSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6775084f91ccSmrg prefix_cmds="$prefix_cmds -e 1d"; 6776084f91ccSmrg fi~ 6777084f91ccSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6778084f91ccSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6779084f91ccSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6780084f91ccSmrg emximp -o $lib $output_objdir/$libname.def' 6781084f91ccSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6782084f91ccSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6783084f91ccSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6784084f91ccSmrg ;; 6785084f91ccSmrg 67869418810dSmrg dgux*) 67879418810dSmrg case $cc_basename in 67889418810dSmrg ec++*) 67899418810dSmrg # FIXME: insert proper C++ library support 67909418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67919418810dSmrg ;; 67929418810dSmrg ghcx*) 67939418810dSmrg # Green Hills C++ Compiler 67949418810dSmrg # FIXME: insert proper C++ library support 67959418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67969418810dSmrg ;; 67979418810dSmrg *) 67989418810dSmrg # FIXME: insert proper C++ library support 67999418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68009418810dSmrg ;; 68019418810dSmrg esac 68029418810dSmrg ;; 68039418810dSmrg 68040da4cdccSmrg freebsd2.*) 68059418810dSmrg # C++ shared libraries reported to be fairly broken before 68069418810dSmrg # switch to ELF 68079418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68089418810dSmrg ;; 68099bd41f2cSmrg 68109418810dSmrg freebsd-elf*) 68119418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68129418810dSmrg ;; 68139bd41f2cSmrg 6814084f91ccSmrg freebsd* | dragonfly* | midnightbsd*) 68159418810dSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 68169418810dSmrg # conventions 68179418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 68189418810dSmrg ;; 68199bd41f2cSmrg 68200da4cdccSmrg haiku*) 6821084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 68220da4cdccSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68230da4cdccSmrg ;; 68240da4cdccSmrg 68259418810dSmrg hpux9*) 6826084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68279418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6828084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68299418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68309418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68319418810dSmrg # but as the default 68329418810dSmrg # location of the library. 68339418810dSmrg 68349418810dSmrg case $cc_basename in 68359418810dSmrg CC*) 68369418810dSmrg # FIXME: insert proper C++ library support 68379418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68389418810dSmrg ;; 68399418810dSmrg aCC*) 6840084f91ccSmrg _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' 68419418810dSmrg # Commands to make compiler produce verbose output that lists 68429418810dSmrg # what "hidden" libraries, object files and flags are used when 68439418810dSmrg # linking a shared library. 68449418810dSmrg # 68459418810dSmrg # There doesn't appear to be a way to prevent this compiler from 68469418810dSmrg # explicitly linking system object files so we need to strip them 68479418810dSmrg # from the output so that they don't get included in the library 68489418810dSmrg # dependencies. 6849084f91ccSmrg 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"' 68509418810dSmrg ;; 68519418810dSmrg *) 6852084f91ccSmrg if test yes = "$GXX"; then 6853084f91ccSmrg _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' 68549418810dSmrg else 68559418810dSmrg # FIXME: insert proper C++ library support 68569418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68579418810dSmrg fi 68589418810dSmrg ;; 68599418810dSmrg esac 68609418810dSmrg ;; 68619bd41f2cSmrg 68629418810dSmrg hpux10*|hpux11*) 6863084f91ccSmrg if test no = "$with_gnu_ld"; then 6864084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68659418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68669418810dSmrg 68679418810dSmrg case $host_cpu in 68689418810dSmrg hppa*64*|ia64*) 68699418810dSmrg ;; 68709418810dSmrg *) 6871084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68729418810dSmrg ;; 68739418810dSmrg esac 68749418810dSmrg fi 68759418810dSmrg case $host_cpu in 68769418810dSmrg hppa*64*|ia64*) 68779418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 68789418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68799418810dSmrg ;; 68809418810dSmrg *) 68819418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68829418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68839418810dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68849418810dSmrg # but as the default 68859418810dSmrg # location of the library. 68869418810dSmrg ;; 68879418810dSmrg esac 68889418810dSmrg 68899418810dSmrg case $cc_basename in 68909418810dSmrg CC*) 68919418810dSmrg # FIXME: insert proper C++ library support 68929418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68939418810dSmrg ;; 68949418810dSmrg aCC*) 68959418810dSmrg case $host_cpu in 68969418810dSmrg hppa*64*) 6897084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68989418810dSmrg ;; 68999418810dSmrg ia64*) 6900084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69019418810dSmrg ;; 69029418810dSmrg *) 6903084f91ccSmrg _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' 69049418810dSmrg ;; 69059418810dSmrg esac 69069418810dSmrg # Commands to make compiler produce verbose output that lists 69079418810dSmrg # what "hidden" libraries, object files and flags are used when 69089418810dSmrg # linking a shared library. 69099418810dSmrg # 69109418810dSmrg # There doesn't appear to be a way to prevent this compiler from 69119418810dSmrg # explicitly linking system object files so we need to strip them 69129418810dSmrg # from the output so that they don't get included in the library 69139418810dSmrg # dependencies. 6914084f91ccSmrg 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"' 69159418810dSmrg ;; 69169418810dSmrg *) 6917084f91ccSmrg if test yes = "$GXX"; then 6918084f91ccSmrg if test no = "$with_gnu_ld"; then 69199418810dSmrg case $host_cpu in 69209418810dSmrg hppa*64*) 6921084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69229418810dSmrg ;; 69239418810dSmrg ia64*) 6924084f91ccSmrg _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' 69259418810dSmrg ;; 69269418810dSmrg *) 6927084f91ccSmrg _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' 69289418810dSmrg ;; 69299418810dSmrg esac 69309418810dSmrg fi 69319418810dSmrg else 69329418810dSmrg # FIXME: insert proper C++ library support 69339418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 69349418810dSmrg fi 69359418810dSmrg ;; 69369418810dSmrg esac 69379418810dSmrg ;; 69389bd41f2cSmrg 69399418810dSmrg interix[[3-9]]*) 69409418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 69419418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6942084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6943084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69449418810dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69459418810dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69469418810dSmrg # default) and relocated if they conflict, which is a slow very memory 69479418810dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 69489418810dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69499418810dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6950084f91ccSmrg _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' 6951084f91ccSmrg _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' 69529418810dSmrg ;; 69539418810dSmrg irix5* | irix6*) 69549418810dSmrg case $cc_basename in 69559418810dSmrg CC*) 69569418810dSmrg # SGI C++ 6957084f91ccSmrg _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' 69589418810dSmrg 69599418810dSmrg # Archives containing C++ object files must be created using 69609418810dSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69619418810dSmrg # necessary to make sure instantiated templates are included 69629418810dSmrg # in the archive. 69639418810dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69649418810dSmrg ;; 69659418810dSmrg *) 6966084f91ccSmrg if test yes = "$GXX"; then 6967084f91ccSmrg if test no = "$with_gnu_ld"; then 6968084f91ccSmrg _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' 69699418810dSmrg else 6970084f91ccSmrg _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' 69719418810dSmrg fi 69729418810dSmrg fi 69739418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69749418810dSmrg ;; 69759418810dSmrg esac 6976084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69779418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69789418810dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 69799418810dSmrg ;; 69809bd41f2cSmrg 6981084f91ccSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69829418810dSmrg case $cc_basename in 69839418810dSmrg KCC*) 69849418810dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69859418810dSmrg 69869418810dSmrg # KCC will only create a shared library if the output file 69879418810dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69889418810dSmrg # to its proper name (with version) after linking. 6989084f91ccSmrg _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' 6990084f91ccSmrg _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' 69919418810dSmrg # Commands to make compiler produce verbose output that lists 69929418810dSmrg # what "hidden" libraries, object files and flags are used when 69939418810dSmrg # linking a shared library. 69949418810dSmrg # 69959418810dSmrg # There doesn't appear to be a way to prevent this compiler from 69969418810dSmrg # explicitly linking system object files so we need to strip them 69979418810dSmrg # from the output so that they don't get included in the library 69989418810dSmrg # dependencies. 6999084f91ccSmrg 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"' 70009418810dSmrg 7001084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70039418810dSmrg 70049418810dSmrg # Archives containing C++ object files must be created using 70059418810dSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 70069418810dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 70079418810dSmrg ;; 70089418810dSmrg icpc* | ecpc* ) 70099418810dSmrg # Intel C++ 70109418810dSmrg with_gnu_ld=yes 70119418810dSmrg # version 8.0 and above of icpc choke on multiply defined symbols 70129418810dSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 70139418810dSmrg # earlier do not add the objects themselves. 70149418810dSmrg case `$CC -V 2>&1` in 70159418810dSmrg *"Version 7."*) 7016084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7017084f91ccSmrg _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' 70189418810dSmrg ;; 70199418810dSmrg *) # Version 8.0 or newer 70209418810dSmrg tmp_idyn= 70219418810dSmrg case $host_cpu in 70229418810dSmrg ia64*) tmp_idyn=' -i_dynamic';; 70239418810dSmrg esac 7024084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7025084f91ccSmrg _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' 70269418810dSmrg ;; 70279418810dSmrg esac 70289418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7029084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7030084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7031084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70329418810dSmrg ;; 70339418810dSmrg pgCC* | pgcpp*) 70349418810dSmrg # Portland Group C++ compiler 70359418810dSmrg case `$CC -V` in 70360da4cdccSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70379418810dSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7038084f91ccSmrg rm -rf $tpldir~ 7039084f91ccSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7040084f91ccSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70419418810dSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7042084f91ccSmrg rm -rf $tpldir~ 7043084f91ccSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7044084f91ccSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7045084f91ccSmrg $RANLIB $oldlib' 70469418810dSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7047084f91ccSmrg rm -rf $tpldir~ 7048084f91ccSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7049084f91ccSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70509418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7051084f91ccSmrg rm -rf $tpldir~ 7052084f91ccSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7053084f91ccSmrg $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' 70549418810dSmrg ;; 70550da4cdccSmrg *) # Version 6 and above use weak symbols 7056084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7057084f91ccSmrg _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' 70589418810dSmrg ;; 70599418810dSmrg esac 70609bd41f2cSmrg 7061084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7062084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7063084f91ccSmrg _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' 70649418810dSmrg ;; 70659418810dSmrg cxx*) 70669418810dSmrg # Compaq C++ 7067084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7068084f91ccSmrg _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' 70699bd41f2cSmrg 70709418810dSmrg runpath_var=LD_RUN_PATH 70719418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70729418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7073d075918cSmrg 70749418810dSmrg # Commands to make compiler produce verbose output that lists 70759418810dSmrg # what "hidden" libraries, object files and flags are used when 70769418810dSmrg # linking a shared library. 70779418810dSmrg # 70789418810dSmrg # There doesn't appear to be a way to prevent this compiler from 70799418810dSmrg # explicitly linking system object files so we need to strip them 70809418810dSmrg # from the output so that they don't get included in the library 70819418810dSmrg # dependencies. 7082084f91ccSmrg 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' 70839418810dSmrg ;; 70840da4cdccSmrg xl* | mpixl* | bgxl*) 70859418810dSmrg # IBM XL 8.0 on PPC, with GNU ld 7086084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7087084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7088084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7089084f91ccSmrg if test yes = "$supports_anon_versioning"; then 70909418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7091084f91ccSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7092084f91ccSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7093084f91ccSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70949418810dSmrg fi 70959418810dSmrg ;; 70969418810dSmrg *) 7097084f91ccSmrg case `$CC -V 2>&1 | $SED 5q` in 70989418810dSmrg *Sun\ C*) 70999418810dSmrg # Sun C++ 5.9 71009418810dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7101084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7102084f91ccSmrg _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' 71039418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7104084f91ccSmrg _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' 71059418810dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 71069418810dSmrg 71079418810dSmrg # Not sure whether something based on 71089418810dSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 71099418810dSmrg # would be better. 71100da4cdccSmrg output_verbose_link_cmd='func_echo_all' 71119418810dSmrg 71129418810dSmrg # Archives containing C++ object files must be created using 71139418810dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 71149418810dSmrg # necessary to make sure instantiated templates are included 71159418810dSmrg # in the archive. 71169418810dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 71179418810dSmrg ;; 71189418810dSmrg esac 71199418810dSmrg ;; 71209418810dSmrg esac 71219418810dSmrg ;; 71229bd41f2cSmrg 71239418810dSmrg lynxos*) 71249418810dSmrg # FIXME: insert proper C++ library support 71259418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71269418810dSmrg ;; 71279bd41f2cSmrg 71289418810dSmrg m88k*) 71299418810dSmrg # FIXME: insert proper C++ library support 71309418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71319418810dSmrg ;; 71329bd41f2cSmrg 71339418810dSmrg mvs*) 71349418810dSmrg case $cc_basename in 71359418810dSmrg cxx*) 71369418810dSmrg # FIXME: insert proper C++ library support 71379418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71389418810dSmrg ;; 71399418810dSmrg *) 71409418810dSmrg # FIXME: insert proper C++ library support 71419418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71429418810dSmrg ;; 71439418810dSmrg esac 71449418810dSmrg ;; 71459bd41f2cSmrg 71469418810dSmrg netbsd*) 71479418810dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71489418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71499418810dSmrg wlarc= 71509418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71519418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71529418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71539418810dSmrg fi 71549418810dSmrg # Workaround some broken pre-1.5 toolchains 71559418810dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71569418810dSmrg ;; 71579bd41f2cSmrg 71589418810dSmrg *nto* | *qnx*) 71599418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 71609418810dSmrg ;; 71619bd41f2cSmrg 7162084f91ccSmrg openbsd* | bitrig*) 71639418810dSmrg if test -f /usr/libexec/ld.so; then 71649418810dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71659418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71669418810dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71679418810dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7168084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7169084f91ccSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7170084f91ccSmrg _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' 7171084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7172084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71739418810dSmrg fi 71740da4cdccSmrg output_verbose_link_cmd=func_echo_all 71759418810dSmrg else 71769418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71779418810dSmrg fi 71789418810dSmrg ;; 71799bd41f2cSmrg 71809418810dSmrg osf3* | osf4* | osf5*) 71819418810dSmrg case $cc_basename in 71829418810dSmrg KCC*) 71839418810dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71849418810dSmrg 71859418810dSmrg # KCC will only create a shared library if the output file 71869418810dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71879418810dSmrg # to its proper name (with version) after linking. 7188084f91ccSmrg _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' 71899418810dSmrg 7190084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71919418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71929418810dSmrg 71939418810dSmrg # Archives containing C++ object files must be created using 71949418810dSmrg # the KAI C++ compiler. 71959418810dSmrg case $host in 71969418810dSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71979418810dSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71989418810dSmrg esac 71999418810dSmrg ;; 72009418810dSmrg RCC*) 72019418810dSmrg # Rational C++ 2.4.1 72029418810dSmrg # FIXME: insert proper C++ library support 72039418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72049418810dSmrg ;; 72059418810dSmrg cxx*) 72069418810dSmrg case $host in 72079418810dSmrg osf3*) 7208084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7209084f91ccSmrg _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' 7210084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72119418810dSmrg ;; 72129418810dSmrg *) 72139418810dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7214084f91ccSmrg _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' 72159418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7216084f91ccSmrg echo "-hidden">> $lib.exp~ 7217084f91ccSmrg $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~ 7218084f91ccSmrg $RM $lib.exp' 72199418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 72209418810dSmrg ;; 72219418810dSmrg esac 72229bd41f2cSmrg 72239418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72249bd41f2cSmrg 72259418810dSmrg # Commands to make compiler produce verbose output that lists 72269418810dSmrg # what "hidden" libraries, object files and flags are used when 72279418810dSmrg # linking a shared library. 72289418810dSmrg # 72299418810dSmrg # There doesn't appear to be a way to prevent this compiler from 72309418810dSmrg # explicitly linking system object files so we need to strip them 72319418810dSmrg # from the output so that they don't get included in the library 72329418810dSmrg # dependencies. 7233084f91ccSmrg 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"' 72349418810dSmrg ;; 72359418810dSmrg *) 7236084f91ccSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7237084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72389418810dSmrg case $host in 72399418810dSmrg osf3*) 7240084f91ccSmrg _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' 72419418810dSmrg ;; 72429418810dSmrg *) 7243084f91ccSmrg _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' 72449418810dSmrg ;; 72459418810dSmrg esac 72469418810dSmrg 7247084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72489418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72499418810dSmrg 72509418810dSmrg # Commands to make compiler produce verbose output that lists 72519418810dSmrg # what "hidden" libraries, object files and flags are used when 72529418810dSmrg # linking a shared library. 72530da4cdccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72549418810dSmrg 72559418810dSmrg else 72569418810dSmrg # FIXME: insert proper C++ library support 72579418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72589418810dSmrg fi 72599418810dSmrg ;; 72609418810dSmrg esac 72619418810dSmrg ;; 72629bd41f2cSmrg 72639418810dSmrg psos*) 72649418810dSmrg # FIXME: insert proper C++ library support 72659418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72669418810dSmrg ;; 72679bd41f2cSmrg 72689418810dSmrg sunos4*) 72699418810dSmrg case $cc_basename in 72709418810dSmrg CC*) 72719418810dSmrg # Sun C++ 4.x 72729418810dSmrg # FIXME: insert proper C++ library support 72739418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72749418810dSmrg ;; 72759418810dSmrg lcc*) 72769418810dSmrg # Lucid 72779418810dSmrg # FIXME: insert proper C++ library support 72789418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72799418810dSmrg ;; 72809418810dSmrg *) 72819418810dSmrg # FIXME: insert proper C++ library support 72829418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72839418810dSmrg ;; 72849418810dSmrg esac 72859418810dSmrg ;; 72869bd41f2cSmrg 72879418810dSmrg solaris*) 72889418810dSmrg case $cc_basename in 72890da4cdccSmrg CC* | sunCC*) 72909418810dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 72919418810dSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72929418810dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7293084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72949418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7295084f91ccSmrg $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' 72969418810dSmrg 72979418810dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72989418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72999418810dSmrg case $host_os in 73009418810dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73019418810dSmrg *) 73029418810dSmrg # The compiler driver will combine and reorder linker options, 7303084f91ccSmrg # but understands '-z linker_flag'. 73049418810dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 73059418810dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 73069418810dSmrg ;; 73079418810dSmrg esac 73089418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73099bd41f2cSmrg 73100da4cdccSmrg output_verbose_link_cmd='func_echo_all' 73119bd41f2cSmrg 73129418810dSmrg # Archives containing C++ object files must be created using 73139418810dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 73149418810dSmrg # necessary to make sure instantiated templates are included 73159418810dSmrg # in the archive. 73169418810dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 73179418810dSmrg ;; 73189418810dSmrg gcx*) 73199418810dSmrg # Green Hills C++ Compiler 7320084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73219bd41f2cSmrg 73229418810dSmrg # The C++ compiler must be used to create the archive. 73239418810dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 73249418810dSmrg ;; 73259418810dSmrg *) 73269418810dSmrg # GNU C++ compiler with Solaris linker 7327084f91ccSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7328084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73299418810dSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7330084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73319418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7332084f91ccSmrg $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' 73339418810dSmrg 73349418810dSmrg # Commands to make compiler produce verbose output that lists 73359418810dSmrg # what "hidden" libraries, object files and flags are used when 73369418810dSmrg # linking a shared library. 73370da4cdccSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73389418810dSmrg else 7339084f91ccSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73409418810dSmrg # platform. 7341084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73429418810dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7343084f91ccSmrg $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' 73449418810dSmrg 73459418810dSmrg # Commands to make compiler produce verbose output that lists 73469418810dSmrg # what "hidden" libraries, object files and flags are used when 73479418810dSmrg # linking a shared library. 73480da4cdccSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73499418810dSmrg fi 73509418810dSmrg 7351084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73529418810dSmrg case $host_os in 73539418810dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73549418810dSmrg *) 7355084f91ccSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73569418810dSmrg ;; 73579418810dSmrg esac 73589418810dSmrg fi 73599418810dSmrg ;; 73609418810dSmrg esac 73619418810dSmrg ;; 73629bd41f2cSmrg 73639418810dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7364084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73659418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73669418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73679418810dSmrg runpath_var='LD_RUN_PATH' 73689bd41f2cSmrg 73699418810dSmrg case $cc_basename in 73709418810dSmrg CC*) 7371084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7372084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73739418810dSmrg ;; 73749418810dSmrg *) 7375084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7376084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73779418810dSmrg ;; 73789418810dSmrg esac 73799418810dSmrg ;; 73809bd41f2cSmrg 73819418810dSmrg sysv5* | sco3.2v5* | sco5v6*) 7382084f91ccSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 73839418810dSmrg # link with -lc, and that would cause any symbols used from libc to 73849418810dSmrg # always be unresolved, which means just about no library would 73859418810dSmrg # ever link correctly. If we're not using GNU ld we use -z text 73869418810dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 73879418810dSmrg # as -z defs. 7388084f91ccSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7389084f91ccSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73909418810dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73919418810dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7392084f91ccSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73939418810dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73949418810dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7395084f91ccSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73969418810dSmrg runpath_var='LD_RUN_PATH' 73979bd41f2cSmrg 73989418810dSmrg case $cc_basename in 73999418810dSmrg CC*) 7400084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7401084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74020da4cdccSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7403084f91ccSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 74040da4cdccSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7405084f91ccSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 74069418810dSmrg ;; 74079418810dSmrg *) 7408084f91ccSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7409084f91ccSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74109418810dSmrg ;; 74119418810dSmrg esac 74129418810dSmrg ;; 74139bd41f2cSmrg 74149418810dSmrg tandem*) 74159418810dSmrg case $cc_basename in 74169418810dSmrg NCC*) 74179418810dSmrg # NonStop-UX NCC 3.20 74189418810dSmrg # FIXME: insert proper C++ library support 74199418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74209418810dSmrg ;; 74219418810dSmrg *) 74229418810dSmrg # FIXME: insert proper C++ library support 74239418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74249418810dSmrg ;; 74259418810dSmrg esac 74269418810dSmrg ;; 74279bd41f2cSmrg 74289418810dSmrg vxworks*) 74299418810dSmrg # FIXME: insert proper C++ library support 74309418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74319418810dSmrg ;; 74329bd41f2cSmrg 74339418810dSmrg *) 74349418810dSmrg # FIXME: insert proper C++ library support 74359418810dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74369418810dSmrg ;; 74379418810dSmrg esac 74389bd41f2cSmrg 74399418810dSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7440084f91ccSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74419418810dSmrg 7442084f91ccSmrg _LT_TAGVAR(GCC, $1)=$GXX 7443084f91ccSmrg _LT_TAGVAR(LD, $1)=$LD 74449418810dSmrg 74459418810dSmrg ## CAVEAT EMPTOR: 74469418810dSmrg ## There is no encapsulation within the following macros, do not change 74479418810dSmrg ## the running order or otherwise move them around unless you know exactly 74489418810dSmrg ## what you are doing... 74499418810dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74509418810dSmrg _LT_COMPILER_PIC($1) 74519418810dSmrg _LT_COMPILER_C_O($1) 74529418810dSmrg _LT_COMPILER_FILE_LOCKS($1) 74539418810dSmrg _LT_LINKER_SHLIBS($1) 74549418810dSmrg _LT_SYS_DYNAMIC_LINKER($1) 74559418810dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74569418810dSmrg 74579418810dSmrg _LT_CONFIG($1) 74589418810dSmrg fi # test -n "$compiler" 74599418810dSmrg 74609418810dSmrg CC=$lt_save_CC 74610da4cdccSmrg CFLAGS=$lt_save_CFLAGS 74629418810dSmrg LDCXX=$LD 74639418810dSmrg LD=$lt_save_LD 74649418810dSmrg GCC=$lt_save_GCC 74659418810dSmrg with_gnu_ld=$lt_save_with_gnu_ld 74669418810dSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 74679418810dSmrg lt_cv_path_LD=$lt_save_path_LD 74689418810dSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74699418810dSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7470084f91ccSmrgfi # test yes != "$_lt_caught_CXX_error" 74719bd41f2cSmrg 74729418810dSmrgAC_LANG_POP 74739418810dSmrg])# _LT_LANG_CXX_CONFIG 74749bd41f2cSmrg 74759bd41f2cSmrg 74760da4cdccSmrg# _LT_FUNC_STRIPNAME_CNF 74770da4cdccSmrg# ---------------------- 74780da4cdccSmrg# func_stripname_cnf prefix suffix name 74790da4cdccSmrg# strip PREFIX and SUFFIX off of NAME. 74800da4cdccSmrg# PREFIX and SUFFIX must not contain globbing or regex special 74810da4cdccSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74820da4cdccSmrg# dot (in which case that matches only a dot). 74830da4cdccSmrg# 74840da4cdccSmrg# This function is identical to the (non-XSI) version of func_stripname, 74850da4cdccSmrg# except this one can be used by m4 code that may be executed by configure, 74860da4cdccSmrg# rather than the libtool script. 74870da4cdccSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74880da4cdccSmrgAC_REQUIRE([_LT_DECL_SED]) 74890da4cdccSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74900da4cdccSmrgfunc_stripname_cnf () 74910da4cdccSmrg{ 7492084f91ccSmrg case @S|@2 in 7493084f91ccSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7494084f91ccSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74950da4cdccSmrg esac 74960da4cdccSmrg} # func_stripname_cnf 74970da4cdccSmrg])# _LT_FUNC_STRIPNAME_CNF 74980da4cdccSmrg 7499084f91ccSmrg 75009418810dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 75019418810dSmrg# --------------------------------- 75029418810dSmrg# Figure out "hidden" library dependencies from verbose 75039418810dSmrg# compiler output when linking a shared library. 75049418810dSmrg# Parse the compiler output and extract the necessary 75059418810dSmrg# objects, libraries and library flags. 75069418810dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 75079418810dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 75080da4cdccSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 75099418810dSmrg# Dependencies to place before and after the object being linked: 75109418810dSmrg_LT_TAGVAR(predep_objects, $1)= 75119418810dSmrg_LT_TAGVAR(postdep_objects, $1)= 75129418810dSmrg_LT_TAGVAR(predeps, $1)= 75139418810dSmrg_LT_TAGVAR(postdeps, $1)= 75149418810dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 75159bd41f2cSmrg 75169418810dSmrgdnl we can't use the lt_simple_compile_test_code here, 75179418810dSmrgdnl because it contains code intended for an executable, 75189418810dSmrgdnl not a library. It's possible we should let each 75199418810dSmrgdnl tag define a new lt_????_link_test_code variable, 75209418810dSmrgdnl but it's only used here... 75219418810dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 75229418810dSmrgint a; 75239418810dSmrgvoid foo (void) { a = 0; } 75249418810dSmrg_LT_EOF 75259418810dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 75269418810dSmrgclass Foo 75279418810dSmrg{ 75289418810dSmrgpublic: 75299418810dSmrg Foo (void) { a = 0; } 75309418810dSmrgprivate: 75319418810dSmrg int a; 75329418810dSmrg}; 75339418810dSmrg_LT_EOF 75349418810dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75359418810dSmrg subroutine foo 75369418810dSmrg implicit none 75379418810dSmrg integer*4 a 75389418810dSmrg a=0 75399418810dSmrg return 75409418810dSmrg end 75419418810dSmrg_LT_EOF 75429418810dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75439418810dSmrg subroutine foo 75449418810dSmrg implicit none 75459418810dSmrg integer a 75469418810dSmrg a=0 75479418810dSmrg return 75489418810dSmrg end 75499418810dSmrg_LT_EOF 75509418810dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75519418810dSmrgpublic class foo { 75529418810dSmrg private int a; 75539418810dSmrg public void bar (void) { 75549418810dSmrg a = 0; 75559418810dSmrg } 75569418810dSmrg}; 75579418810dSmrg_LT_EOF 75580da4cdccSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75590da4cdccSmrgpackage foo 75600da4cdccSmrgfunc foo() { 75610da4cdccSmrg} 75620da4cdccSmrg_LT_EOF 75639418810dSmrg]) 75640da4cdccSmrg 75650da4cdccSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 75660da4cdccSmrgcase "$CC $CFLAGS " in #( 75670da4cdccSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75680da4cdccSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75690da4cdccSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75700da4cdccSmrgesac 75710da4cdccSmrg 75729418810dSmrgdnl Parse the compiler output and extract the necessary 75739418810dSmrgdnl objects, libraries and library flags. 75749418810dSmrgif AC_TRY_EVAL(ac_compile); then 75759418810dSmrg # Parse the compiler output and extract the necessary 75769418810dSmrg # objects, libraries and library flags. 75779bd41f2cSmrg 75789418810dSmrg # Sentinel used to keep track of whether or not we are before 75799418810dSmrg # the conftest object file. 75809418810dSmrg pre_test_object_deps_done=no 75819bd41f2cSmrg 75829418810dSmrg for p in `eval "$output_verbose_link_cmd"`; do 7583084f91ccSmrg case $prev$p in 75849bd41f2cSmrg 75859418810dSmrg -L* | -R* | -l*) 75869418810dSmrg # Some compilers place space between "-{L,R}" and the path. 75879418810dSmrg # Remove the space. 7588084f91ccSmrg if test x-L = "$p" || 7589084f91ccSmrg test x-R = "$p"; then 75909418810dSmrg prev=$p 75919418810dSmrg continue 75929418810dSmrg fi 75939bd41f2cSmrg 75940da4cdccSmrg # Expand the sysroot to ease extracting the directories later. 75950da4cdccSmrg if test -z "$prev"; then 75960da4cdccSmrg case $p in 75970da4cdccSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75980da4cdccSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75990da4cdccSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 76000da4cdccSmrg esac 76010da4cdccSmrg fi 76020da4cdccSmrg case $p in 76030da4cdccSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 76040da4cdccSmrg esac 7605084f91ccSmrg if test no = "$pre_test_object_deps_done"; then 7606084f91ccSmrg case $prev in 76070da4cdccSmrg -L | -R) 76089418810dSmrg # Internal compiler library paths should come after those 76099418810dSmrg # provided the user. The postdeps already come after the 76109418810dSmrg # user supplied libs so there is no need to process them. 76119418810dSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7612084f91ccSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 76139418810dSmrg else 7614084f91ccSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 76159418810dSmrg fi 76169418810dSmrg ;; 76179418810dSmrg # The "-l" case would never come before the object being 76189418810dSmrg # linked, so don't bother handling this case. 76199418810dSmrg esac 76209418810dSmrg else 76219418810dSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7622084f91ccSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 76239418810dSmrg else 7624084f91ccSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 76259418810dSmrg fi 76269418810dSmrg fi 76270da4cdccSmrg prev= 76289418810dSmrg ;; 76299bd41f2cSmrg 76300da4cdccSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 76319418810dSmrg *.$objext) 76329418810dSmrg # This assumes that the test object file only shows up 76339418810dSmrg # once in the compiler output. 76349418810dSmrg if test "$p" = "conftest.$objext"; then 76359418810dSmrg pre_test_object_deps_done=yes 76369418810dSmrg continue 76379418810dSmrg fi 76389bd41f2cSmrg 7639084f91ccSmrg if test no = "$pre_test_object_deps_done"; then 76409418810dSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7641084f91ccSmrg _LT_TAGVAR(predep_objects, $1)=$p 76429418810dSmrg else 76439418810dSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76449418810dSmrg fi 76459418810dSmrg else 76469418810dSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7647084f91ccSmrg _LT_TAGVAR(postdep_objects, $1)=$p 76489418810dSmrg else 76499418810dSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76509418810dSmrg fi 76519418810dSmrg fi 76529418810dSmrg ;; 76539bd41f2cSmrg 76549418810dSmrg *) ;; # Ignore the rest. 76559bd41f2cSmrg 76569418810dSmrg esac 76579418810dSmrg done 76589bd41f2cSmrg 76599418810dSmrg # Clean up. 76609418810dSmrg rm -f a.out a.exe 76619bd41f2cSmrgelse 76629418810dSmrg echo "libtool.m4: error: problem compiling $1 test program" 76639bd41f2cSmrgfi 76649bd41f2cSmrg 76659418810dSmrg$RM -f confest.$objext 76660da4cdccSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76679bd41f2cSmrg 76689418810dSmrg# PORTME: override above test on systems where it is broken 76699418810dSmrgm4_if([$1], [CXX], 76709418810dSmrg[case $host_os in 76719418810dSmrginterix[[3-9]]*) 76729418810dSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76739418810dSmrg # hack all around it, let's just trust "g++" to DTRT. 76749418810dSmrg _LT_TAGVAR(predep_objects,$1)= 76759418810dSmrg _LT_TAGVAR(postdep_objects,$1)= 76769418810dSmrg _LT_TAGVAR(postdeps,$1)= 76779418810dSmrg ;; 76789418810dSmrgesac 76799418810dSmrg]) 76809bd41f2cSmrg 76819418810dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 76829418810dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76839418810dSmrgesac 76849418810dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76859418810dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7686084f91ccSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76879418810dSmrgfi 76889418810dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76899418810dSmrg [The directories searched by this compiler when creating a shared library]) 76909418810dSmrg_LT_TAGDECL([], [predep_objects], [1], 76919418810dSmrg [Dependencies to place before and after the objects being linked to 76929418810dSmrg create a shared library]) 76939418810dSmrg_LT_TAGDECL([], [postdep_objects], [1]) 76949418810dSmrg_LT_TAGDECL([], [predeps], [1]) 76959418810dSmrg_LT_TAGDECL([], [postdeps], [1]) 76969418810dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76979418810dSmrg [The library search path used internally by the compiler when linking 76989418810dSmrg a shared library]) 76999418810dSmrg])# _LT_SYS_HIDDEN_LIBDEPS 77009418810dSmrg 77019418810dSmrg 77029418810dSmrg# _LT_LANG_F77_CONFIG([TAG]) 77039418810dSmrg# -------------------------- 77049418810dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 77059418810dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7706084f91ccSmrg# to write the compiler configuration to 'libtool'. 77079418810dSmrgm4_defun([_LT_LANG_F77_CONFIG], 77080da4cdccSmrg[AC_LANG_PUSH(Fortran 77) 7709084f91ccSmrgif test -z "$F77" || test no = "$F77"; then 77100da4cdccSmrg _lt_disable_F77=yes 77110da4cdccSmrgfi 77129bd41f2cSmrg 77139418810dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 77149418810dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 77159418810dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 77169418810dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 77179418810dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 77189418810dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 77199418810dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 77209418810dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 77219418810dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 77229418810dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 77239418810dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 77249418810dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 77259418810dSmrg_LT_TAGVAR(module_cmds, $1)= 77269418810dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 77279418810dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77289418810dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77290da4cdccSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77300da4cdccSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77319418810dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 77329418810dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77339418810dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77349bd41f2cSmrg 77359418810dSmrg# Source file extension for f77 test sources. 77369418810dSmrgac_ext=f 77379bd41f2cSmrg 77389418810dSmrg# Object file extension for compiled f77 test sources. 77399418810dSmrgobjext=o 77409418810dSmrg_LT_TAGVAR(objext, $1)=$objext 77419418810dSmrg 77429418810dSmrg# No sense in running all these tests if we already determined that 77439418810dSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 77449418810dSmrg# are currently assumed to apply to all compilers on this platform, 77459418810dSmrg# and will be corrupted by setting them based on a non-working compiler. 7746084f91ccSmrgif test yes != "$_lt_disable_F77"; then 77479418810dSmrg # Code to be used in simple compile tests 77489418810dSmrg lt_simple_compile_test_code="\ 77499418810dSmrg subroutine t 77509418810dSmrg return 77519418810dSmrg end 77529418810dSmrg" 77539bd41f2cSmrg 77549418810dSmrg # Code to be used in simple link tests 77559418810dSmrg lt_simple_link_test_code="\ 77569418810dSmrg program t 77579418810dSmrg end 77589418810dSmrg" 77599bd41f2cSmrg 77609418810dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77619418810dSmrg _LT_TAG_COMPILER 77629bd41f2cSmrg 77639418810dSmrg # save warnings/boilerplate of simple test code 77649418810dSmrg _LT_COMPILER_BOILERPLATE 77659418810dSmrg _LT_LINKER_BOILERPLATE 77669bd41f2cSmrg 77679418810dSmrg # Allow CC to be a program name with arguments. 7768084f91ccSmrg lt_save_CC=$CC 77699418810dSmrg lt_save_GCC=$GCC 77700da4cdccSmrg lt_save_CFLAGS=$CFLAGS 77719418810dSmrg CC=${F77-"f77"} 77720da4cdccSmrg CFLAGS=$FFLAGS 77739418810dSmrg compiler=$CC 77749418810dSmrg _LT_TAGVAR(compiler, $1)=$CC 77759418810dSmrg _LT_CC_BASENAME([$compiler]) 77769418810dSmrg GCC=$G77 77779418810dSmrg if test -n "$compiler"; then 77789418810dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77799418810dSmrg AC_MSG_RESULT([$can_build_shared]) 77809bd41f2cSmrg 77819418810dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7782084f91ccSmrg test no = "$can_build_shared" && enable_shared=no 77839bd41f2cSmrg 77849418810dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 77859418810dSmrg # are all built from PIC. 77869418810dSmrg case $host_os in 77879418810dSmrg aix3*) 7788084f91ccSmrg test yes = "$enable_shared" && enable_static=no 77899418810dSmrg if test -n "$RANLIB"; then 77909418810dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77919418810dSmrg postinstall_cmds='$RANLIB $lib' 77929418810dSmrg fi 77939418810dSmrg ;; 77949418810dSmrg aix[[4-9]]*) 7795084f91ccSmrg if test ia64 != "$host_cpu"; then 7796084f91ccSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7797084f91ccSmrg yes,aix,yes) ;; # shared object as lib.so file only 7798084f91ccSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7799084f91ccSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7800084f91ccSmrg esac 78019418810dSmrg fi 78029418810dSmrg ;; 78039418810dSmrg esac 78049418810dSmrg AC_MSG_RESULT([$enable_shared]) 78059418810dSmrg 78069418810dSmrg AC_MSG_CHECKING([whether to build static libraries]) 78079418810dSmrg # Make sure either enable_shared or enable_static is yes. 7808084f91ccSmrg test yes = "$enable_shared" || enable_static=yes 78099418810dSmrg AC_MSG_RESULT([$enable_static]) 78109418810dSmrg 7811084f91ccSmrg _LT_TAGVAR(GCC, $1)=$G77 7812084f91ccSmrg _LT_TAGVAR(LD, $1)=$LD 78139418810dSmrg 78149418810dSmrg ## CAVEAT EMPTOR: 78159418810dSmrg ## There is no encapsulation within the following macros, do not change 78169418810dSmrg ## the running order or otherwise move them around unless you know exactly 78179418810dSmrg ## what you are doing... 78189418810dSmrg _LT_COMPILER_PIC($1) 78199418810dSmrg _LT_COMPILER_C_O($1) 78209418810dSmrg _LT_COMPILER_FILE_LOCKS($1) 78219418810dSmrg _LT_LINKER_SHLIBS($1) 78229418810dSmrg _LT_SYS_DYNAMIC_LINKER($1) 78239418810dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 78249418810dSmrg 78259418810dSmrg _LT_CONFIG($1) 78269418810dSmrg fi # test -n "$compiler" 78279418810dSmrg 78289418810dSmrg GCC=$lt_save_GCC 7829084f91ccSmrg CC=$lt_save_CC 7830084f91ccSmrg CFLAGS=$lt_save_CFLAGS 7831084f91ccSmrgfi # test yes != "$_lt_disable_F77" 78329bd41f2cSmrg 78339418810dSmrgAC_LANG_POP 78349418810dSmrg])# _LT_LANG_F77_CONFIG 78359bd41f2cSmrg 78369bd41f2cSmrg 78379418810dSmrg# _LT_LANG_FC_CONFIG([TAG]) 78389418810dSmrg# ------------------------- 78399418810dSmrg# Ensure that the configuration variables for a Fortran compiler are 78409418810dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7841084f91ccSmrg# to write the compiler configuration to 'libtool'. 78429418810dSmrgm4_defun([_LT_LANG_FC_CONFIG], 78430da4cdccSmrg[AC_LANG_PUSH(Fortran) 78440da4cdccSmrg 7845084f91ccSmrgif test -z "$FC" || test no = "$FC"; then 78460da4cdccSmrg _lt_disable_FC=yes 78470da4cdccSmrgfi 78489418810dSmrg 78499418810dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78509418810dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 78519418810dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 78529418810dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78539418810dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78549418810dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 78559418810dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78569418810dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78579418810dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78589418810dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78599418810dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 78609418810dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 78619418810dSmrg_LT_TAGVAR(module_cmds, $1)= 78629418810dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 78639418810dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78649418810dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78650da4cdccSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78660da4cdccSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78679418810dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 78689418810dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78699418810dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78709418810dSmrg 78719418810dSmrg# Source file extension for fc test sources. 78729418810dSmrgac_ext=${ac_fc_srcext-f} 78739418810dSmrg 78749418810dSmrg# Object file extension for compiled fc test sources. 78759418810dSmrgobjext=o 78769418810dSmrg_LT_TAGVAR(objext, $1)=$objext 78779418810dSmrg 78789418810dSmrg# No sense in running all these tests if we already determined that 78799418810dSmrg# the FC compiler isn't working. Some variables (like enable_shared) 78809418810dSmrg# are currently assumed to apply to all compilers on this platform, 78819418810dSmrg# and will be corrupted by setting them based on a non-working compiler. 7882084f91ccSmrgif test yes != "$_lt_disable_FC"; then 78839418810dSmrg # Code to be used in simple compile tests 78849418810dSmrg lt_simple_compile_test_code="\ 78859418810dSmrg subroutine t 78869418810dSmrg return 78879418810dSmrg end 78889418810dSmrg" 78899bd41f2cSmrg 78909418810dSmrg # Code to be used in simple link tests 78919418810dSmrg lt_simple_link_test_code="\ 78929418810dSmrg program t 78939418810dSmrg end 78949418810dSmrg" 78959bd41f2cSmrg 78969418810dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78979418810dSmrg _LT_TAG_COMPILER 78989bd41f2cSmrg 78999418810dSmrg # save warnings/boilerplate of simple test code 79009418810dSmrg _LT_COMPILER_BOILERPLATE 79019418810dSmrg _LT_LINKER_BOILERPLATE 79029bd41f2cSmrg 79039418810dSmrg # Allow CC to be a program name with arguments. 7904084f91ccSmrg lt_save_CC=$CC 79059418810dSmrg lt_save_GCC=$GCC 79060da4cdccSmrg lt_save_CFLAGS=$CFLAGS 79079418810dSmrg CC=${FC-"f95"} 79080da4cdccSmrg CFLAGS=$FCFLAGS 79099418810dSmrg compiler=$CC 79109418810dSmrg GCC=$ac_cv_fc_compiler_gnu 79119418810dSmrg 79129418810dSmrg _LT_TAGVAR(compiler, $1)=$CC 79139418810dSmrg _LT_CC_BASENAME([$compiler]) 79149418810dSmrg 79159418810dSmrg if test -n "$compiler"; then 79169418810dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 79179418810dSmrg AC_MSG_RESULT([$can_build_shared]) 79189bd41f2cSmrg 79199418810dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7920084f91ccSmrg test no = "$can_build_shared" && enable_shared=no 79219418810dSmrg 79229418810dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 79239418810dSmrg # are all built from PIC. 79249bd41f2cSmrg case $host_os in 79259418810dSmrg aix3*) 7926084f91ccSmrg test yes = "$enable_shared" && enable_static=no 79279418810dSmrg if test -n "$RANLIB"; then 79289418810dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79299418810dSmrg postinstall_cmds='$RANLIB $lib' 79309418810dSmrg fi 79319418810dSmrg ;; 7932d075918cSmrg aix[[4-9]]*) 7933084f91ccSmrg if test ia64 != "$host_cpu"; then 7934084f91ccSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7935084f91ccSmrg yes,aix,yes) ;; # shared object as lib.so file only 7936084f91ccSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7937084f91ccSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7938084f91ccSmrg esac 79399bd41f2cSmrg fi 79409418810dSmrg ;; 79419bd41f2cSmrg esac 79429418810dSmrg AC_MSG_RESULT([$enable_shared]) 79439418810dSmrg 79449418810dSmrg AC_MSG_CHECKING([whether to build static libraries]) 79459418810dSmrg # Make sure either enable_shared or enable_static is yes. 7946084f91ccSmrg test yes = "$enable_shared" || enable_static=yes 79479418810dSmrg AC_MSG_RESULT([$enable_static]) 79489418810dSmrg 7949084f91ccSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7950084f91ccSmrg _LT_TAGVAR(LD, $1)=$LD 79519418810dSmrg 79529418810dSmrg ## CAVEAT EMPTOR: 79539418810dSmrg ## There is no encapsulation within the following macros, do not change 79549418810dSmrg ## the running order or otherwise move them around unless you know exactly 79559418810dSmrg ## what you are doing... 79569418810dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 79579418810dSmrg _LT_COMPILER_PIC($1) 79589418810dSmrg _LT_COMPILER_C_O($1) 79599418810dSmrg _LT_COMPILER_FILE_LOCKS($1) 79609418810dSmrg _LT_LINKER_SHLIBS($1) 79619418810dSmrg _LT_SYS_DYNAMIC_LINKER($1) 79629418810dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 79639418810dSmrg 79649418810dSmrg _LT_CONFIG($1) 79659418810dSmrg fi # test -n "$compiler" 79669418810dSmrg 79679418810dSmrg GCC=$lt_save_GCC 79680da4cdccSmrg CC=$lt_save_CC 79690da4cdccSmrg CFLAGS=$lt_save_CFLAGS 7970084f91ccSmrgfi # test yes != "$_lt_disable_FC" 79719bd41f2cSmrg 79729418810dSmrgAC_LANG_POP 79739418810dSmrg])# _LT_LANG_FC_CONFIG 79749bd41f2cSmrg 79759bd41f2cSmrg 79769418810dSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 79779418810dSmrg# -------------------------- 79789418810dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79799418810dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7980084f91ccSmrg# to write the compiler configuration to 'libtool'. 79819418810dSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 79829418810dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79839418810dSmrgAC_LANG_SAVE 79849bd41f2cSmrg 79859418810dSmrg# Source file extension for Java test sources. 79869418810dSmrgac_ext=java 79879bd41f2cSmrg 79889418810dSmrg# Object file extension for compiled Java test sources. 79899418810dSmrgobjext=o 79909418810dSmrg_LT_TAGVAR(objext, $1)=$objext 79919bd41f2cSmrg 79929418810dSmrg# Code to be used in simple compile tests 79939418810dSmrglt_simple_compile_test_code="class foo {}" 79949bd41f2cSmrg 79959418810dSmrg# Code to be used in simple link tests 79969418810dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79979bd41f2cSmrg 79989418810dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79999418810dSmrg_LT_TAG_COMPILER 80009bd41f2cSmrg 80019418810dSmrg# save warnings/boilerplate of simple test code 80029418810dSmrg_LT_COMPILER_BOILERPLATE 80039418810dSmrg_LT_LINKER_BOILERPLATE 80049418810dSmrg 80059418810dSmrg# Allow CC to be a program name with arguments. 80060da4cdccSmrglt_save_CC=$CC 80070da4cdccSmrglt_save_CFLAGS=$CFLAGS 80089418810dSmrglt_save_GCC=$GCC 80099418810dSmrgGCC=yes 80109418810dSmrgCC=${GCJ-"gcj"} 80110da4cdccSmrgCFLAGS=$GCJFLAGS 80129418810dSmrgcompiler=$CC 80139418810dSmrg_LT_TAGVAR(compiler, $1)=$CC 8014084f91ccSmrg_LT_TAGVAR(LD, $1)=$LD 80159418810dSmrg_LT_CC_BASENAME([$compiler]) 80169418810dSmrg 80179418810dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 80189418810dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80199418810dSmrg 80209418810dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80210da4cdccSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80220da4cdccSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80239418810dSmrg 80249418810dSmrgif test -n "$compiler"; then 80259418810dSmrg _LT_COMPILER_NO_RTTI($1) 80269418810dSmrg _LT_COMPILER_PIC($1) 80279418810dSmrg _LT_COMPILER_C_O($1) 80289418810dSmrg _LT_COMPILER_FILE_LOCKS($1) 80299418810dSmrg _LT_LINKER_SHLIBS($1) 80309418810dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 80319418810dSmrg 80329418810dSmrg _LT_CONFIG($1) 80339418810dSmrgfi 80349418810dSmrg 80359418810dSmrgAC_LANG_RESTORE 80369bd41f2cSmrg 80379418810dSmrgGCC=$lt_save_GCC 80380da4cdccSmrgCC=$lt_save_CC 80390da4cdccSmrgCFLAGS=$lt_save_CFLAGS 80409418810dSmrg])# _LT_LANG_GCJ_CONFIG 80419bd41f2cSmrg 80429bd41f2cSmrg 80430da4cdccSmrg# _LT_LANG_GO_CONFIG([TAG]) 80440da4cdccSmrg# -------------------------- 80450da4cdccSmrg# Ensure that the configuration variables for the GNU Go compiler 80460da4cdccSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8047084f91ccSmrg# to write the compiler configuration to 'libtool'. 80480da4cdccSmrgm4_defun([_LT_LANG_GO_CONFIG], 80490da4cdccSmrg[AC_REQUIRE([LT_PROG_GO])dnl 80500da4cdccSmrgAC_LANG_SAVE 80510da4cdccSmrg 80520da4cdccSmrg# Source file extension for Go test sources. 80530da4cdccSmrgac_ext=go 80540da4cdccSmrg 80550da4cdccSmrg# Object file extension for compiled Go test sources. 80560da4cdccSmrgobjext=o 80570da4cdccSmrg_LT_TAGVAR(objext, $1)=$objext 80580da4cdccSmrg 80590da4cdccSmrg# Code to be used in simple compile tests 80600da4cdccSmrglt_simple_compile_test_code="package main; func main() { }" 80610da4cdccSmrg 80620da4cdccSmrg# Code to be used in simple link tests 80630da4cdccSmrglt_simple_link_test_code='package main; func main() { }' 80640da4cdccSmrg 80650da4cdccSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80660da4cdccSmrg_LT_TAG_COMPILER 80670da4cdccSmrg 80680da4cdccSmrg# save warnings/boilerplate of simple test code 80690da4cdccSmrg_LT_COMPILER_BOILERPLATE 80700da4cdccSmrg_LT_LINKER_BOILERPLATE 80710da4cdccSmrg 80720da4cdccSmrg# Allow CC to be a program name with arguments. 80730da4cdccSmrglt_save_CC=$CC 80740da4cdccSmrglt_save_CFLAGS=$CFLAGS 80750da4cdccSmrglt_save_GCC=$GCC 80760da4cdccSmrgGCC=yes 80770da4cdccSmrgCC=${GOC-"gccgo"} 80780da4cdccSmrgCFLAGS=$GOFLAGS 80790da4cdccSmrgcompiler=$CC 80800da4cdccSmrg_LT_TAGVAR(compiler, $1)=$CC 8081084f91ccSmrg_LT_TAGVAR(LD, $1)=$LD 80820da4cdccSmrg_LT_CC_BASENAME([$compiler]) 80830da4cdccSmrg 80840da4cdccSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 80850da4cdccSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80860da4cdccSmrg 80870da4cdccSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80880da4cdccSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80890da4cdccSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80900da4cdccSmrg 80910da4cdccSmrgif test -n "$compiler"; then 80920da4cdccSmrg _LT_COMPILER_NO_RTTI($1) 80930da4cdccSmrg _LT_COMPILER_PIC($1) 80940da4cdccSmrg _LT_COMPILER_C_O($1) 80950da4cdccSmrg _LT_COMPILER_FILE_LOCKS($1) 80960da4cdccSmrg _LT_LINKER_SHLIBS($1) 80970da4cdccSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 80980da4cdccSmrg 80990da4cdccSmrg _LT_CONFIG($1) 81000da4cdccSmrgfi 81010da4cdccSmrg 81020da4cdccSmrgAC_LANG_RESTORE 81030da4cdccSmrg 81040da4cdccSmrgGCC=$lt_save_GCC 81050da4cdccSmrgCC=$lt_save_CC 81060da4cdccSmrgCFLAGS=$lt_save_CFLAGS 81070da4cdccSmrg])# _LT_LANG_GO_CONFIG 81080da4cdccSmrg 81090da4cdccSmrg 81109418810dSmrg# _LT_LANG_RC_CONFIG([TAG]) 81119418810dSmrg# ------------------------- 81129418810dSmrg# Ensure that the configuration variables for the Windows resource compiler 81139418810dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8114084f91ccSmrg# to write the compiler configuration to 'libtool'. 81159418810dSmrgm4_defun([_LT_LANG_RC_CONFIG], 81169418810dSmrg[AC_REQUIRE([LT_PROG_RC])dnl 81179418810dSmrgAC_LANG_SAVE 81189bd41f2cSmrg 81199418810dSmrg# Source file extension for RC test sources. 81209418810dSmrgac_ext=rc 81219bd41f2cSmrg 81229418810dSmrg# Object file extension for compiled RC test sources. 81239418810dSmrgobjext=o 81249418810dSmrg_LT_TAGVAR(objext, $1)=$objext 81259bd41f2cSmrg 81269418810dSmrg# Code to be used in simple compile tests 81279418810dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81289bd41f2cSmrg 81299418810dSmrg# Code to be used in simple link tests 8130084f91ccSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81319bd41f2cSmrg 81329418810dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81339418810dSmrg_LT_TAG_COMPILER 81349bd41f2cSmrg 81359418810dSmrg# save warnings/boilerplate of simple test code 81369418810dSmrg_LT_COMPILER_BOILERPLATE 81379418810dSmrg_LT_LINKER_BOILERPLATE 81389bd41f2cSmrg 81399418810dSmrg# Allow CC to be a program name with arguments. 8140084f91ccSmrglt_save_CC=$CC 81410da4cdccSmrglt_save_CFLAGS=$CFLAGS 81429418810dSmrglt_save_GCC=$GCC 81439418810dSmrgGCC= 81449418810dSmrgCC=${RC-"windres"} 81450da4cdccSmrgCFLAGS= 81469418810dSmrgcompiler=$CC 81479418810dSmrg_LT_TAGVAR(compiler, $1)=$CC 81489418810dSmrg_LT_CC_BASENAME([$compiler]) 81499418810dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81509bd41f2cSmrg 81519418810dSmrgif test -n "$compiler"; then 81529418810dSmrg : 81539418810dSmrg _LT_CONFIG($1) 81549418810dSmrgfi 81559bd41f2cSmrg 81569418810dSmrgGCC=$lt_save_GCC 81579418810dSmrgAC_LANG_RESTORE 81580da4cdccSmrgCC=$lt_save_CC 81590da4cdccSmrgCFLAGS=$lt_save_CFLAGS 81609418810dSmrg])# _LT_LANG_RC_CONFIG 81619bd41f2cSmrg 81629bd41f2cSmrg 81639418810dSmrg# LT_PROG_GCJ 81649418810dSmrg# ----------- 81659418810dSmrgAC_DEFUN([LT_PROG_GCJ], 81669418810dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81679418810dSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81689418810dSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8169084f91ccSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81709418810dSmrg AC_SUBST(GCJFLAGS)])])[]dnl 81719418810dSmrg]) 81729bd41f2cSmrg 81739418810dSmrg# Old name: 81749418810dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81759418810dSmrgdnl aclocal-1.4 backwards compatibility: 81769418810dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81779bd41f2cSmrg 81789418810dSmrg 81790da4cdccSmrg# LT_PROG_GO 81800da4cdccSmrg# ---------- 81810da4cdccSmrgAC_DEFUN([LT_PROG_GO], 81820da4cdccSmrg[AC_CHECK_TOOL(GOC, gccgo,) 81830da4cdccSmrg]) 81840da4cdccSmrg 81850da4cdccSmrg 81869418810dSmrg# LT_PROG_RC 81879418810dSmrg# ---------- 81889418810dSmrgAC_DEFUN([LT_PROG_RC], 81899418810dSmrg[AC_CHECK_TOOL(RC, windres,) 81909bd41f2cSmrg]) 81919bd41f2cSmrg 81929418810dSmrg# Old name: 81939418810dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81949418810dSmrgdnl aclocal-1.4 backwards compatibility: 81959418810dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81969bd41f2cSmrg 81979418810dSmrg 81989418810dSmrg# _LT_DECL_EGREP 81999418810dSmrg# -------------- 82009418810dSmrg# If we don't have a new enough Autoconf to choose the best grep 82019418810dSmrg# available, choose the one first in the user's PATH. 82029418810dSmrgm4_defun([_LT_DECL_EGREP], 82039418810dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 82049418810dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 82059418810dSmrgtest -z "$GREP" && GREP=grep 82069418810dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 82079418810dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 82089418810dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 82099418810dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 82109418810dSmrgAC_SUBST([GREP]) 82119bd41f2cSmrg]) 82129bd41f2cSmrg 82139bd41f2cSmrg 82149418810dSmrg# _LT_DECL_OBJDUMP 82159418810dSmrg# -------------- 82169418810dSmrg# If we don't have a new enough Autoconf to choose the best objdump 82179418810dSmrg# available, choose the one first in the user's PATH. 82189418810dSmrgm4_defun([_LT_DECL_OBJDUMP], 82199418810dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 82209418810dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 82219418810dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 82229418810dSmrgAC_SUBST([OBJDUMP]) 82239418810dSmrg]) 82249418810dSmrg 82250da4cdccSmrg# _LT_DECL_DLLTOOL 82260da4cdccSmrg# ---------------- 82270da4cdccSmrg# Ensure DLLTOOL variable is set. 82280da4cdccSmrgm4_defun([_LT_DECL_DLLTOOL], 82290da4cdccSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82300da4cdccSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82310da4cdccSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82320da4cdccSmrgAC_SUBST([DLLTOOL]) 82330da4cdccSmrg]) 82349418810dSmrg 8235084f91ccSmrg# _LT_DECL_FILECMD 8236084f91ccSmrg# ---------------- 8237084f91ccSmrg# Check for a file(cmd) program that can be used to detect file type and magic 8238084f91ccSmrgm4_defun([_LT_DECL_FILECMD], 8239084f91ccSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 8240084f91ccSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8241084f91ccSmrg])# _LD_DECL_FILECMD 8242084f91ccSmrg 82439418810dSmrg# _LT_DECL_SED 82449418810dSmrg# ------------ 82459418810dSmrg# Check for a fully-functional sed program, that truncates 82469418810dSmrg# as few characters as possible. Prefer GNU sed if found. 82479418810dSmrgm4_defun([_LT_DECL_SED], 82489418810dSmrg[AC_PROG_SED 82499418810dSmrgtest -z "$SED" && SED=sed 82509418810dSmrgXsed="$SED -e 1s/^X//" 82519418810dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82529418810dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82539418810dSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82549418810dSmrg])# _LT_DECL_SED 82559418810dSmrg 82569418810dSmrgm4_ifndef([AC_PROG_SED], [ 82579418810dSmrg# NOTE: This macro has been submitted for inclusion into # 82589418810dSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82599418810dSmrg# a released version of Autoconf we should remove this # 82609418810dSmrg# macro and use it instead. # 82619418810dSmrg 82629418810dSmrgm4_defun([AC_PROG_SED], 82639418810dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82649418810dSmrgAC_CACHE_VAL(lt_cv_path_SED, 82659418810dSmrg[# Loop through the user's path and test for sed and gsed. 82669418810dSmrg# Then use that list of sed's as ones to test for truncation. 82679418810dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82689418810dSmrgfor as_dir in $PATH 82699418810dSmrgdo 82709418810dSmrg IFS=$as_save_IFS 82719418810dSmrg test -z "$as_dir" && as_dir=. 82729418810dSmrg for lt_ac_prog in sed gsed; do 82739418810dSmrg for ac_exec_ext in '' $ac_executable_extensions; do 82749418810dSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82759418810dSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82769418810dSmrg fi 82779418810dSmrg done 82789418810dSmrg done 82799418810dSmrgdone 82809418810dSmrgIFS=$as_save_IFS 82819418810dSmrglt_ac_max=0 82829418810dSmrglt_ac_count=0 82839418810dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82849418810dSmrg# along with /bin/sed that truncates output. 82859418810dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8286084f91ccSmrg test ! -f "$lt_ac_sed" && continue 82879418810dSmrg cat /dev/null > conftest.in 82889418810dSmrg lt_ac_count=0 82899418810dSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82909418810dSmrg # Check for GNU sed and select it if it is found. 82919418810dSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82929418810dSmrg lt_cv_path_SED=$lt_ac_sed 82939418810dSmrg break 82949418810dSmrg fi 82959418810dSmrg while true; do 82969418810dSmrg cat conftest.in conftest.in >conftest.tmp 82979418810dSmrg mv conftest.tmp conftest.in 82989418810dSmrg cp conftest.in conftest.nl 82999418810dSmrg echo >>conftest.nl 83009418810dSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 83019418810dSmrg cmp -s conftest.out conftest.nl || break 83029418810dSmrg # 10000 chars as input seems more than enough 8303084f91ccSmrg test 10 -lt "$lt_ac_count" && break 83049418810dSmrg lt_ac_count=`expr $lt_ac_count + 1` 8305084f91ccSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 83069418810dSmrg lt_ac_max=$lt_ac_count 83079418810dSmrg lt_cv_path_SED=$lt_ac_sed 83089bd41f2cSmrg fi 83099418810dSmrg done 83109418810dSmrgdone 83119418810dSmrg]) 83129418810dSmrgSED=$lt_cv_path_SED 83139418810dSmrgAC_SUBST([SED]) 83149418810dSmrgAC_MSG_RESULT([$SED]) 83159418810dSmrg])#AC_PROG_SED 83169418810dSmrg])#m4_ifndef 83179418810dSmrg 83189418810dSmrg# Old name: 83199418810dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 83209418810dSmrgdnl aclocal-1.4 backwards compatibility: 83219418810dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83229418810dSmrg 83239418810dSmrg 83249418810dSmrg# _LT_CHECK_SHELL_FEATURES 83259418810dSmrg# ------------------------ 83269418810dSmrg# Find out whether the shell is Bourne or XSI compatible, 83279418810dSmrg# or has some other useful features. 83289418810dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8329084f91ccSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 83309418810dSmrg lt_unset=unset 83319418810dSmrgelse 83329418810dSmrg lt_unset=false 83339418810dSmrgfi 83349418810dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 83359418810dSmrg 83369418810dSmrg# test EBCDIC or ASCII 83379418810dSmrgcase `echo X|tr X '\101'` in 83389418810dSmrg A) # ASCII based system 83399418810dSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83409418810dSmrg lt_SP2NL='tr \040 \012' 83419418810dSmrg lt_NL2SP='tr \015\012 \040\040' 83429bd41f2cSmrg ;; 83439418810dSmrg *) # EBCDIC based system 83449418810dSmrg lt_SP2NL='tr \100 \n' 83459418810dSmrg lt_NL2SP='tr \r\n \100\100' 83469bd41f2cSmrg ;; 83479418810dSmrgesac 83489418810dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83499418810dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83509418810dSmrg])# _LT_CHECK_SHELL_FEATURES 83519418810dSmrg 83529418810dSmrg 83530da4cdccSmrg# _LT_PATH_CONVERSION_FUNCTIONS 83540da4cdccSmrg# ----------------------------- 8355084f91ccSmrg# Determine what file name conversion functions should be used by 83560da4cdccSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83570da4cdccSmrg# for certain cross-compile configurations and native mingw. 83580da4cdccSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83590da4cdccSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83600da4cdccSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83610da4cdccSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83620da4cdccSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83630da4cdccSmrg[case $host in 83640da4cdccSmrg *-*-mingw* ) 83650da4cdccSmrg case $build in 83660da4cdccSmrg *-*-mingw* ) # actually msys 83670da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83680da4cdccSmrg ;; 83690da4cdccSmrg *-*-cygwin* ) 83700da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83710da4cdccSmrg ;; 83720da4cdccSmrg * ) # otherwise, assume *nix 83730da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83740da4cdccSmrg ;; 83750da4cdccSmrg esac 83769418810dSmrg ;; 83770da4cdccSmrg *-*-cygwin* ) 83780da4cdccSmrg case $build in 83790da4cdccSmrg *-*-mingw* ) # actually msys 83800da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83810da4cdccSmrg ;; 83820da4cdccSmrg *-*-cygwin* ) 83830da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 83840da4cdccSmrg ;; 83850da4cdccSmrg * ) # otherwise, assume *nix 83860da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83870da4cdccSmrg ;; 83880da4cdccSmrg esac 83899418810dSmrg ;; 83900da4cdccSmrg * ) # unhandled hosts (and "normal" native builds) 83910da4cdccSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 83920da4cdccSmrg ;; 83930da4cdccSmrgesac 83940da4cdccSmrg]) 83950da4cdccSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83960da4cdccSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83970da4cdccSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83980da4cdccSmrg [0], [convert $build file names to $host format])dnl 83990da4cdccSmrg 84000da4cdccSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 84010da4cdccSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 84020da4cdccSmrg[#assume ordinary cross tools, or native build. 84030da4cdccSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 84040da4cdccSmrgcase $host in 84050da4cdccSmrg *-*-mingw* ) 84060da4cdccSmrg case $build in 84070da4cdccSmrg *-*-mingw* ) # actually msys 84080da4cdccSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 84090da4cdccSmrg ;; 84100da4cdccSmrg esac 84110da4cdccSmrg ;; 84120da4cdccSmrgesac 84139418810dSmrg]) 84140da4cdccSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 84150da4cdccSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 84160da4cdccSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 84170da4cdccSmrg [0], [convert $build files to toolchain format])dnl 84180da4cdccSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 84199bd41f2cSmrg 84209418810dSmrg# Helper functions for option handling. -*- Autoconf -*- 84219418810dSmrg# 8422084f91ccSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 8423084f91ccSmrg# Software Foundation, Inc. 84249418810dSmrg# Written by Gary V. Vaughan, 2004 84259418810dSmrg# 84269418810dSmrg# This file is free software; the Free Software Foundation gives 84279418810dSmrg# unlimited permission to copy and/or distribute it, with or without 84289418810dSmrg# modifications, as long as this notice is preserved. 84299bd41f2cSmrg 8430084f91ccSmrg# serial 8 ltoptions.m4 84319bd41f2cSmrg 84329418810dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 84339418810dSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 84349bd41f2cSmrg 84359bd41f2cSmrg 84369418810dSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 84379418810dSmrg# ------------------------------------------ 84389418810dSmrgm4_define([_LT_MANGLE_OPTION], 84399418810dSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 84409bd41f2cSmrg 84419bd41f2cSmrg 84429418810dSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 84439418810dSmrg# --------------------------------------- 84449418810dSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 84459418810dSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84469418810dSmrg# saved as a flag. 84479418810dSmrgm4_define([_LT_SET_OPTION], 84489418810dSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84499418810dSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84509418810dSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8451084f91ccSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84529418810dSmrg]) 84539418810dSmrg 84549418810dSmrg 84559418810dSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84569418810dSmrg# ------------------------------------------------------------ 84579418810dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84589418810dSmrgm4_define([_LT_IF_OPTION], 84599418810dSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 84609418810dSmrg 84619418810dSmrg 84629418810dSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84639418810dSmrg# ------------------------------------------------------- 84649418810dSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84659418810dSmrg# are set. 84669418810dSmrgm4_define([_LT_UNLESS_OPTIONS], 84679418810dSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84689418810dSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84699418810dSmrg [m4_define([$0_found])])])[]dnl 84709418810dSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84719418810dSmrg])[]dnl 84729418810dSmrg]) 84739418810dSmrg 84749418810dSmrg 84759418810dSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84769418810dSmrg# ---------------------------------------- 84779418810dSmrg# OPTION-LIST is a space-separated list of Libtool options associated 84789418810dSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84799418810dSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84809418810dSmrg# the unknown option and exit. 84819418810dSmrgm4_defun([_LT_SET_OPTIONS], 84829418810dSmrg[# Set options 84839418810dSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84849418810dSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 84859418810dSmrg 84869418810dSmrgm4_if([$1],[LT_INIT],[ 84879418810dSmrg dnl 84889418810dSmrg dnl Simply set some default values (i.e off) if boolean options were not 84899418810dSmrg dnl specified: 84909418810dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84919418810dSmrg ]) 84929418810dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84939418810dSmrg ]) 84949418810dSmrg dnl 84959418810dSmrg dnl If no reference was made to various pairs of opposing options, then 84969418810dSmrg dnl we run the default mode handler for the pair. For example, if neither 8497084f91ccSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84989418810dSmrg dnl archives by default: 84999418810dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 85009418810dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 85019418810dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 85029418810dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8503084f91ccSmrg [_LT_ENABLE_FAST_INSTALL]) 8504084f91ccSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8505084f91ccSmrg [_LT_WITH_AIX_SONAME([aix])]) 85069418810dSmrg ]) 85079418810dSmrg])# _LT_SET_OPTIONS 85089bd41f2cSmrg 85099bd41f2cSmrg 85109bd41f2cSmrg 85119418810dSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 85129418810dSmrg# ----------------------------------------- 85139418810dSmrgm4_define([_LT_MANGLE_DEFUN], 85149418810dSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 85159bd41f2cSmrg 85169bd41f2cSmrg 85179418810dSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 85189418810dSmrg# ----------------------------------------------- 85199418810dSmrgm4_define([LT_OPTION_DEFINE], 85209418810dSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 85219418810dSmrg])# LT_OPTION_DEFINE 85229bd41f2cSmrg 85239bd41f2cSmrg 85249418810dSmrg# dlopen 85259418810dSmrg# ------ 85269418810dSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 85279418810dSmrg]) 85289bd41f2cSmrg 85299418810dSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 85309418810dSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 85319418810dSmrgAC_DIAGNOSE([obsolete], 85329418810dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8533084f91ccSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 85349418810dSmrg]) 85359bd41f2cSmrg 85369418810dSmrgdnl aclocal-1.4 backwards compatibility: 85379418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 85389bd41f2cSmrg 85399bd41f2cSmrg 85409418810dSmrg# win32-dll 85419418810dSmrg# --------- 85429418810dSmrg# Declare package support for building win32 dll's. 85439418810dSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 85449418810dSmrg[enable_win32_dll=yes 85459bd41f2cSmrg 85469418810dSmrgcase $host in 85470da4cdccSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85489418810dSmrg AC_CHECK_TOOL(AS, as, false) 85499418810dSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85509418810dSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85519418810dSmrg ;; 85529418810dSmrgesac 85539bd41f2cSmrg 85549418810dSmrgtest -z "$AS" && AS=as 85550da4cdccSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 85569bd41f2cSmrg 85579418810dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85580da4cdccSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 85599bd41f2cSmrg 85609418810dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85610da4cdccSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85629418810dSmrg])# win32-dll 85639bd41f2cSmrg 85649418810dSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85659418810dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85669418810dSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85679418810dSmrgAC_DIAGNOSE([obsolete], 85689418810dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8569084f91ccSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85709418810dSmrg]) 85719bd41f2cSmrg 85729418810dSmrgdnl aclocal-1.4 backwards compatibility: 85739418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 85749bd41f2cSmrg 85759bd41f2cSmrg 85769418810dSmrg# _LT_ENABLE_SHARED([DEFAULT]) 85779418810dSmrg# ---------------------------- 8578084f91ccSmrg# implement the --enable-shared flag, and supports the 'shared' and 8579084f91ccSmrg# 'disable-shared' LT_INIT options. 8580084f91ccSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85819418810dSmrgm4_define([_LT_ENABLE_SHARED], 85829418810dSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85839418810dSmrgAC_ARG_ENABLE([shared], 85849418810dSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85859418810dSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85869418810dSmrg [p=${PACKAGE-default} 85879418810dSmrg case $enableval in 85889418810dSmrg yes) enable_shared=yes ;; 85899418810dSmrg no) enable_shared=no ;; 85909418810dSmrg *) 85919418810dSmrg enable_shared=no 85929418810dSmrg # Look at the argument we got. We use all the common list separators. 8593084f91ccSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85949418810dSmrg for pkg in $enableval; do 8595084f91ccSmrg IFS=$lt_save_ifs 85969418810dSmrg if test "X$pkg" = "X$p"; then 85979418810dSmrg enable_shared=yes 85989418810dSmrg fi 85999418810dSmrg done 8600084f91ccSmrg IFS=$lt_save_ifs 86019bd41f2cSmrg ;; 86029418810dSmrg esac], 86039418810dSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 86049bd41f2cSmrg 86059418810dSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 86069418810dSmrg [Whether or not to build shared libraries]) 86079418810dSmrg])# _LT_ENABLE_SHARED 86089bd41f2cSmrg 86099418810dSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 86109418810dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 86119bd41f2cSmrg 86129418810dSmrg# Old names: 86139418810dSmrgAC_DEFUN([AC_ENABLE_SHARED], 86149418810dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 86159418810dSmrg]) 86169bd41f2cSmrg 86179418810dSmrgAC_DEFUN([AC_DISABLE_SHARED], 86189418810dSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 86199418810dSmrg]) 86209bd41f2cSmrg 86219418810dSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 86229418810dSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 86239bd41f2cSmrg 86249418810dSmrgdnl aclocal-1.4 backwards compatibility: 86259418810dSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 86269418810dSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 86279bd41f2cSmrg 86289bd41f2cSmrg 86299418810dSmrg 86309418810dSmrg# _LT_ENABLE_STATIC([DEFAULT]) 86319418810dSmrg# ---------------------------- 8632084f91ccSmrg# implement the --enable-static flag, and support the 'static' and 8633084f91ccSmrg# 'disable-static' LT_INIT options. 8634084f91ccSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86359418810dSmrgm4_define([_LT_ENABLE_STATIC], 86369418810dSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 86379418810dSmrgAC_ARG_ENABLE([static], 86389418810dSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 86399418810dSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 86409418810dSmrg [p=${PACKAGE-default} 86419418810dSmrg case $enableval in 86429418810dSmrg yes) enable_static=yes ;; 86439418810dSmrg no) enable_static=no ;; 86449418810dSmrg *) 86459418810dSmrg enable_static=no 86469418810dSmrg # Look at the argument we got. We use all the common list separators. 8647084f91ccSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86489418810dSmrg for pkg in $enableval; do 8649084f91ccSmrg IFS=$lt_save_ifs 86509418810dSmrg if test "X$pkg" = "X$p"; then 86519418810dSmrg enable_static=yes 86529bd41f2cSmrg fi 86539418810dSmrg done 8654084f91ccSmrg IFS=$lt_save_ifs 86559bd41f2cSmrg ;; 86569418810dSmrg esac], 86579418810dSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 86589bd41f2cSmrg 86599418810dSmrg _LT_DECL([build_old_libs], [enable_static], [0], 86609418810dSmrg [Whether or not to build static libraries]) 86619418810dSmrg])# _LT_ENABLE_STATIC 86629bd41f2cSmrg 86639418810dSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86649418810dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 86659418810dSmrg 86669418810dSmrg# Old names: 86679418810dSmrgAC_DEFUN([AC_ENABLE_STATIC], 86689418810dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86699418810dSmrg]) 86709418810dSmrg 86719418810dSmrgAC_DEFUN([AC_DISABLE_STATIC], 86729418810dSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86739418810dSmrg]) 86749418810dSmrg 86759418810dSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86769418810dSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 86779418810dSmrg 86789418810dSmrgdnl aclocal-1.4 backwards compatibility: 86799418810dSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86809418810dSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 86819418810dSmrg 86829418810dSmrg 86839418810dSmrg 86849418810dSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86859418810dSmrg# ---------------------------------- 8686084f91ccSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 8687084f91ccSmrg# and 'disable-fast-install' LT_INIT options. 8688084f91ccSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86899418810dSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 86909418810dSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86919418810dSmrgAC_ARG_ENABLE([fast-install], 86929418810dSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86939418810dSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86949418810dSmrg [p=${PACKAGE-default} 86959418810dSmrg case $enableval in 86969418810dSmrg yes) enable_fast_install=yes ;; 86979418810dSmrg no) enable_fast_install=no ;; 86989418810dSmrg *) 86999418810dSmrg enable_fast_install=no 87009418810dSmrg # Look at the argument we got. We use all the common list separators. 8701084f91ccSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 87029418810dSmrg for pkg in $enableval; do 8703084f91ccSmrg IFS=$lt_save_ifs 87049418810dSmrg if test "X$pkg" = "X$p"; then 87059418810dSmrg enable_fast_install=yes 87069418810dSmrg fi 87079418810dSmrg done 8708084f91ccSmrg IFS=$lt_save_ifs 87099bd41f2cSmrg ;; 87109418810dSmrg esac], 87119418810dSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 87129bd41f2cSmrg 87139418810dSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 87149418810dSmrg [Whether or not to optimize for fast installation])dnl 87159418810dSmrg])# _LT_ENABLE_FAST_INSTALL 87169bd41f2cSmrg 87179418810dSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 87189418810dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 87199bd41f2cSmrg 87209418810dSmrg# Old names: 87219418810dSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 87229418810dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 87239418810dSmrgAC_DIAGNOSE([obsolete], 87249418810dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8725084f91ccSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 87269418810dSmrg]) 87279bd41f2cSmrg 87289418810dSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 87299418810dSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 87309418810dSmrgAC_DIAGNOSE([obsolete], 87319418810dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8732084f91ccSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 87339418810dSmrg]) 87349bd41f2cSmrg 87359418810dSmrgdnl aclocal-1.4 backwards compatibility: 87369418810dSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 87379418810dSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 87389bd41f2cSmrg 87399bd41f2cSmrg 8740084f91ccSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8741084f91ccSmrg# ---------------------------------- 8742084f91ccSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8743084f91ccSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8744084f91ccSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8745084f91ccSmrgm4_define([_LT_WITH_AIX_SONAME], 8746084f91ccSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8747084f91ccSmrgshared_archive_member_spec= 8748084f91ccSmrgcase $host,$enable_shared in 8749084f91ccSmrgpower*-*-aix[[5-9]]*,yes) 8750084f91ccSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8751084f91ccSmrg AC_ARG_WITH([aix-soname], 8752084f91ccSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8753084f91ccSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8754084f91ccSmrg [case $withval in 8755084f91ccSmrg aix|svr4|both) 8756084f91ccSmrg ;; 8757084f91ccSmrg *) 8758084f91ccSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8759084f91ccSmrg ;; 8760084f91ccSmrg esac 8761084f91ccSmrg lt_cv_with_aix_soname=$with_aix_soname], 8762084f91ccSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8763084f91ccSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8764084f91ccSmrg with_aix_soname=$lt_cv_with_aix_soname]) 8765084f91ccSmrg AC_MSG_RESULT([$with_aix_soname]) 8766084f91ccSmrg if test aix != "$with_aix_soname"; then 8767084f91ccSmrg # For the AIX way of multilib, we name the shared archive member 8768084f91ccSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8769084f91ccSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8770084f91ccSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8771084f91ccSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8772084f91ccSmrg if test 64 = "${OBJECT_MODE-32}"; then 8773084f91ccSmrg shared_archive_member_spec=shr_64 8774084f91ccSmrg else 8775084f91ccSmrg shared_archive_member_spec=shr 8776084f91ccSmrg fi 8777084f91ccSmrg fi 8778084f91ccSmrg ;; 8779084f91ccSmrg*) 8780084f91ccSmrg with_aix_soname=aix 8781084f91ccSmrg ;; 8782084f91ccSmrgesac 8783084f91ccSmrg 8784084f91ccSmrg_LT_DECL([], [shared_archive_member_spec], [0], 8785084f91ccSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8786084f91ccSmrg])# _LT_WITH_AIX_SONAME 8787084f91ccSmrg 8788084f91ccSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8789084f91ccSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8790084f91ccSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8791084f91ccSmrg 8792084f91ccSmrg 87939418810dSmrg# _LT_WITH_PIC([MODE]) 87949418810dSmrg# -------------------- 8795084f91ccSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87969418810dSmrg# LT_INIT options. 8797084f91ccSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87989418810dSmrgm4_define([_LT_WITH_PIC], 87999418810dSmrg[AC_ARG_WITH([pic], 88000da4cdccSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 88019418810dSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 88020da4cdccSmrg [lt_p=${PACKAGE-default} 88030da4cdccSmrg case $withval in 88040da4cdccSmrg yes|no) pic_mode=$withval ;; 88050da4cdccSmrg *) 88060da4cdccSmrg pic_mode=default 88070da4cdccSmrg # Look at the argument we got. We use all the common list separators. 8808084f91ccSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 88090da4cdccSmrg for lt_pkg in $withval; do 8810084f91ccSmrg IFS=$lt_save_ifs 88110da4cdccSmrg if test "X$lt_pkg" = "X$lt_p"; then 88120da4cdccSmrg pic_mode=yes 88130da4cdccSmrg fi 88140da4cdccSmrg done 8815084f91ccSmrg IFS=$lt_save_ifs 88160da4cdccSmrg ;; 88170da4cdccSmrg esac], 8818084f91ccSmrg [pic_mode=m4_default([$1], [default])]) 88199418810dSmrg 88209418810dSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 88219418810dSmrg])# _LT_WITH_PIC 88229418810dSmrg 88239418810dSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 88249418810dSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 88259418810dSmrg 88269418810dSmrg# Old name: 88279418810dSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 88289418810dSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 88299418810dSmrgAC_DIAGNOSE([obsolete], 88309418810dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8831084f91ccSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 88329bd41f2cSmrg]) 88339bd41f2cSmrg 88349418810dSmrgdnl aclocal-1.4 backwards compatibility: 88359418810dSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 88369bd41f2cSmrg 88379bd41f2cSmrg 88389418810dSmrgm4_define([_LTDL_MODE], []) 88399418810dSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 88409418810dSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 88419418810dSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 88429418810dSmrg [m4_define([_LTDL_MODE], [recursive])]) 88439418810dSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 88449418810dSmrg [m4_define([_LTDL_MODE], [subproject])]) 88459bd41f2cSmrg 88469418810dSmrgm4_define([_LTDL_TYPE], []) 88479418810dSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88489418810dSmrg [m4_define([_LTDL_TYPE], [installable])]) 88499418810dSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88509418810dSmrg [m4_define([_LTDL_TYPE], [convenience])]) 88519bd41f2cSmrg 88529418810dSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 88539bd41f2cSmrg# 8854084f91ccSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 8855084f91ccSmrg# Foundation, Inc. 88569418810dSmrg# Written by Gary V. Vaughan, 2004 88579bd41f2cSmrg# 88589418810dSmrg# This file is free software; the Free Software Foundation gives 88599418810dSmrg# unlimited permission to copy and/or distribute it, with or without 88609418810dSmrg# modifications, as long as this notice is preserved. 88619418810dSmrg 88629418810dSmrg# serial 6 ltsugar.m4 88639418810dSmrg 88649418810dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 88659418810dSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 88669418810dSmrg 88679418810dSmrg 88689418810dSmrg# lt_join(SEP, ARG1, [ARG2...]) 88699418810dSmrg# ----------------------------- 88709418810dSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88719418810dSmrg# associated separator. 88729418810dSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88739418810dSmrg# versions in m4sugar had bugs. 88749418810dSmrgm4_define([lt_join], 88759418810dSmrg[m4_if([$#], [1], [], 88769418810dSmrg [$#], [2], [[$2]], 88779418810dSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88789418810dSmrgm4_define([_lt_join], 88799418810dSmrg[m4_if([$#$2], [2], [], 88809418810dSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88819418810dSmrg 88829418810dSmrg 88839418810dSmrg# lt_car(LIST) 88849418810dSmrg# lt_cdr(LIST) 88859418810dSmrg# ------------ 88869418810dSmrg# Manipulate m4 lists. 88879418810dSmrg# These macros are necessary as long as will still need to support 8888084f91ccSmrg# Autoconf-2.59, which quotes differently. 88899418810dSmrgm4_define([lt_car], [[$1]]) 88909418810dSmrgm4_define([lt_cdr], 88919418810dSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88929418810dSmrg [$#], 1, [], 88939418810dSmrg [m4_dquote(m4_shift($@))])]) 88949418810dSmrgm4_define([lt_unquote], $1) 88959418810dSmrg 88969418810dSmrg 88979418810dSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88989418810dSmrg# ------------------------------------------ 8899084f91ccSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 89009418810dSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 89019418810dSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 89029418810dSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 89039418810dSmrg# than defined and empty). 89049bd41f2cSmrg# 89059418810dSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 89069418810dSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 89079418810dSmrgm4_define([lt_append], 89089418810dSmrg[m4_define([$1], 89099418810dSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 89109418810dSmrg 89119418810dSmrg 89129418810dSmrg 89139418810dSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 89149418810dSmrg# ---------------------------------------------------------- 89159418810dSmrg# Produce a SEP delimited list of all paired combinations of elements of 89169418810dSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 89179418810dSmrg# has the form PREFIXmINFIXSUFFIXn. 89189418810dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 89199418810dSmrgm4_define([lt_combine], 89209418810dSmrg[m4_if(m4_eval([$# > 3]), [1], 89219418810dSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 89229418810dSmrg[[m4_foreach([_Lt_prefix], [$2], 89239418810dSmrg [m4_foreach([_Lt_suffix], 89249418810dSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 89259418810dSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 89269418810dSmrg 89279418810dSmrg 89289418810dSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 89299418810dSmrg# ----------------------------------------------------------------------- 89309418810dSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 89319418810dSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 89329418810dSmrgm4_define([lt_if_append_uniq], 89339418810dSmrg[m4_ifdef([$1], 89349418810dSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 89359418810dSmrg [lt_append([$1], [$2], [$3])$4], 89369418810dSmrg [$5])], 89379418810dSmrg [lt_append([$1], [$2], [$3])$4])]) 89389418810dSmrg 89399418810dSmrg 89409418810dSmrg# lt_dict_add(DICT, KEY, VALUE) 89419418810dSmrg# ----------------------------- 89429418810dSmrgm4_define([lt_dict_add], 89439418810dSmrg[m4_define([$1($2)], [$3])]) 89449bd41f2cSmrg 89459bd41f2cSmrg 89469418810dSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89479418810dSmrg# -------------------------------------------- 89489418810dSmrgm4_define([lt_dict_add_subkey], 89499418810dSmrg[m4_define([$1($2:$3)], [$4])]) 89509418810dSmrg 89519bd41f2cSmrg 89529418810dSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89539418810dSmrg# ---------------------------------- 89549418810dSmrgm4_define([lt_dict_fetch], 89559418810dSmrg[m4_ifval([$3], 89569418810dSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89579418810dSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 89589bd41f2cSmrg 89599bd41f2cSmrg 89609418810dSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89619418810dSmrg# ----------------------------------------------------------------- 89629418810dSmrgm4_define([lt_if_dict_fetch], 89639418810dSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89649418810dSmrg [$5], 89659418810dSmrg [$6])]) 89669bd41f2cSmrg 89679bd41f2cSmrg 89689418810dSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89699418810dSmrg# -------------------------------------------------------------- 89709418810dSmrgm4_define([lt_dict_filter], 89719418810dSmrg[m4_if([$5], [], [], 89729418810dSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89739418810dSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89749418810dSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 89759bd41f2cSmrg]) 89769bd41f2cSmrg 89779418810dSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89789418810dSmrg# 8979084f91ccSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 8980084f91ccSmrg# Inc. 89819418810dSmrg# Written by Scott James Remnant, 2004 89829418810dSmrg# 89839418810dSmrg# This file is free software; the Free Software Foundation gives 89849418810dSmrg# unlimited permission to copy and/or distribute it, with or without 89859418810dSmrg# modifications, as long as this notice is preserved. 89869bd41f2cSmrg 89870da4cdccSmrg# @configure_input@ 89889bd41f2cSmrg 8989084f91ccSmrg# serial 4245 ltversion.m4 89909418810dSmrg# This file is part of GNU Libtool 89919bd41f2cSmrg 8992084f91ccSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 8993084f91ccSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 89949bd41f2cSmrg 89959418810dSmrgAC_DEFUN([LTVERSION_VERSION], 8996084f91ccSmrg[macro_version='2.4.7' 8997084f91ccSmrgmacro_revision='2.4.7' 89989418810dSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89999418810dSmrg_LT_DECL(, macro_revision, 0) 90009bd41f2cSmrg]) 90019bd41f2cSmrg 90029418810dSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 90039418810dSmrg# 9004084f91ccSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 9005084f91ccSmrg# Software Foundation, Inc. 90069418810dSmrg# Written by Scott James Remnant, 2004. 90079418810dSmrg# 90089418810dSmrg# This file is free software; the Free Software Foundation gives 90099418810dSmrg# unlimited permission to copy and/or distribute it, with or without 90109418810dSmrg# modifications, as long as this notice is preserved. 90119418810dSmrg 90120da4cdccSmrg# serial 5 lt~obsolete.m4 90139418810dSmrg 90149418810dSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 90159418810dSmrg# 9016084f91ccSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 90179418810dSmrg# which have later been changed to m4_define as they aren't part of the 90189418810dSmrg# exported API, or moved to Autoconf or Automake where they belong. 90199418810dSmrg# 90209418810dSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 90219418810dSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 90229418810dSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 90239418810dSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 90249418810dSmrg# and doesn't know about Autoconf macros at all.) 90259418810dSmrg# 90269418810dSmrg# So we provide this file, which has a silly filename so it's always 90279418810dSmrg# included after everything else. This provides aclocal with the 90289418810dSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 90299418810dSmrg# because those macros already exist, or will be overwritten later. 9030084f91ccSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 90319418810dSmrg# 90329418810dSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 90339418810dSmrg# Yes, that means every name once taken will need to remain here until 90349418810dSmrg# we give up compatibility with versions before 1.7, at which point 90359418810dSmrg# we need to keep only those names which we still refer to. 90369418810dSmrg 90379418810dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 90389418810dSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 90399418810dSmrg 90409418810dSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 90419418810dSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 90429418810dSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 90439418810dSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 90449418810dSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 90459418810dSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 90469418810dSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90479418810dSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90489418810dSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90499418810dSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90509418810dSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90519418810dSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90529418810dSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90539418810dSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90549418810dSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90559418810dSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90569418810dSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90579418810dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90589418810dSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90599418810dSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90609418810dSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90619418810dSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90629418810dSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90639418810dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90649418810dSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90659418810dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90669418810dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90679418810dSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90689418810dSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90699418810dSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90709418810dSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90719418810dSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90729418810dSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90739418810dSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90749418810dSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90759418810dSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90769418810dSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90779418810dSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90789418810dSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90799418810dSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90809418810dSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90819418810dSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90829418810dSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90839418810dSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90849418810dSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90859418810dSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90869418810dSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90879418810dSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90889418810dSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90899418810dSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90909418810dSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90919418810dSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90929418810dSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90939418810dSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90940da4cdccSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90950da4cdccSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90960da4cdccSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90970da4cdccSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90980da4cdccSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90990da4cdccSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 91000da4cdccSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 91019418810dSmrg 9102084f91ccSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9103084f91ccSmrg# serial 11 (pkg-config-0.29.1) 91049bd41f2cSmrg 9105084f91ccSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9106084f91ccSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9107084f91ccSmrgdnl 9108084f91ccSmrgdnl This program is free software; you can redistribute it and/or modify 9109084f91ccSmrgdnl it under the terms of the GNU General Public License as published by 9110084f91ccSmrgdnl the Free Software Foundation; either version 2 of the License, or 9111084f91ccSmrgdnl (at your option) any later version. 9112084f91ccSmrgdnl 9113084f91ccSmrgdnl This program is distributed in the hope that it will be useful, but 9114084f91ccSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9115084f91ccSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9116084f91ccSmrgdnl General Public License for more details. 9117084f91ccSmrgdnl 9118084f91ccSmrgdnl You should have received a copy of the GNU General Public License 9119084f91ccSmrgdnl along with this program; if not, write to the Free Software 9120084f91ccSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9121084f91ccSmrgdnl 02111-1307, USA. 9122084f91ccSmrgdnl 9123084f91ccSmrgdnl As a special exception to the GNU General Public License, if you 9124084f91ccSmrgdnl distribute this file as part of a program that contains a 9125084f91ccSmrgdnl configuration script generated by Autoconf, you may include it under 9126084f91ccSmrgdnl the same distribution terms that you use for the rest of that 9127084f91ccSmrgdnl program. 9128084f91ccSmrg 9129084f91ccSmrgdnl PKG_PREREQ(MIN-VERSION) 9130084f91ccSmrgdnl ----------------------- 9131084f91ccSmrgdnl Since: 0.29 9132084f91ccSmrgdnl 9133084f91ccSmrgdnl Verify that the version of the pkg-config macros are at least 9134084f91ccSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9135084f91ccSmrgdnl installed version of pkg-config, this checks the developer's version 9136084f91ccSmrgdnl of pkg.m4 when generating configure. 9137084f91ccSmrgdnl 9138084f91ccSmrgdnl To ensure that this macro is defined, also add: 9139084f91ccSmrgdnl m4_ifndef([PKG_PREREQ], 9140084f91ccSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9141084f91ccSmrgdnl 9142084f91ccSmrgdnl See the "Since" comment for each macro you use to see what version 9143084f91ccSmrgdnl of the macros you require. 9144084f91ccSmrgm4_defun([PKG_PREREQ], 9145084f91ccSmrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9146084f91ccSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9147084f91ccSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9148084f91ccSmrg])dnl PKG_PREREQ 9149084f91ccSmrg 9150084f91ccSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9151084f91ccSmrgdnl ---------------------------------- 9152084f91ccSmrgdnl Since: 0.16 9153084f91ccSmrgdnl 9154084f91ccSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9155084f91ccSmrgdnl first found in the path. Checks that the version of pkg-config found 9156084f91ccSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9157084f91ccSmrgdnl used since that's the first version where most current features of 9158084f91ccSmrgdnl pkg-config existed. 91599bd41f2cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 91609bd41f2cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9161084f91ccSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9162084f91ccSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 91630da4cdccSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 91640da4cdccSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 91650da4cdccSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 91660da4cdccSmrg 91679bd41f2cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 91689bd41f2cSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 91699bd41f2cSmrgfi 91709bd41f2cSmrgif test -n "$PKG_CONFIG"; then 91719bd41f2cSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 91729bd41f2cSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 91739bd41f2cSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 91749bd41f2cSmrg AC_MSG_RESULT([yes]) 91759bd41f2cSmrg else 91769bd41f2cSmrg AC_MSG_RESULT([no]) 91779bd41f2cSmrg PKG_CONFIG="" 91789bd41f2cSmrg fi 91799bd41f2cSmrgfi[]dnl 9180084f91ccSmrg])dnl PKG_PROG_PKG_CONFIG 91819bd41f2cSmrg 9182084f91ccSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9183084f91ccSmrgdnl ------------------------------------------------------------------- 9184084f91ccSmrgdnl Since: 0.18 9185084f91ccSmrgdnl 9186084f91ccSmrgdnl Check to see whether a particular set of modules exists. Similar to 9187084f91ccSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9188084f91ccSmrgdnl 9189084f91ccSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9190084f91ccSmrgdnl only at the first occurence in configure.ac, so if the first place 9191084f91ccSmrgdnl it's called might be skipped (such as if it is within an "if", you 9192084f91ccSmrgdnl have to call PKG_CHECK_EXISTS manually 91939bd41f2cSmrgAC_DEFUN([PKG_CHECK_EXISTS], 91949bd41f2cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91959bd41f2cSmrgif test -n "$PKG_CONFIG" && \ 91969bd41f2cSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 91970da4cdccSmrg m4_default([$2], [:]) 91989bd41f2cSmrgm4_ifvaln([$3], [else 91999bd41f2cSmrg $3])dnl 92009bd41f2cSmrgfi]) 92019bd41f2cSmrg 9202084f91ccSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9203084f91ccSmrgdnl --------------------------------------------- 9204084f91ccSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9205084f91ccSmrgdnl pkg_failed based on the result. 92069bd41f2cSmrgm4_define([_PKG_CONFIG], 9207d075918cSmrg[if test -n "$$1"; then 9208d075918cSmrg pkg_cv_[]$1="$$1" 9209d075918cSmrg elif test -n "$PKG_CONFIG"; then 9210d075918cSmrg PKG_CHECK_EXISTS([$3], 9211084f91ccSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9212084f91ccSmrg test "x$?" != "x0" && pkg_failed=yes ], 9213d075918cSmrg [pkg_failed=yes]) 9214d075918cSmrg else 9215d075918cSmrg pkg_failed=untried 92169bd41f2cSmrgfi[]dnl 9217084f91ccSmrg])dnl _PKG_CONFIG 92189bd41f2cSmrg 9219084f91ccSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9220084f91ccSmrgdnl --------------------------- 9221084f91ccSmrgdnl Internal check to see if pkg-config supports short errors. 92229bd41f2cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 92239bd41f2cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 92249bd41f2cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 92259bd41f2cSmrg _pkg_short_errors_supported=yes 92269bd41f2cSmrgelse 92279bd41f2cSmrg _pkg_short_errors_supported=no 92289bd41f2cSmrgfi[]dnl 9229084f91ccSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 92309bd41f2cSmrg 92319bd41f2cSmrg 9232084f91ccSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9233084f91ccSmrgdnl [ACTION-IF-NOT-FOUND]) 9234084f91ccSmrgdnl -------------------------------------------------------------- 9235084f91ccSmrgdnl Since: 0.4.0 9236084f91ccSmrgdnl 9237084f91ccSmrgdnl Note that if there is a possibility the first call to 9238084f91ccSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9239084f91ccSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 92409bd41f2cSmrgAC_DEFUN([PKG_CHECK_MODULES], 92419bd41f2cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92429bd41f2cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 92439bd41f2cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 92449bd41f2cSmrg 92459bd41f2cSmrgpkg_failed=no 92469bd41f2cSmrgAC_MSG_CHECKING([for $1]) 92479bd41f2cSmrg 92489bd41f2cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 92499bd41f2cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 92509bd41f2cSmrg 92519bd41f2cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 92529bd41f2cSmrgand $1[]_LIBS to avoid the need to call pkg-config. 92539bd41f2cSmrgSee the pkg-config man page for more details.]) 92549bd41f2cSmrg 92559bd41f2cSmrgif test $pkg_failed = yes; then 92560da4cdccSmrg AC_MSG_RESULT([no]) 92579bd41f2cSmrg _PKG_SHORT_ERRORS_SUPPORTED 92589bd41f2cSmrg if test $_pkg_short_errors_supported = yes; then 9259084f91ccSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 92609bd41f2cSmrg else 9261084f91ccSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 92629bd41f2cSmrg fi 92639bd41f2cSmrg # Put the nasty error message in config.log where it belongs 92649bd41f2cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 92659bd41f2cSmrg 92660da4cdccSmrg m4_default([$4], [AC_MSG_ERROR( 92679bd41f2cSmrg[Package requirements ($2) were not met: 92689bd41f2cSmrg 92699bd41f2cSmrg$$1_PKG_ERRORS 92709bd41f2cSmrg 92719bd41f2cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 92729bd41f2cSmrginstalled software in a non-standard prefix. 92739bd41f2cSmrg 9274084f91ccSmrg_PKG_TEXT])[]dnl 92750da4cdccSmrg ]) 92769bd41f2cSmrgelif test $pkg_failed = untried; then 92770da4cdccSmrg AC_MSG_RESULT([no]) 92780da4cdccSmrg m4_default([$4], [AC_MSG_FAILURE( 92799bd41f2cSmrg[The pkg-config script could not be found or is too old. Make sure it 92809bd41f2cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 92819bd41f2cSmrgpath to pkg-config. 92829bd41f2cSmrg 92839bd41f2cSmrg_PKG_TEXT 92849bd41f2cSmrg 9285084f91ccSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 92860da4cdccSmrg ]) 92879bd41f2cSmrgelse 92889bd41f2cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 92899bd41f2cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 92909bd41f2cSmrg AC_MSG_RESULT([yes]) 92910da4cdccSmrg $3 92929bd41f2cSmrgfi[]dnl 9293084f91ccSmrg])dnl PKG_CHECK_MODULES 9294084f91ccSmrg 9295084f91ccSmrg 9296084f91ccSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9297084f91ccSmrgdnl [ACTION-IF-NOT-FOUND]) 9298084f91ccSmrgdnl --------------------------------------------------------------------- 9299084f91ccSmrgdnl Since: 0.29 9300084f91ccSmrgdnl 9301084f91ccSmrgdnl Checks for existence of MODULES and gathers its build flags with 9302084f91ccSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9303084f91ccSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9304084f91ccSmrgdnl 9305084f91ccSmrgdnl Note that if there is a possibility the first call to 9306084f91ccSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9307084f91ccSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9308084f91ccSmrgdnl configure.ac. 9309084f91ccSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9310084f91ccSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9311084f91ccSmrg_save_PKG_CONFIG=$PKG_CONFIG 9312084f91ccSmrgPKG_CONFIG="$PKG_CONFIG --static" 9313084f91ccSmrgPKG_CHECK_MODULES($@) 9314084f91ccSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9315084f91ccSmrg])dnl PKG_CHECK_MODULES_STATIC 9316084f91ccSmrg 9317084f91ccSmrg 9318084f91ccSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 9319084f91ccSmrgdnl ------------------------- 9320084f91ccSmrgdnl Since: 0.27 9321084f91ccSmrgdnl 9322084f91ccSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 9323084f91ccSmrgdnl should install pkg-config .pc files. By default the directory is 9324084f91ccSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 9325084f91ccSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9326084f91ccSmrgdnl parameter. 9327084f91ccSmrgAC_DEFUN([PKG_INSTALLDIR], 9328084f91ccSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9329084f91ccSmrgm4_pushdef([pkg_description], 9330084f91ccSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9331084f91ccSmrgAC_ARG_WITH([pkgconfigdir], 9332084f91ccSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9333084f91ccSmrg [with_pkgconfigdir=]pkg_default) 9334084f91ccSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9335084f91ccSmrgm4_popdef([pkg_default]) 9336084f91ccSmrgm4_popdef([pkg_description]) 9337084f91ccSmrg])dnl PKG_INSTALLDIR 9338084f91ccSmrg 9339084f91ccSmrg 9340084f91ccSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9341084f91ccSmrgdnl -------------------------------- 9342084f91ccSmrgdnl Since: 0.27 9343084f91ccSmrgdnl 9344084f91ccSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9345084f91ccSmrgdnl module should install arch-independent pkg-config .pc files. By 9346084f91ccSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 9347084f91ccSmrgdnl changed by passing DIRECTORY. The user can override through the 9348084f91ccSmrgdnl --with-noarch-pkgconfigdir parameter. 9349084f91ccSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9350084f91ccSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9351084f91ccSmrgm4_pushdef([pkg_description], 9352084f91ccSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9353084f91ccSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9354084f91ccSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9355084f91ccSmrg [with_noarch_pkgconfigdir=]pkg_default) 9356084f91ccSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9357084f91ccSmrgm4_popdef([pkg_default]) 9358084f91ccSmrgm4_popdef([pkg_description]) 9359084f91ccSmrg])dnl PKG_NOARCH_INSTALLDIR 9360084f91ccSmrg 9361084f91ccSmrg 9362084f91ccSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9363084f91ccSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9364084f91ccSmrgdnl ------------------------------------------- 9365084f91ccSmrgdnl Since: 0.28 9366084f91ccSmrgdnl 9367084f91ccSmrgdnl Retrieves the value of the pkg-config variable for the given module. 9368084f91ccSmrgAC_DEFUN([PKG_CHECK_VAR], 9369084f91ccSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9370084f91ccSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9371084f91ccSmrg 9372084f91ccSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9373084f91ccSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9374084f91ccSmrg 9375084f91ccSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9376084f91ccSmrg])dnl PKG_CHECK_VAR 9377084f91ccSmrg 9378084f91ccSmrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9379084f91ccSmrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9380084f91ccSmrgdnl [DESCRIPTION], [DEFAULT]) 9381084f91ccSmrgdnl ------------------------------------------ 9382084f91ccSmrgdnl 9383084f91ccSmrgdnl Prepare a "--with-" configure option using the lowercase 9384084f91ccSmrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9385084f91ccSmrgdnl PKG_CHECK_MODULES in a single macro. 9386084f91ccSmrgAC_DEFUN([PKG_WITH_MODULES], 9387084f91ccSmrg[ 9388084f91ccSmrgm4_pushdef([with_arg], m4_tolower([$1])) 9389084f91ccSmrg 9390084f91ccSmrgm4_pushdef([description], 9391084f91ccSmrg [m4_default([$5], [build with ]with_arg[ support])]) 9392084f91ccSmrg 9393084f91ccSmrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 9394084f91ccSmrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9395084f91ccSmrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9396084f91ccSmrg 9397084f91ccSmrgm4_case(def_arg, 9398084f91ccSmrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9399084f91ccSmrg [m4_pushdef([with_without],[--with-]with_arg)]) 9400084f91ccSmrg 9401084f91ccSmrgAC_ARG_WITH(with_arg, 9402084f91ccSmrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9403084f91ccSmrg [AS_TR_SH([with_]with_arg)=def_arg]) 9404084f91ccSmrg 9405084f91ccSmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 9406084f91ccSmrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9407084f91ccSmrg [auto],[PKG_CHECK_MODULES([$1],[$2], 9408084f91ccSmrg [m4_n([def_action_if_found]) $3], 9409084f91ccSmrg [m4_n([def_action_if_not_found]) $4])]) 9410084f91ccSmrg 9411084f91ccSmrgm4_popdef([with_arg]) 9412084f91ccSmrgm4_popdef([description]) 9413084f91ccSmrgm4_popdef([def_arg]) 9414084f91ccSmrg 9415084f91ccSmrg])dnl PKG_WITH_MODULES 9416084f91ccSmrg 9417084f91ccSmrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9418084f91ccSmrgdnl [DESCRIPTION], [DEFAULT]) 9419084f91ccSmrgdnl ----------------------------------------------- 9420084f91ccSmrgdnl 9421084f91ccSmrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9422084f91ccSmrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 9423084f91ccSmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 9424084f91ccSmrg[ 9425084f91ccSmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9426084f91ccSmrg 9427084f91ccSmrgAM_CONDITIONAL([HAVE_][$1], 9428084f91ccSmrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9429084f91ccSmrg])dnl PKG_HAVE_WITH_MODULES 9430084f91ccSmrg 9431084f91ccSmrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9432084f91ccSmrgdnl [DESCRIPTION], [DEFAULT]) 9433084f91ccSmrgdnl ------------------------------------------------------ 9434084f91ccSmrgdnl 9435084f91ccSmrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9436084f91ccSmrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9437084f91ccSmrgdnl and preprocessor variable. 9438084f91ccSmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9439084f91ccSmrg[ 9440084f91ccSmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9441084f91ccSmrg 9442084f91ccSmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9443084f91ccSmrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9444084f91ccSmrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 94459bd41f2cSmrg 9446ea0de359Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9447ea0de359Smrgdnl 9448084f91ccSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 9449084f91ccSmrgdnl 9450ea0de359Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9451ea0de359Smrgdnl copy of this software and associated documentation files (the "Software"), 9452ea0de359Smrgdnl to deal in the Software without restriction, including without limitation 9453ea0de359Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9454ea0de359Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9455ea0de359Smrgdnl Software is furnished to do so, subject to the following conditions: 9456ea0de359Smrgdnl 9457ea0de359Smrgdnl The above copyright notice and this permission notice (including the next 9458ea0de359Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9459ea0de359Smrgdnl Software. 9460ea0de359Smrgdnl 9461ea0de359Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9462ea0de359Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9463ea0de359Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9464ea0de359Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9465ea0de359Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9466ea0de359Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9467ea0de359Smrgdnl DEALINGS IN THE SOFTWARE. 94689418810dSmrg 9469ea0de359Smrg# XORG_MACROS_VERSION(required-version) 9470ea0de359Smrg# ------------------------------------- 9471ea0de359Smrg# Minimum version: 1.1.0 94729bd41f2cSmrg# 9473ea0de359Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9474ea0de359Smrg# your configure.ac with the minimum required version, such as: 9475ea0de359Smrg# XORG_MACROS_VERSION(1.1) 94769bd41f2cSmrg# 9477ea0de359Smrg# To ensure that this macro is defined, also add: 9478ea0de359Smrg# m4_ifndef([XORG_MACROS_VERSION], 9479ea0de359Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 94809418810dSmrg# 94819418810dSmrg# 9482084f91ccSmrg# See the "minimum version" comment for each macro you use to see what 9483ea0de359Smrg# version you require. 9484ea0de359Smrgm4_defun([XORG_MACROS_VERSION],[ 9485084f91ccSmrgm4_define([vers_have], [1.19.3]) 9486ea0de359Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9487ea0de359Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9488ea0de359Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9489ea0de359Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9490ea0de359Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9491ea0de359Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9492ea0de359Smrgm4_undefine([vers_have]) 9493ea0de359Smrgm4_undefine([maj_have]) 9494ea0de359Smrgm4_undefine([maj_needed]) 9495ea0de359Smrg]) # XORG_MACROS_VERSION 94969418810dSmrg 9497ea0de359Smrg# XORG_PROG_RAWCPP() 9498ea0de359Smrg# ------------------ 9499ea0de359Smrg# Minimum version: 1.0.0 95009bd41f2cSmrg# 9501ea0de359Smrg# Find cpp program and necessary flags for use in pre-processing text files 9502ea0de359Smrg# such as man pages and config files 9503ea0de359SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9504ea0de359SmrgAC_REQUIRE([AC_PROG_CPP]) 9505084f91ccSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 9506ea0de359Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 95079bd41f2cSmrg 9508ea0de359Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9509ea0de359Smrg# which is not the best choice for supporting other OS'es, but covers most 9510ea0de359Smrg# of the ones we need for now. 9511ea0de359SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 95120da4cdccSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9513ea0de359Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9514ea0de359Smrg AC_MSG_RESULT([no]) 9515ea0de359Smrgelse 9516ea0de359Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9517ea0de359Smrg RAWCPPFLAGS=-undef 9518ea0de359Smrg AC_MSG_RESULT([yes]) 9519ea0de359Smrg # under Cygwin unix is still defined even with -undef 9520ea0de359Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9521ea0de359Smrg RAWCPPFLAGS="-undef -ansi" 9522ea0de359Smrg AC_MSG_RESULT([yes, with -ansi]) 9523ea0de359Smrg else 9524ea0de359Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9525ea0de359Smrg fi 9526ea0de359Smrgfi 9527ea0de359Smrgrm -f conftest.$ac_ext 95289bd41f2cSmrg 9529ea0de359SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 95300da4cdccSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9531ea0de359Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9532ea0de359Smrg AC_MSG_RESULT([no]) 95339bd41f2cSmrgelse 9534ea0de359Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9535084f91ccSmrg TRADITIONALCPPFLAGS="-traditional" 9536ea0de359Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9537ea0de359Smrg AC_MSG_RESULT([yes]) 9538ea0de359Smrg else 9539ea0de359Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9540ea0de359Smrg fi 95419bd41f2cSmrgfi 9542ea0de359Smrgrm -f conftest.$ac_ext 9543ea0de359SmrgAC_SUBST(RAWCPPFLAGS) 9544084f91ccSmrgAC_SUBST(TRADITIONALCPPFLAGS) 9545ea0de359Smrg]) # XORG_PROG_RAWCPP 95469bd41f2cSmrg 9547ea0de359Smrg# XORG_MANPAGE_SECTIONS() 9548ea0de359Smrg# ----------------------- 9549ea0de359Smrg# Minimum version: 1.0.0 95509bd41f2cSmrg# 9551ea0de359Smrg# Determine which sections man pages go in for the different man page types 9552ea0de359Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9553ea0de359Smrg# Not sure if there's any better way than just hardcoding by OS name. 9554ea0de359Smrg# Override default settings by setting environment variables 9555ea0de359Smrg# Added MAN_SUBSTS in version 1.8 9556ea0de359Smrg# Added AC_PROG_SED in version 1.8 95579bd41f2cSmrg 9558ea0de359SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9559ea0de359SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9560ea0de359SmrgAC_REQUIRE([AC_PROG_SED]) 95619bd41f2cSmrg 9562084f91ccSmrgcase $host_os in 9563084f91ccSmrg solaris*) 9564084f91ccSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 9565084f91ccSmrg # check for a man page file found in later versions that use 9566084f91ccSmrg # traditional section numbers instead 9567084f91ccSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 9568084f91ccSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 9569084f91ccSmrg ;; 9570084f91ccSmrg *) SYSV_MAN_SECTIONS=false ;; 9571084f91ccSmrgesac 9572084f91ccSmrg 9573ea0de359Smrgif test x$APP_MAN_SUFFIX = x ; then 9574ea0de359Smrg APP_MAN_SUFFIX=1 9575ea0de359Smrgfi 9576ea0de359Smrgif test x$APP_MAN_DIR = x ; then 9577ea0de359Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9578ea0de359Smrgfi 95799bd41f2cSmrg 9580ea0de359Smrgif test x$LIB_MAN_SUFFIX = x ; then 9581ea0de359Smrg LIB_MAN_SUFFIX=3 9582ea0de359Smrgfi 9583ea0de359Smrgif test x$LIB_MAN_DIR = x ; then 9584ea0de359Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9585ea0de359Smrgfi 95869bd41f2cSmrg 9587ea0de359Smrgif test x$FILE_MAN_SUFFIX = x ; then 9588084f91ccSmrg case $SYSV_MAN_SECTIONS in 9589084f91ccSmrg true) FILE_MAN_SUFFIX=4 ;; 9590084f91ccSmrg *) FILE_MAN_SUFFIX=5 ;; 9591ea0de359Smrg esac 9592ea0de359Smrgfi 9593ea0de359Smrgif test x$FILE_MAN_DIR = x ; then 9594ea0de359Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9595ea0de359Smrgfi 95969bd41f2cSmrg 9597ea0de359Smrgif test x$MISC_MAN_SUFFIX = x ; then 9598084f91ccSmrg case $SYSV_MAN_SECTIONS in 9599084f91ccSmrg true) MISC_MAN_SUFFIX=5 ;; 9600084f91ccSmrg *) MISC_MAN_SUFFIX=7 ;; 9601ea0de359Smrg esac 9602ea0de359Smrgfi 9603ea0de359Smrgif test x$MISC_MAN_DIR = x ; then 9604ea0de359Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9605ea0de359Smrgfi 96069bd41f2cSmrg 9607ea0de359Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9608084f91ccSmrg case $SYSV_MAN_SECTIONS in 9609084f91ccSmrg true) DRIVER_MAN_SUFFIX=7 ;; 9610084f91ccSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9611ea0de359Smrg esac 9612ea0de359Smrgfi 9613ea0de359Smrgif test x$DRIVER_MAN_DIR = x ; then 9614ea0de359Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9615ea0de359Smrgfi 96169bd41f2cSmrg 9617ea0de359Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9618084f91ccSmrg case $SYSV_MAN_SECTIONS in 9619084f91ccSmrg true) ADMIN_MAN_SUFFIX=1m ;; 9620084f91ccSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9621ea0de359Smrg esac 9622ea0de359Smrgfi 9623ea0de359Smrgif test x$ADMIN_MAN_DIR = x ; then 9624ea0de359Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9625ea0de359Smrgfi 96269418810dSmrg 96279418810dSmrg 9628ea0de359SmrgAC_SUBST([APP_MAN_SUFFIX]) 9629ea0de359SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9630ea0de359SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9631ea0de359SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9632ea0de359SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9633ea0de359SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9634ea0de359SmrgAC_SUBST([APP_MAN_DIR]) 9635ea0de359SmrgAC_SUBST([LIB_MAN_DIR]) 9636ea0de359SmrgAC_SUBST([FILE_MAN_DIR]) 9637ea0de359SmrgAC_SUBST([MISC_MAN_DIR]) 9638ea0de359SmrgAC_SUBST([DRIVER_MAN_DIR]) 9639ea0de359SmrgAC_SUBST([ADMIN_MAN_DIR]) 96409418810dSmrg 9641ea0de359SmrgXORG_MAN_PAGE="X Version 11" 9642ea0de359SmrgAC_SUBST([XORG_MAN_PAGE]) 9643ea0de359SmrgMAN_SUBSTS="\ 9644ea0de359Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9645ea0de359Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9646ea0de359Smrg -e 's|__xservername__|Xorg|g' \ 9647ea0de359Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9648ea0de359Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9649c4f7863aSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9650ea0de359Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9651ea0de359Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9652ea0de359Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9653ea0de359Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9654ea0de359Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9655ea0de359Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9656ea0de359SmrgAC_SUBST([MAN_SUBSTS]) 9657ea0de359Smrg 9658ea0de359Smrg]) # XORG_MANPAGE_SECTIONS 9659ea0de359Smrg 9660ea0de359Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9661ea0de359Smrg# ------------------------ 9662ea0de359Smrg# Minimum version: 1.7.0 9663ea0de359Smrg# 9664ea0de359Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9665ea0de359Smrg# provided by xorg-sgml-doctools, if installed. 9666ea0de359SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9667ea0de359SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9668ea0de359SmrgXORG_SGML_PATH= 9669ea0de359SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9670ea0de359Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9671ea0de359Smrg [m4_ifval([$1],[:], 9672ea0de359Smrg [if test x"$cross_compiling" != x"yes" ; then 9673ea0de359Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9674ea0de359Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9675ea0de359Smrg fi]) 9676ea0de359Smrg ]) 9677ea0de359Smrg 9678ea0de359Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9679ea0de359Smrg# the path and the name of the doc stylesheet 9680ea0de359Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9681ea0de359Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9682ea0de359Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9683ea0de359Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 96849418810dSmrgelse 9685ea0de359Smrg AC_MSG_RESULT([no]) 96869bd41f2cSmrgfi 96879bd41f2cSmrg 9688ea0de359SmrgAC_SUBST(XORG_SGML_PATH) 9689ea0de359SmrgAC_SUBST(STYLESHEET_SRCDIR) 9690ea0de359SmrgAC_SUBST(XSL_STYLESHEET) 9691ea0de359SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9692ea0de359Smrg]) # XORG_CHECK_SGML_DOCTOOLS 96939bd41f2cSmrg 9694ea0de359Smrg# XORG_CHECK_LINUXDOC 9695ea0de359Smrg# ------------------- 9696ea0de359Smrg# Minimum version: 1.0.0 9697ea0de359Smrg# 9698ea0de359Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9699ea0de359Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9700ea0de359Smrg# Whether or not the necessary tools and files are found can be checked 9701ea0de359Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9702ea0de359SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9703ea0de359SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9704ea0de359SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 97059bd41f2cSmrg 9706ea0de359SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 97079bd41f2cSmrg 9708ea0de359SmrgAC_MSG_CHECKING([whether to build documentation]) 9709ea0de359Smrg 9710ea0de359Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9711ea0de359Smrg BUILDDOC=yes 9712ea0de359Smrgelse 9713ea0de359Smrg BUILDDOC=no 97149bd41f2cSmrgfi 97159bd41f2cSmrg 9716ea0de359SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 97179bd41f2cSmrg 9718ea0de359SmrgAC_MSG_RESULT([$BUILDDOC]) 9719ea0de359Smrg 9720ea0de359SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9721ea0de359Smrg 9722ea0de359Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9723ea0de359Smrg BUILDPDFDOC=yes 9724ea0de359Smrgelse 9725ea0de359Smrg BUILDPDFDOC=no 9726ea0de359Smrgfi 9727ea0de359Smrg 9728ea0de359SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9729ea0de359Smrg 9730ea0de359SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9731ea0de359Smrg 9732ea0de359SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9733ea0de359SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9734ea0de359SmrgMAKE_PDF="$PS2PDF" 9735ea0de359SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9736ea0de359Smrg 9737ea0de359SmrgAC_SUBST(MAKE_TEXT) 9738ea0de359SmrgAC_SUBST(MAKE_PS) 9739ea0de359SmrgAC_SUBST(MAKE_PDF) 9740ea0de359SmrgAC_SUBST(MAKE_HTML) 9741ea0de359Smrg]) # XORG_CHECK_LINUXDOC 9742ea0de359Smrg 9743ea0de359Smrg# XORG_CHECK_DOCBOOK 9744ea0de359Smrg# ------------------- 9745ea0de359Smrg# Minimum version: 1.0.0 97469418810dSmrg# 9747ea0de359Smrg# Checks for the ability to build output formats from SGML DocBook source. 9748ea0de359Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9749ea0de359Smrg# indicates whether the necessary tools and files are found and, if set, 9750ea0de359Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9751ea0de359SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9752ea0de359SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 97539bd41f2cSmrg 9754ea0de359SmrgBUILDTXTDOC=no 9755ea0de359SmrgBUILDPDFDOC=no 9756ea0de359SmrgBUILDPSDOC=no 9757ea0de359SmrgBUILDHTMLDOC=no 97589bd41f2cSmrg 9759ea0de359SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9760ea0de359SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9761ea0de359SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9762ea0de359SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 97639bd41f2cSmrg 9764ea0de359SmrgAC_MSG_CHECKING([whether to build text documentation]) 9765ea0de359Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9766ea0de359Smrg test x$BUILD_TXTDOC != xno; then 9767ea0de359Smrg BUILDTXTDOC=yes 9768ea0de359Smrgfi 9769ea0de359SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9770ea0de359SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 97719bd41f2cSmrg 9772ea0de359SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9773ea0de359Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9774ea0de359Smrg test x$BUILD_PDFDOC != xno; then 9775ea0de359Smrg BUILDPDFDOC=yes 9776ea0de359Smrgfi 9777ea0de359SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9778ea0de359SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 97799bd41f2cSmrg 9780ea0de359SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9781ea0de359Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9782ea0de359Smrg test x$BUILD_PSDOC != xno; then 9783ea0de359Smrg BUILDPSDOC=yes 9784ea0de359Smrgfi 9785ea0de359SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9786ea0de359SmrgAC_MSG_RESULT([$BUILDPSDOC]) 97879bd41f2cSmrg 9788ea0de359SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9789ea0de359Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9790ea0de359Smrg test x$BUILD_HTMLDOC != xno; then 9791ea0de359Smrg BUILDHTMLDOC=yes 9792ea0de359Smrgfi 9793ea0de359SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9794ea0de359SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 97959bd41f2cSmrg 9796ea0de359SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9797ea0de359SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9798ea0de359SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9799ea0de359SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 98009bd41f2cSmrg 9801ea0de359SmrgAC_SUBST(MAKE_TEXT) 9802ea0de359SmrgAC_SUBST(MAKE_PS) 9803ea0de359SmrgAC_SUBST(MAKE_PDF) 9804ea0de359SmrgAC_SUBST(MAKE_HTML) 9805ea0de359Smrg]) # XORG_CHECK_DOCBOOK 98069bd41f2cSmrg 9807c4f7863aSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9808ea0de359Smrg# ---------------- 9809ea0de359Smrg# Minimum version: 1.5.0 9810c4f7863aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 98119bd41f2cSmrg# 9812ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 9813ea0de359Smrg# not at the appropriate level. This macro enables a module to test for the 9814ea0de359Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9815ea0de359Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9816c4f7863aSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9817c4f7863aSmrg# --with-xmlto assumes 'auto'. 9818ea0de359Smrg# 9819ea0de359Smrg# Interface to module: 9820ea0de359Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9821ea0de359Smrg# XMLTO: returns the path of the xmlto program found 9822ea0de359Smrg# returns the path set by the user in the environment 9823ea0de359Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9824ea0de359Smrg# 'no' user instructs the module not to use xmlto 9825ea0de359Smrg# 9826ea0de359Smrg# Added in version 1.10.0 9827ea0de359Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9828ea0de359Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9829ea0de359Smrg# 9830ea0de359Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9831ea0de359Smrg# 9832ea0de359SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9833ea0de359SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9834c4f7863aSmrgm4_define([_defopt], m4_default([$2], [auto])) 9835ea0de359SmrgAC_ARG_WITH(xmlto, 9836ea0de359Smrg AS_HELP_STRING([--with-xmlto], 9837c4f7863aSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9838c4f7863aSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9839c4f7863aSmrgm4_undefine([_defopt]) 98409bd41f2cSmrg 9841ea0de359Smrgif test "x$use_xmlto" = x"auto"; then 9842ea0de359Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9843ea0de359Smrg if test "x$XMLTO" = "x"; then 9844ea0de359Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9845ea0de359Smrg have_xmlto=no 9846ea0de359Smrg else 9847ea0de359Smrg have_xmlto=yes 9848ea0de359Smrg fi 9849ea0de359Smrgelif test "x$use_xmlto" = x"yes" ; then 9850ea0de359Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9851ea0de359Smrg if test "x$XMLTO" = "x"; then 9852ea0de359Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9853ea0de359Smrg fi 9854ea0de359Smrg have_xmlto=yes 9855ea0de359Smrgelif test "x$use_xmlto" = x"no" ; then 9856ea0de359Smrg if test "x$XMLTO" != "x"; then 9857ea0de359Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9858ea0de359Smrg fi 9859ea0de359Smrg have_xmlto=no 9860ea0de359Smrgelse 9861ea0de359Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 98629bd41f2cSmrgfi 98639bd41f2cSmrg 9864ea0de359Smrg# Test for a minimum version of xmlto, if provided. 9865ea0de359Smrgm4_ifval([$1], 9866ea0de359Smrg[if test "$have_xmlto" = yes; then 9867ea0de359Smrg # scrape the xmlto version 9868ea0de359Smrg AC_MSG_CHECKING([the xmlto version]) 9869ea0de359Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9870ea0de359Smrg AC_MSG_RESULT([$xmlto_version]) 9871ea0de359Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9872ea0de359Smrg [if test "x$use_xmlto" = xauto; then 9873ea0de359Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9874ea0de359Smrg have_xmlto=no 9875ea0de359Smrg else 9876ea0de359Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9877ea0de359Smrg fi]) 9878ea0de359Smrgfi]) 98799bd41f2cSmrg 9880ea0de359Smrg# Test for the ability of xmlto to generate a text target 9881084f91ccSmrg# 9882084f91ccSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 9883084f91ccSmrg# following test for empty XML docbook files. 9884084f91ccSmrg# For compatibility reasons use the following empty XML docbook file and if 9885084f91ccSmrg# it fails try it again with a non-empty XML file. 9886ea0de359Smrghave_xmlto_text=no 9887ea0de359Smrgcat > conftest.xml << "EOF" 9888ea0de359SmrgEOF 9889ea0de359SmrgAS_IF([test "$have_xmlto" = yes], 9890ea0de359Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9891ea0de359Smrg [have_xmlto_text=yes], 9892084f91ccSmrg [# Try it again with a non-empty XML file. 9893084f91ccSmrg cat > conftest.xml << "EOF" 9894084f91ccSmrg<x></x> 9895084f91ccSmrgEOF 9896084f91ccSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9897084f91ccSmrg [have_xmlto_text=yes], 9898084f91ccSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 9899ea0de359Smrgrm -f conftest.xml 9900ea0de359SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9901ea0de359SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9902ea0de359Smrg]) # XORG_WITH_XMLTO 99039bd41f2cSmrg 99040da4cdccSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 99050da4cdccSmrg# -------------------------------------------- 99060da4cdccSmrg# Minimum version: 1.12.0 99070da4cdccSmrg# Minimum version for optional DEFAULT argument: 1.12.0 99080da4cdccSmrg# 99090da4cdccSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 99100da4cdccSmrg# XML-based language used for the transformation of XML documents. 99110da4cdccSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 99120da4cdccSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 99130da4cdccSmrg# The XSLT processor is often used as a standalone tool for transformations. 99140da4cdccSmrg# It should not be assumed that this tool is used only to work with documnetation. 99150da4cdccSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 99160da4cdccSmrg# 99170da4cdccSmrg# Interface to module: 99180da4cdccSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 99190da4cdccSmrg# XSLTPROC: returns the path of the xsltproc program found 99200da4cdccSmrg# returns the path set by the user in the environment 99210da4cdccSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 99220da4cdccSmrg# 'no' user instructs the module not to use xsltproc 99230da4cdccSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 99240da4cdccSmrg# 99250da4cdccSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 99260da4cdccSmrg# 99270da4cdccSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 99280da4cdccSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 99290da4cdccSmrg# Preserves the interface, should it be implemented later 99300da4cdccSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 99310da4cdccSmrgm4_define([_defopt], m4_default([$2], [auto])) 99320da4cdccSmrgAC_ARG_WITH(xsltproc, 99330da4cdccSmrg AS_HELP_STRING([--with-xsltproc], 99340da4cdccSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 99350da4cdccSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 99360da4cdccSmrgm4_undefine([_defopt]) 99370da4cdccSmrg 99380da4cdccSmrgif test "x$use_xsltproc" = x"auto"; then 99390da4cdccSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 99400da4cdccSmrg if test "x$XSLTPROC" = "x"; then 99410da4cdccSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 99420da4cdccSmrg have_xsltproc=no 99430da4cdccSmrg else 99440da4cdccSmrg have_xsltproc=yes 99450da4cdccSmrg fi 99460da4cdccSmrgelif test "x$use_xsltproc" = x"yes" ; then 99470da4cdccSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 99480da4cdccSmrg if test "x$XSLTPROC" = "x"; then 99490da4cdccSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 99500da4cdccSmrg fi 99510da4cdccSmrg have_xsltproc=yes 99520da4cdccSmrgelif test "x$use_xsltproc" = x"no" ; then 99530da4cdccSmrg if test "x$XSLTPROC" != "x"; then 99540da4cdccSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 99550da4cdccSmrg fi 99560da4cdccSmrg have_xsltproc=no 99570da4cdccSmrgelse 99580da4cdccSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 99590da4cdccSmrgfi 99600da4cdccSmrg 99610da4cdccSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 99620da4cdccSmrg]) # XORG_WITH_XSLTPROC 99630da4cdccSmrg 99640da4cdccSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 99650da4cdccSmrg# ---------------------------------------- 99660da4cdccSmrg# Minimum version: 1.15.0 99670da4cdccSmrg# 99680da4cdccSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 99690da4cdccSmrg# scanning arbitrary text files, extracting information from those text files, 99700da4cdccSmrg# and printing reports based on that information. 99710da4cdccSmrg# 99720da4cdccSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 99730da4cdccSmrg# 99740da4cdccSmrg# Interface to module: 99750da4cdccSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 99760da4cdccSmrg# PERL: returns the path of the perl program found 99770da4cdccSmrg# returns the path set by the user in the environment 99780da4cdccSmrg# --with-perl: 'yes' user instructs the module to use perl 99790da4cdccSmrg# 'no' user instructs the module not to use perl 99800da4cdccSmrg# have_perl: returns yes if perl found in PATH or no 99810da4cdccSmrg# 99820da4cdccSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 99830da4cdccSmrg# 99840da4cdccSmrgAC_DEFUN([XORG_WITH_PERL],[ 99850da4cdccSmrgAC_ARG_VAR([PERL], [Path to perl command]) 99860da4cdccSmrg# Preserves the interface, should it be implemented later 99870da4cdccSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 99880da4cdccSmrgm4_define([_defopt], m4_default([$2], [auto])) 99890da4cdccSmrgAC_ARG_WITH(perl, 99900da4cdccSmrg AS_HELP_STRING([--with-perl], 99910da4cdccSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 99920da4cdccSmrg [use_perl=$withval], [use_perl=]_defopt) 99930da4cdccSmrgm4_undefine([_defopt]) 99940da4cdccSmrg 99950da4cdccSmrgif test "x$use_perl" = x"auto"; then 99960da4cdccSmrg AC_PATH_PROG([PERL], [perl]) 99970da4cdccSmrg if test "x$PERL" = "x"; then 99980da4cdccSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 99990da4cdccSmrg have_perl=no 100000da4cdccSmrg else 100010da4cdccSmrg have_perl=yes 100020da4cdccSmrg fi 100030da4cdccSmrgelif test "x$use_perl" = x"yes" ; then 100040da4cdccSmrg AC_PATH_PROG([PERL], [perl]) 100050da4cdccSmrg if test "x$PERL" = "x"; then 100060da4cdccSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 100070da4cdccSmrg fi 100080da4cdccSmrg have_perl=yes 100090da4cdccSmrgelif test "x$use_perl" = x"no" ; then 100100da4cdccSmrg if test "x$PERL" != "x"; then 100110da4cdccSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 100120da4cdccSmrg fi 100130da4cdccSmrg have_perl=no 100140da4cdccSmrgelse 100150da4cdccSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 100160da4cdccSmrgfi 100170da4cdccSmrg 100180da4cdccSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 100190da4cdccSmrg]) # XORG_WITH_PERL 100200da4cdccSmrg 10021c4f7863aSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10022ea0de359Smrg# ---------------- 10023ea0de359Smrg# Minimum version: 1.5.0 10024c4f7863aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 100259bd41f2cSmrg# 10026ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 10027ea0de359Smrg# not at the appropriate level. This macro enables a module to test for the 10028ea0de359Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10029ea0de359Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10030c4f7863aSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10031c4f7863aSmrg# --with-asciidoc assumes 'auto'. 10032ea0de359Smrg# 10033ea0de359Smrg# Interface to module: 10034ea0de359Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10035ea0de359Smrg# ASCIIDOC: returns the path of the asciidoc program found 10036ea0de359Smrg# returns the path set by the user in the environment 10037ea0de359Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10038ea0de359Smrg# 'no' user instructs the module not to use asciidoc 10039ea0de359Smrg# 10040ea0de359Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10041ea0de359Smrg# 10042ea0de359SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10043ea0de359SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10044c4f7863aSmrgm4_define([_defopt], m4_default([$2], [auto])) 10045ea0de359SmrgAC_ARG_WITH(asciidoc, 10046ea0de359Smrg AS_HELP_STRING([--with-asciidoc], 10047c4f7863aSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10048c4f7863aSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10049c4f7863aSmrgm4_undefine([_defopt]) 100509bd41f2cSmrg 10051ea0de359Smrgif test "x$use_asciidoc" = x"auto"; then 10052ea0de359Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10053ea0de359Smrg if test "x$ASCIIDOC" = "x"; then 10054ea0de359Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10055ea0de359Smrg have_asciidoc=no 10056ea0de359Smrg else 10057ea0de359Smrg have_asciidoc=yes 10058ea0de359Smrg fi 10059ea0de359Smrgelif test "x$use_asciidoc" = x"yes" ; then 10060ea0de359Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10061ea0de359Smrg if test "x$ASCIIDOC" = "x"; then 10062ea0de359Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10063ea0de359Smrg fi 10064ea0de359Smrg have_asciidoc=yes 10065ea0de359Smrgelif test "x$use_asciidoc" = x"no" ; then 10066ea0de359Smrg if test "x$ASCIIDOC" != "x"; then 10067ea0de359Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10068ea0de359Smrg fi 10069ea0de359Smrg have_asciidoc=no 10070ea0de359Smrgelse 10071ea0de359Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 100729bd41f2cSmrgfi 10073ea0de359Smrgm4_ifval([$1], 10074ea0de359Smrg[if test "$have_asciidoc" = yes; then 10075ea0de359Smrg # scrape the asciidoc version 10076ea0de359Smrg AC_MSG_CHECKING([the asciidoc version]) 10077ea0de359Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10078ea0de359Smrg AC_MSG_RESULT([$asciidoc_version]) 10079ea0de359Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10080ea0de359Smrg [if test "x$use_asciidoc" = xauto; then 10081ea0de359Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10082ea0de359Smrg have_asciidoc=no 10083ea0de359Smrg else 10084ea0de359Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10085ea0de359Smrg fi]) 10086ea0de359Smrgfi]) 10087ea0de359SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10088ea0de359Smrg]) # XORG_WITH_ASCIIDOC 100899bd41f2cSmrg 10090c4f7863aSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10091084f91ccSmrg# ------------------------------------------- 10092ea0de359Smrg# Minimum version: 1.5.0 10093c4f7863aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10094084f91ccSmrg# Minimum version for optional DOT checking: 1.18.0 100959418810dSmrg# 10096ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 10097ea0de359Smrg# not at the appropriate level. This macro enables a module to test for the 10098ea0de359Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10099ea0de359Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10100c4f7863aSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10101c4f7863aSmrg# --with-doxygen assumes 'auto'. 10102ea0de359Smrg# 10103ea0de359Smrg# Interface to module: 10104ea0de359Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10105ea0de359Smrg# DOXYGEN: returns the path of the doxygen program found 10106ea0de359Smrg# returns the path set by the user in the environment 10107ea0de359Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10108ea0de359Smrg# 'no' user instructs the module not to use doxygen 10109ea0de359Smrg# 10110ea0de359Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10111ea0de359Smrg# 10112ea0de359SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10113ea0de359SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10114084f91ccSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10115c4f7863aSmrgm4_define([_defopt], m4_default([$2], [auto])) 10116ea0de359SmrgAC_ARG_WITH(doxygen, 10117ea0de359Smrg AS_HELP_STRING([--with-doxygen], 10118c4f7863aSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10119c4f7863aSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10120c4f7863aSmrgm4_undefine([_defopt]) 101219418810dSmrg 10122ea0de359Smrgif test "x$use_doxygen" = x"auto"; then 10123ea0de359Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10124ea0de359Smrg if test "x$DOXYGEN" = "x"; then 10125ea0de359Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10126ea0de359Smrg have_doxygen=no 10127ea0de359Smrg else 10128ea0de359Smrg have_doxygen=yes 10129ea0de359Smrg fi 10130ea0de359Smrgelif test "x$use_doxygen" = x"yes" ; then 10131ea0de359Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10132ea0de359Smrg if test "x$DOXYGEN" = "x"; then 10133ea0de359Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10134ea0de359Smrg fi 10135ea0de359Smrg have_doxygen=yes 10136ea0de359Smrgelif test "x$use_doxygen" = x"no" ; then 10137ea0de359Smrg if test "x$DOXYGEN" != "x"; then 10138ea0de359Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10139ea0de359Smrg fi 10140ea0de359Smrg have_doxygen=no 101419bd41f2cSmrgelse 10142ea0de359Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 101439bd41f2cSmrgfi 10144ea0de359Smrgm4_ifval([$1], 10145ea0de359Smrg[if test "$have_doxygen" = yes; then 10146ea0de359Smrg # scrape the doxygen version 10147ea0de359Smrg AC_MSG_CHECKING([the doxygen version]) 10148ea0de359Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10149ea0de359Smrg AC_MSG_RESULT([$doxygen_version]) 10150ea0de359Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10151ea0de359Smrg [if test "x$use_doxygen" = xauto; then 10152ea0de359Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10153ea0de359Smrg have_doxygen=no 10154ea0de359Smrg else 10155ea0de359Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10156ea0de359Smrg fi]) 10157ea0de359Smrgfi]) 10158084f91ccSmrg 10159084f91ccSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10160084f91ccSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10161084f91ccSmrgdnl HAVE_DOT = @HAVE_DOT@ 10162084f91ccSmrgHAVE_DOT=no 10163084f91ccSmrgif test "x$have_doxygen" = "xyes"; then 10164084f91ccSmrg AC_PATH_PROG([DOT], [dot]) 10165084f91ccSmrg if test "x$DOT" != "x"; then 10166084f91ccSmrg HAVE_DOT=yes 10167084f91ccSmrg fi 10168084f91ccSmrgfi 10169084f91ccSmrg 10170084f91ccSmrgAC_SUBST([HAVE_DOT]) 10171084f91ccSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10172ea0de359SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10173ea0de359Smrg]) # XORG_WITH_DOXYGEN 101749bd41f2cSmrg 10175c4f7863aSmrg# XORG_WITH_GROFF([DEFAULT]) 10176ea0de359Smrg# ---------------- 10177ea0de359Smrg# Minimum version: 1.6.0 10178c4f7863aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 101799bd41f2cSmrg# 10180ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 10181ea0de359Smrg# not at the appropriate level. This macro enables a module to test for the 10182ea0de359Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10183ea0de359Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10184c4f7863aSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 10185c4f7863aSmrg# --with-groff assumes 'auto'. 101869418810dSmrg# 10187ea0de359Smrg# Interface to module: 10188ea0de359Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10189ea0de359Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10190ea0de359Smrg# HAVE_GROFF_MS: the -ms macros package 10191ea0de359Smrg# GROFF: returns the path of the groff program found 10192ea0de359Smrg# returns the path set by the user in the environment 10193ea0de359Smrg# --with-groff: 'yes' user instructs the module to use groff 10194ea0de359Smrg# 'no' user instructs the module not to use groff 10195ea0de359Smrg# 10196ea0de359Smrg# Added in version 1.9.0: 10197ea0de359Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10198ea0de359Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10199ea0de359Smrg# psselect from the psutils package. 10200ea0de359Smrg# the ghostcript package. Refer to the grohtml man pages 10201ea0de359Smrg# 10202ea0de359Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10203ea0de359Smrg# 10204ea0de359Smrg# OS and distros often splits groff in a basic and full package, the former 10205ea0de359Smrg# having the groff program and the later having devices, fonts and macros 10206ea0de359Smrg# Checking for the groff executable is not enough. 10207ea0de359Smrg# 10208ea0de359Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10209ea0de359Smrg# unset HAVE_GROFF or GROFF env variables. 10210ea0de359Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10211ea0de359Smrg# 10212ea0de359SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10213ea0de359SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10214c4f7863aSmrgm4_define([_defopt], m4_default([$1], [auto])) 10215ea0de359SmrgAC_ARG_WITH(groff, 10216ea0de359Smrg AS_HELP_STRING([--with-groff], 10217c4f7863aSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10218c4f7863aSmrg [use_groff=$withval], [use_groff=]_defopt) 10219c4f7863aSmrgm4_undefine([_defopt]) 102209bd41f2cSmrg 10221ea0de359Smrgif test "x$use_groff" = x"auto"; then 10222ea0de359Smrg AC_PATH_PROG([GROFF], [groff]) 10223ea0de359Smrg if test "x$GROFF" = "x"; then 10224ea0de359Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10225ea0de359Smrg have_groff=no 10226ea0de359Smrg else 10227ea0de359Smrg have_groff=yes 10228ea0de359Smrg fi 10229ea0de359Smrgelif test "x$use_groff" = x"yes" ; then 10230ea0de359Smrg AC_PATH_PROG([GROFF], [groff]) 10231ea0de359Smrg if test "x$GROFF" = "x"; then 10232ea0de359Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10233ea0de359Smrg fi 10234ea0de359Smrg have_groff=yes 10235ea0de359Smrgelif test "x$use_groff" = x"no" ; then 10236ea0de359Smrg if test "x$GROFF" != "x"; then 10237ea0de359Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10238ea0de359Smrg fi 10239ea0de359Smrg have_groff=no 10240ea0de359Smrgelse 10241ea0de359Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10242b15a006bSmrgfi 102439bd41f2cSmrg 10244ea0de359Smrg# We have groff, test for the presence of the macro packages 10245ea0de359Smrgif test "x$have_groff" = x"yes"; then 10246ea0de359Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10247ea0de359Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10248ea0de359Smrg groff_ms_works=yes 10249ea0de359Smrg else 10250ea0de359Smrg groff_ms_works=no 10251ea0de359Smrg fi 10252ea0de359Smrg AC_MSG_RESULT([$groff_ms_works]) 10253ea0de359Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10254ea0de359Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10255ea0de359Smrg groff_mm_works=yes 10256ea0de359Smrg else 10257ea0de359Smrg groff_mm_works=no 10258ea0de359Smrg fi 10259ea0de359Smrg AC_MSG_RESULT([$groff_mm_works]) 10260ea0de359Smrgfi 10261b15a006bSmrg 10262ea0de359Smrg# We have groff, test for HTML dependencies, one command per package 10263ea0de359Smrgif test "x$have_groff" = x"yes"; then 10264ea0de359Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10265ea0de359Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10266ea0de359Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10267ea0de359Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10268ea0de359Smrg have_groff_html=yes 10269ea0de359Smrg else 10270ea0de359Smrg have_groff_html=no 10271ea0de359Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10272ea0de359Smrg fi 10273ea0de359Smrgfi 10274b15a006bSmrg 10275ea0de359Smrg# Set Automake conditionals for Makefiles 10276ea0de359SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10277ea0de359SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10278ea0de359SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10279ea0de359SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10280ea0de359Smrg]) # XORG_WITH_GROFF 10281b15a006bSmrg 102820da4cdccSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 102830da4cdccSmrg# --------------------------------------- 10284ea0de359Smrg# Minimum version: 1.6.0 10285c4f7863aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 102860da4cdccSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10287ea0de359Smrg# 10288ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 10289ea0de359Smrg# not at the appropriate level. This macro enables a module to test for the 10290ea0de359Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10291ea0de359Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10292c4f7863aSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 10293c4f7863aSmrg# --with-fop assumes 'auto'. 10294ea0de359Smrg# 10295ea0de359Smrg# Interface to module: 10296ea0de359Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10297ea0de359Smrg# FOP: returns the path of the fop program found 10298ea0de359Smrg# returns the path set by the user in the environment 10299ea0de359Smrg# --with-fop: 'yes' user instructs the module to use fop 10300ea0de359Smrg# 'no' user instructs the module not to use fop 10301ea0de359Smrg# 10302ea0de359Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10303ea0de359Smrg# 10304ea0de359SmrgAC_DEFUN([XORG_WITH_FOP],[ 10305ea0de359SmrgAC_ARG_VAR([FOP], [Path to fop command]) 103060da4cdccSmrgm4_define([_defopt], m4_default([$2], [auto])) 10307ea0de359SmrgAC_ARG_WITH(fop, 10308ea0de359Smrg AS_HELP_STRING([--with-fop], 10309c4f7863aSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10310c4f7863aSmrg [use_fop=$withval], [use_fop=]_defopt) 10311c4f7863aSmrgm4_undefine([_defopt]) 103129418810dSmrg 10313ea0de359Smrgif test "x$use_fop" = x"auto"; then 10314ea0de359Smrg AC_PATH_PROG([FOP], [fop]) 10315ea0de359Smrg if test "x$FOP" = "x"; then 10316ea0de359Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10317ea0de359Smrg have_fop=no 10318ea0de359Smrg else 10319ea0de359Smrg have_fop=yes 10320ea0de359Smrg fi 10321ea0de359Smrgelif test "x$use_fop" = x"yes" ; then 10322ea0de359Smrg AC_PATH_PROG([FOP], [fop]) 10323ea0de359Smrg if test "x$FOP" = "x"; then 10324ea0de359Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10325ea0de359Smrg fi 10326ea0de359Smrg have_fop=yes 10327ea0de359Smrgelif test "x$use_fop" = x"no" ; then 10328ea0de359Smrg if test "x$FOP" != "x"; then 10329ea0de359Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10330ea0de359Smrg fi 10331ea0de359Smrg have_fop=no 103329418810dSmrgelse 10333ea0de359Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 103349418810dSmrgfi 103350da4cdccSmrg 103360da4cdccSmrg# Test for a minimum version of fop, if provided. 103370da4cdccSmrgm4_ifval([$1], 103380da4cdccSmrg[if test "$have_fop" = yes; then 103390da4cdccSmrg # scrape the fop version 103400da4cdccSmrg AC_MSG_CHECKING([for fop minimum version]) 103410da4cdccSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 103420da4cdccSmrg AC_MSG_RESULT([$fop_version]) 103430da4cdccSmrg AS_VERSION_COMPARE([$fop_version], [$1], 103440da4cdccSmrg [if test "x$use_fop" = xauto; then 103450da4cdccSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 103460da4cdccSmrg have_fop=no 103470da4cdccSmrg else 103480da4cdccSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 103490da4cdccSmrg fi]) 103500da4cdccSmrgfi]) 10351ea0de359SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10352ea0de359Smrg]) # XORG_WITH_FOP 10353b15a006bSmrg 10354084f91ccSmrg# XORG_WITH_M4([MIN-VERSION]) 10355084f91ccSmrg# --------------------------- 10356084f91ccSmrg# Minimum version: 1.19.0 10357084f91ccSmrg# 10358084f91ccSmrg# This macro attempts to locate an m4 macro processor which supports 10359084f91ccSmrg# -I option and is only useful for modules relying on M4 in order to 10360084f91ccSmrg# expand macros in source code files. 10361084f91ccSmrg# 10362084f91ccSmrg# Interface to module: 10363084f91ccSmrg# M4: returns the path of the m4 program found 10364084f91ccSmrg# returns the path set by the user in the environment 10365084f91ccSmrg# 10366084f91ccSmrgAC_DEFUN([XORG_WITH_M4], [ 10367084f91ccSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10368084f91ccSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10369084f91ccSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10370084f91ccSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10371084f91ccSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10372084f91ccSmrg [$PATH:/usr/gnu/bin])]) 10373084f91ccSmrg 10374084f91ccSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10375084f91ccSmrg]) # XORG_WITH_M4 10376084f91ccSmrg 10377c4f7863aSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10378ea0de359Smrg# ---------------- 10379ea0de359Smrg# Minimum version: 1.6.0 10380c4f7863aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 103819bd41f2cSmrg# 10382ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 10383ea0de359Smrg# not at the appropriate level. This macro enables a module to test for the 10384ea0de359Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10385ea0de359Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10386c4f7863aSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10387c4f7863aSmrg# --with-ps2pdf assumes 'auto'. 103889418810dSmrg# 10389ea0de359Smrg# Interface to module: 10390ea0de359Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10391ea0de359Smrg# PS2PDF: returns the path of the ps2pdf program found 10392ea0de359Smrg# returns the path set by the user in the environment 10393ea0de359Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10394ea0de359Smrg# 'no' user instructs the module not to use ps2pdf 10395ea0de359Smrg# 10396ea0de359Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10397ea0de359Smrg# 10398ea0de359SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10399ea0de359SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10400c4f7863aSmrgm4_define([_defopt], m4_default([$1], [auto])) 10401ea0de359SmrgAC_ARG_WITH(ps2pdf, 10402ea0de359Smrg AS_HELP_STRING([--with-ps2pdf], 10403c4f7863aSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10404c4f7863aSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10405c4f7863aSmrgm4_undefine([_defopt]) 104069bd41f2cSmrg 10407ea0de359Smrgif test "x$use_ps2pdf" = x"auto"; then 10408ea0de359Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10409ea0de359Smrg if test "x$PS2PDF" = "x"; then 10410ea0de359Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10411ea0de359Smrg have_ps2pdf=no 10412ea0de359Smrg else 10413ea0de359Smrg have_ps2pdf=yes 104149418810dSmrg fi 10415ea0de359Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10416ea0de359Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10417ea0de359Smrg if test "x$PS2PDF" = "x"; then 10418ea0de359Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 104199418810dSmrg fi 10420ea0de359Smrg have_ps2pdf=yes 10421ea0de359Smrgelif test "x$use_ps2pdf" = x"no" ; then 10422ea0de359Smrg if test "x$PS2PDF" != "x"; then 10423ea0de359Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10424ea0de359Smrg fi 10425ea0de359Smrg have_ps2pdf=no 104269418810dSmrgelse 10427ea0de359Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 104289418810dSmrgfi 10429ea0de359SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10430ea0de359Smrg]) # XORG_WITH_PS2PDF 104319418810dSmrg 10432ea0de359Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10433ea0de359Smrg# ---------------- 10434ea0de359Smrg# Minimum version: 1.6.0 104359bd41f2cSmrg# 10436ea0de359Smrg# Documentation tools are not always available on all platforms and sometimes 10437ea0de359Smrg# not at the appropriate level. This macro enables a builder to skip all 10438ea0de359Smrg# documentation targets except traditional man pages. 10439ea0de359Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10440ea0de359Smrg# maximum flexibilty in controlling documentation building. 10441ea0de359Smrg# Refer to: 10442ea0de359Smrg# XORG_WITH_XMLTO --with-xmlto 10443ea0de359Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10444ea0de359Smrg# XORG_WITH_DOXYGEN --with-doxygen 10445ea0de359Smrg# XORG_WITH_FOP --with-fop 10446ea0de359Smrg# XORG_WITH_GROFF --with-groff 10447ea0de359Smrg# XORG_WITH_PS2PDF --with-ps2pdf 104489bd41f2cSmrg# 10449ea0de359Smrg# Interface to module: 10450ea0de359Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10451ea0de359Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10452ea0de359Smrg# 'no' user instructs the module not to generate docs 10453ea0de359Smrg# parm1: specify the default value, yes or no. 10454ea0de359Smrg# 10455ea0de359SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10456c4f7863aSmrgm4_define([docs_default], m4_default([$1], [yes])) 10457ea0de359SmrgAC_ARG_ENABLE(docs, 10458ea0de359Smrg AS_HELP_STRING([--enable-docs], 10459c4f7863aSmrg [Enable building the documentation (default: ]docs_default[)]), 10460c4f7863aSmrg [build_docs=$enableval], [build_docs=]docs_default) 10461c4f7863aSmrgm4_undefine([docs_default]) 10462ea0de359SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10463ea0de359SmrgAC_MSG_CHECKING([whether to build documentation]) 10464ea0de359SmrgAC_MSG_RESULT([$build_docs]) 10465ea0de359Smrg]) # XORG_ENABLE_DOCS 104669bd41f2cSmrg 10467ea0de359Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10468ea0de359Smrg# ---------------- 10469ea0de359Smrg# Minimum version: 1.6.0 104709bd41f2cSmrg# 10471ea0de359Smrg# This macro enables a builder to skip all developer documentation. 10472ea0de359Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10473ea0de359Smrg# maximum flexibilty in controlling documentation building. 10474ea0de359Smrg# Refer to: 10475ea0de359Smrg# XORG_WITH_XMLTO --with-xmlto 10476ea0de359Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10477ea0de359Smrg# XORG_WITH_DOXYGEN --with-doxygen 10478ea0de359Smrg# XORG_WITH_FOP --with-fop 10479ea0de359Smrg# XORG_WITH_GROFF --with-groff 10480ea0de359Smrg# XORG_WITH_PS2PDF --with-ps2pdf 104819bd41f2cSmrg# 10482ea0de359Smrg# Interface to module: 10483ea0de359Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10484ea0de359Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10485ea0de359Smrg# 'no' user instructs the module not to generate developer docs 10486ea0de359Smrg# parm1: specify the default value, yes or no. 10487ea0de359Smrg# 10488ea0de359SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10489c4f7863aSmrgm4_define([devel_default], m4_default([$1], [yes])) 10490ea0de359SmrgAC_ARG_ENABLE(devel-docs, 10491ea0de359Smrg AS_HELP_STRING([--enable-devel-docs], 10492c4f7863aSmrg [Enable building the developer documentation (default: ]devel_default[)]), 10493c4f7863aSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10494c4f7863aSmrgm4_undefine([devel_default]) 10495ea0de359SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10496ea0de359SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10497ea0de359SmrgAC_MSG_RESULT([$build_devel_docs]) 10498ea0de359Smrg]) # XORG_ENABLE_DEVEL_DOCS 104999bd41f2cSmrg 10500ea0de359Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10501ea0de359Smrg# ---------------- 10502ea0de359Smrg# Minimum version: 1.6.0 105039418810dSmrg# 10504ea0de359Smrg# This macro enables a builder to skip all functional specification targets. 10505ea0de359Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10506ea0de359Smrg# maximum flexibilty in controlling documentation building. 10507ea0de359Smrg# Refer to: 10508ea0de359Smrg# XORG_WITH_XMLTO --with-xmlto 10509ea0de359Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10510ea0de359Smrg# XORG_WITH_DOXYGEN --with-doxygen 10511ea0de359Smrg# XORG_WITH_FOP --with-fop 10512ea0de359Smrg# XORG_WITH_GROFF --with-groff 10513ea0de359Smrg# XORG_WITH_PS2PDF --with-ps2pdf 105149418810dSmrg# 10515ea0de359Smrg# Interface to module: 10516ea0de359Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10517ea0de359Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10518ea0de359Smrg# 'no' user instructs the module not to generate specs 10519ea0de359Smrg# parm1: specify the default value, yes or no. 10520ea0de359Smrg# 10521ea0de359SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10522c4f7863aSmrgm4_define([spec_default], m4_default([$1], [yes])) 10523ea0de359SmrgAC_ARG_ENABLE(specs, 10524ea0de359Smrg AS_HELP_STRING([--enable-specs], 10525c4f7863aSmrg [Enable building the specs (default: ]spec_default[)]), 10526c4f7863aSmrg [build_specs=$enableval], [build_specs=]spec_default) 10527c4f7863aSmrgm4_undefine([spec_default]) 10528ea0de359SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10529ea0de359SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10530ea0de359SmrgAC_MSG_RESULT([$build_specs]) 10531ea0de359Smrg]) # XORG_ENABLE_SPECS 105329bd41f2cSmrg 105330da4cdccSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 105340da4cdccSmrg# ---------------------------------------------- 105350da4cdccSmrg# Minimum version: 1.13.0 105360da4cdccSmrg# 105370da4cdccSmrg# This macro enables a builder to enable/disable unit testing 105380da4cdccSmrg# It makes no assumption about the test cases implementation 105390da4cdccSmrg# Test cases may or may not use Automake "Support for test suites" 105400da4cdccSmrg# They may or may not use the software utility library GLib 105410da4cdccSmrg# 105420da4cdccSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 105430da4cdccSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 105440da4cdccSmrg# The variable enable_unit_tests is used by other macros in this file. 105450da4cdccSmrg# 105460da4cdccSmrg# Interface to module: 105470da4cdccSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 105480da4cdccSmrg# enable_unit_tests: used in configure.ac for additional configuration 105490da4cdccSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 105500da4cdccSmrg# 'no' user instructs the module not to build tests 105510da4cdccSmrg# parm1: specify the default value, yes or no. 105520da4cdccSmrg# 105530da4cdccSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 105540da4cdccSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 105550da4cdccSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 105560da4cdccSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 105570da4cdccSmrgm4_define([_defopt], m4_default([$1], [auto])) 105580da4cdccSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 105590da4cdccSmrg [Enable building unit test cases (default: ]_defopt[)]), 105600da4cdccSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 105610da4cdccSmrgm4_undefine([_defopt]) 105620da4cdccSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 105630da4cdccSmrgAC_MSG_CHECKING([whether to build unit test cases]) 105640da4cdccSmrgAC_MSG_RESULT([$enable_unit_tests]) 105650da4cdccSmrg]) # XORG_ENABLE_UNIT_TESTS 105660da4cdccSmrg 105670da4cdccSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 105680da4cdccSmrg# ------------------------------------------------------ 105690da4cdccSmrg# Minimum version: 1.17.0 105700da4cdccSmrg# 105710da4cdccSmrg# This macro enables a builder to enable/disable integration testing 105720da4cdccSmrg# It makes no assumption about the test cases' implementation 105730da4cdccSmrg# Test cases may or may not use Automake "Support for test suites" 105740da4cdccSmrg# 105750da4cdccSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 105760da4cdccSmrg# usually requires less dependencies and may be built and run under less 105770da4cdccSmrg# stringent environments than integration tests. 105780da4cdccSmrg# 105790da4cdccSmrg# Interface to module: 105800da4cdccSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 105810da4cdccSmrg# enable_integration_tests: used in configure.ac for additional configuration 105820da4cdccSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 105830da4cdccSmrg# 'no' user instructs the module not to build tests 105840da4cdccSmrg# parm1: specify the default value, yes or no. 105850da4cdccSmrg# 105860da4cdccSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 105870da4cdccSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 105880da4cdccSmrgm4_define([_defopt], m4_default([$1], [auto])) 105890da4cdccSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 105900da4cdccSmrg [Enable building integration test cases (default: ]_defopt[)]), 105910da4cdccSmrg [enable_integration_tests=$enableval], 105920da4cdccSmrg [enable_integration_tests=]_defopt) 105930da4cdccSmrgm4_undefine([_defopt]) 105940da4cdccSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 105950da4cdccSmrg [test "x$enable_integration_tests" != xno]) 105960da4cdccSmrgAC_MSG_CHECKING([whether to build unit test cases]) 105970da4cdccSmrgAC_MSG_RESULT([$enable_integration_tests]) 105980da4cdccSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 105990da4cdccSmrg 106000da4cdccSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 106010da4cdccSmrg# ---------------------------------------- 106020da4cdccSmrg# Minimum version: 1.13.0 106030da4cdccSmrg# 106040da4cdccSmrg# GLib is a library which provides advanced data structures and functions. 106050da4cdccSmrg# This macro enables a module to test for the presence of Glib. 106060da4cdccSmrg# 106070da4cdccSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 106080da4cdccSmrg# Otherwise the value of $enable_unit_tests is blank. 106090da4cdccSmrg# 106100da4cdccSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 106110da4cdccSmrg# test support usually requires less dependencies and may be built and run under 106120da4cdccSmrg# less stringent environments than integration tests. 106130da4cdccSmrg# 106140da4cdccSmrg# Interface to module: 106150da4cdccSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 106160da4cdccSmrg# with_glib: used in configure.ac to know if GLib has been found 106170da4cdccSmrg# --with-glib: 'yes' user instructs the module to use glib 106180da4cdccSmrg# 'no' user instructs the module not to use glib 106190da4cdccSmrg# 106200da4cdccSmrgAC_DEFUN([XORG_WITH_GLIB],[ 106210da4cdccSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106220da4cdccSmrgm4_define([_defopt], m4_default([$2], [auto])) 106230da4cdccSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 106240da4cdccSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 106250da4cdccSmrg [with_glib=$withval], [with_glib=]_defopt) 106260da4cdccSmrgm4_undefine([_defopt]) 106270da4cdccSmrg 106280da4cdccSmrghave_glib=no 106290da4cdccSmrg# Do not probe GLib if user explicitly disabled unit testing 106300da4cdccSmrgif test "x$enable_unit_tests" != x"no"; then 106310da4cdccSmrg # Do not probe GLib if user explicitly disabled it 106320da4cdccSmrg if test "x$with_glib" != x"no"; then 106330da4cdccSmrg m4_ifval( 106340da4cdccSmrg [$1], 106350da4cdccSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 106360da4cdccSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 106370da4cdccSmrg ) 106380da4cdccSmrg fi 106390da4cdccSmrgfi 106400da4cdccSmrg 106410da4cdccSmrg# Not having GLib when unit testing has been explicitly requested is an error 106420da4cdccSmrgif test "x$enable_unit_tests" = x"yes"; then 106430da4cdccSmrg if test "x$have_glib" = x"no"; then 106440da4cdccSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 106450da4cdccSmrg fi 106460da4cdccSmrgfi 106470da4cdccSmrg 106480da4cdccSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 106490da4cdccSmrgif test "x$enable_unit_tests" = x"no"; then 106500da4cdccSmrg if test "x$with_glib" = x"yes"; then 106510da4cdccSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 106520da4cdccSmrg fi 106530da4cdccSmrgfi 106540da4cdccSmrg 106550da4cdccSmrg# Not having GLib when it has been explicitly requested is an error 106560da4cdccSmrgif test "x$with_glib" = x"yes"; then 106570da4cdccSmrg if test "x$have_glib" = x"no"; then 106580da4cdccSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 106590da4cdccSmrg fi 106600da4cdccSmrgfi 106610da4cdccSmrg 106620da4cdccSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 106630da4cdccSmrg]) # XORG_WITH_GLIB 106640da4cdccSmrg 106650da4cdccSmrg# XORG_LD_WRAP([required|optional]) 106660da4cdccSmrg# --------------------------------- 106670da4cdccSmrg# Minimum version: 1.13.0 106680da4cdccSmrg# 106690da4cdccSmrg# Check if linker supports -wrap, passed via compiler flags 106700da4cdccSmrg# 106710da4cdccSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 106720da4cdccSmrg# Otherwise the value of $enable_unit_tests is blank. 106730da4cdccSmrg# 106740da4cdccSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 106750da4cdccSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 106760da4cdccSmrg# available, an argument of "optional" allows use when some unit tests require 106770da4cdccSmrg# ld -wrap and others do not. 106780da4cdccSmrg# 106790da4cdccSmrgAC_DEFUN([XORG_LD_WRAP],[ 106800da4cdccSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 106810da4cdccSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 106820da4cdccSmrg void __wrap_exit(int status) { return; }], 106830da4cdccSmrg [exit(0);])]) 106840da4cdccSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 106850da4cdccSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 106860da4cdccSmrg if test "x$have_ld_wrap" = x"no"; then 106870da4cdccSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 106880da4cdccSmrg fi 106890da4cdccSmrgfi 106900da4cdccSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 106910da4cdccSmrg# 106920da4cdccSmrg]) # XORG_LD_WRAP 106930da4cdccSmrg 106940da4cdccSmrg# XORG_CHECK_LINKER_FLAGS 106950da4cdccSmrg# ----------------------- 106960da4cdccSmrg# SYNOPSIS 106970da4cdccSmrg# 106980da4cdccSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 106990da4cdccSmrg# 107000da4cdccSmrg# DESCRIPTION 107010da4cdccSmrg# 107020da4cdccSmrg# Check whether the given linker FLAGS work with the current language's 107030da4cdccSmrg# linker, or whether they give an error. 107040da4cdccSmrg# 107050da4cdccSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 107060da4cdccSmrg# success/failure. 107070da4cdccSmrg# 107080da4cdccSmrg# PROGRAM-SOURCE is the program source to link with, if needed 107090da4cdccSmrg# 107100da4cdccSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 107110da4cdccSmrg# 107120da4cdccSmrg# LICENSE 107130da4cdccSmrg# 107140da4cdccSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 107150da4cdccSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 107160da4cdccSmrg# Copyright (c) 2009 Matteo Frigo 107170da4cdccSmrg# 107180da4cdccSmrg# This program is free software: you can redistribute it and/or modify it 107190da4cdccSmrg# under the terms of the GNU General Public License as published by the 107200da4cdccSmrg# Free Software Foundation, either version 3 of the License, or (at your 107210da4cdccSmrg# option) any later version. 107220da4cdccSmrg# 107230da4cdccSmrg# This program is distributed in the hope that it will be useful, but 107240da4cdccSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 107250da4cdccSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 107260da4cdccSmrg# Public License for more details. 107270da4cdccSmrg# 107280da4cdccSmrg# You should have received a copy of the GNU General Public License along 107290da4cdccSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 107300da4cdccSmrg# 107310da4cdccSmrg# As a special exception, the respective Autoconf Macro's copyright owner 107320da4cdccSmrg# gives unlimited permission to copy, distribute and modify the configure 107330da4cdccSmrg# scripts that are the output of Autoconf when processing the Macro. You 107340da4cdccSmrg# need not follow the terms of the GNU General Public License when using 107350da4cdccSmrg# or distributing such scripts, even though portions of the text of the 107360da4cdccSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 107370da4cdccSmrg# all other use of the material that constitutes the Autoconf Macro. 107380da4cdccSmrg# 107390da4cdccSmrg# This special exception to the GPL applies to versions of the Autoconf 107400da4cdccSmrg# Macro released by the Autoconf Archive. When you make and distribute a 107410da4cdccSmrg# modified version of the Autoconf Macro, you may extend this special 107420da4cdccSmrg# exception to the GPL to apply to your modified version as well.# 107430da4cdccSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 107440da4cdccSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 107450da4cdccSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 107460da4cdccSmrgAS_LITERAL_IF([$1], 107470da4cdccSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 107480da4cdccSmrg ax_save_FLAGS=$LDFLAGS 107490da4cdccSmrg LDFLAGS="$1" 107500da4cdccSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 107510da4cdccSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 107520da4cdccSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 107530da4cdccSmrg LDFLAGS=$ax_save_FLAGS])], 107540da4cdccSmrg [ax_save_FLAGS=$LDFLAGS 107550da4cdccSmrg LDFLAGS="$1" 107560da4cdccSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 107570da4cdccSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 107580da4cdccSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 107590da4cdccSmrg LDFLAGS=$ax_save_FLAGS]) 107600da4cdccSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 107610da4cdccSmrgAC_MSG_RESULT($xorg_check_linker_flags) 107620da4cdccSmrgif test "x$xorg_check_linker_flags" = xyes; then 107630da4cdccSmrg m4_default([$2], :) 107640da4cdccSmrgelse 107650da4cdccSmrg m4_default([$3], :) 107660da4cdccSmrgfi 107670da4cdccSmrg]) # XORG_CHECK_LINKER_FLAGS 107680da4cdccSmrg 107690da4cdccSmrg# XORG_MEMORY_CHECK_FLAGS 107700da4cdccSmrg# ----------------------- 107710da4cdccSmrg# Minimum version: 1.16.0 107720da4cdccSmrg# 107730da4cdccSmrg# This macro attempts to find appropriate memory checking functionality 107740da4cdccSmrg# for various platforms which unit testing code may use to catch various 107750da4cdccSmrg# forms of memory allocation and access errors in testing. 107760da4cdccSmrg# 107770da4cdccSmrg# Interface to module: 107780da4cdccSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 107790da4cdccSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 107800da4cdccSmrg# 107810da4cdccSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 107820da4cdccSmrg# 107830da4cdccSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 107840da4cdccSmrg 107850da4cdccSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 107860da4cdccSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 107870da4cdccSmrg [Environment variables to enable memory checking in tests]) 107880da4cdccSmrg 107890da4cdccSmrg# Check for different types of support on different platforms 107900da4cdccSmrgcase $host_os in 107910da4cdccSmrg solaris*) 107920da4cdccSmrg AC_CHECK_LIB([umem], [umem_alloc], 107930da4cdccSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 107940da4cdccSmrg ;; 107950da4cdccSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 107960da4cdccSmrg # both directly and inverted, so should not be 0 or 255. 107970da4cdccSmrg malloc_debug_env='MALLOC_PERTURB_=15' 107980da4cdccSmrg ;; 107990da4cdccSmrg darwin*) 108000da4cdccSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 108010da4cdccSmrg ;; 108020da4cdccSmrg *bsd*) 108030da4cdccSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 108040da4cdccSmrg ;; 108050da4cdccSmrgesac 108060da4cdccSmrg 108070da4cdccSmrg# User supplied flags override default flags 108080da4cdccSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 108090da4cdccSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 108100da4cdccSmrgfi 108110da4cdccSmrg 108120da4cdccSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 108130da4cdccSmrg]) # XORG_WITH_LINT 108140da4cdccSmrg 10815ea0de359Smrg# XORG_CHECK_MALLOC_ZERO 10816ea0de359Smrg# ---------------------- 10817ea0de359Smrg# Minimum version: 1.0.0 10818ea0de359Smrg# 10819ea0de359Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10820ea0de359Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 10821ea0de359Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10822ea0de359SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10823ea0de359SmrgAC_ARG_ENABLE(malloc0returnsnull, 10824ea0de359Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 10825ea0de359Smrg [malloc(0) returns NULL (default: auto)]), 10826ea0de359Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10827ea0de359Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 108289418810dSmrg 10829ea0de359SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10830ea0de359Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10831084f91ccSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10832084f91ccSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 108330da4cdccSmrg#include <stdlib.h> 108340da4cdccSmrg],[ 10835ea0de359Smrg char *m0, *r0, *c0, *p; 10836ea0de359Smrg m0 = malloc(0); 10837ea0de359Smrg p = malloc(10); 10838ea0de359Smrg r0 = realloc(p,0); 108390da4cdccSmrg c0 = calloc(0,10); 108400da4cdccSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 108410da4cdccSmrg])], 10842084f91ccSmrg [xorg_cv_malloc0_returns_null=yes], 10843084f91ccSmrg [xorg_cv_malloc0_returns_null=no])]) 10844084f91ccSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10845ea0de359Smrgfi 10846ea0de359SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 108479bd41f2cSmrg 10848ea0de359Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10849ea0de359Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10850ea0de359Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10851ea0de359Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10852ea0de359Smrgelse 10853ea0de359Smrg MALLOC_ZERO_CFLAGS="" 10854ea0de359Smrg XMALLOC_ZERO_CFLAGS="" 10855ea0de359Smrg XTMALLOC_ZERO_CFLAGS="" 10856ea0de359Smrgfi 108579418810dSmrg 10858ea0de359SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10859ea0de359SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10860ea0de359SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10861ea0de359Smrg]) # XORG_CHECK_MALLOC_ZERO 108629418810dSmrg 10863ea0de359Smrg# XORG_WITH_LINT() 10864ea0de359Smrg# ---------------- 108659418810dSmrg# Minimum version: 1.1.0 108669418810dSmrg# 10867ea0de359Smrg# This macro enables the use of a tool that flags some suspicious and 10868ea0de359Smrg# non-portable constructs (likely to be bugs) in C language source code. 10869ea0de359Smrg# It will attempt to locate the tool and use appropriate options. 10870ea0de359Smrg# There are various lint type tools on different platforms. 108719418810dSmrg# 10872ea0de359Smrg# Interface to module: 10873ea0de359Smrg# LINT: returns the path to the tool found on the platform 10874ea0de359Smrg# or the value set to LINT on the configure cmd line 10875ea0de359Smrg# also an Automake conditional 10876ea0de359Smrg# LINT_FLAGS: an Automake variable with appropriate flags 108779418810dSmrg# 10878ea0de359Smrg# --with-lint: 'yes' user instructs the module to use lint 10879ea0de359Smrg# 'no' user instructs the module not to use lint (default) 108809418810dSmrg# 10881ea0de359Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10882ea0de359Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 108839418810dSmrg# 10884ea0de359SmrgAC_DEFUN([XORG_WITH_LINT],[ 108859418810dSmrg 10886ea0de359SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10887ea0de359SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10888ea0de359SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10889ea0de359Smrg [Use a lint-style source code checker (default: disabled)])], 10890ea0de359Smrg [use_lint=$withval], [use_lint=no]) 10891ea0de359Smrg 10892ea0de359Smrg# Obtain platform specific info like program name and options 10893ea0de359Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10894ea0de359Smrgcase $host_os in 10895ea0de359Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10896ea0de359Smrg lint_name=splint 10897ea0de359Smrg lint_options="-badflag" 10898ea0de359Smrg ;; 10899ea0de359Smrg *freebsd* | *netbsd*) 10900ea0de359Smrg lint_name=lint 10901ea0de359Smrg lint_options="-u -b" 10902ea0de359Smrg ;; 10903ea0de359Smrg *solaris*) 10904ea0de359Smrg lint_name=lint 10905ea0de359Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10906ea0de359Smrg ;; 10907ea0de359Smrgesac 10908ea0de359Smrg 10909ea0de359Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10910ea0de359Smrgif test "x$use_lint" = x"yes" ; then 10911ea0de359Smrg AC_PATH_PROG([LINT], [$lint_name]) 10912ea0de359Smrg if test "x$LINT" = "x"; then 10913ea0de359Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10914ea0de359Smrg fi 10915ea0de359Smrgelif test "x$use_lint" = x"no" ; then 10916ea0de359Smrg if test "x$LINT" != "x"; then 10917ea0de359Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10918ea0de359Smrg fi 109199bd41f2cSmrgelse 10920ea0de359Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 109219bd41f2cSmrgfi 109229bd41f2cSmrg 10923ea0de359Smrg# User supplied flags override default flags 10924ea0de359Smrgif test "x$LINT_FLAGS" != "x"; then 10925ea0de359Smrg lint_options=$LINT_FLAGS 109269418810dSmrgfi 109279bd41f2cSmrg 10928ea0de359SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10929ea0de359SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 109309bd41f2cSmrg 10931ea0de359Smrg]) # XORG_WITH_LINT 109329bd41f2cSmrg 10933ea0de359Smrg# XORG_LINT_LIBRARY(LIBNAME) 10934ea0de359Smrg# -------------------------- 10935ea0de359Smrg# Minimum version: 1.1.0 10936ea0de359Smrg# 10937ea0de359Smrg# Sets up flags for building lint libraries for checking programs that call 10938ea0de359Smrg# functions in the library. 10939ea0de359Smrg# 10940ea0de359Smrg# Interface to module: 10941ea0de359Smrg# LINTLIB - Automake variable with the name of lint library file to make 10942ea0de359Smrg# MAKE_LINT_LIB - Automake conditional 10943ea0de359Smrg# 10944ea0de359Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10945ea0de359Smrg# - 'no' user instructs the module not to create a lint library (default) 109469bd41f2cSmrg 10947ea0de359SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10948ea0de359SmrgAC_REQUIRE([XORG_WITH_LINT]) 10949ea0de359SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10950ea0de359Smrg [Create lint library (default: disabled)])], 10951ea0de359Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 109529bd41f2cSmrg 10953ea0de359Smrgif test "x$make_lint_lib" = x"yes" ; then 10954ea0de359Smrg LINTLIB=llib-l$1.ln 10955ea0de359Smrg if test "x$LINT" = "x"; then 10956ea0de359Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10957ea0de359Smrg fi 10958ea0de359Smrgelif test "x$make_lint_lib" != x"no" ; then 10959ea0de359Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 109609418810dSmrgfi 109619bd41f2cSmrg 10962ea0de359SmrgAC_SUBST(LINTLIB) 10963ea0de359SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 109649bd41f2cSmrg 10965ea0de359Smrg]) # XORG_LINT_LIBRARY 109669bd41f2cSmrg 109670da4cdccSmrg# XORG_COMPILER_BRAND 109680da4cdccSmrg# ------------------- 109690da4cdccSmrg# Minimum version: 1.14.0 109700da4cdccSmrg# 109710da4cdccSmrg# Checks for various brands of compilers and sets flags as appropriate: 109720da4cdccSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 109730da4cdccSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 109740da4cdccSmrg# clang compiler - sets CLANGCC to "yes" 109750da4cdccSmrg# Intel compiler - sets INTELCC to "yes" 109760da4cdccSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 109770da4cdccSmrg# 109780da4cdccSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 109790da4cdccSmrgAC_LANG_CASE( 109800da4cdccSmrg [C], [ 109810da4cdccSmrg AC_REQUIRE([AC_PROG_CC_C99]) 109820da4cdccSmrg ], 109830da4cdccSmrg [C++], [ 109840da4cdccSmrg AC_REQUIRE([AC_PROG_CXX]) 109850da4cdccSmrg ] 109860da4cdccSmrg) 109870da4cdccSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 109880da4cdccSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 109890da4cdccSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 109900da4cdccSmrg]) # XORG_COMPILER_BRAND 109910da4cdccSmrg 109920da4cdccSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 109930da4cdccSmrg# --------------- 109940da4cdccSmrg# Minimum version: 1.16.0 109950da4cdccSmrg# 109960da4cdccSmrg# Test if the compiler works when passed the given flag as a command line argument. 109970da4cdccSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 109980da4cdccSmrg# next flag in the list until there are no more options. 109990da4cdccSmrg# 110000da4cdccSmrg# Note that this does not guarantee that the compiler supports the flag as some 110010da4cdccSmrg# compilers will simply ignore arguments that they do not understand, but we do 110020da4cdccSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 110030da4cdccSmrg# -Werror=unused-command-line-argument 110040da4cdccSmrg# 110050da4cdccSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 110060da4cdccSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 110070da4cdccSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 110080da4cdccSmrg 110090da4cdccSmrgAC_LANG_COMPILER_REQUIRE 110100da4cdccSmrg 110110da4cdccSmrgAC_LANG_CASE( 110120da4cdccSmrg [C], [ 110130da4cdccSmrg AC_REQUIRE([AC_PROG_CC_C99]) 110140da4cdccSmrg define([PREFIX], [C]) 110150da4cdccSmrg define([CACHE_PREFIX], [cc]) 110160da4cdccSmrg define([COMPILER], [$CC]) 110170da4cdccSmrg ], 110180da4cdccSmrg [C++], [ 110190da4cdccSmrg define([PREFIX], [CXX]) 110200da4cdccSmrg define([CACHE_PREFIX], [cxx]) 110210da4cdccSmrg define([COMPILER], [$CXX]) 110220da4cdccSmrg ] 110230da4cdccSmrg) 110240da4cdccSmrg 110250da4cdccSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 110260da4cdccSmrg 110270da4cdccSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 110280da4cdccSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 110290da4cdccSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 110300da4cdccSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 110310da4cdccSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 110320da4cdccSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 110330da4cdccSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 110340da4cdccSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 110350da4cdccSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 110360da4cdccSmrgfi 110370da4cdccSmrg 110380da4cdccSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 110390da4cdccSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 110400da4cdccSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 110410da4cdccSmrg fi 110420da4cdccSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 110430da4cdccSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 110440da4cdccSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 110450da4cdccSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 110460da4cdccSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 110470da4cdccSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 110480da4cdccSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 110490da4cdccSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 110500da4cdccSmrgfi 110510da4cdccSmrg 110520da4cdccSmrgfound="no" 110530da4cdccSmrgm4_foreach([flag], m4_cdr($@), [ 110540da4cdccSmrg if test $found = "no" ; then 11055084f91ccSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 110560da4cdccSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 110570da4cdccSmrg fi 110580da4cdccSmrg 11059084f91ccSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 110600da4cdccSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 110610da4cdccSmrg fi 110620da4cdccSmrg 110630da4cdccSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 110640da4cdccSmrg 110650da4cdccSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11066084f91ccSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 110670da4cdccSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 110680da4cdccSmrg AC_CACHE_VAL($cacheid, 110690da4cdccSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 110700da4cdccSmrg [eval $cacheid=yes], 110710da4cdccSmrg [eval $cacheid=no])]) 110720da4cdccSmrg 110730da4cdccSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 110740da4cdccSmrg 110750da4cdccSmrg eval supported=\$$cacheid 110760da4cdccSmrg AC_MSG_RESULT([$supported]) 110770da4cdccSmrg if test "$supported" = "yes" ; then 110780da4cdccSmrg $1="$$1 ]flag[" 110790da4cdccSmrg found="yes" 110800da4cdccSmrg fi 110810da4cdccSmrg fi 110820da4cdccSmrg]) 110830da4cdccSmrg]) # XORG_TESTSET_CFLAG 110840da4cdccSmrg 110850da4cdccSmrg# XORG_COMPILER_FLAGS 110860da4cdccSmrg# --------------- 110870da4cdccSmrg# Minimum version: 1.16.0 110880da4cdccSmrg# 110890da4cdccSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 110900da4cdccSmrg# arguments supported by the selected compiler which do NOT alter the generated 110910da4cdccSmrg# code. These arguments will cause the compiler to print various warnings 110920da4cdccSmrg# during compilation AND turn a conservative set of warnings into errors. 110930da4cdccSmrg# 110940da4cdccSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 110950da4cdccSmrg# future versions of util-macros as options are added to new compilers. 110960da4cdccSmrg# 110970da4cdccSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 110980da4cdccSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 110990da4cdccSmrg 111000da4cdccSmrgAC_ARG_ENABLE(selective-werror, 111010da4cdccSmrg AS_HELP_STRING([--disable-selective-werror], 111020da4cdccSmrg [Turn off selective compiler errors. (default: enabled)]), 111030da4cdccSmrg [SELECTIVE_WERROR=$enableval], 111040da4cdccSmrg [SELECTIVE_WERROR=yes]) 111050da4cdccSmrg 111060da4cdccSmrgAC_LANG_CASE( 111070da4cdccSmrg [C], [ 111080da4cdccSmrg define([PREFIX], [C]) 111090da4cdccSmrg ], 111100da4cdccSmrg [C++], [ 111110da4cdccSmrg define([PREFIX], [CXX]) 111120da4cdccSmrg ] 111130da4cdccSmrg) 111140da4cdccSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 111150da4cdccSmrgif test "x$SUNCC" = "xyes"; then 111160da4cdccSmrg [BASE_]PREFIX[FLAGS]="-v" 111170da4cdccSmrgelse 111180da4cdccSmrg [BASE_]PREFIX[FLAGS]="" 111190da4cdccSmrgfi 111200da4cdccSmrg 111210da4cdccSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 111220da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 111230da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 111240da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 111250da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 111260da4cdccSmrg 111270da4cdccSmrgAC_LANG_CASE( 111280da4cdccSmrg [C], [ 111290da4cdccSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 111300da4cdccSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 111310da4cdccSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 111320da4cdccSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11133084f91ccSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 111340da4cdccSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 111350da4cdccSmrg ] 111360da4cdccSmrg) 111370da4cdccSmrg 111380da4cdccSmrg# This chunk adds additional warnings that could catch undesired effects. 111390da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 111400da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 111410da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 111420da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 111430da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 111440da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11145084f91ccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 111460da4cdccSmrg 111470da4cdccSmrg# These are currently disabled because they are noisy. They will be enabled 111480da4cdccSmrg# in the future once the codebase is sufficiently modernized to silence 111490da4cdccSmrg# them. For now, I don't want them to drown out the other warnings. 111500da4cdccSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 111510da4cdccSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11152084f91ccSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 111530da4cdccSmrg 111540da4cdccSmrg# Turn some warnings into errors, so we don't accidently get successful builds 111550da4cdccSmrg# when there are problems that should be fixed. 111560da4cdccSmrg 111570da4cdccSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 111580da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 111590da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 111600da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 111610da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 111620da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 111630da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 111640da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 111650da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 111660da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 111670da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 111680da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 111690da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 111700da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 111710da4cdccSmrgelse 111720da4cdccSmrgAC_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]) 111730da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 111740da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 111750da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 111760da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 111770da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 111780da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 111790da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 111800da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 111810da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 111820da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 111830da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 111840da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 111850da4cdccSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 111860da4cdccSmrgfi 111870da4cdccSmrg 111880da4cdccSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 111890da4cdccSmrg]) # XORG_COMPILER_FLAGS 111900da4cdccSmrg 11191ea0de359Smrg# XORG_CWARNFLAGS 11192ea0de359Smrg# --------------- 11193ea0de359Smrg# Minimum version: 1.2.0 111940da4cdccSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11195ea0de359Smrg# 11196ea0de359Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11197ea0de359Smrg# 111980da4cdccSmrg# This function is deprecated because it defines -fno-strict-aliasing 111990da4cdccSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 112000da4cdccSmrg# is needed, then it should be added explicitly in the module when 112010da4cdccSmrg# it is updated to use BASE_CFLAGS. 112020da4cdccSmrg# 11203ea0de359SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 112040da4cdccSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 112050da4cdccSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 112060da4cdccSmrgAC_LANG_CASE( 112070da4cdccSmrg [C], [ 112080da4cdccSmrg CWARNFLAGS="$BASE_CFLAGS" 112090da4cdccSmrg if test "x$GCC" = xyes ; then 112100da4cdccSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 112110da4cdccSmrg fi 112120da4cdccSmrg AC_SUBST(CWARNFLAGS) 112130da4cdccSmrg ] 112140da4cdccSmrg) 11215ea0de359Smrg]) # XORG_CWARNFLAGS 112169bd41f2cSmrg 11217ea0de359Smrg# XORG_STRICT_OPTION 11218ea0de359Smrg# ----------------------- 11219ea0de359Smrg# Minimum version: 1.3.0 112209418810dSmrg# 112210da4cdccSmrg# Add configure option to enable strict compilation flags, such as treating 112220da4cdccSmrg# warnings as fatal errors. 112230da4cdccSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 112240da4cdccSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 112250da4cdccSmrg# 112260da4cdccSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 112270da4cdccSmrg# when strict compilation is unconditionally desired. 11228ea0de359SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11229ea0de359SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 112300da4cdccSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 112319418810dSmrg 11232ea0de359SmrgAC_ARG_ENABLE(strict-compilation, 11233ea0de359Smrg AS_HELP_STRING([--enable-strict-compilation], 11234ea0de359Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11235ea0de359Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 112360da4cdccSmrg 112370da4cdccSmrgAC_LANG_CASE( 112380da4cdccSmrg [C], [ 112390da4cdccSmrg define([PREFIX], [C]) 112400da4cdccSmrg ], 112410da4cdccSmrg [C++], [ 112420da4cdccSmrg define([PREFIX], [CXX]) 112430da4cdccSmrg ] 112440da4cdccSmrg) 112450da4cdccSmrg 112460da4cdccSmrg[STRICT_]PREFIX[FLAGS]="" 112470da4cdccSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 112480da4cdccSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 112490da4cdccSmrg 112500da4cdccSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 112510da4cdccSmrg# activate it with -Werror, so we add it here explicitly. 112520da4cdccSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 112530da4cdccSmrg 11254ea0de359Smrgif test "x$STRICT_COMPILE" = "xyes"; then 112550da4cdccSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 112560da4cdccSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 112579418810dSmrgfi 112580da4cdccSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 112590da4cdccSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 112600da4cdccSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11261ea0de359Smrg]) # XORG_STRICT_OPTION 112629bd41f2cSmrg 11263ea0de359Smrg# XORG_DEFAULT_OPTIONS 11264ea0de359Smrg# -------------------- 11265ea0de359Smrg# Minimum version: 1.3.0 112669bd41f2cSmrg# 11267ea0de359Smrg# Defines default options for X.Org modules. 11268ea0de359Smrg# 11269ea0de359SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11270ea0de359SmrgAC_REQUIRE([AC_PROG_INSTALL]) 112710da4cdccSmrgXORG_COMPILER_FLAGS 11272ea0de359SmrgXORG_CWARNFLAGS 11273ea0de359SmrgXORG_STRICT_OPTION 11274ea0de359SmrgXORG_RELEASE_VERSION 11275ea0de359SmrgXORG_CHANGELOG 11276ea0de359SmrgXORG_INSTALL 11277ea0de359SmrgXORG_MANPAGE_SECTIONS 11278ea0de359Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11279ea0de359Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11280ea0de359Smrg]) # XORG_DEFAULT_OPTIONS 112819bd41f2cSmrg 11282ea0de359Smrg# XORG_INSTALL() 11283ea0de359Smrg# ---------------- 11284ea0de359Smrg# Minimum version: 1.4.0 11285ea0de359Smrg# 11286ea0de359Smrg# Defines the variable INSTALL_CMD as the command to copy 11287ea0de359Smrg# INSTALL from $prefix/share/util-macros. 11288ea0de359Smrg# 11289ea0de359SmrgAC_DEFUN([XORG_INSTALL], [ 11290ea0de359SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11291ea0de359Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11292ea0de359SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11293ea0de359Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11294084f91ccSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 11295084f91ccSmrgtouch \$(top_srcdir)/INSTALL; \ 11296084f91ccSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 11297ea0de359SmrgAC_SUBST([INSTALL_CMD]) 11298ea0de359Smrg]) # XORG_INSTALL 11299ea0de359Smrgdnl Copyright 2005 Red Hat, Inc 11300ea0de359Smrgdnl 11301ea0de359Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11302ea0de359Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11303ea0de359Smrgdnl the above copyright notice appear in all copies and that both that 11304ea0de359Smrgdnl copyright notice and this permission notice appear in supporting 11305ea0de359Smrgdnl documentation. 11306ea0de359Smrgdnl 11307ea0de359Smrgdnl The above copyright notice and this permission notice shall be included 11308ea0de359Smrgdnl in all copies or substantial portions of the Software. 11309ea0de359Smrgdnl 11310ea0de359Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11311ea0de359Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11312ea0de359Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11313ea0de359Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11314ea0de359Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11315ea0de359Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11316ea0de359Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11317ea0de359Smrgdnl 11318ea0de359Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11319ea0de359Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11320ea0de359Smrgdnl other dealings in this Software without prior written authorization 11321ea0de359Smrgdnl from the copyright holders. 11322ea0de359Smrgdnl 113239bd41f2cSmrg 11324ea0de359Smrg# XORG_RELEASE_VERSION 11325ea0de359Smrg# -------------------- 11326ea0de359Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11327084f91ccSmrg 11328ea0de359SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11329ea0de359Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11330ea0de359Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11331ea0de359Smrg [Major version of this package]) 11332ea0de359Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11333ea0de359Smrg if test "x$PVM" = "x"; then 11334ea0de359Smrg PVM="0" 11335ea0de359Smrg fi 11336ea0de359Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11337ea0de359Smrg [$PVM], 11338ea0de359Smrg [Minor version of this package]) 11339ea0de359Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11340ea0de359Smrg if test "x$PVP" = "x"; then 11341ea0de359Smrg PVP="0" 11342ea0de359Smrg fi 11343ea0de359Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11344ea0de359Smrg [$PVP], 11345ea0de359Smrg [Patch version of this package]) 11346ea0de359Smrg]) 113479bd41f2cSmrg 11348ea0de359Smrg# XORG_CHANGELOG() 11349ea0de359Smrg# ---------------- 11350ea0de359Smrg# Minimum version: 1.2.0 11351ea0de359Smrg# 11352ea0de359Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11353ea0de359Smrg# ChangeLog from git. 11354ea0de359Smrg# 11355ea0de359Smrg# 11356ea0de359SmrgAC_DEFUN([XORG_CHANGELOG], [ 11357084f91ccSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 11358ea0de359Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11359084f91ccSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 11360084f91ccSmrgtouch \$(top_srcdir)/ChangeLog; \ 11361084f91ccSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 11362ea0de359SmrgAC_SUBST([CHANGELOG_CMD]) 11363ea0de359Smrg]) # XORG_CHANGELOG 113649bd41f2cSmrg 11365ea0de359Smrgdnl Copyright 2005 Red Hat, Inc 11366ea0de359Smrgdnl 11367ea0de359Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11368ea0de359Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11369ea0de359Smrgdnl the above copyright notice appear in all copies and that both that 11370ea0de359Smrgdnl copyright notice and this permission notice appear in supporting 11371ea0de359Smrgdnl documentation. 11372ea0de359Smrgdnl 11373ea0de359Smrgdnl The above copyright notice and this permission notice shall be included 11374ea0de359Smrgdnl in all copies or substantial portions of the Software. 11375ea0de359Smrgdnl 11376ea0de359Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11377ea0de359Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11378ea0de359Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11379ea0de359Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11380ea0de359Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11381ea0de359Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11382ea0de359Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11383ea0de359Smrgdnl 11384ea0de359Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11385ea0de359Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11386ea0de359Smrgdnl other dealings in this Software without prior written authorization 11387ea0de359Smrgdnl from the copyright holders. 11388ea0de359Smrgdnl 113899bd41f2cSmrg 11390084f91ccSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11391ea0de359Smrg# -------------------------- 11392084f91ccSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11393084f91ccSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 113949bd41f2cSmrg 11395ea0de359SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 113960da4cdccSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11397ea0de359Smrg SAVE_CFLAGS="$CFLAGS" 11398084f91ccSmrg CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" 11399ea0de359Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11400ea0de359Smrg#include "xorg-server.h" 11401ea0de359Smrg#if !defined $1 11402ea0de359Smrg#error $1 not defined 11403ea0de359Smrg#endif 11404ea0de359Smrg ]])], 11405ea0de359Smrg [_EXT_CHECK=yes], 11406ea0de359Smrg [_EXT_CHECK=no]) 11407ea0de359Smrg CFLAGS="$SAVE_CFLAGS" 11408ea0de359Smrg AC_MSG_CHECKING([if $1 is defined]) 11409ea0de359Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11410ea0de359Smrg if test "$_EXT_CHECK" != no; then 11411ea0de359Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11412ea0de359Smrg fi 11413ea0de359Smrg]) 114149bd41f2cSmrg 11415084f91ccSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 11416ea0de359Smrg# 11417ea0de359Smrg# This file is free software; the Free Software Foundation 11418ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 11419ea0de359Smrg# with or without modifications, as long as this notice is preserved. 114209bd41f2cSmrg 11421ea0de359Smrg# AM_AUTOMAKE_VERSION(VERSION) 11422ea0de359Smrg# ---------------------------- 11423ea0de359Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11424ea0de359Smrg# generated from the m4 files accompanying Automake X.Y. 11425ea0de359Smrg# (This private macro should not be called outside this file.) 11426ea0de359SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 11427084f91ccSmrg[am__api_version='1.16' 11428ea0de359Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11429ea0de359Smrgdnl require some minimum version. Point them to the right macro. 11430084f91ccSmrgm4_if([$1], [1.16.5], [], 11431ea0de359Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11432ea0de359Smrg]) 114339bd41f2cSmrg 11434ea0de359Smrg# _AM_AUTOCONF_VERSION(VERSION) 11435ea0de359Smrg# ----------------------------- 11436ea0de359Smrg# aclocal traces this macro to find the Autoconf version. 11437ea0de359Smrg# This is a private macro too. Using m4_define simplifies 11438ea0de359Smrg# the logic in aclocal, which can simply ignore this definition. 11439ea0de359Smrgm4_define([_AM_AUTOCONF_VERSION], []) 11440ea0de359Smrg 11441ea0de359Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11442ea0de359Smrg# ------------------------------- 11443ea0de359Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11444ea0de359Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11445ea0de359SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11446084f91ccSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 11447ea0de359Smrgm4_ifndef([AC_AUTOCONF_VERSION], 11448ea0de359Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11449ea0de359Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11450ea0de359Smrg 11451ea0de359Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11452ea0de359Smrg 11453084f91ccSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 114549bd41f2cSmrg# 11455ea0de359Smrg# This file is free software; the Free Software Foundation 11456ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 11457ea0de359Smrg# with or without modifications, as long as this notice is preserved. 114589bd41f2cSmrg 11459ea0de359Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11460084f91ccSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11461084f91ccSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11462ea0de359Smrg# 11463ea0de359Smrg# Of course, Automake must honor this variable whenever it calls a 11464ea0de359Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 11465ea0de359Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11466ea0de359Smrg# depending on how configure is run. This is pretty annoying, since 11467ea0de359Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11468ea0de359Smrg# source directory, any form will work fine, but in subdirectories a 11469ea0de359Smrg# relative path needs to be adjusted first. 11470ea0de359Smrg# 11471ea0de359Smrg# $ac_aux_dir/missing 11472ea0de359Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 11473ea0de359Smrg# $top_srcdir/$ac_aux_dir/missing 11474ea0de359Smrg# fails if $ac_aux_dir is absolute, 11475ea0de359Smrg# fails when called from a subdirectory in a VPATH build with 11476ea0de359Smrg# a relative $ac_aux_dir 11477ea0de359Smrg# 11478ea0de359Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11479ea0de359Smrg# are both prefixed by $srcdir. In an in-source build this is usually 11480084f91ccSmrg# harmless because $srcdir is '.', but things will broke when you 11481ea0de359Smrg# start a VPATH build or use an absolute $srcdir. 11482ea0de359Smrg# 11483ea0de359Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11484ea0de359Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11485ea0de359Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11486ea0de359Smrg# and then we would define $MISSING as 11487ea0de359Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 11488ea0de359Smrg# This will work as long as MISSING is not called from configure, because 11489ea0de359Smrg# unfortunately $(top_srcdir) has no meaning in configure. 11490ea0de359Smrg# However there are other variables, like CC, which are often used in 11491ea0de359Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11492ea0de359Smrg# 11493ea0de359Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 11494ea0de359Smrg# absolute PATH. The drawback is that using absolute paths prevent a 11495ea0de359Smrg# configured tree to be moved without reconfiguration. 114969bd41f2cSmrg 11497ea0de359SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 11498084f91ccSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11499084f91ccSmrg# Expand $ac_aux_dir to an absolute path. 11500084f91ccSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 11501ea0de359Smrg]) 115029418810dSmrg 11503ea0de359Smrg# AM_CONDITIONAL -*- Autoconf -*- 115049bd41f2cSmrg 11505084f91ccSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 11506ea0de359Smrg# 11507ea0de359Smrg# This file is free software; the Free Software Foundation 11508ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 11509ea0de359Smrg# with or without modifications, as long as this notice is preserved. 115109bd41f2cSmrg 11511ea0de359Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11512ea0de359Smrg# ------------------------------------- 11513ea0de359Smrg# Define a conditional. 11514ea0de359SmrgAC_DEFUN([AM_CONDITIONAL], 11515084f91ccSmrg[AC_PREREQ([2.52])dnl 11516084f91ccSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11517084f91ccSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11518ea0de359SmrgAC_SUBST([$1_TRUE])dnl 11519ea0de359SmrgAC_SUBST([$1_FALSE])dnl 11520ea0de359Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11521ea0de359Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 115220da4cdccSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11523ea0de359Smrgif $2; then 11524ea0de359Smrg $1_TRUE= 11525ea0de359Smrg $1_FALSE='#' 11526ea0de359Smrgelse 11527ea0de359Smrg $1_TRUE='#' 11528ea0de359Smrg $1_FALSE= 115299418810dSmrgfi 11530ea0de359SmrgAC_CONFIG_COMMANDS_PRE( 11531ea0de359Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11532ea0de359Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 11533ea0de359SmrgUsually this means the macro was only invoked conditionally.]]) 11534ea0de359Smrgfi])]) 115359bd41f2cSmrg 11536084f91ccSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 11537ea0de359Smrg# 11538ea0de359Smrg# This file is free software; the Free Software Foundation 11539ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 11540ea0de359Smrg# with or without modifications, as long as this notice is preserved. 115419bd41f2cSmrg 115429bd41f2cSmrg 11543084f91ccSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11544ea0de359Smrg# written in clear, in which case automake, when reading aclocal.m4, 11545ea0de359Smrg# will think it sees a *use*, and therefore will trigger all it's 11546ea0de359Smrg# C support machinery. Also note that it means that autoscan, seeing 11547ea0de359Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11548ea0de359Smrg 11549ea0de359Smrg 11550ea0de359Smrg# _AM_DEPENDENCIES(NAME) 11551ea0de359Smrg# ---------------------- 11552ea0de359Smrg# See how the compiler implements dependency checking. 11553084f91ccSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11554ea0de359Smrg# We try a few techniques and use that to set a single cache variable. 115559418810dSmrg# 11556ea0de359Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11557ea0de359Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11558ea0de359Smrg# dependency, and given that the user is not expected to run this macro, 11559ea0de359Smrg# just rely on AC_PROG_CC. 11560ea0de359SmrgAC_DEFUN([_AM_DEPENDENCIES], 11561ea0de359Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11562ea0de359SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11563ea0de359SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11564ea0de359SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 115659418810dSmrg 11566084f91ccSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11567084f91ccSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11568084f91ccSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11569084f91ccSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11570084f91ccSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11571084f91ccSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11572084f91ccSmrg [depcc="$$1" am_compiler_list=]) 115739bd41f2cSmrg 11574ea0de359SmrgAC_CACHE_CHECK([dependency style of $depcc], 11575ea0de359Smrg [am_cv_$1_dependencies_compiler_type], 11576ea0de359Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11577ea0de359Smrg # We make a subdir and do the tests there. Otherwise we can end up 11578ea0de359Smrg # making bogus files that we don't know about and never remove. For 11579ea0de359Smrg # instance it was reported that on HP-UX the gcc test will end up 11580084f91ccSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 11581084f91ccSmrg # in D". 115820da4cdccSmrg rm -rf conftest.dir 11583ea0de359Smrg mkdir conftest.dir 11584ea0de359Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 11585ea0de359Smrg # using a relative directory. 11586ea0de359Smrg cp "$am_depcomp" conftest.dir 11587ea0de359Smrg cd conftest.dir 11588ea0de359Smrg # We will build objects and dependencies in a subdirectory because 11589ea0de359Smrg # it helps to detect inapplicable dependency modes. For instance 11590ea0de359Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 11591ea0de359Smrg # side effect of compilation, but ICC will put the dependencies in 11592ea0de359Smrg # the current directory while Tru64 will put them in the object 11593ea0de359Smrg # directory. 11594ea0de359Smrg mkdir sub 115959418810dSmrg 11596ea0de359Smrg am_cv_$1_dependencies_compiler_type=none 11597ea0de359Smrg if test "$am_compiler_list" = ""; then 11598ea0de359Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11599ea0de359Smrg fi 116000da4cdccSmrg am__universal=false 116010da4cdccSmrg m4_case([$1], [CC], 116020da4cdccSmrg [case " $depcc " in #( 116030da4cdccSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 116040da4cdccSmrg esac], 116050da4cdccSmrg [CXX], 116060da4cdccSmrg [case " $depcc " in #( 116070da4cdccSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 116080da4cdccSmrg esac]) 116090da4cdccSmrg 11610ea0de359Smrg for depmode in $am_compiler_list; do 11611ea0de359Smrg # Setup a source with many dependencies, because some compilers 11612ea0de359Smrg # like to wrap large dependency lists on column 80 (with \), and 11613ea0de359Smrg # we should not choose a depcomp mode which is confused by this. 11614ea0de359Smrg # 11615ea0de359Smrg # We need to recreate these files for each test, as the compiler may 11616ea0de359Smrg # overwrite some of them when testing with obscure command lines. 11617ea0de359Smrg # This happens at least with the AIX C compiler. 11618ea0de359Smrg : > sub/conftest.c 11619ea0de359Smrg for i in 1 2 3 4 5 6; do 11620ea0de359Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 11621084f91ccSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11622084f91ccSmrg # Solaris 10 /bin/sh. 11623084f91ccSmrg echo '/* dummy */' > sub/conftst$i.h 11624ea0de359Smrg done 11625ea0de359Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11626ea0de359Smrg 11627084f91ccSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 116280da4cdccSmrg # mode. It turns out that the SunPro C++ compiler does not properly 11629084f91ccSmrg # handle '-M -o', and we need to detect this. Also, some Intel 11630084f91ccSmrg # versions had trouble with output in subdirs. 116310da4cdccSmrg am__obj=sub/conftest.${OBJEXT-o} 116320da4cdccSmrg am__minus_obj="-o $am__obj" 11633ea0de359Smrg case $depmode in 116340da4cdccSmrg gcc) 116350da4cdccSmrg # This depmode causes a compiler race in universal mode. 116360da4cdccSmrg test "$am__universal" = false || continue 116370da4cdccSmrg ;; 11638ea0de359Smrg nosideeffect) 11639084f91ccSmrg # After this tag, mechanisms are not by side-effect, so they'll 11640084f91ccSmrg # only be used when explicitly requested. 11641ea0de359Smrg if test "x$enable_dependency_tracking" = xyes; then 11642ea0de359Smrg continue 11643ea0de359Smrg else 11644ea0de359Smrg break 11645ea0de359Smrg fi 11646ea0de359Smrg ;; 116470da4cdccSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11648084f91ccSmrg # This compiler won't grok '-c -o', but also, the minuso test has 116490da4cdccSmrg # not run yet. These depmodes are late enough in the game, and 116500da4cdccSmrg # so weak that their functioning should not be impacted. 116510da4cdccSmrg am__obj=conftest.${OBJEXT-o} 116520da4cdccSmrg am__minus_obj= 116530da4cdccSmrg ;; 11654ea0de359Smrg none) break ;; 11655ea0de359Smrg esac 11656ea0de359Smrg if depmode=$depmode \ 116570da4cdccSmrg source=sub/conftest.c object=$am__obj \ 11658ea0de359Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 116590da4cdccSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11660ea0de359Smrg >/dev/null 2>conftest.err && 11661ea0de359Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11662ea0de359Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 116630da4cdccSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11664ea0de359Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11665ea0de359Smrg # icc doesn't choke on unknown options, it will just issue warnings 11666ea0de359Smrg # or remarks (even with -Werror). So we grep stderr for any message 11667ea0de359Smrg # that says an option was ignored or not supported. 11668ea0de359Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11669ea0de359Smrg # icc: Command line warning: ignoring option '-M'; no argument required 11670ea0de359Smrg # The diagnosis changed in icc 8.0: 11671ea0de359Smrg # icc: Command line remark: option '-MP' not supported 11672ea0de359Smrg if (grep 'ignoring option' conftest.err || 11673ea0de359Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11674ea0de359Smrg am_cv_$1_dependencies_compiler_type=$depmode 11675ea0de359Smrg break 11676ea0de359Smrg fi 11677ea0de359Smrg fi 11678ea0de359Smrg done 11679ea0de359Smrg 11680ea0de359Smrg cd .. 11681ea0de359Smrg rm -rf conftest.dir 116829418810dSmrgelse 11683ea0de359Smrg am_cv_$1_dependencies_compiler_type=none 116849418810dSmrgfi 11685ea0de359Smrg]) 11686ea0de359SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11687ea0de359SmrgAM_CONDITIONAL([am__fastdep$1], [ 11688ea0de359Smrg test "x$enable_dependency_tracking" != xno \ 11689ea0de359Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11690ea0de359Smrg]) 116919bd41f2cSmrg 116929418810dSmrg 11693ea0de359Smrg# AM_SET_DEPDIR 11694ea0de359Smrg# ------------- 11695ea0de359Smrg# Choose a directory name for dependency files. 11696084f91ccSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11697ea0de359SmrgAC_DEFUN([AM_SET_DEPDIR], 11698ea0de359Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11699ea0de359SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11700ea0de359Smrg]) 11701ea0de359Smrg 11702ea0de359Smrg 11703ea0de359Smrg# AM_DEP_TRACK 11704ea0de359Smrg# ------------ 11705ea0de359SmrgAC_DEFUN([AM_DEP_TRACK], 11706084f91ccSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11707084f91ccSmrgAS_HELP_STRING( 11708084f91ccSmrg [--enable-dependency-tracking], 11709084f91ccSmrg [do not reject slow dependency extractors]) 11710084f91ccSmrgAS_HELP_STRING( 11711084f91ccSmrg [--disable-dependency-tracking], 11712084f91ccSmrg [speeds up one-time build])]) 11713ea0de359Smrgif test "x$enable_dependency_tracking" != xno; then 11714ea0de359Smrg am_depcomp="$ac_aux_dir/depcomp" 11715ea0de359Smrg AMDEPBACKSLASH='\' 117160da4cdccSmrg am__nodep='_no' 117179418810dSmrgfi 11718ea0de359SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11719ea0de359SmrgAC_SUBST([AMDEPBACKSLASH])dnl 11720ea0de359Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 117210da4cdccSmrgAC_SUBST([am__nodep])dnl 117220da4cdccSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11723ea0de359Smrg]) 117249bd41f2cSmrg 11725ea0de359Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11726ea0de359Smrg 11727084f91ccSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 117289418810dSmrg# 11729ea0de359Smrg# This file is free software; the Free Software Foundation 11730ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 11731ea0de359Smrg# with or without modifications, as long as this notice is preserved. 117329418810dSmrg 11733ea0de359Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11734ea0de359Smrg# ------------------------------ 11735ea0de359SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 117360da4cdccSmrg[{ 11737084f91ccSmrg # Older Autoconf quotes --file arguments for eval, but not when files 117380da4cdccSmrg # are listed without --file. Let's play safe and only enable the eval 117390da4cdccSmrg # if we detect the quoting. 11740084f91ccSmrg # TODO: see whether this extra hack can be removed once we start 11741084f91ccSmrg # requiring Autoconf 2.70 or later. 11742084f91ccSmrg AS_CASE([$CONFIG_FILES], 11743084f91ccSmrg [*\'*], [eval set x "$CONFIG_FILES"], 11744084f91ccSmrg [*], [set x $CONFIG_FILES]) 117450da4cdccSmrg shift 11746084f91ccSmrg # Used to flag and report bootstrapping failures. 11747084f91ccSmrg am_rc=0 11748084f91ccSmrg for am_mf 117490da4cdccSmrg do 117500da4cdccSmrg # Strip MF so we end up with the name of the file. 11751084f91ccSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 11752084f91ccSmrg # Check whether this is an Automake generated Makefile which includes 11753084f91ccSmrg # dependency-tracking related rules and includes. 11754084f91ccSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 117550da4cdccSmrg # limit of 2048, but all sed's we know have understand at least 4000. 11756084f91ccSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 11757084f91ccSmrg || continue 11758084f91ccSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 11759084f91ccSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 11760084f91ccSmrg AM_RUN_LOG([cd "$am_dirpart" \ 11761084f91ccSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 11762084f91ccSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 11763ea0de359Smrg done 11764084f91ccSmrg if test $am_rc -ne 0; then 11765084f91ccSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 11766084f91ccSmrg for automatic dependency tracking. If GNU make was not used, consider 11767084f91ccSmrg re-running the configure script with MAKE="gmake" (or whatever is 11768084f91ccSmrg necessary). You can also try re-running configure with the 11769084f91ccSmrg '--disable-dependency-tracking' option to at least be able to build 11770084f91ccSmrg the package (albeit without support for automatic dependency tracking).]) 11771084f91ccSmrg fi 11772084f91ccSmrg AS_UNSET([am_dirpart]) 11773084f91ccSmrg AS_UNSET([am_filepart]) 11774084f91ccSmrg AS_UNSET([am_mf]) 11775084f91ccSmrg AS_UNSET([am_rc]) 11776084f91ccSmrg rm -f conftest-deps.mk 117770da4cdccSmrg} 11778ea0de359Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 117799418810dSmrg 117809418810dSmrg 11781ea0de359Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11782ea0de359Smrg# ----------------------------- 11783ea0de359Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 117849418810dSmrg# 11785084f91ccSmrg# This code is only required when automatic dependency tracking is enabled. 11786084f91ccSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 11787084f91ccSmrg# order to bootstrap the dependency handling code. 11788ea0de359SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11789ea0de359Smrg[AC_CONFIG_COMMANDS([depfiles], 11790ea0de359Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11791084f91ccSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 11792ea0de359Smrg 11793ea0de359Smrg# Do all the work for Automake. -*- Autoconf -*- 11794ea0de359Smrg 11795084f91ccSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 117969418810dSmrg# 11797ea0de359Smrg# This file is free software; the Free Software Foundation 11798ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 11799ea0de359Smrg# with or without modifications, as long as this notice is preserved. 118009418810dSmrg 11801ea0de359Smrg# This macro actually does too much. Some checks are only needed if 11802ea0de359Smrg# your package does certain things. But this isn't really a big deal. 11803ea0de359Smrg 11804084f91ccSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11805084f91ccSmrgm4_define([AC_PROG_CC], 11806084f91ccSmrgm4_defn([AC_PROG_CC]) 11807084f91ccSmrg[_AM_PROG_CC_C_O 11808084f91ccSmrg]) 11809084f91ccSmrg 11810ea0de359Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11811ea0de359Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11812ea0de359Smrg# ----------------------------------------------- 11813ea0de359Smrg# The call with PACKAGE and VERSION arguments is the old style 11814ea0de359Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11815ea0de359Smrg# and VERSION should now be passed to AC_INIT and removed from 11816ea0de359Smrg# the call to AM_INIT_AUTOMAKE. 11817ea0de359Smrg# We support both call styles for the transition. After 11818ea0de359Smrg# the next Automake release, Autoconf can make the AC_INIT 11819ea0de359Smrg# arguments mandatory, and then we can depend on a new Autoconf 11820ea0de359Smrg# release and drop the old call support. 11821ea0de359SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11822084f91ccSmrg[AC_PREREQ([2.65])dnl 11823084f91ccSmrgm4_ifdef([_$0_ALREADY_INIT], 11824084f91ccSmrg [m4_fatal([$0 expanded multiple times 11825084f91ccSmrg]m4_defn([_$0_ALREADY_INIT]))], 11826084f91ccSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 11827ea0de359Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11828ea0de359Smrgdnl the ones we care about. 11829ea0de359Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11830ea0de359SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11831ea0de359SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11832ea0de359Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11833ea0de359Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11834ea0de359Smrg # is not polluted with repeated "-I." 11835ea0de359Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11836ea0de359Smrg # test to see if srcdir already configured 11837ea0de359Smrg if test -f $srcdir/config.status; then 11838ea0de359Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11839ea0de359Smrg fi 118409bd41f2cSmrgfi 118419bd41f2cSmrg 11842ea0de359Smrg# test whether we have cygpath 11843ea0de359Smrgif test -z "$CYGPATH_W"; then 11844ea0de359Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 11845ea0de359Smrg CYGPATH_W='cygpath -w' 11846ea0de359Smrg else 11847ea0de359Smrg CYGPATH_W=echo 11848ea0de359Smrg fi 11849ea0de359Smrgfi 11850ea0de359SmrgAC_SUBST([CYGPATH_W]) 11851ea0de359Smrg 11852ea0de359Smrg# Define the identity of the package. 11853ea0de359Smrgdnl Distinguish between old-style and new-style calls. 11854ea0de359Smrgm4_ifval([$2], 11855084f91ccSmrg[AC_DIAGNOSE([obsolete], 11856084f91ccSmrg [$0: two- and three-arguments forms are deprecated.]) 11857084f91ccSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11858ea0de359Smrg AC_SUBST([PACKAGE], [$1])dnl 11859ea0de359Smrg AC_SUBST([VERSION], [$2])], 11860ea0de359Smrg[_AM_SET_OPTIONS([$1])dnl 11861ea0de359Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11862084f91ccSmrgm4_if( 11863084f91ccSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 11864084f91ccSmrg [ok:ok],, 11865ea0de359Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11866ea0de359Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11867ea0de359Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11868ea0de359Smrg 11869ea0de359Smrg_AM_IF_OPTION([no-define],, 11870084f91ccSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11871084f91ccSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11872ea0de359Smrg 11873ea0de359Smrg# Some tools Automake needs. 11874ea0de359SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11875ea0de359SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11876084f91ccSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11877084f91ccSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11878084f91ccSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11879084f91ccSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11880084f91ccSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 118810da4cdccSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 118820da4cdccSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11883084f91ccSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11884084f91ccSmrg# For better backward compatibility. To be removed once Automake 1.9.x 11885084f91ccSmrg# dies out for good. For more background, see: 11886084f91ccSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11887084f91ccSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11888084f91ccSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11889084f91ccSmrg# We need awk for the "check" target (and possibly the TAP driver). The 11890084f91ccSmrg# system "awk" is bad on some platforms. 11891ea0de359SmrgAC_REQUIRE([AC_PROG_AWK])dnl 11892ea0de359SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11893ea0de359SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11894ea0de359Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 118950da4cdccSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 118960da4cdccSmrg [_AM_PROG_TAR([v7])])]) 11897ea0de359Smrg_AM_IF_OPTION([no-dependencies],, 11898ea0de359Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11899084f91ccSmrg [_AM_DEPENDENCIES([CC])], 11900084f91ccSmrg [m4_define([AC_PROG_CC], 11901084f91ccSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11902ea0de359SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11903084f91ccSmrg [_AM_DEPENDENCIES([CXX])], 11904084f91ccSmrg [m4_define([AC_PROG_CXX], 11905084f91ccSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11906ea0de359SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11907084f91ccSmrg [_AM_DEPENDENCIES([OBJC])], 11908084f91ccSmrg [m4_define([AC_PROG_OBJC], 11909084f91ccSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11910084f91ccSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11911084f91ccSmrg [_AM_DEPENDENCIES([OBJCXX])], 11912084f91ccSmrg [m4_define([AC_PROG_OBJCXX], 11913084f91ccSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11914ea0de359Smrg]) 11915084f91ccSmrg# Variables for tags utilities; see am/tags.am 11916084f91ccSmrgif test -z "$CTAGS"; then 11917084f91ccSmrg CTAGS=ctags 11918084f91ccSmrgfi 11919084f91ccSmrgAC_SUBST([CTAGS]) 11920084f91ccSmrgif test -z "$ETAGS"; then 11921084f91ccSmrg ETAGS=etags 11922084f91ccSmrgfi 11923084f91ccSmrgAC_SUBST([ETAGS]) 11924084f91ccSmrgif test -z "$CSCOPE"; then 11925084f91ccSmrg CSCOPE=cscope 11926084f91ccSmrgfi 11927084f91ccSmrgAC_SUBST([CSCOPE]) 11928084f91ccSmrg 11929084f91ccSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11930084f91ccSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 11931084f91ccSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11932084f91ccSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 119330da4cdccSmrgAC_CONFIG_COMMANDS_PRE(dnl 119340da4cdccSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 119350da4cdccSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11936084f91ccSmrg 11937084f91ccSmrg# POSIX will say in a future version that running "rm -f" with no argument 11938084f91ccSmrg# is OK; and we want to be able to make that assumption in our Makefile 11939084f91ccSmrg# recipes. So use an aggressive probe to check that the usage we want is 11940084f91ccSmrg# actually supported "in the wild" to an acceptable degree. 11941084f91ccSmrg# See automake bug#10828. 11942084f91ccSmrg# To make any issue more visible, cause the running configure to be aborted 11943084f91ccSmrg# by default if the 'rm' program in use doesn't match our expectations; the 11944084f91ccSmrg# user can still override this though. 11945084f91ccSmrgif rm -f && rm -fr && rm -rf; then : OK; else 11946084f91ccSmrg cat >&2 <<'END' 11947084f91ccSmrgOops! 11948084f91ccSmrg 11949084f91ccSmrgYour 'rm' program seems unable to run without file operands specified 11950084f91ccSmrgon the command line, even when the '-f' option is present. This is contrary 11951084f91ccSmrgto the behaviour of most rm programs out there, and not conforming with 11952084f91ccSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11953084f91ccSmrg 11954084f91ccSmrgPlease tell bug-automake@gnu.org about your system, including the value 11955084f91ccSmrgof your $PATH and any error possibly output before this message. This 11956084f91ccSmrgcan help us improve future automake versions. 11957084f91ccSmrg 11958084f91ccSmrgEND 11959084f91ccSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11960084f91ccSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 11961084f91ccSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11962084f91ccSmrg echo >&2 11963084f91ccSmrg else 11964084f91ccSmrg cat >&2 <<'END' 11965084f91ccSmrgAborting the configuration process, to ensure you take notice of the issue. 11966084f91ccSmrg 11967084f91ccSmrgYou can download and install GNU coreutils to get an 'rm' implementation 11968084f91ccSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 11969084f91ccSmrg 11970084f91ccSmrgIf you want to complete the configuration process using your problematic 11971084f91ccSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11972084f91ccSmrgto "yes", and re-run configure. 11973084f91ccSmrg 11974084f91ccSmrgEND 11975084f91ccSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11976084f91ccSmrg fi 11977084f91ccSmrgfi 11978084f91ccSmrgdnl The trailing newline in this macro's definition is deliberate, for 11979084f91ccSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 11980084f91ccSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11981ea0de359Smrg]) 11982ea0de359Smrg 11983084f91ccSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 119840da4cdccSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 119850da4cdccSmrgdnl mangled by Autoconf and run in a shell conditional statement. 119860da4cdccSmrgm4_define([_AC_COMPILER_EXEEXT], 119870da4cdccSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 119880da4cdccSmrg 11989ea0de359Smrg# When config.status generates a header, we must update the stamp-h file. 11990ea0de359Smrg# This file resides in the same directory as the config header 11991ea0de359Smrg# that is generated. The stamp files are numbered to have different names. 11992ea0de359Smrg 11993ea0de359Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11994ea0de359Smrg# loop where config.status creates the headers, so we can generate 11995ea0de359Smrg# our stamp files there. 11996ea0de359SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11997ea0de359Smrg[# Compute $1's index in $config_headers. 11998ea0de359Smrg_am_arg=$1 11999ea0de359Smrg_am_stamp_count=1 12000ea0de359Smrgfor _am_header in $config_headers :; do 12001ea0de359Smrg case $_am_header in 12002ea0de359Smrg $_am_arg | $_am_arg:* ) 12003ea0de359Smrg break ;; 12004ea0de359Smrg * ) 12005ea0de359Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 12006ea0de359Smrg esac 12007ea0de359Smrgdone 12008ea0de359Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 12009ea0de359Smrg 12010084f91ccSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 120119418810dSmrg# 12012ea0de359Smrg# This file is free software; the Free Software Foundation 12013ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12014ea0de359Smrg# with or without modifications, as long as this notice is preserved. 12015ea0de359Smrg 12016ea0de359Smrg# AM_PROG_INSTALL_SH 12017ea0de359Smrg# ------------------ 12018ea0de359Smrg# Define $install_sh. 12019ea0de359SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 12020ea0de359Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12021084f91ccSmrgif test x"${install_sh+set}" != xset; then 120220da4cdccSmrg case $am_aux_dir in 120230da4cdccSmrg *\ * | *\ *) 120240da4cdccSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 120250da4cdccSmrg *) 120260da4cdccSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 120270da4cdccSmrg esac 120280da4cdccSmrgfi 12029084f91ccSmrgAC_SUBST([install_sh])]) 120309418810dSmrg 12031084f91ccSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 120329418810dSmrg# 12033ea0de359Smrg# This file is free software; the Free Software Foundation 12034ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12035ea0de359Smrg# with or without modifications, as long as this notice is preserved. 12036ea0de359Smrg 12037ea0de359Smrg# Check whether the underlying file-system supports filenames 12038ea0de359Smrg# with a leading dot. For instance MS-DOS doesn't. 12039ea0de359SmrgAC_DEFUN([AM_SET_LEADING_DOT], 12040ea0de359Smrg[rm -rf .tst 2>/dev/null 12041ea0de359Smrgmkdir .tst 2>/dev/null 12042ea0de359Smrgif test -d .tst; then 12043ea0de359Smrg am__leading_dot=. 12044ea0de359Smrgelse 12045ea0de359Smrg am__leading_dot=_ 120469418810dSmrgfi 12047ea0de359Smrgrmdir .tst 2>/dev/null 12048ea0de359SmrgAC_SUBST([am__leading_dot])]) 120499418810dSmrg 12050ea0de359Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 12051ea0de359Smrg 12052084f91ccSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 120539418810dSmrg# 12054ea0de359Smrg# This file is free software; the Free Software Foundation 12055ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12056ea0de359Smrg# with or without modifications, as long as this notice is preserved. 12057ea0de359Smrg 12058ea0de359Smrg# AM_MAKE_INCLUDE() 12059ea0de359Smrg# ----------------- 12060084f91ccSmrg# Check whether make has an 'include' directive that can support all 12061084f91ccSmrg# the idioms we need for our automatic dependency tracking code. 12062ea0de359SmrgAC_DEFUN([AM_MAKE_INCLUDE], 12063084f91ccSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 12064084f91ccSmrgcat > confinc.mk << 'END' 12065ea0de359Smrgam__doit: 12066084f91ccSmrg @echo this is the am__doit target >confinc.out 12067ea0de359Smrg.PHONY: am__doit 12068ea0de359SmrgEND 12069ea0de359Smrgam__include="#" 12070ea0de359Smrgam__quote= 12071084f91ccSmrg# BSD make does it like this. 12072084f91ccSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 12073084f91ccSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 12074084f91ccSmrgecho 'include confinc.mk # ignored' > confmf.GNU 12075084f91ccSmrg_am_result=no 12076084f91ccSmrgfor s in GNU BSD; do 12077084f91ccSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 12078084f91ccSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 12079084f91ccSmrg ['0:this is the am__doit target'], 12080084f91ccSmrg [AS_CASE([$s], 12081084f91ccSmrg [BSD], [am__include='.include' am__quote='"'], 12082084f91ccSmrg [am__include='include' am__quote=''])]) 12083084f91ccSmrg if test "$am__include" != "#"; then 12084084f91ccSmrg _am_result="yes ($s style)" 12085084f91ccSmrg break 12086084f91ccSmrg fi 12087084f91ccSmrgdone 12088084f91ccSmrgrm -f confinc.* confmf.* 12089084f91ccSmrgAC_MSG_RESULT([${_am_result}]) 12090084f91ccSmrgAC_SUBST([am__include])]) 12091084f91ccSmrgAC_SUBST([am__quote])]) 120929bd41f2cSmrg 12093ea0de359Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 12094ea0de359Smrg 12095084f91ccSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 120969418810dSmrg# 12097ea0de359Smrg# This file is free software; the Free Software Foundation 12098ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12099ea0de359Smrg# with or without modifications, as long as this notice is preserved. 121009bd41f2cSmrg 12101ea0de359Smrg# AM_MISSING_PROG(NAME, PROGRAM) 12102ea0de359Smrg# ------------------------------ 12103ea0de359SmrgAC_DEFUN([AM_MISSING_PROG], 12104ea0de359Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12105ea0de359Smrg$1=${$1-"${am_missing_run}$2"} 12106ea0de359SmrgAC_SUBST($1)]) 12107ea0de359Smrg 12108ea0de359Smrg# AM_MISSING_HAS_RUN 12109ea0de359Smrg# ------------------ 12110084f91ccSmrg# Define MISSING if not defined so far and test if it is modern enough. 12111084f91ccSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 12112ea0de359SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 12113ea0de359Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12114ea0de359SmrgAC_REQUIRE_AUX_FILE([missing])dnl 121150da4cdccSmrgif test x"${MISSING+set}" != xset; then 12116084f91ccSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 121170da4cdccSmrgfi 12118ea0de359Smrg# Use eval to expand $SHELL 12119084f91ccSmrgif eval "$MISSING --is-lightweight"; then 12120084f91ccSmrg am_missing_run="$MISSING " 121219bd41f2cSmrgelse 12122ea0de359Smrg am_missing_run= 12123084f91ccSmrg AC_MSG_WARN(['missing' script is too old or missing]) 121249bd41f2cSmrgfi 12125ea0de359Smrg]) 121269bd41f2cSmrg 12127ea0de359Smrg# Helper functions for option handling. -*- Autoconf -*- 12128ea0de359Smrg 12129084f91ccSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 121309418810dSmrg# 12131ea0de359Smrg# This file is free software; the Free Software Foundation 12132ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12133ea0de359Smrg# with or without modifications, as long as this notice is preserved. 121349bd41f2cSmrg 12135ea0de359Smrg# _AM_MANGLE_OPTION(NAME) 12136ea0de359Smrg# ----------------------- 12137ea0de359SmrgAC_DEFUN([_AM_MANGLE_OPTION], 12138ea0de359Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 121399bd41f2cSmrg 12140ea0de359Smrg# _AM_SET_OPTION(NAME) 121410da4cdccSmrg# -------------------- 12142ea0de359Smrg# Set option NAME. Presently that only means defining a flag for this option. 12143ea0de359SmrgAC_DEFUN([_AM_SET_OPTION], 12144084f91ccSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 121459bd41f2cSmrg 12146ea0de359Smrg# _AM_SET_OPTIONS(OPTIONS) 121470da4cdccSmrg# ------------------------ 12148ea0de359Smrg# OPTIONS is a space-separated list of Automake options. 12149ea0de359SmrgAC_DEFUN([_AM_SET_OPTIONS], 12150ea0de359Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 121519bd41f2cSmrg 12152ea0de359Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12153ea0de359Smrg# ------------------------------------------- 12154ea0de359Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12155ea0de359SmrgAC_DEFUN([_AM_IF_OPTION], 12156ea0de359Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 121579bd41f2cSmrg 12158084f91ccSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 12159084f91ccSmrg# 12160084f91ccSmrg# This file is free software; the Free Software Foundation 12161084f91ccSmrg# gives unlimited permission to copy and/or distribute it, 12162084f91ccSmrg# with or without modifications, as long as this notice is preserved. 12163084f91ccSmrg 12164084f91ccSmrg# _AM_PROG_CC_C_O 12165084f91ccSmrg# --------------- 12166084f91ccSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12167084f91ccSmrg# to automatically call this. 12168084f91ccSmrgAC_DEFUN([_AM_PROG_CC_C_O], 12169084f91ccSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12170084f91ccSmrgAC_REQUIRE_AUX_FILE([compile])dnl 12171084f91ccSmrgAC_LANG_PUSH([C])dnl 12172084f91ccSmrgAC_CACHE_CHECK( 12173084f91ccSmrg [whether $CC understands -c and -o together], 12174084f91ccSmrg [am_cv_prog_cc_c_o], 12175084f91ccSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12176084f91ccSmrg # Make sure it works both with $CC and with simple cc. 12177084f91ccSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 12178084f91ccSmrg # compilers refuse to overwrite an existing .o file with -o, 12179084f91ccSmrg # though they will create one. 12180084f91ccSmrg am_cv_prog_cc_c_o=yes 12181084f91ccSmrg for am_i in 1 2; do 12182084f91ccSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12183084f91ccSmrg && test -f conftest2.$ac_objext; then 12184084f91ccSmrg : OK 12185084f91ccSmrg else 12186084f91ccSmrg am_cv_prog_cc_c_o=no 12187084f91ccSmrg break 12188084f91ccSmrg fi 12189084f91ccSmrg done 12190084f91ccSmrg rm -f core conftest* 12191084f91ccSmrg unset am_i]) 12192084f91ccSmrgif test "$am_cv_prog_cc_c_o" != yes; then 12193084f91ccSmrg # Losing compiler, so override with the script. 12194084f91ccSmrg # FIXME: It is wrong to rewrite CC. 12195084f91ccSmrg # But if we don't then we get into trouble of one sort or another. 12196084f91ccSmrg # A longer-term fix would be to have automake use am__CC in this case, 12197084f91ccSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12198084f91ccSmrg CC="$am_aux_dir/compile $CC" 12199084f91ccSmrgfi 12200084f91ccSmrgAC_LANG_POP([C])]) 122019bd41f2cSmrg 12202084f91ccSmrg# For backward compatibility. 12203084f91ccSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12204084f91ccSmrg 12205084f91ccSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 122069418810dSmrg# 12207ea0de359Smrg# This file is free software; the Free Software Foundation 12208ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12209ea0de359Smrg# with or without modifications, as long as this notice is preserved. 12210ea0de359Smrg 12211084f91ccSmrg# AM_RUN_LOG(COMMAND) 12212084f91ccSmrg# ------------------- 12213084f91ccSmrg# Run COMMAND, save the exit status in ac_status, and log it. 12214084f91ccSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12215084f91ccSmrgAC_DEFUN([AM_RUN_LOG], 12216084f91ccSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12217084f91ccSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12218084f91ccSmrg ac_status=$? 12219084f91ccSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12220084f91ccSmrg (exit $ac_status); }]) 12221084f91ccSmrg 12222084f91ccSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 12223084f91ccSmrg 12224084f91ccSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 12225084f91ccSmrg# 12226084f91ccSmrg# This file is free software; the Free Software Foundation 12227084f91ccSmrg# gives unlimited permission to copy and/or distribute it, 12228084f91ccSmrg# with or without modifications, as long as this notice is preserved. 12229ea0de359Smrg 12230ea0de359Smrg# AM_SANITY_CHECK 12231ea0de359Smrg# --------------- 12232ea0de359SmrgAC_DEFUN([AM_SANITY_CHECK], 12233ea0de359Smrg[AC_MSG_CHECKING([whether build environment is sane]) 122340da4cdccSmrg# Reject unsafe characters in $srcdir or the absolute working directory 122350da4cdccSmrg# name. Accept space and tab only in the latter. 122360da4cdccSmrgam_lf=' 122370da4cdccSmrg' 122380da4cdccSmrgcase `pwd` in 122390da4cdccSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 122400da4cdccSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 122410da4cdccSmrgesac 122420da4cdccSmrgcase $srcdir in 122430da4cdccSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12244084f91ccSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 122450da4cdccSmrgesac 122460da4cdccSmrg 12247084f91ccSmrg# Do 'set' in a subshell so we don't clobber the current shell's 12248ea0de359Smrg# arguments. Must try -L first in case configure is actually a 12249ea0de359Smrg# symlink; some systems play weird games with the mod time of symlinks 12250ea0de359Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12251ea0de359Smrg# directory). 12252ea0de359Smrgif ( 12253084f91ccSmrg am_has_slept=no 12254084f91ccSmrg for am_try in 1 2; do 12255084f91ccSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 12256084f91ccSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12257084f91ccSmrg if test "$[*]" = "X"; then 12258084f91ccSmrg # -L didn't work. 12259084f91ccSmrg set X `ls -t "$srcdir/configure" conftest.file` 12260084f91ccSmrg fi 12261084f91ccSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12262084f91ccSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12263084f91ccSmrg 12264084f91ccSmrg # If neither matched, then we have a broken ls. This can happen 12265084f91ccSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12266084f91ccSmrg # broken ls alias from the environment. This has actually 12267084f91ccSmrg # happened. Such a system could not be considered "sane". 12268084f91ccSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12269084f91ccSmrg alias in your environment]) 12270084f91ccSmrg fi 12271084f91ccSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 12272084f91ccSmrg break 12273084f91ccSmrg fi 12274084f91ccSmrg # Just in case. 12275084f91ccSmrg sleep 1 12276084f91ccSmrg am_has_slept=yes 12277084f91ccSmrg done 12278ea0de359Smrg test "$[2]" = conftest.file 12279ea0de359Smrg ) 12280ea0de359Smrgthen 12281ea0de359Smrg # Ok. 12282ea0de359Smrg : 122839bd41f2cSmrgelse 12284ea0de359Smrg AC_MSG_ERROR([newly created file is older than distributed files! 12285ea0de359SmrgCheck your system clock]) 122869bd41f2cSmrgfi 12287084f91ccSmrgAC_MSG_RESULT([yes]) 12288084f91ccSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 12289084f91ccSmrg# generated files are strictly newer. 12290084f91ccSmrgam_sleep_pid= 12291084f91ccSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 12292084f91ccSmrg ( sleep 1 ) & 12293084f91ccSmrg am_sleep_pid=$! 12294084f91ccSmrgfi 12295084f91ccSmrgAC_CONFIG_COMMANDS_PRE( 12296084f91ccSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 12297084f91ccSmrg if test -n "$am_sleep_pid"; then 12298084f91ccSmrg # Hide warnings about reused PIDs. 12299084f91ccSmrg wait $am_sleep_pid 2>/dev/null 12300084f91ccSmrg fi 12301084f91ccSmrg AC_MSG_RESULT([done])]) 12302084f91ccSmrgrm -f conftest.file 12303084f91ccSmrg]) 123049bd41f2cSmrg 12305084f91ccSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 123060da4cdccSmrg# 123070da4cdccSmrg# This file is free software; the Free Software Foundation 123080da4cdccSmrg# gives unlimited permission to copy and/or distribute it, 123090da4cdccSmrg# with or without modifications, as long as this notice is preserved. 123100da4cdccSmrg 123110da4cdccSmrg# AM_SILENT_RULES([DEFAULT]) 123120da4cdccSmrg# -------------------------- 123130da4cdccSmrg# Enable less verbose build rules; with the default set to DEFAULT 12314084f91ccSmrg# ("yes" being less verbose, "no" or empty being verbose). 123150da4cdccSmrgAC_DEFUN([AM_SILENT_RULES], 12316084f91ccSmrg[AC_ARG_ENABLE([silent-rules], [dnl 12317084f91ccSmrgAS_HELP_STRING( 12318084f91ccSmrg [--enable-silent-rules], 12319084f91ccSmrg [less verbose build output (undo: "make V=1")]) 12320084f91ccSmrgAS_HELP_STRING( 12321084f91ccSmrg [--disable-silent-rules], 12322084f91ccSmrg [verbose build output (undo: "make V=0")])dnl 12323084f91ccSmrg]) 12324084f91ccSmrgcase $enable_silent_rules in @%:@ ((( 12325084f91ccSmrg yes) AM_DEFAULT_VERBOSITY=0;; 12326084f91ccSmrg no) AM_DEFAULT_VERBOSITY=1;; 12327084f91ccSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 123280da4cdccSmrgesac 123290da4cdccSmrgdnl 12330084f91ccSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 123310da4cdccSmrgdnl do not support nested variable expansions. 123320da4cdccSmrgdnl See automake bug#9928 and bug#10237. 123330da4cdccSmrgam_make=${MAKE-make} 123340da4cdccSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 123350da4cdccSmrg [am_cv_make_support_nested_variables], 123360da4cdccSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 123370da4cdccSmrgBAR0=false 123380da4cdccSmrgBAR1=true 123390da4cdccSmrgV=1 123400da4cdccSmrgam__doit: 123410da4cdccSmrg @$(TRUE) 123420da4cdccSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 123430da4cdccSmrg am_cv_make_support_nested_variables=yes 123440da4cdccSmrgelse 123450da4cdccSmrg am_cv_make_support_nested_variables=no 123460da4cdccSmrgfi]) 123470da4cdccSmrgif test $am_cv_make_support_nested_variables = yes; then 12348084f91ccSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 123490da4cdccSmrg AM_V='$(V)' 123500da4cdccSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 123510da4cdccSmrgelse 123520da4cdccSmrg AM_V=$AM_DEFAULT_VERBOSITY 123530da4cdccSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 123540da4cdccSmrgfi 123550da4cdccSmrgAC_SUBST([AM_V])dnl 123560da4cdccSmrgAM_SUBST_NOTMAKE([AM_V])dnl 123570da4cdccSmrgAC_SUBST([AM_DEFAULT_V])dnl 123580da4cdccSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 123590da4cdccSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 123600da4cdccSmrgAM_BACKSLASH='\' 123610da4cdccSmrgAC_SUBST([AM_BACKSLASH])dnl 123620da4cdccSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 123630da4cdccSmrg]) 123640da4cdccSmrg 12365084f91ccSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 12366ea0de359Smrg# 12367ea0de359Smrg# This file is free software; the Free Software Foundation 12368ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12369ea0de359Smrg# with or without modifications, as long as this notice is preserved. 12370ea0de359Smrg 12371ea0de359Smrg# AM_PROG_INSTALL_STRIP 12372ea0de359Smrg# --------------------- 12373084f91ccSmrg# One issue with vendor 'install' (even GNU) is that you can't 12374ea0de359Smrg# specify the program used to strip binaries. This is especially 12375ea0de359Smrg# annoying in cross-compiling environments, where the build's strip 12376ea0de359Smrg# is unlikely to handle the host's binaries. 12377ea0de359Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12378084f91ccSmrg# always use install-sh in "make install-strip", and initialize 12379ea0de359Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 12380ea0de359SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12381ea0de359Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12382084f91ccSmrg# Installed binaries are usually stripped using 'strip' when the user 12383084f91ccSmrg# run "make install-strip". However 'strip' might not be the right 12384ea0de359Smrg# tool to use in cross-compilation environments, therefore Automake 12385084f91ccSmrg# will honor the 'STRIP' environment variable to overrule this program. 12386084f91ccSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12387ea0de359Smrgif test "$cross_compiling" != no; then 12388ea0de359Smrg AC_CHECK_TOOL([STRIP], [strip], :) 123899bd41f2cSmrgfi 12390ea0de359SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12391ea0de359SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 123929bd41f2cSmrg 12393084f91ccSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 123949bd41f2cSmrg# 12395ea0de359Smrg# This file is free software; the Free Software Foundation 12396ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12397ea0de359Smrg# with or without modifications, as long as this notice is preserved. 123989418810dSmrg 12399ea0de359Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 12400ea0de359Smrg# --------------------------- 12401ea0de359Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12402ea0de359Smrg# This macro is traced by Automake. 12403ea0de359SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 124049418810dSmrg 124050da4cdccSmrg# AM_SUBST_NOTMAKE(VARIABLE) 124060da4cdccSmrg# -------------------------- 124070da4cdccSmrg# Public sister of _AM_SUBST_NOTMAKE. 124080da4cdccSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 124090da4cdccSmrg 12410ea0de359Smrg# Check how to create a tarball. -*- Autoconf -*- 12411ea0de359Smrg 12412084f91ccSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 124139bd41f2cSmrg# 12414ea0de359Smrg# This file is free software; the Free Software Foundation 12415ea0de359Smrg# gives unlimited permission to copy and/or distribute it, 12416ea0de359Smrg# with or without modifications, as long as this notice is preserved. 12417ea0de359Smrg 12418ea0de359Smrg# _AM_PROG_TAR(FORMAT) 12419ea0de359Smrg# -------------------- 12420ea0de359Smrg# Check how to create a tarball in format FORMAT. 12421084f91ccSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 124229bd41f2cSmrg# 12423ea0de359Smrg# Substitute a variable $(am__tar) that is a command 12424ea0de359Smrg# writing to stdout a FORMAT-tarball containing the directory 12425ea0de359Smrg# $tardir. 12426ea0de359Smrg# tardir=directory && $(am__tar) > result.tar 124279418810dSmrg# 12428ea0de359Smrg# Substitute a variable $(am__untar) that extract such 12429ea0de359Smrg# a tarball read from stdin. 12430ea0de359Smrg# $(am__untar) < result.tar 12431084f91ccSmrg# 12432ea0de359SmrgAC_DEFUN([_AM_PROG_TAR], 124330da4cdccSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 124340da4cdccSmrg# in the wild :-( We should find a proper way to deprecate it ... 124350da4cdccSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 12436084f91ccSmrg 12437084f91ccSmrg# We'll loop over all known methods to create a tar archive until one works. 12438ea0de359Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 124399bd41f2cSmrg 12440084f91ccSmrgm4_if([$1], [v7], 12441084f91ccSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12442084f91ccSmrg 12443084f91ccSmrg [m4_case([$1], 12444084f91ccSmrg [ustar], 12445084f91ccSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12446084f91ccSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 12447084f91ccSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12448084f91ccSmrg # and bug#13588). 12449084f91ccSmrg am_max_uid=2097151 # 2^21 - 1 12450084f91ccSmrg am_max_gid=$am_max_uid 12451084f91ccSmrg # The $UID and $GID variables are not portable, so we need to resort 12452084f91ccSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12453084f91ccSmrg # below are definitely unexpected, so allow the users to see them 12454084f91ccSmrg # (that is, avoid stderr redirection). 12455084f91ccSmrg am_uid=`id -u || echo unknown` 12456084f91ccSmrg am_gid=`id -g || echo unknown` 12457084f91ccSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12458084f91ccSmrg if test $am_uid -le $am_max_uid; then 12459084f91ccSmrg AC_MSG_RESULT([yes]) 12460084f91ccSmrg else 12461084f91ccSmrg AC_MSG_RESULT([no]) 12462084f91ccSmrg _am_tools=none 12463084f91ccSmrg fi 12464084f91ccSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12465084f91ccSmrg if test $am_gid -le $am_max_gid; then 12466084f91ccSmrg AC_MSG_RESULT([yes]) 12467084f91ccSmrg else 12468084f91ccSmrg AC_MSG_RESULT([no]) 12469084f91ccSmrg _am_tools=none 12470084f91ccSmrg fi], 12471084f91ccSmrg 12472084f91ccSmrg [pax], 12473084f91ccSmrg [], 124749bd41f2cSmrg 12475084f91ccSmrg [m4_fatal([Unknown tar format])]) 12476084f91ccSmrg 12477084f91ccSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 12478084f91ccSmrg 12479084f91ccSmrg # Go ahead even if we have the value already cached. We do so because we 12480084f91ccSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 12481084f91ccSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12482084f91ccSmrg 12483084f91ccSmrg for _am_tool in $_am_tools; do 12484084f91ccSmrg case $_am_tool in 12485084f91ccSmrg gnutar) 12486084f91ccSmrg for _am_tar in tar gnutar gtar; do 12487084f91ccSmrg AM_RUN_LOG([$_am_tar --version]) && break 12488084f91ccSmrg done 12489084f91ccSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12490084f91ccSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12491084f91ccSmrg am__untar="$_am_tar -xf -" 12492084f91ccSmrg ;; 12493084f91ccSmrg plaintar) 12494084f91ccSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 12495084f91ccSmrg # ustar tarball either. 12496084f91ccSmrg (tar --version) >/dev/null 2>&1 && continue 12497084f91ccSmrg am__tar='tar chf - "$$tardir"' 12498084f91ccSmrg am__tar_='tar chf - "$tardir"' 12499084f91ccSmrg am__untar='tar xf -' 12500084f91ccSmrg ;; 12501084f91ccSmrg pax) 12502084f91ccSmrg am__tar='pax -L -x $1 -w "$$tardir"' 12503084f91ccSmrg am__tar_='pax -L -x $1 -w "$tardir"' 12504084f91ccSmrg am__untar='pax -r' 12505084f91ccSmrg ;; 12506084f91ccSmrg cpio) 12507084f91ccSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12508084f91ccSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12509084f91ccSmrg am__untar='cpio -i -H $1 -d' 12510084f91ccSmrg ;; 12511084f91ccSmrg none) 12512084f91ccSmrg am__tar=false 12513084f91ccSmrg am__tar_=false 12514084f91ccSmrg am__untar=false 12515084f91ccSmrg ;; 12516084f91ccSmrg esac 12517084f91ccSmrg 12518084f91ccSmrg # If the value was cached, stop now. We just wanted to have am__tar 12519084f91ccSmrg # and am__untar set. 12520084f91ccSmrg test -n "${am_cv_prog_tar_$1}" && break 12521084f91ccSmrg 12522084f91ccSmrg # tar/untar a dummy directory, and stop if the command works. 12523084f91ccSmrg rm -rf conftest.dir 12524084f91ccSmrg mkdir conftest.dir 12525084f91ccSmrg echo GrepMe > conftest.dir/file 12526084f91ccSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12527084f91ccSmrg rm -rf conftest.dir 12528084f91ccSmrg if test -s conftest.tar; then 12529084f91ccSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 12530084f91ccSmrg AM_RUN_LOG([cat conftest.dir/file]) 12531084f91ccSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12532084f91ccSmrg fi 12533084f91ccSmrg done 12534ea0de359Smrg rm -rf conftest.dir 125359bd41f2cSmrg 12536084f91ccSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12537084f91ccSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12538084f91ccSmrg 12539ea0de359SmrgAC_SUBST([am__tar]) 12540ea0de359SmrgAC_SUBST([am__untar]) 12541ea0de359Smrg]) # _AM_PROG_TAR 125429bd41f2cSmrg 12543