aclocal.m4 revision 9ab56c27
154cef2ddSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 270728a38Smrg 354cef2ddSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 48c9fbc29Smrg 58c9fbc29Smrg# This file is free software; the Free Software Foundation 68c9fbc29Smrg# gives unlimited permission to copy and/or distribute it, 78c9fbc29Smrg# with or without modifications, as long as this notice is preserved. 88c9fbc29Smrg 98c9fbc29Smrg# This program is distributed in the hope that it will be useful, 108c9fbc29Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 118c9fbc29Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 128c9fbc29Smrg# PARTICULAR PURPOSE. 138c9fbc29Smrg 1470728a38Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 154e411241Smrgm4_ifndef([AC_AUTOCONF_VERSION], 164e411241Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1754cef2ddSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 1854cef2ddSmrg[m4_warning([this file was generated for autoconf 2.71. 194e411241SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 204e411241SmrgIf you have problems, you may need to regenerate the build system entirely. 2170728a38SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 228c9fbc29Smrg 239ab56c27Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2454044362Smrg# 259ab56c27Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 269ab56c27Smrg# Foundation, Inc. 279ab56c27Smrg# Written by Gordon Matzigkeit, 1996 289ab56c27Smrg# 299ab56c27Smrg# This file is free software; the Free Software Foundation gives 309ab56c27Smrg# unlimited permission to copy and/or distribute it, with or without 319ab56c27Smrg# modifications, as long as this notice is preserved. 328c9fbc29Smrg 339ab56c27Smrgm4_define([_LT_COPYING], [dnl 349ab56c27Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 359ab56c27Smrg# This is free software; see the source for copying conditions. There is NO 369ab56c27Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 378c9fbc29Smrg 389ab56c27Smrg# GNU Libtool is free software; you can redistribute it and/or modify 399ab56c27Smrg# it under the terms of the GNU General Public License as published by 409ab56c27Smrg# the Free Software Foundation; either version 2 of of the License, or 419ab56c27Smrg# (at your option) any later version. 429ab56c27Smrg# 439ab56c27Smrg# As a special exception to the GNU General Public License, if you 449ab56c27Smrg# distribute this file as part of a program or library that is built 459ab56c27Smrg# using GNU Libtool, you may include this file under the same 469ab56c27Smrg# distribution terms that you use for the rest of that program. 479ab56c27Smrg# 489ab56c27Smrg# GNU Libtool is distributed in the hope that it will be useful, but 499ab56c27Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 509ab56c27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 519ab56c27Smrg# GNU General Public License for more details. 529ab56c27Smrg# 539ab56c27Smrg# You should have received a copy of the GNU General Public License 549ab56c27Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 559ab56c27Smrg]) 568c9fbc29Smrg 579ab56c27Smrg# serial 59 LT_INIT 588c9fbc29Smrg 598c9fbc29Smrg 609ab56c27Smrg# LT_PREREQ(VERSION) 619ab56c27Smrg# ------------------ 629ab56c27Smrg# Complain and exit if this libtool version is less that VERSION. 639ab56c27Smrgm4_defun([LT_PREREQ], 649ab56c27Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 659ab56c27Smrg [m4_default([$3], 669ab56c27Smrg [m4_fatal([Libtool version $1 or higher is required], 679ab56c27Smrg 63)])], 689ab56c27Smrg [$2])]) 698c9fbc29Smrg 7054cef2ddSmrg 719ab56c27Smrg# _LT_CHECK_BUILDDIR 729ab56c27Smrg# ------------------ 739ab56c27Smrg# Complain if the absolute build directory name contains unusual characters 749ab56c27Smrgm4_defun([_LT_CHECK_BUILDDIR], 759ab56c27Smrg[case `pwd` in 769ab56c27Smrg *\ * | *\ *) 779ab56c27Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 789ab56c27Smrgesac 798c9fbc29Smrg]) 808c9fbc29Smrg 818c9fbc29Smrg 829ab56c27Smrg# LT_INIT([OPTIONS]) 839ab56c27Smrg# ------------------ 849ab56c27SmrgAC_DEFUN([LT_INIT], 859ab56c27Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 869ab56c27SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 879ab56c27SmrgAC_BEFORE([$0], [LT_LANG])dnl 889ab56c27SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 899ab56c27SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 909ab56c27Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 918c9fbc29Smrg 929ab56c27Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 939ab56c27Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 949ab56c27Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 959ab56c27Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 969ab56c27Smrgdnl unless we require an AC_DEFUNed macro: 979ab56c27SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 989ab56c27SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 999ab56c27SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1009ab56c27SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1019ab56c27Smrgm4_require([_LT_PROG_LTMAIN])dnl 1028c9fbc29Smrg 1039ab56c27Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1048c9fbc29Smrg 1059ab56c27Smrgdnl Parse OPTIONS 1069ab56c27Smrg_LT_SET_OPTIONS([$0], [$1]) 1078c9fbc29Smrg 1089ab56c27Smrg# This can be used to rebuild libtool when needed 1099ab56c27SmrgLIBTOOL_DEPS=$ltmain 1108c9fbc29Smrg 1119ab56c27Smrg# Always use our own libtool. 1129ab56c27SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1139ab56c27SmrgAC_SUBST(LIBTOOL)dnl 1148c9fbc29Smrg 1159ab56c27Smrg_LT_SETUP 1168c9fbc29Smrg 1179ab56c27Smrg# Only expand once: 1189ab56c27Smrgm4_define([LT_INIT]) 1199ab56c27Smrg])# LT_INIT 1208c9fbc29Smrg 1219ab56c27Smrg# Old names: 1229ab56c27SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1239ab56c27SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1249ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 1259ab56c27Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1269ab56c27Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1278c9fbc29Smrg 1284e411241Smrg 1299ab56c27Smrg# _LT_PREPARE_CC_BASENAME 1309ab56c27Smrg# ----------------------- 1319ab56c27Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1329ab56c27Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1339ab56c27Smrgfunc_cc_basename () 1349ab56c27Smrg{ 1359ab56c27Smrg for cc_temp in @S|@*""; do 1369ab56c27Smrg case $cc_temp in 1379ab56c27Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1389ab56c27Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1399ab56c27Smrg \-*) ;; 1409ab56c27Smrg *) break;; 1419ab56c27Smrg esac 1428c9fbc29Smrg done 1439ab56c27Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1449ab56c27Smrg} 1459ab56c27Smrg])# _LT_PREPARE_CC_BASENAME 1468c9fbc29Smrg 1478c9fbc29Smrg 1489ab56c27Smrg# _LT_CC_BASENAME(CC) 1499ab56c27Smrg# ------------------- 1509ab56c27Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1519ab56c27Smrg# but that macro is also expanded into generated libtool script, which 1529ab56c27Smrg# arranges for $SED and $ECHO to be set by different means. 1539ab56c27Smrgm4_defun([_LT_CC_BASENAME], 1549ab56c27Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1559ab56c27SmrgAC_REQUIRE([_LT_DECL_SED])dnl 1569ab56c27SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1579ab56c27Smrgfunc_cc_basename $1 1589ab56c27Smrgcc_basename=$func_cc_basename_result 1598c9fbc29Smrg]) 1608c9fbc29Smrg 1618c9fbc29Smrg 1629ab56c27Smrg# _LT_FILEUTILS_DEFAULTS 1639ab56c27Smrg# ---------------------- 1649ab56c27Smrg# It is okay to use these file commands and assume they have been set 1659ab56c27Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1669ab56c27Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1679ab56c27Smrg[: ${CP="cp -f"} 1689ab56c27Smrg: ${MV="mv -f"} 1699ab56c27Smrg: ${RM="rm -f"} 1709ab56c27Smrg])# _LT_FILEUTILS_DEFAULTS 17154044362Smrg 17254044362Smrg 1739ab56c27Smrg# _LT_SETUP 1749ab56c27Smrg# --------- 1759ab56c27Smrgm4_defun([_LT_SETUP], 1769ab56c27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1779ab56c27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1789ab56c27SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1799ab56c27SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1809ab56c27Smrg 1819ab56c27Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1829ab56c27Smrgdnl 1839ab56c27Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1849ab56c27Smrg_LT_DECL([], [host], [0])dnl 1859ab56c27Smrg_LT_DECL([], [host_os], [0])dnl 1869ab56c27Smrgdnl 1879ab56c27Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1889ab56c27Smrg_LT_DECL([], [build], [0])dnl 1899ab56c27Smrg_LT_DECL([], [build_os], [0])dnl 1909ab56c27Smrgdnl 1919ab56c27SmrgAC_REQUIRE([AC_PROG_CC])dnl 1929ab56c27SmrgAC_REQUIRE([LT_PATH_LD])dnl 1939ab56c27SmrgAC_REQUIRE([LT_PATH_NM])dnl 1949ab56c27Smrgdnl 1959ab56c27SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1969ab56c27Smrgtest -z "$LN_S" && LN_S="ln -s" 1979ab56c27Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1989ab56c27Smrgdnl 1999ab56c27SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2009ab56c27Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2019ab56c27Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2029ab56c27Smrgdnl 2039ab56c27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2049ab56c27Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2059ab56c27Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2069ab56c27Smrgm4_require([_LT_CMD_RELOAD])dnl 2079ab56c27Smrgm4_require([_LT_DECL_FILECMD])dnl 2089ab56c27Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2099ab56c27Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2109ab56c27Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2119ab56c27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2129ab56c27Smrgm4_require([_LT_WITH_SYSROOT])dnl 2139ab56c27Smrgm4_require([_LT_CMD_TRUNCATE])dnl 2149ab56c27Smrg 2159ab56c27Smrg_LT_CONFIG_LIBTOOL_INIT([ 2169ab56c27Smrg# See if we are running on zsh, and set the options that allow our 2179ab56c27Smrg# commands through without removal of \ escapes INIT. 2189ab56c27Smrgif test -n "\${ZSH_VERSION+set}"; then 2199ab56c27Smrg setopt NO_GLOB_SUBST 2208c9fbc29Smrgfi 2218c9fbc29Smrg]) 2229ab56c27Smrgif test -n "${ZSH_VERSION+set}"; then 2239ab56c27Smrg setopt NO_GLOB_SUBST 2249ab56c27Smrgfi 2258c9fbc29Smrg 2269ab56c27Smrg_LT_CHECK_OBJDIR 2278c9fbc29Smrg 2289ab56c27Smrgm4_require([_LT_TAG_COMPILER])dnl 2298c9fbc29Smrg 2309ab56c27Smrgcase $host_os in 2319ab56c27Smrgaix3*) 2329ab56c27Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2339ab56c27Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2349ab56c27Smrg # vanish in a puff of smoke. 2359ab56c27Smrg if test set != "${COLLECT_NAMES+set}"; then 2369ab56c27Smrg COLLECT_NAMES= 2379ab56c27Smrg export COLLECT_NAMES 23854044362Smrg fi 2399ab56c27Smrg ;; 2409ab56c27Smrgesac 2418c9fbc29Smrg 2429ab56c27Smrg# Global variables: 2439ab56c27Smrgofile=libtool 2449ab56c27Smrgcan_build_shared=yes 2458c9fbc29Smrg 2469ab56c27Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 2479ab56c27Smrg# ICC, which need '.lib'). 2489ab56c27Smrglibext=a 2498c9fbc29Smrg 2509ab56c27Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2518c9fbc29Smrg 2529ab56c27Smrgold_CC=$CC 2539ab56c27Smrgold_CFLAGS=$CFLAGS 2548c9fbc29Smrg 2559ab56c27Smrg# Set sane defaults for various variables 2569ab56c27Smrgtest -z "$CC" && CC=cc 2579ab56c27Smrgtest -z "$LTCC" && LTCC=$CC 2589ab56c27Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2599ab56c27Smrgtest -z "$LD" && LD=ld 2609ab56c27Smrgtest -z "$ac_objext" && ac_objext=o 26170728a38Smrg 2629ab56c27Smrg_LT_CC_BASENAME([$compiler]) 2638c9fbc29Smrg 2649ab56c27Smrg# Only perform the check for file, if the check method requires it 2659ab56c27Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2669ab56c27Smrgcase $deplibs_check_method in 2679ab56c27Smrgfile_magic*) 2689ab56c27Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2699ab56c27Smrg _LT_PATH_MAGIC 27054cef2ddSmrg fi 2719ab56c27Smrg ;; 2729ab56c27Smrgesac 2738c9fbc29Smrg 2749ab56c27Smrg# Use C for the default configuration in the libtool script 2759ab56c27SmrgLT_SUPPORTED_TAG([CC]) 2769ab56c27Smrg_LT_LANG_C_CONFIG 2779ab56c27Smrg_LT_LANG_DEFAULT_CONFIG 2789ab56c27Smrg_LT_CONFIG_COMMANDS 2799ab56c27Smrg])# _LT_SETUP 28070728a38Smrg 28170728a38Smrg 2829ab56c27Smrg# _LT_PREPARE_SED_QUOTE_VARS 2839ab56c27Smrg# -------------------------- 2849ab56c27Smrg# Define a few sed substitution that help us do robust quoting. 2859ab56c27Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2869ab56c27Smrg[# Backslashify metacharacters that are still active within 2879ab56c27Smrg# double-quoted strings. 2889ab56c27Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 28970728a38Smrg 2909ab56c27Smrg# Same as above, but do not quote variable references. 2919ab56c27Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2929ab56c27Smrg 2939ab56c27Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2949ab56c27Smrg# double_quote_subst'ed string. 2959ab56c27Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2969ab56c27Smrg 2979ab56c27Smrg# Sed substitution to delay expansion of an escaped single quote. 2989ab56c27Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2999ab56c27Smrg 3009ab56c27Smrg# Sed substitution to avoid accidental globbing in evaled expressions 3019ab56c27Smrgno_glob_subst='s/\*/\\\*/g' 30254044362Smrg]) 30370728a38Smrg 3049ab56c27Smrg# _LT_PROG_LTMAIN 3059ab56c27Smrg# --------------- 3069ab56c27Smrg# Note that this code is called both from 'configure', and 'config.status' 3079ab56c27Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3089ab56c27Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3099ab56c27Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3109ab56c27Smrgm4_defun([_LT_PROG_LTMAIN], 3119ab56c27Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3129ab56c27Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3139ab56c27Smrgltmain=$ac_aux_dir/ltmain.sh 3149ab56c27Smrg])# _LT_PROG_LTMAIN 3154e411241Smrg 3168c9fbc29Smrg 3178c9fbc29Smrg 3189ab56c27Smrg# So that we can recreate a full libtool script including additional 3199ab56c27Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3209ab56c27Smrg# in macros and then make a single call at the end using the 'libtool' 3219ab56c27Smrg# label. 3228c9fbc29Smrg 3238c9fbc29Smrg 3249ab56c27Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3259ab56c27Smrg# ---------------------------------------- 3269ab56c27Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3279ab56c27Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3289ab56c27Smrg[m4_ifval([$1], 3299ab56c27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3309ab56c27Smrg [$1 3319ab56c27Smrg])])]) 3328c9fbc29Smrg 3339ab56c27Smrg# Initialize. 3349ab56c27Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3358c9fbc29Smrg 3368c9fbc29Smrg 3379ab56c27Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3389ab56c27Smrg# ------------------------------ 3399ab56c27Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3409ab56c27Smrgm4_define([_LT_CONFIG_LIBTOOL], 3419ab56c27Smrg[m4_ifval([$1], 3429ab56c27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3439ab56c27Smrg [$1 3449ab56c27Smrg])])]) 3458c9fbc29Smrg 3469ab56c27Smrg# Initialize. 3479ab56c27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3488c9fbc29Smrg 3498c9fbc29Smrg 3509ab56c27Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3519ab56c27Smrg# ----------------------------------------------------- 3529ab56c27Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3539ab56c27Smrg[_LT_CONFIG_LIBTOOL([$1]) 3549ab56c27Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3559ab56c27Smrg]) 35654044362Smrg 3578c9fbc29Smrg 3589ab56c27Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3599ab56c27Smrg# ----------------------------- 3609ab56c27Smrg# Add leading comment marks to the start of each line, and a trailing 3619ab56c27Smrg# full-stop to the whole comment if one is not present already. 3629ab56c27Smrgm4_define([_LT_FORMAT_COMMENT], 3639ab56c27Smrg[m4_ifval([$1], [ 3649ab56c27Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3659ab56c27Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3669ab56c27Smrg)]) 3678c9fbc29Smrg 3688c9fbc29Smrg 3698c9fbc29Smrg 3708c9fbc29Smrg 3718c9fbc29Smrg 3729ab56c27Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3739ab56c27Smrg# ------------------------------------------------------------------- 3749ab56c27Smrg# CONFIGNAME is the name given to the value in the libtool script. 3759ab56c27Smrg# VARNAME is the (base) name used in the configure script. 3769ab56c27Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3779ab56c27Smrg# VARNAME. Any other value will be used directly. 3789ab56c27Smrgm4_define([_LT_DECL], 3799ab56c27Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3809ab56c27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3819ab56c27Smrg [m4_ifval([$1], [$1], [$2])]) 3829ab56c27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3839ab56c27Smrg m4_ifval([$4], 3849ab56c27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3859ab56c27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3869ab56c27Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3879ab56c27Smrg]) 3888c9fbc29Smrg 38970728a38Smrg 3909ab56c27Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3919ab56c27Smrg# -------------------------------------------------------- 3929ab56c27Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 39354cef2ddSmrg 3949ab56c27Smrg 3959ab56c27Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3969ab56c27Smrg# ------------------------------------------------ 3979ab56c27Smrgm4_define([lt_decl_tag_varnames], 3989ab56c27Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3999ab56c27Smrg 4009ab56c27Smrg 4019ab56c27Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4029ab56c27Smrg# --------------------------------------------------------- 4039ab56c27Smrgm4_define([_lt_decl_filter], 4049ab56c27Smrg[m4_case([$#], 4059ab56c27Smrg [0], [m4_fatal([$0: too few arguments: $#])], 4069ab56c27Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4079ab56c27Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4089ab56c27Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4099ab56c27Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 41054cef2ddSmrg]) 4118c9fbc29Smrg 41270728a38Smrg 4139ab56c27Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4149ab56c27Smrg# -------------------------------------------------- 4159ab56c27Smrgm4_define([lt_decl_quote_varnames], 4169ab56c27Smrg[_lt_decl_filter([value], [1], $@)]) 4178c9fbc29Smrg 41870728a38Smrg 4199ab56c27Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4209ab56c27Smrg# --------------------------------------------------- 4219ab56c27Smrgm4_define([lt_decl_dquote_varnames], 4229ab56c27Smrg[_lt_decl_filter([value], [2], $@)]) 42370728a38Smrg 4248c9fbc29Smrg 4259ab56c27Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4269ab56c27Smrg# --------------------------------------------------- 4279ab56c27Smrgm4_define([lt_decl_varnames_tagged], 4289ab56c27Smrg[m4_assert([$# <= 2])dnl 4299ab56c27Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4309ab56c27Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4319ab56c27Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4329ab56c27Smrgm4_define([_lt_decl_varnames_tagged], 4339ab56c27Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4344e411241Smrg 43570728a38Smrg 4369ab56c27Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4379ab56c27Smrg# ------------------------------------------------ 4389ab56c27Smrgm4_define([lt_decl_all_varnames], 4399ab56c27Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4409ab56c27Smrg m4_if([$2], [], 4419ab56c27Smrg m4_quote(lt_decl_varnames), 4429ab56c27Smrg m4_quote(m4_shift($@))))[]dnl 4439ab56c27Smrg]) 4449ab56c27Smrgm4_define([_lt_decl_all_varnames], 4459ab56c27Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4469ab56c27Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4479ab56c27Smrg]) 4488c9fbc29Smrg 44954044362Smrg 4509ab56c27Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4519ab56c27Smrg# ------------------------------------ 4529ab56c27Smrg# Quote a variable value, and forward it to 'config.status' so that its 4539ab56c27Smrg# declaration there will have the same value as in 'configure'. VARNAME 4549ab56c27Smrg# must have a single quote delimited value for this to work. 4559ab56c27Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4569ab56c27Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4579ab56c27Smrg 4589ab56c27Smrg 4599ab56c27Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4609ab56c27Smrg# ------------------------------ 4619ab56c27Smrg# We delimit libtool config variables with single quotes, so when 4629ab56c27Smrg# we write them to config.status, we have to be sure to quote all 4639ab56c27Smrg# embedded single quotes properly. In configure, this macro expands 4649ab56c27Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4654e411241Smrg# 4669ab56c27Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4679ab56c27Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4689ab56c27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4699ab56c27Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 47054044362Smrg 4714e411241Smrg 4729ab56c27Smrg# _LT_LIBTOOL_TAGS 4739ab56c27Smrg# ---------------- 4749ab56c27Smrg# Output comment and list of tags supported by the script 4759ab56c27Smrgm4_defun([_LT_LIBTOOL_TAGS], 4769ab56c27Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4779ab56c27Smrgavailable_tags='_LT_TAGS'dnl 4789ab56c27Smrg]) 47954044362Smrg 4809ab56c27Smrg 4819ab56c27Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4829ab56c27Smrg# ----------------------------------- 4839ab56c27Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4849ab56c27Smrg# expand to a commented shell variable setting: 4858c9fbc29Smrg# 4869ab56c27Smrg# # Some comment about what VAR is for. 4879ab56c27Smrg# visible_name=$lt_internal_name 4889ab56c27Smrgm4_define([_LT_LIBTOOL_DECLARE], 4899ab56c27Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4909ab56c27Smrg [description])))[]dnl 4919ab56c27Smrgm4_pushdef([_libtool_name], 4929ab56c27Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4939ab56c27Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4949ab56c27Smrg [0], [_libtool_name=[$]$1], 4959ab56c27Smrg [1], [_libtool_name=$lt_[]$1], 4969ab56c27Smrg [2], [_libtool_name=$lt_[]$1], 4979ab56c27Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4989ab56c27Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4999ab56c27Smrg]) 5008c9fbc29Smrg 5018c9fbc29Smrg 5029ab56c27Smrg# _LT_LIBTOOL_CONFIG_VARS 5039ab56c27Smrg# ----------------------- 5049ab56c27Smrg# Produce commented declarations of non-tagged libtool config variables 5059ab56c27Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5069ab56c27Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5079ab56c27Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5089ab56c27Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5099ab56c27Smrg[m4_foreach([_lt_var], 5109ab56c27Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5119ab56c27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5124e411241Smrg 5138c9fbc29Smrg 5149ab56c27Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5159ab56c27Smrg# ------------------------- 5169ab56c27Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5179ab56c27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5189ab56c27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5198c9fbc29Smrg 5204e411241Smrg 5219ab56c27Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5229ab56c27Smrg# ------------------------------ 5239ab56c27Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 52470728a38Smrg 5254e411241Smrg 5269ab56c27Smrg# _LT_CONFIG_COMMANDS 5279ab56c27Smrg# ------------------- 5289ab56c27Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5299ab56c27Smrg# variables for single and double quote escaping we saved from calls 5309ab56c27Smrg# to _LT_DECL, we can put quote escaped variables declarations 5319ab56c27Smrg# into 'config.status', and then the shell code to quote escape them in 5329ab56c27Smrg# for loops in 'config.status'. Finally, any additional code accumulated 5339ab56c27Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5349ab56c27Smrgm4_defun([_LT_CONFIG_COMMANDS], 5359ab56c27Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5369ab56c27Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5379ab56c27Smrg dnl instead of duplicating it all over again into config.status, 5389ab56c27Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5399ab56c27Smrg dnl needs to know what name is stored there: 5409ab56c27Smrg [AC_CONFIG_COMMANDS([libtool], 5419ab56c27Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5429ab56c27Smrg dnl If the libtool generation code is destined for config.status, 5439ab56c27Smrg dnl expand the accumulated commands and init code now: 5449ab56c27Smrg [AC_CONFIG_COMMANDS([libtool], 5459ab56c27Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5469ab56c27Smrg])#_LT_CONFIG_COMMANDS 5474e411241Smrg 5484cd6a3aeSmrg 5499ab56c27Smrg# Initialize. 5509ab56c27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5519ab56c27Smrg[ 5524e411241Smrg 5539ab56c27Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5549ab56c27Smrg# if CDPATH is set. 5559ab56c27Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5564e411241Smrg 5579ab56c27Smrgsed_quote_subst='$sed_quote_subst' 5589ab56c27Smrgdouble_quote_subst='$double_quote_subst' 5599ab56c27Smrgdelay_variable_subst='$delay_variable_subst' 5609ab56c27Smrg_LT_CONFIG_STATUS_DECLARATIONS 5619ab56c27SmrgLTCC='$LTCC' 5629ab56c27SmrgLTCFLAGS='$LTCFLAGS' 5639ab56c27Smrgcompiler='$compiler_DEFAULT' 5644e411241Smrg 5659ab56c27Smrg# A function that is used when there is no print builtin or printf. 5669ab56c27Smrgfunc_fallback_echo () 5679ab56c27Smrg{ 5689ab56c27Smrg eval 'cat <<_LTECHO_EOF 5699ab56c27Smrg\$[]1 5709ab56c27Smrg_LTECHO_EOF' 5719ab56c27Smrg} 5724e411241Smrg 5739ab56c27Smrg# Quote evaled strings. 5749ab56c27Smrgfor var in lt_decl_all_varnames([[ \ 5759ab56c27Smrg]], lt_decl_quote_varnames); do 5769ab56c27Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5779ab56c27Smrg *[[\\\\\\\`\\"\\\$]]*) 5789ab56c27Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 57954cef2ddSmrg ;; 5809ab56c27Smrg *) 5819ab56c27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 58254cef2ddSmrg ;; 5839ab56c27Smrg esac 5849ab56c27Smrgdone 5859ab56c27Smrg 5869ab56c27Smrg# Double-quote double-evaled strings. 5879ab56c27Smrgfor var in lt_decl_all_varnames([[ \ 5889ab56c27Smrg]], lt_decl_dquote_varnames); do 5899ab56c27Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5909ab56c27Smrg *[[\\\\\\\`\\"\\\$]]*) 5919ab56c27Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 59254cef2ddSmrg ;; 5939ab56c27Smrg *) 5949ab56c27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 59554cef2ddSmrg ;; 59654cef2ddSmrg esac 5979ab56c27Smrgdone 5984e411241Smrg 5999ab56c27Smrg_LT_OUTPUT_LIBTOOL_INIT 6009ab56c27Smrg]) 6014e411241Smrg 6029ab56c27Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 6039ab56c27Smrg# ------------------------------------ 6049ab56c27Smrg# Generate a child script FILE with all initialization necessary to 6059ab56c27Smrg# reuse the environment learned by the parent script, and make the 6069ab56c27Smrg# file executable. If COMMENT is supplied, it is inserted after the 6079ab56c27Smrg# '#!' sequence but before initialization text begins. After this 6089ab56c27Smrg# macro, additional text can be appended to FILE to form the body of 6099ab56c27Smrg# the child script. The macro ends with non-zero status if the 6109ab56c27Smrg# file could not be fully written (such as if the disk is full). 6119ab56c27Smrgm4_ifdef([AS_INIT_GENERATED], 6129ab56c27Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6139ab56c27Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6149ab56c27Smrg[m4_require([AS_PREPARE])]dnl 6159ab56c27Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6169ab56c27Smrg[lt_write_fail=0 6179ab56c27Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6189ab56c27Smrg#! $SHELL 6199ab56c27Smrg# Generated by $as_me. 6209ab56c27Smrg$2 6219ab56c27SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6229ab56c27Smrgexport SHELL 6239ab56c27Smrg_ASEOF 6249ab56c27Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6259ab56c27SmrgAS_SHELL_SANITIZE 6269ab56c27Smrg_AS_PREPARE 6279ab56c27Smrgexec AS_MESSAGE_FD>&1 6289ab56c27Smrg_ASEOF 6299ab56c27Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6309ab56c27Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6314e411241Smrg 6329ab56c27Smrg# LT_OUTPUT 6339ab56c27Smrg# --------- 6349ab56c27Smrg# This macro allows early generation of the libtool script (before 6359ab56c27Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6369ab56c27Smrg# tests. 6379ab56c27SmrgAC_DEFUN([LT_OUTPUT], 6389ab56c27Smrg[: ${CONFIG_LT=./config.lt} 6399ab56c27SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6409ab56c27Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6419ab56c27Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6424e411241Smrg 6439ab56c27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6449ab56c27Smrglt_cl_silent=false 6459ab56c27Smrgexec AS_MESSAGE_LOG_FD>>config.log 6469ab56c27Smrg{ 6479ab56c27Smrg echo 6489ab56c27Smrg AS_BOX([Running $as_me.]) 6499ab56c27Smrg} >&AS_MESSAGE_LOG_FD 6504e411241Smrg 6519ab56c27Smrglt_cl_help="\ 6529ab56c27Smrg'$as_me' creates a local libtool stub from the current configuration, 6539ab56c27Smrgfor use in further configure time tests before the real libtool is 6549ab56c27Smrggenerated. 6554e411241Smrg 6569ab56c27SmrgUsage: $[0] [[OPTIONS]] 6574e411241Smrg 6589ab56c27Smrg -h, --help print this help, then exit 6599ab56c27Smrg -V, --version print version number, then exit 6609ab56c27Smrg -q, --quiet do not print progress messages 6619ab56c27Smrg -d, --debug don't remove temporary files 6624cd6a3aeSmrg 6639ab56c27SmrgReport bugs to <bug-libtool@gnu.org>." 6644e411241Smrg 6659ab56c27Smrglt_cl_version="\ 6669ab56c27Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6679ab56c27Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6689ab56c27Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6694cd6a3aeSmrg 6709ab56c27SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6719ab56c27SmrgThis config.lt script is free software; the Free Software Foundation 6729ab56c27Smrggives unlimited permision to copy, distribute and modify it." 6734e411241Smrg 6749ab56c27Smrgwhile test 0 != $[#] 6759ab56c27Smrgdo 6769ab56c27Smrg case $[1] in 6779ab56c27Smrg --version | --v* | -V ) 6789ab56c27Smrg echo "$lt_cl_version"; exit 0 ;; 6799ab56c27Smrg --help | --h* | -h ) 6809ab56c27Smrg echo "$lt_cl_help"; exit 0 ;; 6819ab56c27Smrg --debug | --d* | -d ) 6829ab56c27Smrg debug=: ;; 6839ab56c27Smrg --quiet | --q* | --silent | --s* | -q ) 6849ab56c27Smrg lt_cl_silent=: ;; 6854e411241Smrg 6869ab56c27Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6879ab56c27SmrgTry '$[0] --help' for more information.]) ;; 6884e411241Smrg 6899ab56c27Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6909ab56c27SmrgTry '$[0] --help' for more information.]) ;; 6919ab56c27Smrg esac 6929ab56c27Smrg shift 6939ab56c27Smrgdone 6944e411241Smrg 6959ab56c27Smrgif $lt_cl_silent; then 6969ab56c27Smrg exec AS_MESSAGE_FD>/dev/null 6979ab56c27Smrgfi 6989ab56c27Smrg_LTEOF 6994e411241Smrg 7009ab56c27Smrgcat >>"$CONFIG_LT" <<_LTEOF 7019ab56c27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7029ab56c27Smrg_LTEOF 7034e411241Smrg 7049ab56c27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 7059ab56c27SmrgAC_MSG_NOTICE([creating $ofile]) 7069ab56c27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 7079ab56c27SmrgAS_EXIT(0) 7089ab56c27Smrg_LTEOF 7099ab56c27Smrgchmod +x "$CONFIG_LT" 7104e411241Smrg 7119ab56c27Smrg# configure is writing to config.log, but config.lt does its own redirection, 7129ab56c27Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7139ab56c27Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7149ab56c27Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7159ab56c27Smrglt_cl_success=: 7169ab56c27Smrgtest yes = "$silent" && 7179ab56c27Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7189ab56c27Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7199ab56c27Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7209ab56c27Smrgexec AS_MESSAGE_LOG_FD>>config.log 7219ab56c27Smrg$lt_cl_success || AS_EXIT(1) 7229ab56c27Smrg])# LT_OUTPUT 7234e411241Smrg 7244e411241Smrg 7259ab56c27Smrg# _LT_CONFIG(TAG) 7269ab56c27Smrg# --------------- 7279ab56c27Smrg# If TAG is the built-in tag, create an initial libtool script with a 7289ab56c27Smrg# default configuration from the untagged config vars. Otherwise add code 7299ab56c27Smrg# to config.status for appending the configuration named by TAG from the 7309ab56c27Smrg# matching tagged config vars. 7319ab56c27Smrgm4_defun([_LT_CONFIG], 7329ab56c27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7339ab56c27Smrg_LT_CONFIG_SAVE_COMMANDS([ 7349ab56c27Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7359ab56c27Smrg m4_if(_LT_TAG, [C], [ 7369ab56c27Smrg # See if we are running on zsh, and set the options that allow our 7379ab56c27Smrg # commands through without removal of \ escapes. 7389ab56c27Smrg if test -n "${ZSH_VERSION+set}"; then 7399ab56c27Smrg setopt NO_GLOB_SUBST 7409ab56c27Smrg fi 7414e411241Smrg 7429ab56c27Smrg cfgfile=${ofile}T 7439ab56c27Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7449ab56c27Smrg $RM "$cfgfile" 7454e411241Smrg 7469ab56c27Smrg cat <<_LT_EOF >> "$cfgfile" 7479ab56c27Smrg#! $SHELL 7489ab56c27Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7499ab56c27Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7509ab56c27Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7514e411241Smrg 7529ab56c27Smrg# Provide generalized library-building support services. 7539ab56c27Smrg# Written by Gordon Matzigkeit, 1996 7548c9fbc29Smrg 7559ab56c27Smrg_LT_COPYING 7569ab56c27Smrg_LT_LIBTOOL_TAGS 7574cd6a3aeSmrg 7589ab56c27Smrg# Configured defaults for sys_lib_dlsearch_path munging. 7599ab56c27Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7604cd6a3aeSmrg 7619ab56c27Smrg# ### BEGIN LIBTOOL CONFIG 7629ab56c27Smrg_LT_LIBTOOL_CONFIG_VARS 7639ab56c27Smrg_LT_LIBTOOL_TAG_VARS 7649ab56c27Smrg# ### END LIBTOOL CONFIG 7654cd6a3aeSmrg 7669ab56c27Smrg_LT_EOF 7674cd6a3aeSmrg 7689ab56c27Smrg cat <<'_LT_EOF' >> "$cfgfile" 7694e411241Smrg 7709ab56c27Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7718c9fbc29Smrg 7729ab56c27Smrg_LT_PREPARE_MUNGE_PATH_LIST 7739ab56c27Smrg_LT_PREPARE_CC_BASENAME 7748c9fbc29Smrg 7759ab56c27Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7768c9fbc29Smrg 7779ab56c27Smrg_LT_EOF 7788c9fbc29Smrg 7799ab56c27Smrg case $host_os in 7809ab56c27Smrg aix3*) 7819ab56c27Smrg cat <<\_LT_EOF >> "$cfgfile" 7829ab56c27Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7839ab56c27Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7849ab56c27Smrg# vanish in a puff of smoke. 7859ab56c27Smrgif test set != "${COLLECT_NAMES+set}"; then 7869ab56c27Smrg COLLECT_NAMES= 7879ab56c27Smrg export COLLECT_NAMES 7889ab56c27Smrgfi 7899ab56c27Smrg_LT_EOF 7909ab56c27Smrg ;; 7919ab56c27Smrg esac 7928c9fbc29Smrg 7939ab56c27Smrg _LT_PROG_LTMAIN 7948c9fbc29Smrg 7959ab56c27Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7969ab56c27Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7979ab56c27Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7989ab56c27Smrg # is reportedly fixed, but why not run on old versions too? 7999ab56c27Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 8009ab56c27Smrg || (rm -f "$cfgfile"; exit 1) 8018c9fbc29Smrg 8029ab56c27Smrg mv -f "$cfgfile" "$ofile" || 8039ab56c27Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8049ab56c27Smrg chmod +x "$ofile" 8059ab56c27Smrg], 8069ab56c27Smrg[cat <<_LT_EOF >> "$ofile" 8074cd6a3aeSmrg 8089ab56c27Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8099ab56c27Smrgdnl in a comment (ie after a #). 8109ab56c27Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8119ab56c27Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8129ab56c27Smrg# ### END LIBTOOL TAG CONFIG: $1 8139ab56c27Smrg_LT_EOF 8149ab56c27Smrg])dnl /m4_if 8159ab56c27Smrg], 8169ab56c27Smrg[m4_if([$1], [], [ 8179ab56c27Smrg PACKAGE='$PACKAGE' 8189ab56c27Smrg VERSION='$VERSION' 8199ab56c27Smrg RM='$RM' 8209ab56c27Smrg ofile='$ofile'], []) 8219ab56c27Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8229ab56c27Smrg])# _LT_CONFIG 8234cd6a3aeSmrg 8244cd6a3aeSmrg 8259ab56c27Smrg# LT_SUPPORTED_TAG(TAG) 8269ab56c27Smrg# --------------------- 8279ab56c27Smrg# Trace this macro to discover what tags are supported by the libtool 8289ab56c27Smrg# --tag option, using: 8299ab56c27Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8309ab56c27SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8318c9fbc29Smrg 8328c9fbc29Smrg 8339ab56c27Smrg# C support is built-in for now 8349ab56c27Smrgm4_define([_LT_LANG_C_enabled], []) 8359ab56c27Smrgm4_define([_LT_TAGS], []) 8364cd6a3aeSmrg 8374cd6a3aeSmrg 8389ab56c27Smrg# LT_LANG(LANG) 8399ab56c27Smrg# ------------- 8409ab56c27Smrg# Enable libtool support for the given language if not already enabled. 8419ab56c27SmrgAC_DEFUN([LT_LANG], 8429ab56c27Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8439ab56c27Smrgm4_case([$1], 8449ab56c27Smrg [C], [_LT_LANG(C)], 8459ab56c27Smrg [C++], [_LT_LANG(CXX)], 8469ab56c27Smrg [Go], [_LT_LANG(GO)], 8479ab56c27Smrg [Java], [_LT_LANG(GCJ)], 8489ab56c27Smrg [Fortran 77], [_LT_LANG(F77)], 8499ab56c27Smrg [Fortran], [_LT_LANG(FC)], 8509ab56c27Smrg [Windows Resource], [_LT_LANG(RC)], 8519ab56c27Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8529ab56c27Smrg [_LT_LANG($1)], 8539ab56c27Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8549ab56c27Smrg])# LT_LANG 8554cd6a3aeSmrg 8564cd6a3aeSmrg 8579ab56c27Smrg# _LT_LANG(LANGNAME) 8589ab56c27Smrg# ------------------ 8599ab56c27Smrgm4_defun([_LT_LANG], 8609ab56c27Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8619ab56c27Smrg [LT_SUPPORTED_TAG([$1])dnl 8629ab56c27Smrg m4_append([_LT_TAGS], [$1 ])dnl 8639ab56c27Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8649ab56c27Smrg _LT_LANG_$1_CONFIG($1)])dnl 8659ab56c27Smrg])# _LT_LANG 8668c9fbc29Smrg 8678c9fbc29Smrg 8689ab56c27Smrgm4_ifndef([AC_PROG_GO], [ 8699ab56c27Smrg# NOTE: This macro has been submitted for inclusion into # 8709ab56c27Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8719ab56c27Smrg# a released version of Autoconf we should remove this # 8729ab56c27Smrg# macro and use it instead. # 8739ab56c27Smrgm4_defun([AC_PROG_GO], 8749ab56c27Smrg[AC_LANG_PUSH(Go)dnl 8759ab56c27SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8769ab56c27SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8779ab56c27Smrg_AC_ARG_VAR_LDFLAGS()dnl 8789ab56c27SmrgAC_CHECK_TOOL(GOC, gccgo) 8799ab56c27Smrgif test -z "$GOC"; then 8809ab56c27Smrg if test -n "$ac_tool_prefix"; then 8819ab56c27Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8829ab56c27Smrg fi 88354cef2ddSmrgfi 8849ab56c27Smrgif test -z "$GOC"; then 8859ab56c27Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 88654cef2ddSmrgfi 8879ab56c27Smrg])#m4_defun 8889ab56c27Smrg])#m4_ifndef 8898c9fbc29Smrg 8908c9fbc29Smrg 8919ab56c27Smrg# _LT_LANG_DEFAULT_CONFIG 8929ab56c27Smrg# ----------------------- 8939ab56c27Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8949ab56c27Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8959ab56c27Smrg [LT_LANG(CXX)], 8969ab56c27Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8978c9fbc29Smrg 8989ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8999ab56c27Smrg [LT_LANG(F77)], 9009ab56c27Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 9018c9fbc29Smrg 9029ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9039ab56c27Smrg [LT_LANG(FC)], 9049ab56c27Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 90554044362Smrg 9069ab56c27Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9079ab56c27Smrgdnl pulling things in needlessly. 9089ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9099ab56c27Smrg [LT_LANG(GCJ)], 9109ab56c27Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9119ab56c27Smrg [LT_LANG(GCJ)], 9129ab56c27Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9139ab56c27Smrg [LT_LANG(GCJ)], 9149ab56c27Smrg [m4_ifdef([AC_PROG_GCJ], 9159ab56c27Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9169ab56c27Smrg m4_ifdef([A][M_PROG_GCJ], 9179ab56c27Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9189ab56c27Smrg m4_ifdef([LT_PROG_GCJ], 9199ab56c27Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9208c9fbc29Smrg 9219ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9229ab56c27Smrg [LT_LANG(GO)], 9239ab56c27Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9248c9fbc29Smrg 9259ab56c27SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9269ab56c27Smrg [LT_LANG(RC)], 9279ab56c27Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9289ab56c27Smrg])# _LT_LANG_DEFAULT_CONFIG 9298c9fbc29Smrg 9309ab56c27Smrg# Obsolete macros: 9319ab56c27SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9329ab56c27SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9339ab56c27SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9349ab56c27SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9359ab56c27SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9369ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 9379ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9389ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9399ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9409ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9419ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9428c9fbc29Smrg 9438c9fbc29Smrg 9449ab56c27Smrg# _LT_TAG_COMPILER 9459ab56c27Smrg# ---------------- 9469ab56c27Smrgm4_defun([_LT_TAG_COMPILER], 9479ab56c27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9488c9fbc29Smrg 9499ab56c27Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9509ab56c27Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9519ab56c27Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9529ab56c27Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9538c9fbc29Smrg 9549ab56c27Smrg# If no C compiler was specified, use CC. 9559ab56c27SmrgLTCC=${LTCC-"$CC"} 9568c9fbc29Smrg 9579ab56c27Smrg# If no C compiler flags were specified, use CFLAGS. 9589ab56c27SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9598c9fbc29Smrg 9609ab56c27Smrg# Allow CC to be a program name with arguments. 9619ab56c27Smrgcompiler=$CC 9629ab56c27Smrg])# _LT_TAG_COMPILER 96354cef2ddSmrg 9648c9fbc29Smrg 9659ab56c27Smrg# _LT_COMPILER_BOILERPLATE 9669ab56c27Smrg# ------------------------ 9679ab56c27Smrg# Check for compiler boilerplate output or warnings with 9689ab56c27Smrg# the simple compiler test code. 9699ab56c27Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9709ab56c27Smrg[m4_require([_LT_DECL_SED])dnl 9719ab56c27Smrgac_outfile=conftest.$ac_objext 9729ab56c27Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9739ab56c27Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9749ab56c27Smrg_lt_compiler_boilerplate=`cat conftest.err` 9759ab56c27Smrg$RM conftest* 9769ab56c27Smrg])# _LT_COMPILER_BOILERPLATE 9778c9fbc29Smrg 9788c9fbc29Smrg 9799ab56c27Smrg# _LT_LINKER_BOILERPLATE 9809ab56c27Smrg# ---------------------- 9819ab56c27Smrg# Check for linker boilerplate output or warnings with 9829ab56c27Smrg# the simple link test code. 9839ab56c27Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9849ab56c27Smrg[m4_require([_LT_DECL_SED])dnl 9859ab56c27Smrgac_outfile=conftest.$ac_objext 9869ab56c27Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9879ab56c27Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9889ab56c27Smrg_lt_linker_boilerplate=`cat conftest.err` 9899ab56c27Smrg$RM -r conftest* 9909ab56c27Smrg])# _LT_LINKER_BOILERPLATE 9918c9fbc29Smrg 9929ab56c27Smrg# _LT_REQUIRED_DARWIN_CHECKS 9939ab56c27Smrg# ------------------------- 9949ab56c27Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9959ab56c27Smrg case $host_os in 9969ab56c27Smrg rhapsody* | darwin*) 9979ab56c27Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9989ab56c27Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9999ab56c27Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 10009ab56c27Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 10019ab56c27Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10029ab56c27Smrg _LT_DECL([], [DSYMUTIL], [1], 10039ab56c27Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10049ab56c27Smrg _LT_DECL([], [NMEDIT], [1], 10059ab56c27Smrg [Tool to change global to local symbols on Mac OS X]) 10069ab56c27Smrg _LT_DECL([], [LIPO], [1], 10079ab56c27Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 10089ab56c27Smrg _LT_DECL([], [OTOOL], [1], 10099ab56c27Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10109ab56c27Smrg _LT_DECL([], [OTOOL64], [1], 10119ab56c27Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 10124e411241Smrg 10139ab56c27Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10149ab56c27Smrg [lt_cv_apple_cc_single_mod=no 10159ab56c27Smrg if test -z "$LT_MULTI_MODULE"; then 10169ab56c27Smrg # By default we will add the -single_module flag. You can override 10179ab56c27Smrg # by either setting the environment variable LT_MULTI_MODULE 10189ab56c27Smrg # non-empty at configure time, or by adding -multi_module to the 10199ab56c27Smrg # link flags. 10209ab56c27Smrg rm -rf libconftest.dylib* 10219ab56c27Smrg echo "int foo(void){return 1;}" > conftest.c 10229ab56c27Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10239ab56c27Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10249ab56c27Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10259ab56c27Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10269ab56c27Smrg _lt_result=$? 10279ab56c27Smrg # If there is a non-empty error log, and "single_module" 10289ab56c27Smrg # appears in it, assume the flag caused a linker warning 10299ab56c27Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10309ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10319ab56c27Smrg # Otherwise, if the output was created with a 0 exit code from 10329ab56c27Smrg # the compiler, it worked. 10339ab56c27Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10349ab56c27Smrg lt_cv_apple_cc_single_mod=yes 10359ab56c27Smrg else 10369ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10379ab56c27Smrg fi 10389ab56c27Smrg rm -rf libconftest.dylib* 10399ab56c27Smrg rm -f conftest.* 10409ab56c27Smrg fi]) 104154044362Smrg 10429ab56c27Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10439ab56c27Smrg [lt_cv_ld_exported_symbols_list], 10449ab56c27Smrg [lt_cv_ld_exported_symbols_list=no 10459ab56c27Smrg save_LDFLAGS=$LDFLAGS 10469ab56c27Smrg echo "_main" > conftest.sym 10479ab56c27Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10489ab56c27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10499ab56c27Smrg [lt_cv_ld_exported_symbols_list=yes], 10509ab56c27Smrg [lt_cv_ld_exported_symbols_list=no]) 10519ab56c27Smrg LDFLAGS=$save_LDFLAGS 10529ab56c27Smrg ]) 10538c9fbc29Smrg 10549ab56c27Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10559ab56c27Smrg [lt_cv_ld_force_load=no 10569ab56c27Smrg cat > conftest.c << _LT_EOF 10579ab56c27Smrgint forced_loaded() { return 2;} 10589ab56c27Smrg_LT_EOF 10599ab56c27Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10609ab56c27Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10619ab56c27Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10629ab56c27Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10639ab56c27Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10649ab56c27Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10659ab56c27Smrg cat > conftest.c << _LT_EOF 10669ab56c27Smrgint main() { return 0;} 10679ab56c27Smrg_LT_EOF 10689ab56c27Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10699ab56c27Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10709ab56c27Smrg _lt_result=$? 10719ab56c27Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10729ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10739ab56c27Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10749ab56c27Smrg lt_cv_ld_force_load=yes 10759ab56c27Smrg else 10769ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10779ab56c27Smrg fi 10789ab56c27Smrg rm -f conftest.err libconftest.a conftest conftest.c 10799ab56c27Smrg rm -rf conftest.dSYM 10809ab56c27Smrg ]) 10819ab56c27Smrg case $host_os in 10829ab56c27Smrg rhapsody* | darwin1.[[012]]) 10839ab56c27Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10849ab56c27Smrg darwin1.*) 10859ab56c27Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10869ab56c27Smrg darwin*) 10879ab56c27Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 10889ab56c27Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 10899ab56c27Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10909ab56c27Smrg *) 10919ab56c27Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10929ab56c27Smrg esac 10939ab56c27Smrg ;; 10949ab56c27Smrg esac 10959ab56c27Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10969ab56c27Smrg _lt_dar_single_mod='$single_module' 10979ab56c27Smrg fi 10989ab56c27Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 10999ab56c27Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11009ab56c27Smrg else 11019ab56c27Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11029ab56c27Smrg fi 11039ab56c27Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11049ab56c27Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11059ab56c27Smrg else 11069ab56c27Smrg _lt_dsymutil= 11079ab56c27Smrg fi 11089ab56c27Smrg ;; 11099ab56c27Smrg esac 11109ab56c27Smrg]) 11118c9fbc29Smrg 11128c9fbc29Smrg 11139ab56c27Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11149ab56c27Smrg# --------------------------------- 11159ab56c27Smrg# Checks for linker and compiler features on darwin 11169ab56c27Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11179ab56c27Smrg[ 11189ab56c27Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11199ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11209ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11219ab56c27Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11229ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11239ab56c27Smrg if test yes = "$lt_cv_ld_force_load"; then 11249ab56c27Smrg _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\"`' 11259ab56c27Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11269ab56c27Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11279ab56c27Smrg else 11289ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11299ab56c27Smrg fi 11309ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11319ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11329ab56c27Smrg case $cc_basename in 11339ab56c27Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11349ab56c27Smrg *) _lt_dar_can_shared=$GCC ;; 11359ab56c27Smrg esac 11369ab56c27Smrg if test yes = "$_lt_dar_can_shared"; then 11379ab56c27Smrg output_verbose_link_cmd=func_echo_all 11389ab56c27Smrg _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" 11399ab56c27Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11409ab56c27Smrg _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" 11419ab56c27Smrg _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" 11429ab56c27Smrg m4_if([$1], [CXX], 11439ab56c27Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11449ab56c27Smrg _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" 11459ab56c27Smrg _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" 11469ab56c27Smrg fi 11479ab56c27Smrg],[]) 11489ab56c27Smrg else 11499ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11509ab56c27Smrg fi 11519ab56c27Smrg]) 11528c9fbc29Smrg 11539ab56c27Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11549ab56c27Smrg# ---------------------------------- 11559ab56c27Smrg# Links a minimal program and checks the executable 11569ab56c27Smrg# for the system default hardcoded library path. In most cases, 11579ab56c27Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11589ab56c27Smrg# the location of the communication and MPI libs are included too. 11599ab56c27Smrg# If we don't find anything, use the default library path according 11609ab56c27Smrg# to the aix ld manual. 11619ab56c27Smrg# Store the results from the different compilers for each TAGNAME. 11629ab56c27Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11639ab56c27Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11649ab56c27Smrg[m4_require([_LT_DECL_SED])dnl 11659ab56c27Smrgif test set = "${lt_cv_aix_libpath+set}"; then 11669ab56c27Smrg aix_libpath=$lt_cv_aix_libpath 11679ab56c27Smrgelse 11689ab56c27Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11699ab56c27Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11709ab56c27Smrg lt_aix_libpath_sed='[ 11719ab56c27Smrg /Import File Strings/,/^$/ { 11729ab56c27Smrg /^0/ { 11739ab56c27Smrg s/^0 *\([^ ]*\) *$/\1/ 11749ab56c27Smrg p 11759ab56c27Smrg } 11769ab56c27Smrg }]' 11779ab56c27Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11789ab56c27Smrg # Check for a 64-bit object if we didn't find anything. 11799ab56c27Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11809ab56c27Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11819ab56c27Smrg fi],[]) 11829ab56c27Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11839ab56c27Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11849ab56c27Smrg fi 11859ab56c27Smrg ]) 11869ab56c27Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 118754cef2ddSmrgfi 11889ab56c27Smrg])# _LT_SYS_MODULE_PATH_AIX 11898c9fbc29Smrg 11908c9fbc29Smrg 11919ab56c27Smrg# _LT_SHELL_INIT(ARG) 11929ab56c27Smrg# ------------------- 11939ab56c27Smrgm4_define([_LT_SHELL_INIT], 11949ab56c27Smrg[m4_divert_text([M4SH-INIT], [$1 11959ab56c27Smrg])])# _LT_SHELL_INIT 11968c9fbc29Smrg 11974cd6a3aeSmrg 11984cd6a3aeSmrg 11999ab56c27Smrg# _LT_PROG_ECHO_BACKSLASH 12009ab56c27Smrg# ----------------------- 12019ab56c27Smrg# Find how we can fake an echo command that does not interpret backslash. 12029ab56c27Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 12039ab56c27Smrg# of the generated configure script that will find a shell with a builtin 12049ab56c27Smrg# printf (that we can use as an echo command). 12059ab56c27Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12069ab56c27Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12079ab56c27SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12089ab56c27SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12099ab56c27Smrg 12109ab56c27SmrgAC_MSG_CHECKING([how to print strings]) 12119ab56c27Smrg# Test print first, because it will be a builtin if present. 12129ab56c27Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12139ab56c27Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12149ab56c27Smrg ECHO='print -r --' 12159ab56c27Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12169ab56c27Smrg ECHO='printf %s\n' 121754044362Smrgelse 12189ab56c27Smrg # Use this function as a fallback that always works. 12199ab56c27Smrg func_fallback_echo () 12209ab56c27Smrg { 12219ab56c27Smrg eval 'cat <<_LTECHO_EOF 12229ab56c27Smrg$[]1 12239ab56c27Smrg_LTECHO_EOF' 12249ab56c27Smrg } 12259ab56c27Smrg ECHO='func_fallback_echo' 122654044362Smrgfi 12274cd6a3aeSmrg 12289ab56c27Smrg# func_echo_all arg... 12299ab56c27Smrg# Invoke $ECHO with all args, space-separated. 12309ab56c27Smrgfunc_echo_all () 12319ab56c27Smrg{ 12329ab56c27Smrg $ECHO "$*" 12339ab56c27Smrg} 12344cd6a3aeSmrg 12359ab56c27Smrgcase $ECHO in 12369ab56c27Smrg printf*) AC_MSG_RESULT([printf]) ;; 12379ab56c27Smrg print*) AC_MSG_RESULT([print -r]) ;; 12389ab56c27Smrg *) AC_MSG_RESULT([cat]) ;; 12399ab56c27Smrgesac 12408c9fbc29Smrg 12419ab56c27Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12429ab56c27Smrg[_AS_DETECT_SUGGESTED([ 12439ab56c27Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12449ab56c27Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12459ab56c27Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12469ab56c27Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12479ab56c27Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12489ab56c27Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12499ab56c27Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12504cd6a3aeSmrg 12519ab56c27Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12529ab56c27Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12539ab56c27Smrg])# _LT_PROG_ECHO_BACKSLASH 12544cd6a3aeSmrg 12558c9fbc29Smrg 12569ab56c27Smrg# _LT_WITH_SYSROOT 12579ab56c27Smrg# ---------------- 12589ab56c27SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12599ab56c27Smrg[m4_require([_LT_DECL_SED])dnl 12609ab56c27SmrgAC_MSG_CHECKING([for sysroot]) 12619ab56c27SmrgAC_ARG_WITH([sysroot], 12629ab56c27Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12639ab56c27Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 12649ab56c27Smrg if not specified).])], 12659ab56c27Smrg[], [with_sysroot=no]) 12664cd6a3aeSmrg 12679ab56c27Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12689ab56c27Smrgdnl in case the user passed a directory name. 12699ab56c27Smrglt_sysroot= 12709ab56c27Smrgcase $with_sysroot in #( 12719ab56c27Smrg yes) 12729ab56c27Smrg if test yes = "$GCC"; then 12739ab56c27Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 127454cef2ddSmrg fi 12759ab56c27Smrg ;; #( 12769ab56c27Smrg /*) 12779ab56c27Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 12789ab56c27Smrg ;; #( 12799ab56c27Smrg no|'') 12809ab56c27Smrg ;; #( 12819ab56c27Smrg *) 12829ab56c27Smrg AC_MSG_RESULT([$with_sysroot]) 12839ab56c27Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12849ab56c27Smrg ;; 12859ab56c27Smrgesac 12864cd6a3aeSmrg 12879ab56c27Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12889ab56c27Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12899ab56c27Smrg[dependent libraries, and where our libraries should be installed.])]) 12904cd6a3aeSmrg 12919ab56c27Smrg# _LT_ENABLE_LOCK 12929ab56c27Smrg# --------------- 12939ab56c27Smrgm4_defun([_LT_ENABLE_LOCK], 12949ab56c27Smrg[AC_ARG_ENABLE([libtool-lock], 12959ab56c27Smrg [AS_HELP_STRING([--disable-libtool-lock], 12969ab56c27Smrg [avoid locking (might break parallel builds)])]) 12979ab56c27Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12984cd6a3aeSmrg 12999ab56c27Smrg# Some flags need to be propagated to the compiler or linker for good 13009ab56c27Smrg# libtool support. 13019ab56c27Smrgcase $host in 13029ab56c27Smrgia64-*-hpux*) 13039ab56c27Smrg # Find out what ABI is being produced by ac_compile, and set mode 13049ab56c27Smrg # options accordingly. 13059ab56c27Smrg echo 'int i;' > conftest.$ac_ext 13069ab56c27Smrg if AC_TRY_EVAL(ac_compile); then 13079ab56c27Smrg case `$FILECMD conftest.$ac_objext` in 13089ab56c27Smrg *ELF-32*) 13099ab56c27Smrg HPUX_IA64_MODE=32 13109ab56c27Smrg ;; 13119ab56c27Smrg *ELF-64*) 13129ab56c27Smrg HPUX_IA64_MODE=64 13139ab56c27Smrg ;; 13149ab56c27Smrg esac 13159ab56c27Smrg fi 13169ab56c27Smrg rm -rf conftest* 13179ab56c27Smrg ;; 13189ab56c27Smrg*-*-irix6*) 13199ab56c27Smrg # Find out what ABI is being produced by ac_compile, and set linker 13209ab56c27Smrg # options accordingly. 13219ab56c27Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13229ab56c27Smrg if AC_TRY_EVAL(ac_compile); then 13239ab56c27Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 13249ab56c27Smrg case `$FILECMD conftest.$ac_objext` in 13259ab56c27Smrg *32-bit*) 13269ab56c27Smrg LD="${LD-ld} -melf32bsmip" 13279ab56c27Smrg ;; 13289ab56c27Smrg *N32*) 13299ab56c27Smrg LD="${LD-ld} -melf32bmipn32" 13309ab56c27Smrg ;; 13319ab56c27Smrg *64-bit*) 13329ab56c27Smrg LD="${LD-ld} -melf64bmip" 13339ab56c27Smrg ;; 13349ab56c27Smrg esac 13359ab56c27Smrg else 13369ab56c27Smrg case `$FILECMD conftest.$ac_objext` in 13379ab56c27Smrg *32-bit*) 13389ab56c27Smrg LD="${LD-ld} -32" 13399ab56c27Smrg ;; 13409ab56c27Smrg *N32*) 13419ab56c27Smrg LD="${LD-ld} -n32" 13429ab56c27Smrg ;; 13439ab56c27Smrg *64-bit*) 13449ab56c27Smrg LD="${LD-ld} -64" 13459ab56c27Smrg ;; 13469ab56c27Smrg esac 134754044362Smrg fi 13489ab56c27Smrg fi 13499ab56c27Smrg rm -rf conftest* 13509ab56c27Smrg ;; 13514cd6a3aeSmrg 13529ab56c27Smrgmips64*-*linux*) 13539ab56c27Smrg # Find out what ABI is being produced by ac_compile, and set linker 13549ab56c27Smrg # options accordingly. 13559ab56c27Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13569ab56c27Smrg if AC_TRY_EVAL(ac_compile); then 13579ab56c27Smrg emul=elf 13589ab56c27Smrg case `$FILECMD conftest.$ac_objext` in 13599ab56c27Smrg *32-bit*) 13609ab56c27Smrg emul="${emul}32" 13619ab56c27Smrg ;; 13629ab56c27Smrg *64-bit*) 13639ab56c27Smrg emul="${emul}64" 13649ab56c27Smrg ;; 13659ab56c27Smrg esac 13669ab56c27Smrg case `$FILECMD conftest.$ac_objext` in 13679ab56c27Smrg *MSB*) 13689ab56c27Smrg emul="${emul}btsmip" 13699ab56c27Smrg ;; 13709ab56c27Smrg *LSB*) 13719ab56c27Smrg emul="${emul}ltsmip" 13729ab56c27Smrg ;; 13739ab56c27Smrg esac 13749ab56c27Smrg case `$FILECMD conftest.$ac_objext` in 13759ab56c27Smrg *N32*) 13769ab56c27Smrg emul="${emul}n32" 13779ab56c27Smrg ;; 13789ab56c27Smrg esac 13799ab56c27Smrg LD="${LD-ld} -m $emul" 13809ab56c27Smrg fi 13819ab56c27Smrg rm -rf conftest* 13829ab56c27Smrg ;; 138354cef2ddSmrg 13849ab56c27Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13859ab56c27Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13869ab56c27Smrg # Find out what ABI is being produced by ac_compile, and set linker 13879ab56c27Smrg # options accordingly. Note that the listed cases only cover the 13889ab56c27Smrg # situations where additional linker options are needed (such as when 13899ab56c27Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13909ab56c27Smrg # vice versa); the common cases where no linker options are needed do 13919ab56c27Smrg # not appear in the list. 13929ab56c27Smrg echo 'int i;' > conftest.$ac_ext 13939ab56c27Smrg if AC_TRY_EVAL(ac_compile); then 13949ab56c27Smrg case `$FILECMD conftest.o` in 13959ab56c27Smrg *32-bit*) 13969ab56c27Smrg case $host in 13979ab56c27Smrg x86_64-*kfreebsd*-gnu) 13989ab56c27Smrg LD="${LD-ld} -m elf_i386_fbsd" 13999ab56c27Smrg ;; 14009ab56c27Smrg x86_64-*linux*) 14019ab56c27Smrg case `$FILECMD conftest.o` in 14029ab56c27Smrg *x86-64*) 14039ab56c27Smrg LD="${LD-ld} -m elf32_x86_64" 14049ab56c27Smrg ;; 14059ab56c27Smrg *) 14069ab56c27Smrg LD="${LD-ld} -m elf_i386" 14079ab56c27Smrg ;; 14089ab56c27Smrg esac 14099ab56c27Smrg ;; 14109ab56c27Smrg powerpc64le-*linux*) 14119ab56c27Smrg LD="${LD-ld} -m elf32lppclinux" 14129ab56c27Smrg ;; 14139ab56c27Smrg powerpc64-*linux*) 14149ab56c27Smrg LD="${LD-ld} -m elf32ppclinux" 14159ab56c27Smrg ;; 14169ab56c27Smrg s390x-*linux*) 14179ab56c27Smrg LD="${LD-ld} -m elf_s390" 14189ab56c27Smrg ;; 14199ab56c27Smrg sparc64-*linux*) 14209ab56c27Smrg LD="${LD-ld} -m elf32_sparc" 14219ab56c27Smrg ;; 14229ab56c27Smrg esac 14239ab56c27Smrg ;; 14249ab56c27Smrg *64-bit*) 14259ab56c27Smrg case $host in 14269ab56c27Smrg x86_64-*kfreebsd*-gnu) 14279ab56c27Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14289ab56c27Smrg ;; 14299ab56c27Smrg x86_64-*linux*) 14309ab56c27Smrg LD="${LD-ld} -m elf_x86_64" 14319ab56c27Smrg ;; 14329ab56c27Smrg powerpcle-*linux*|powerpc64le-*linux*) 14339ab56c27Smrg LD="${LD-ld} -m elf64lppc" 14349ab56c27Smrg ;; 14359ab56c27Smrg powerpc-*linux*|powerpc64-*linux*) 14369ab56c27Smrg LD="${LD-ld} -m elf64ppc" 14379ab56c27Smrg ;; 14389ab56c27Smrg s390*-*linux*|s390*-*tpf*) 14399ab56c27Smrg LD="${LD-ld} -m elf64_s390" 14409ab56c27Smrg ;; 14419ab56c27Smrg sparc*-*linux*) 14429ab56c27Smrg LD="${LD-ld} -m elf64_sparc" 14439ab56c27Smrg ;; 14449ab56c27Smrg esac 14459ab56c27Smrg ;; 14469ab56c27Smrg esac 14479ab56c27Smrg fi 14489ab56c27Smrg rm -rf conftest* 14499ab56c27Smrg ;; 14504cd6a3aeSmrg 14519ab56c27Smrg*-*-sco3.2v5*) 14529ab56c27Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14539ab56c27Smrg SAVE_CFLAGS=$CFLAGS 14549ab56c27Smrg CFLAGS="$CFLAGS -belf" 14559ab56c27Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14569ab56c27Smrg [AC_LANG_PUSH(C) 14579ab56c27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14589ab56c27Smrg AC_LANG_POP]) 14599ab56c27Smrg if test yes != "$lt_cv_cc_needs_belf"; then 14609ab56c27Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14619ab56c27Smrg CFLAGS=$SAVE_CFLAGS 14629ab56c27Smrg fi 14639ab56c27Smrg ;; 14649ab56c27Smrg*-*solaris*) 14659ab56c27Smrg # Find out what ABI is being produced by ac_compile, and set linker 14669ab56c27Smrg # options accordingly. 14679ab56c27Smrg echo 'int i;' > conftest.$ac_ext 14689ab56c27Smrg if AC_TRY_EVAL(ac_compile); then 14699ab56c27Smrg case `$FILECMD conftest.o` in 14709ab56c27Smrg *64-bit*) 14719ab56c27Smrg case $lt_cv_prog_gnu_ld in 14729ab56c27Smrg yes*) 14739ab56c27Smrg case $host in 14749ab56c27Smrg i?86-*-solaris*|x86_64-*-solaris*) 14759ab56c27Smrg LD="${LD-ld} -m elf_x86_64" 14769ab56c27Smrg ;; 14779ab56c27Smrg sparc*-*-solaris*) 14789ab56c27Smrg LD="${LD-ld} -m elf64_sparc" 14799ab56c27Smrg ;; 14809ab56c27Smrg esac 14819ab56c27Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14829ab56c27Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14839ab56c27Smrg LD=${LD-ld}_sol2 14849ab56c27Smrg fi 14859ab56c27Smrg ;; 14869ab56c27Smrg *) 14879ab56c27Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14889ab56c27Smrg LD="${LD-ld} -64" 14899ab56c27Smrg fi 14909ab56c27Smrg ;; 14919ab56c27Smrg esac 14929ab56c27Smrg ;; 14939ab56c27Smrg esac 14949ab56c27Smrg fi 14959ab56c27Smrg rm -rf conftest* 14969ab56c27Smrg ;; 14979ab56c27Smrgesac 14984cd6a3aeSmrg 14999ab56c27Smrgneed_locks=$enable_libtool_lock 15009ab56c27Smrg])# _LT_ENABLE_LOCK 15014cd6a3aeSmrg 15024cd6a3aeSmrg 15039ab56c27Smrg# _LT_PROG_AR 15049ab56c27Smrg# ----------- 15059ab56c27Smrgm4_defun([_LT_PROG_AR], 15069ab56c27Smrg[AC_CHECK_TOOLS(AR, [ar], false) 15079ab56c27Smrg: ${AR=ar} 15089ab56c27Smrg_LT_DECL([], [AR], [1], [The archiver]) 15094cd6a3aeSmrg 15109ab56c27Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 15119ab56c27Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 15129ab56c27Smrg# higher priority because thats what people were doing historically (setting 15139ab56c27Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 15149ab56c27Smrg# variable obsoleted/removed. 15159ab56c27Smrg 15169ab56c27Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 15179ab56c27Smrglt_ar_flags=$AR_FLAGS 15189ab56c27Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 15199ab56c27Smrg 15209ab56c27Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 15219ab56c27Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 15229ab56c27Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 15239ab56c27Smrg [Flags to create an archive]) 15249ab56c27Smrg 15259ab56c27SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15269ab56c27Smrg [lt_cv_ar_at_file=no 15279ab56c27Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15289ab56c27Smrg [echo conftest.$ac_objext > conftest.lst 15299ab56c27Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15309ab56c27Smrg AC_TRY_EVAL([lt_ar_try]) 15319ab56c27Smrg if test 0 -eq "$ac_status"; then 15329ab56c27Smrg # Ensure the archiver fails upon bogus file names. 15339ab56c27Smrg rm -f conftest.$ac_objext libconftest.a 15349ab56c27Smrg AC_TRY_EVAL([lt_ar_try]) 15359ab56c27Smrg if test 0 -ne "$ac_status"; then 15369ab56c27Smrg lt_cv_ar_at_file=@ 15379ab56c27Smrg fi 15389ab56c27Smrg fi 15399ab56c27Smrg rm -f conftest.* libconftest.a 15409ab56c27Smrg ]) 15419ab56c27Smrg ]) 15429ab56c27Smrg 15439ab56c27Smrgif test no = "$lt_cv_ar_at_file"; then 15449ab56c27Smrg archiver_list_spec= 154554044362Smrgelse 15469ab56c27Smrg archiver_list_spec=$lt_cv_ar_at_file 154754cef2ddSmrgfi 15489ab56c27Smrg_LT_DECL([], [archiver_list_spec], [1], 15499ab56c27Smrg [How to feed a file listing to the archiver]) 15509ab56c27Smrg])# _LT_PROG_AR 15514cd6a3aeSmrg 15524cd6a3aeSmrg 15539ab56c27Smrg# _LT_CMD_OLD_ARCHIVE 15549ab56c27Smrg# ------------------- 15559ab56c27Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15569ab56c27Smrg[_LT_PROG_AR 15574cd6a3aeSmrg 15589ab56c27SmrgAC_CHECK_TOOL(STRIP, strip, :) 15599ab56c27Smrgtest -z "$STRIP" && STRIP=: 15609ab56c27Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 156170728a38Smrg 15629ab56c27SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15639ab56c27Smrgtest -z "$RANLIB" && RANLIB=: 15649ab56c27Smrg_LT_DECL([], [RANLIB], [1], 15659ab56c27Smrg [Commands used to install an old-style archive]) 156670728a38Smrg 15679ab56c27Smrg# Determine commands to create old-style static archives. 15689ab56c27Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15699ab56c27Smrgold_postinstall_cmds='chmod 644 $oldlib' 15709ab56c27Smrgold_postuninstall_cmds= 15719ab56c27Smrg 15729ab56c27Smrgif test -n "$RANLIB"; then 15739ab56c27Smrg case $host_os in 15749ab56c27Smrg bitrig* | openbsd*) 15759ab56c27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15769ab56c27Smrg ;; 15779ab56c27Smrg *) 15789ab56c27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15799ab56c27Smrg ;; 15809ab56c27Smrg esac 15819ab56c27Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15829ab56c27Smrgfi 15839ab56c27Smrg 15849ab56c27Smrgcase $host_os in 15859ab56c27Smrg darwin*) 15869ab56c27Smrg lock_old_archive_extraction=yes ;; 15879ab56c27Smrg *) 15889ab56c27Smrg lock_old_archive_extraction=no ;; 15899ab56c27Smrgesac 15909ab56c27Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15919ab56c27Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15929ab56c27Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15939ab56c27Smrg [Commands used to build an old-style archive]) 15949ab56c27Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15959ab56c27Smrg [Whether to use a lock for old archive extraction]) 15969ab56c27Smrg])# _LT_CMD_OLD_ARCHIVE 15979ab56c27Smrg 15989ab56c27Smrg 15999ab56c27Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16009ab56c27Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 16019ab56c27Smrg# ---------------------------------------------------------------- 16029ab56c27Smrg# Check whether the given compiler option works 16039ab56c27SmrgAC_DEFUN([_LT_COMPILER_OPTION], 16049ab56c27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16059ab56c27Smrgm4_require([_LT_DECL_SED])dnl 16069ab56c27SmrgAC_CACHE_CHECK([$1], [$2], 16079ab56c27Smrg [$2=no 16089ab56c27Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 16099ab56c27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 16109ab56c27Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16119ab56c27Smrg # Insert the option either (1) after the last *FLAGS variable, or 16129ab56c27Smrg # (2) before a word containing "conftest.", or (3) at the end. 16139ab56c27Smrg # Note that $ac_compile itself does not contain backslashes and begins 16149ab56c27Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16159ab56c27Smrg # The option is referenced via a variable to avoid confusing sed. 16169ab56c27Smrg lt_compile=`echo "$ac_compile" | $SED \ 16179ab56c27Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16189ab56c27Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16199ab56c27Smrg -e 's:$: $lt_compiler_flag:'` 16209ab56c27Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16219ab56c27Smrg (eval "$lt_compile" 2>conftest.err) 16229ab56c27Smrg ac_status=$? 16239ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16249ab56c27Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16259ab56c27Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16269ab56c27Smrg # The compiler can only warn and ignore the option if not recognized 16279ab56c27Smrg # So say no if there are warnings other than the usual output. 16289ab56c27Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16299ab56c27Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16309ab56c27Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16319ab56c27Smrg $2=yes 16329ab56c27Smrg fi 163354cef2ddSmrg fi 16349ab56c27Smrg $RM conftest* 16359ab56c27Smrg]) 16369ab56c27Smrg 16379ab56c27Smrgif test yes = "[$]$2"; then 16389ab56c27Smrg m4_if([$5], , :, [$5]) 163954044362Smrgelse 16409ab56c27Smrg m4_if([$6], , :, [$6]) 164154cef2ddSmrgfi 16429ab56c27Smrg])# _LT_COMPILER_OPTION 16434cd6a3aeSmrg 16449ab56c27Smrg# Old name: 16459ab56c27SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16469ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 16479ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16484cd6a3aeSmrg 16494cd6a3aeSmrg 16509ab56c27Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16519ab56c27Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16529ab56c27Smrg# ---------------------------------------------------- 16539ab56c27Smrg# Check whether the given linker option works 16549ab56c27SmrgAC_DEFUN([_LT_LINKER_OPTION], 16559ab56c27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16569ab56c27Smrgm4_require([_LT_DECL_SED])dnl 16579ab56c27SmrgAC_CACHE_CHECK([$1], [$2], 16589ab56c27Smrg [$2=no 16599ab56c27Smrg save_LDFLAGS=$LDFLAGS 16609ab56c27Smrg LDFLAGS="$LDFLAGS $3" 16619ab56c27Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16629ab56c27Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16639ab56c27Smrg # The linker can only warn and ignore the option if not recognized 16649ab56c27Smrg # So say no if there are warnings 16659ab56c27Smrg if test -s conftest.err; then 16669ab56c27Smrg # Append any errors to the config.log. 16679ab56c27Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16689ab56c27Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16699ab56c27Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16709ab56c27Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16719ab56c27Smrg $2=yes 16729ab56c27Smrg fi 16739ab56c27Smrg else 16749ab56c27Smrg $2=yes 16759ab56c27Smrg fi 16769ab56c27Smrg fi 16779ab56c27Smrg $RM -r conftest* 16789ab56c27Smrg LDFLAGS=$save_LDFLAGS 16799ab56c27Smrg]) 16804cd6a3aeSmrg 16819ab56c27Smrgif test yes = "[$]$2"; then 16829ab56c27Smrg m4_if([$4], , :, [$4]) 16839ab56c27Smrgelse 16849ab56c27Smrg m4_if([$5], , :, [$5]) 168554cef2ddSmrgfi 16869ab56c27Smrg])# _LT_LINKER_OPTION 16878c9fbc29Smrg 16889ab56c27Smrg# Old name: 16899ab56c27SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16909ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 16919ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16928c9fbc29Smrg 169354044362Smrg 16949ab56c27Smrg# LT_CMD_MAX_LEN 16959ab56c27Smrg#--------------- 16969ab56c27SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16979ab56c27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16989ab56c27Smrg# find the maximum length of command line arguments 16999ab56c27SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 17009ab56c27SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 17019ab56c27Smrg i=0 17029ab56c27Smrg teststring=ABCD 17038c9fbc29Smrg 17049ab56c27Smrg case $build_os in 17059ab56c27Smrg msdosdjgpp*) 17069ab56c27Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 17079ab56c27Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 17089ab56c27Smrg # during glob expansion). Even if it were fixed, the result of this 17099ab56c27Smrg # check would be larger than it should be. 17109ab56c27Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17119ab56c27Smrg ;; 171254cef2ddSmrg 17139ab56c27Smrg gnu*) 17149ab56c27Smrg # Under GNU Hurd, this test is not required because there is 17159ab56c27Smrg # no limit to the length of command line arguments. 17169ab56c27Smrg # Libtool will interpret -1 as no limit whatsoever 17179ab56c27Smrg lt_cv_sys_max_cmd_len=-1; 17189ab56c27Smrg ;; 17198c9fbc29Smrg 17209ab56c27Smrg cygwin* | mingw* | cegcc*) 17219ab56c27Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17229ab56c27Smrg # about 5 minutes as the teststring grows exponentially. 17239ab56c27Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17249ab56c27Smrg # you end up with a "frozen" computer, even though with patience 17259ab56c27Smrg # the test eventually succeeds (with a max line length of 256k). 17269ab56c27Smrg # Instead, let's just punt: use the minimum linelength reported by 17279ab56c27Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17289ab56c27Smrg lt_cv_sys_max_cmd_len=8192; 17299ab56c27Smrg ;; 17308c9fbc29Smrg 17319ab56c27Smrg mint*) 17329ab56c27Smrg # On MiNT this can take a long time and run out of memory. 17339ab56c27Smrg lt_cv_sys_max_cmd_len=8192; 17349ab56c27Smrg ;; 173554cef2ddSmrg 17369ab56c27Smrg mint*) 17379ab56c27Smrg # On MiNT this can take a long time and run out of memory. 17389ab56c27Smrg lt_cv_sys_max_cmd_len=8192; 17399ab56c27Smrg ;; 17408c9fbc29Smrg 17419ab56c27Smrg amigaos*) 17429ab56c27Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17439ab56c27Smrg # So we just punt and use a minimum line length of 8192. 17449ab56c27Smrg lt_cv_sys_max_cmd_len=8192; 17459ab56c27Smrg ;; 17468c9fbc29Smrg 17479ab56c27Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17489ab56c27Smrg # This has been around since 386BSD, at least. Likely further. 17499ab56c27Smrg if test -x /sbin/sysctl; then 17509ab56c27Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17519ab56c27Smrg elif test -x /usr/sbin/sysctl; then 17529ab56c27Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17539ab56c27Smrg else 17549ab56c27Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17559ab56c27Smrg fi 17569ab56c27Smrg # And add a safety zone 17579ab56c27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17589ab56c27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17599ab56c27Smrg ;; 17604cd6a3aeSmrg 17619ab56c27Smrg interix*) 17629ab56c27Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17639ab56c27Smrg lt_cv_sys_max_cmd_len=196608 17649ab56c27Smrg ;; 176554cef2ddSmrg 17669ab56c27Smrg os2*) 17679ab56c27Smrg # The test takes a long time on OS/2. 17689ab56c27Smrg lt_cv_sys_max_cmd_len=8192 17699ab56c27Smrg ;; 177054044362Smrg 17719ab56c27Smrg osf*) 17729ab56c27Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17739ab56c27Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17749ab56c27Smrg # nice to cause kernel panics so lets avoid the loop below. 17759ab56c27Smrg # First set a reasonable default. 17769ab56c27Smrg lt_cv_sys_max_cmd_len=16384 17779ab56c27Smrg # 17789ab56c27Smrg if test -x /sbin/sysconfig; then 17799ab56c27Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17809ab56c27Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17819ab56c27Smrg esac 17829ab56c27Smrg fi 17839ab56c27Smrg ;; 17849ab56c27Smrg sco3.2v5*) 17859ab56c27Smrg lt_cv_sys_max_cmd_len=102400 17869ab56c27Smrg ;; 17879ab56c27Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17889ab56c27Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17899ab56c27Smrg if test -n "$kargmax"; then 17909ab56c27Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 17919ab56c27Smrg else 17929ab56c27Smrg lt_cv_sys_max_cmd_len=32768 17939ab56c27Smrg fi 17949ab56c27Smrg ;; 17959ab56c27Smrg *) 17969ab56c27Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17979ab56c27Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17989ab56c27Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17999ab56c27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 18009ab56c27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 18019ab56c27Smrg else 18029ab56c27Smrg # Make teststring a little bigger before we do anything with it. 18039ab56c27Smrg # a 1K string should be a reasonable start. 18049ab56c27Smrg for i in 1 2 3 4 5 6 7 8; do 18059ab56c27Smrg teststring=$teststring$teststring 18069ab56c27Smrg done 18079ab56c27Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 18089ab56c27Smrg # If test is not a shell built-in, we'll probably end up computing a 18099ab56c27Smrg # maximum length that is only half of the actual maximum length, but 18109ab56c27Smrg # we can't tell. 18119ab56c27Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 18129ab56c27Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 18139ab56c27Smrg test 17 != "$i" # 1/2 MB should be enough 18149ab56c27Smrg do 18159ab56c27Smrg i=`expr $i + 1` 18169ab56c27Smrg teststring=$teststring$teststring 18179ab56c27Smrg done 18189ab56c27Smrg # Only check the string length outside the loop. 18199ab56c27Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18209ab56c27Smrg teststring= 18219ab56c27Smrg # Add a significant safety factor because C++ compilers can tack on 18229ab56c27Smrg # massive amounts of additional arguments before passing them to the 18239ab56c27Smrg # linker. It appears as though 1/2 is a usable value. 18249ab56c27Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18259ab56c27Smrg fi 18269ab56c27Smrg ;; 18279ab56c27Smrg esac 18289ab56c27Smrg]) 18299ab56c27Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 18309ab56c27Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18319ab56c27Smrgelse 18329ab56c27Smrg AC_MSG_RESULT(none) 18339ab56c27Smrgfi 18349ab56c27Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18359ab56c27Smrg_LT_DECL([], [max_cmd_len], [0], 18369ab56c27Smrg [What is the maximum length of a command?]) 18379ab56c27Smrg])# LT_CMD_MAX_LEN 183854044362Smrg 18399ab56c27Smrg# Old name: 18409ab56c27SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18419ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 18429ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 184354044362Smrg 18448c9fbc29Smrg 18459ab56c27Smrg# _LT_HEADER_DLFCN 18469ab56c27Smrg# ---------------- 18479ab56c27Smrgm4_defun([_LT_HEADER_DLFCN], 18489ab56c27Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18499ab56c27Smrg])# _LT_HEADER_DLFCN 18508c9fbc29Smrg 18519ab56c27Smrg 18529ab56c27Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18539ab56c27Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18549ab56c27Smrg# ---------------------------------------------------------------- 18559ab56c27Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18569ab56c27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18579ab56c27Smrgif test yes = "$cross_compiling"; then : 18589ab56c27Smrg [$4] 185954044362Smrgelse 18609ab56c27Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18619ab56c27Smrg lt_status=$lt_dlunknown 18629ab56c27Smrg cat > conftest.$ac_ext <<_LT_EOF 18639ab56c27Smrg[#line $LINENO "configure" 18649ab56c27Smrg#include "confdefs.h" 18654cd6a3aeSmrg 18669ab56c27Smrg#if HAVE_DLFCN_H 18679ab56c27Smrg#include <dlfcn.h> 18689ab56c27Smrg#endif 18698c9fbc29Smrg 18709ab56c27Smrg#include <stdio.h> 18718c9fbc29Smrg 18729ab56c27Smrg#ifdef RTLD_GLOBAL 18739ab56c27Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18749ab56c27Smrg#else 18759ab56c27Smrg# ifdef DL_GLOBAL 18769ab56c27Smrg# define LT_DLGLOBAL DL_GLOBAL 18779ab56c27Smrg# else 18789ab56c27Smrg# define LT_DLGLOBAL 0 18799ab56c27Smrg# endif 18809ab56c27Smrg#endif 18818c9fbc29Smrg 18829ab56c27Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18839ab56c27Smrg find out it does not work in some platform. */ 18849ab56c27Smrg#ifndef LT_DLLAZY_OR_NOW 18859ab56c27Smrg# ifdef RTLD_LAZY 18869ab56c27Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18879ab56c27Smrg# else 18889ab56c27Smrg# ifdef DL_LAZY 18899ab56c27Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18909ab56c27Smrg# else 18919ab56c27Smrg# ifdef RTLD_NOW 18929ab56c27Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18939ab56c27Smrg# else 18949ab56c27Smrg# ifdef DL_NOW 18959ab56c27Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18969ab56c27Smrg# else 18979ab56c27Smrg# define LT_DLLAZY_OR_NOW 0 18989ab56c27Smrg# endif 18999ab56c27Smrg# endif 19009ab56c27Smrg# endif 19019ab56c27Smrg# endif 19029ab56c27Smrg#endif 190354044362Smrg 19049ab56c27Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 19059ab56c27Smrg correspondingly for the symbols needed. */ 19069ab56c27Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 19079ab56c27Smrgint fnord () __attribute__((visibility("default"))); 19089ab56c27Smrg#endif 19098c9fbc29Smrg 19109ab56c27Smrgint fnord () { return 42; } 19119ab56c27Smrgint main () 19129ab56c27Smrg{ 19139ab56c27Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 19149ab56c27Smrg int status = $lt_dlunknown; 191554044362Smrg 19169ab56c27Smrg if (self) 19179ab56c27Smrg { 19189ab56c27Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19199ab56c27Smrg else 19209ab56c27Smrg { 19219ab56c27Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19229ab56c27Smrg else puts (dlerror ()); 19239ab56c27Smrg } 19249ab56c27Smrg /* dlclose (self); */ 19259ab56c27Smrg } 19269ab56c27Smrg else 19279ab56c27Smrg puts (dlerror ()); 19288c9fbc29Smrg 19299ab56c27Smrg return status; 19309ab56c27Smrg}] 19319ab56c27Smrg_LT_EOF 19329ab56c27Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19339ab56c27Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19349ab56c27Smrg lt_status=$? 19359ab56c27Smrg case x$lt_status in 19369ab56c27Smrg x$lt_dlno_uscore) $1 ;; 19379ab56c27Smrg x$lt_dlneed_uscore) $2 ;; 19389ab56c27Smrg x$lt_dlunknown|x*) $3 ;; 19399ab56c27Smrg esac 19409ab56c27Smrg else : 19419ab56c27Smrg # compilation failed 19429ab56c27Smrg $3 19439ab56c27Smrg fi 19449ab56c27Smrgfi 19459ab56c27Smrgrm -fr conftest* 19469ab56c27Smrg])# _LT_TRY_DLOPEN_SELF 19478c9fbc29Smrg 19488c9fbc29Smrg 19499ab56c27Smrg# LT_SYS_DLOPEN_SELF 19509ab56c27Smrg# ------------------ 19519ab56c27SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19529ab56c27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19539ab56c27Smrgif test yes != "$enable_dlopen"; then 19549ab56c27Smrg enable_dlopen=unknown 19559ab56c27Smrg enable_dlopen_self=unknown 19569ab56c27Smrg enable_dlopen_self_static=unknown 19579ab56c27Smrgelse 19589ab56c27Smrg lt_cv_dlopen=no 19599ab56c27Smrg lt_cv_dlopen_libs= 19604cd6a3aeSmrg 19619ab56c27Smrg case $host_os in 19629ab56c27Smrg beos*) 19639ab56c27Smrg lt_cv_dlopen=load_add_on 19649ab56c27Smrg lt_cv_dlopen_libs= 19659ab56c27Smrg lt_cv_dlopen_self=yes 19669ab56c27Smrg ;; 19678c9fbc29Smrg 19689ab56c27Smrg mingw* | pw32* | cegcc*) 19699ab56c27Smrg lt_cv_dlopen=LoadLibrary 19709ab56c27Smrg lt_cv_dlopen_libs= 19719ab56c27Smrg ;; 19724cd6a3aeSmrg 19739ab56c27Smrg cygwin*) 19749ab56c27Smrg lt_cv_dlopen=dlopen 19759ab56c27Smrg lt_cv_dlopen_libs= 19769ab56c27Smrg ;; 19774cd6a3aeSmrg 19789ab56c27Smrg darwin*) 19799ab56c27Smrg # if libdl is installed we need to link against it 19809ab56c27Smrg AC_CHECK_LIB([dl], [dlopen], 19819ab56c27Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19829ab56c27Smrg lt_cv_dlopen=dyld 19839ab56c27Smrg lt_cv_dlopen_libs= 19849ab56c27Smrg lt_cv_dlopen_self=yes 19859ab56c27Smrg ]) 19869ab56c27Smrg ;; 19874cd6a3aeSmrg 19889ab56c27Smrg tpf*) 19899ab56c27Smrg # Don't try to run any link tests for TPF. We know it's impossible 19909ab56c27Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 19919ab56c27Smrg lt_cv_dlopen=dlopen 19929ab56c27Smrg lt_cv_dlopen_libs= 19939ab56c27Smrg lt_cv_dlopen_self=no 19949ab56c27Smrg ;; 19954cd6a3aeSmrg 19969ab56c27Smrg *) 19979ab56c27Smrg AC_CHECK_FUNC([shl_load], 19989ab56c27Smrg [lt_cv_dlopen=shl_load], 19999ab56c27Smrg [AC_CHECK_LIB([dld], [shl_load], 20009ab56c27Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 20019ab56c27Smrg [AC_CHECK_FUNC([dlopen], 20029ab56c27Smrg [lt_cv_dlopen=dlopen], 20039ab56c27Smrg [AC_CHECK_LIB([dl], [dlopen], 20049ab56c27Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 20059ab56c27Smrg [AC_CHECK_LIB([svld], [dlopen], 20069ab56c27Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 20079ab56c27Smrg [AC_CHECK_LIB([dld], [dld_link], 20089ab56c27Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 20099ab56c27Smrg ]) 20109ab56c27Smrg ]) 20119ab56c27Smrg ]) 20129ab56c27Smrg ]) 20139ab56c27Smrg ]) 20149ab56c27Smrg ;; 20159ab56c27Smrg esac 20164cd6a3aeSmrg 20179ab56c27Smrg if test no = "$lt_cv_dlopen"; then 20189ab56c27Smrg enable_dlopen=no 20199ab56c27Smrg else 20209ab56c27Smrg enable_dlopen=yes 20219ab56c27Smrg fi 20224cd6a3aeSmrg 20239ab56c27Smrg case $lt_cv_dlopen in 20249ab56c27Smrg dlopen) 20259ab56c27Smrg save_CPPFLAGS=$CPPFLAGS 20269ab56c27Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20274cd6a3aeSmrg 20289ab56c27Smrg save_LDFLAGS=$LDFLAGS 20299ab56c27Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 203054044362Smrg 20319ab56c27Smrg save_LIBS=$LIBS 20329ab56c27Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20334cd6a3aeSmrg 20349ab56c27Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20359ab56c27Smrg lt_cv_dlopen_self, [dnl 20369ab56c27Smrg _LT_TRY_DLOPEN_SELF( 20379ab56c27Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20389ab56c27Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20399ab56c27Smrg ]) 20404cd6a3aeSmrg 20419ab56c27Smrg if test yes = "$lt_cv_dlopen_self"; then 20429ab56c27Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20439ab56c27Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20449ab56c27Smrg lt_cv_dlopen_self_static, [dnl 20459ab56c27Smrg _LT_TRY_DLOPEN_SELF( 20469ab56c27Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20479ab56c27Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20489ab56c27Smrg ]) 20499ab56c27Smrg fi 20508c9fbc29Smrg 20519ab56c27Smrg CPPFLAGS=$save_CPPFLAGS 20529ab56c27Smrg LDFLAGS=$save_LDFLAGS 20539ab56c27Smrg LIBS=$save_LIBS 20549ab56c27Smrg ;; 20559ab56c27Smrg esac 20568c9fbc29Smrg 20579ab56c27Smrg case $lt_cv_dlopen_self in 20589ab56c27Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20599ab56c27Smrg *) enable_dlopen_self=unknown ;; 20609ab56c27Smrg esac 20619ab56c27Smrg 20629ab56c27Smrg case $lt_cv_dlopen_self_static in 20639ab56c27Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20649ab56c27Smrg *) enable_dlopen_self_static=unknown ;; 20659ab56c27Smrg esac 206654cef2ddSmrgfi 20679ab56c27Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20689ab56c27Smrg [Whether dlopen is supported]) 20699ab56c27Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20709ab56c27Smrg [Whether dlopen of programs is supported]) 20719ab56c27Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20729ab56c27Smrg [Whether dlopen of statically linked programs is supported]) 20739ab56c27Smrg])# LT_SYS_DLOPEN_SELF 20748c9fbc29Smrg 20759ab56c27Smrg# Old name: 20769ab56c27SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20779ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 20789ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20794cd6a3aeSmrg 20808c9fbc29Smrg 20819ab56c27Smrg# _LT_COMPILER_C_O([TAGNAME]) 20829ab56c27Smrg# --------------------------- 20839ab56c27Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20849ab56c27Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20859ab56c27Smrgm4_defun([_LT_COMPILER_C_O], 20869ab56c27Smrg[m4_require([_LT_DECL_SED])dnl 20879ab56c27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20889ab56c27Smrgm4_require([_LT_TAG_COMPILER])dnl 20899ab56c27SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20909ab56c27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20919ab56c27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20929ab56c27Smrg $RM -r conftest 2>/dev/null 20939ab56c27Smrg mkdir conftest 20949ab56c27Smrg cd conftest 20959ab56c27Smrg mkdir out 20969ab56c27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20978c9fbc29Smrg 20989ab56c27Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20999ab56c27Smrg # Insert the option either (1) after the last *FLAGS variable, or 21009ab56c27Smrg # (2) before a word containing "conftest.", or (3) at the end. 21019ab56c27Smrg # Note that $ac_compile itself does not contain backslashes and begins 21029ab56c27Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 21039ab56c27Smrg lt_compile=`echo "$ac_compile" | $SED \ 21049ab56c27Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 21059ab56c27Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 21069ab56c27Smrg -e 's:$: $lt_compiler_flag:'` 21079ab56c27Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 21089ab56c27Smrg (eval "$lt_compile" 2>out/conftest.err) 21099ab56c27Smrg ac_status=$? 21109ab56c27Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 21119ab56c27Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 21129ab56c27Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 21139ab56c27Smrg then 21149ab56c27Smrg # The compiler can only warn and ignore the option if not recognized 21159ab56c27Smrg # So say no if there are warnings 21169ab56c27Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21179ab56c27Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21189ab56c27Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21199ab56c27Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21209ab56c27Smrg fi 21219ab56c27Smrg fi 21229ab56c27Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21239ab56c27Smrg $RM conftest* 21249ab56c27Smrg # SGI C++ compiler will create directory out/ii_files/ for 21259ab56c27Smrg # template instantiation 21269ab56c27Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21279ab56c27Smrg $RM out/* && rmdir out 21289ab56c27Smrg cd .. 21299ab56c27Smrg $RM -r conftest 21309ab56c27Smrg $RM conftest* 21319ab56c27Smrg]) 21329ab56c27Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21339ab56c27Smrg [Does compiler simultaneously support -c and -o options?]) 21349ab56c27Smrg])# _LT_COMPILER_C_O 21358c9fbc29Smrg 21364cd6a3aeSmrg 21379ab56c27Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21389ab56c27Smrg# ---------------------------------- 21399ab56c27Smrg# Check to see if we can do hard links to lock some files if needed 21409ab56c27Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21419ab56c27Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21429ab56c27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21439ab56c27Smrg_LT_COMPILER_C_O([$1]) 21449ab56c27Smrg 21459ab56c27Smrghard_links=nottested 21469ab56c27Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21479ab56c27Smrg # do not overwrite the value of need_locks provided by the user 21489ab56c27Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21499ab56c27Smrg hard_links=yes 21509ab56c27Smrg $RM conftest* 21519ab56c27Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21529ab56c27Smrg touch conftest.a 21539ab56c27Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21549ab56c27Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21559ab56c27Smrg AC_MSG_RESULT([$hard_links]) 21569ab56c27Smrg if test no = "$hard_links"; then 21579ab56c27Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21589ab56c27Smrg need_locks=warn 21599ab56c27Smrg fi 216054cef2ddSmrgelse 21619ab56c27Smrg need_locks=no 216254cef2ddSmrgfi 21639ab56c27Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21649ab56c27Smrg])# _LT_COMPILER_FILE_LOCKS 21658c9fbc29Smrg 21668c9fbc29Smrg 21679ab56c27Smrg# _LT_CHECK_OBJDIR 21689ab56c27Smrg# ---------------- 21699ab56c27Smrgm4_defun([_LT_CHECK_OBJDIR], 21709ab56c27Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21719ab56c27Smrg[rm -f .libs 2>/dev/null 21729ab56c27Smrgmkdir .libs 2>/dev/null 21739ab56c27Smrgif test -d .libs; then 21749ab56c27Smrg lt_cv_objdir=.libs 21759ab56c27Smrgelse 21769ab56c27Smrg # MS-DOS does not allow filenames that begin with a dot. 21779ab56c27Smrg lt_cv_objdir=_libs 21789ab56c27Smrgfi 21799ab56c27Smrgrmdir .libs 2>/dev/null]) 21809ab56c27Smrgobjdir=$lt_cv_objdir 21819ab56c27Smrg_LT_DECL([], [objdir], [0], 21829ab56c27Smrg [The name of the directory that contains temporary libtool files])dnl 21839ab56c27Smrgm4_pattern_allow([LT_OBJDIR])dnl 21849ab56c27SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21859ab56c27Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21869ab56c27Smrg])# _LT_CHECK_OBJDIR 21878c9fbc29Smrg 21888c9fbc29Smrg 21899ab56c27Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21909ab56c27Smrg# -------------------------------------- 21919ab56c27Smrg# Check hardcoding attributes. 21929ab56c27Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21939ab56c27Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21949ab56c27Smrg_LT_TAGVAR(hardcode_action, $1)= 21959ab56c27Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21969ab56c27Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21979ab56c27Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21984cd6a3aeSmrg 21999ab56c27Smrg # We can hardcode non-existent directories. 22009ab56c27Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 22019ab56c27Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 22029ab56c27Smrg # have to relink, otherwise we might link with an installed library 22039ab56c27Smrg # when we should be linking with a yet-to-be-installed one 22049ab56c27Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 22059ab56c27Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 22069ab56c27Smrg # Linking always hardcodes the temporary library directory. 22079ab56c27Smrg _LT_TAGVAR(hardcode_action, $1)=relink 22089ab56c27Smrg else 22099ab56c27Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 22109ab56c27Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 22119ab56c27Smrg fi 22129ab56c27Smrgelse 22139ab56c27Smrg # We cannot hardcode anything, or else we can only hardcode existing 22149ab56c27Smrg # directories. 22159ab56c27Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22169ab56c27Smrgfi 22179ab56c27SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 22188c9fbc29Smrg 22199ab56c27Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22209ab56c27Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22219ab56c27Smrg # Fast installation is not supported 22229ab56c27Smrg enable_fast_install=no 22239ab56c27Smrgelif test yes = "$shlibpath_overrides_runpath" || 22249ab56c27Smrg test no = "$enable_shared"; then 22259ab56c27Smrg # Fast installation is not necessary 22269ab56c27Smrg enable_fast_install=needless 22279ab56c27Smrgfi 22289ab56c27Smrg_LT_TAGDECL([], [hardcode_action], [0], 22299ab56c27Smrg [How to hardcode a shared library path into an executable]) 22309ab56c27Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22318c9fbc29Smrg 223270728a38Smrg 22339ab56c27Smrg# _LT_CMD_STRIPLIB 223454cef2ddSmrg# ---------------- 22359ab56c27Smrgm4_defun([_LT_CMD_STRIPLIB], 22369ab56c27Smrg[m4_require([_LT_DECL_EGREP]) 22379ab56c27Smrgstriplib= 22389ab56c27Smrgold_striplib= 22399ab56c27SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22409ab56c27Smrgif test -z "$STRIP"; then 22419ab56c27Smrg AC_MSG_RESULT([no]) 22429ab56c27Smrgelse 22439ab56c27Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22449ab56c27Smrg old_striplib="$STRIP --strip-debug" 22459ab56c27Smrg striplib="$STRIP --strip-unneeded" 22469ab56c27Smrg AC_MSG_RESULT([yes]) 22479ab56c27Smrg else 22489ab56c27Smrg case $host_os in 22499ab56c27Smrg darwin*) 22509ab56c27Smrg # FIXME - insert some real tests, host_os isn't really good enough 22519ab56c27Smrg striplib="$STRIP -x" 22529ab56c27Smrg old_striplib="$STRIP -S" 22539ab56c27Smrg AC_MSG_RESULT([yes]) 22549ab56c27Smrg ;; 22559ab56c27Smrg freebsd*) 22569ab56c27Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 22579ab56c27Smrg old_striplib="$STRIP --strip-debug" 22589ab56c27Smrg striplib="$STRIP --strip-unneeded" 22599ab56c27Smrg AC_MSG_RESULT([yes]) 22609ab56c27Smrg else 22619ab56c27Smrg AC_MSG_RESULT([no]) 22629ab56c27Smrg fi 22639ab56c27Smrg ;; 22649ab56c27Smrg *) 22659ab56c27Smrg AC_MSG_RESULT([no]) 22669ab56c27Smrg ;; 22679ab56c27Smrg esac 22689ab56c27Smrg fi 22699ab56c27Smrgfi 22709ab56c27Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22719ab56c27Smrg_LT_DECL([], [striplib], [1]) 22729ab56c27Smrg])# _LT_CMD_STRIPLIB 22738c9fbc29Smrg 22748c9fbc29Smrg 22759ab56c27Smrg# _LT_PREPARE_MUNGE_PATH_LIST 22769ab56c27Smrg# --------------------------- 22779ab56c27Smrg# Make sure func_munge_path_list() is defined correctly. 22789ab56c27Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22799ab56c27Smrg[[# func_munge_path_list VARIABLE PATH 22809ab56c27Smrg# ----------------------------------- 22819ab56c27Smrg# VARIABLE is name of variable containing _space_ separated list of 22829ab56c27Smrg# directories to be munged by the contents of PATH, which is string 22839ab56c27Smrg# having a format: 22849ab56c27Smrg# "DIR[:DIR]:" 22859ab56c27Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 22869ab56c27Smrg# ":DIR[:DIR]" 22879ab56c27Smrg# string "DIR[ DIR]" will be appended to VARIABLE 22889ab56c27Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22899ab56c27Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22909ab56c27Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 22919ab56c27Smrg# "DIR[:DIR]" 22929ab56c27Smrg# VARIABLE will be replaced by "DIR[ DIR]" 22939ab56c27Smrgfunc_munge_path_list () 22949ab56c27Smrg{ 22959ab56c27Smrg case x@S|@2 in 22969ab56c27Smrg x) 22979ab56c27Smrg ;; 22989ab56c27Smrg *:) 22999ab56c27Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 23009ab56c27Smrg ;; 23019ab56c27Smrg x:*) 23029ab56c27Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 23039ab56c27Smrg ;; 23049ab56c27Smrg *::*) 23059ab56c27Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 23069ab56c27Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 23079ab56c27Smrg ;; 23089ab56c27Smrg *) 23099ab56c27Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 23109ab56c27Smrg ;; 23119ab56c27Smrg esac 23129ab56c27Smrg} 23139ab56c27Smrg]])# _LT_PREPARE_PATH_LIST 23148c9fbc29Smrg 23158c9fbc29Smrg 23169ab56c27Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 23179ab56c27Smrg# ----------------------------- 23189ab56c27Smrg# PORTME Fill in your ld.so characteristics 23199ab56c27Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 232054cef2ddSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23219ab56c27Smrgm4_require([_LT_DECL_EGREP])dnl 232254cef2ddSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23239ab56c27Smrgm4_require([_LT_DECL_OBJDUMP])dnl 23249ab56c27Smrgm4_require([_LT_DECL_SED])dnl 232554cef2ddSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23269ab56c27Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23279ab56c27SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23289ab56c27Smrgm4_if([$1], 23299ab56c27Smrg [], [ 23309ab56c27Smrgif test yes = "$GCC"; then 23319ab56c27Smrg case $host_os in 23329ab56c27Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23339ab56c27Smrg *) lt_awk_arg='/^libraries:/' ;; 23349ab56c27Smrg esac 23359ab56c27Smrg case $host_os in 23369ab56c27Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23379ab56c27Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23389ab56c27Smrg esac 23399ab56c27Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23409ab56c27Smrg case $lt_search_path_spec in 23419ab56c27Smrg *\;*) 23429ab56c27Smrg # if the path contains ";" then we assume it to be the separator 23439ab56c27Smrg # otherwise default to the standard path separator (i.e. ":") - it is 23449ab56c27Smrg # assumed that no part of a normal pathname contains ";" but that should 23459ab56c27Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23469ab56c27Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23479ab56c27Smrg ;; 23489ab56c27Smrg *) 23499ab56c27Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23509ab56c27Smrg ;; 23519ab56c27Smrg esac 23529ab56c27Smrg # Ok, now we have the path, separated by spaces, we can step through it 23539ab56c27Smrg # and add multilib dir if necessary... 23549ab56c27Smrg lt_tmp_lt_search_path_spec= 23559ab56c27Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23569ab56c27Smrg # ...but if some path component already ends with the multilib dir we assume 23579ab56c27Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23589ab56c27Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23599ab56c27Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23609ab56c27Smrg lt_multi_os_dir= 23619ab56c27Smrg ;; 23629ab56c27Smrg esac 23639ab56c27Smrg for lt_sys_path in $lt_search_path_spec; do 23649ab56c27Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23659ab56c27Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23669ab56c27Smrg elif test -n "$lt_multi_os_dir"; then 23679ab56c27Smrg test -d "$lt_sys_path" && \ 23689ab56c27Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23699ab56c27Smrg fi 23709ab56c27Smrg done 23719ab56c27Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23729ab56c27SmrgBEGIN {RS = " "; FS = "/|\n";} { 23739ab56c27Smrg lt_foo = ""; 23749ab56c27Smrg lt_count = 0; 23759ab56c27Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23769ab56c27Smrg if ($lt_i != "" && $lt_i != ".") { 23779ab56c27Smrg if ($lt_i == "..") { 23789ab56c27Smrg lt_count++; 23799ab56c27Smrg } else { 23809ab56c27Smrg if (lt_count == 0) { 23819ab56c27Smrg lt_foo = "/" $lt_i lt_foo; 23829ab56c27Smrg } else { 23839ab56c27Smrg lt_count--; 23849ab56c27Smrg } 23859ab56c27Smrg } 23869ab56c27Smrg } 23879ab56c27Smrg } 23889ab56c27Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23899ab56c27Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23909ab56c27Smrg}'` 23919ab56c27Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23929ab56c27Smrg # for these hosts. 23939ab56c27Smrg case $host_os in 23949ab56c27Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23959ab56c27Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23969ab56c27Smrg esac 23979ab56c27Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23989ab56c27Smrgelse 23999ab56c27Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 24009ab56c27Smrgfi]) 24019ab56c27Smrglibrary_names_spec= 24029ab56c27Smrglibname_spec='lib$name' 24039ab56c27Smrgsoname_spec= 24049ab56c27Smrgshrext_cmds=.so 24059ab56c27Smrgpostinstall_cmds= 24069ab56c27Smrgpostuninstall_cmds= 24079ab56c27Smrgfinish_cmds= 24089ab56c27Smrgfinish_eval= 24099ab56c27Smrgshlibpath_var= 24109ab56c27Smrgshlibpath_overrides_runpath=unknown 24119ab56c27Smrgversion_type=none 24129ab56c27Smrgdynamic_linker="$host_os ld.so" 24139ab56c27Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 24149ab56c27Smrgneed_lib_prefix=unknown 24159ab56c27Smrghardcode_into_libs=no 241654cef2ddSmrg 24179ab56c27Smrg# when you set need_version to no, make sure it does not cause -set_version 24189ab56c27Smrg# flags to be left without arguments 24199ab56c27Smrgneed_version=unknown 242054cef2ddSmrg 24219ab56c27SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 24229ab56c27Smrg[User-defined run-time library search path.]) 242354cef2ddSmrg 242454044362Smrgcase $host_os in 242554cef2ddSmrgaix3*) 24269ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 24279ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24289ab56c27Smrg shlibpath_var=LIBPATH 24298c9fbc29Smrg 24309ab56c27Smrg # AIX 3 has no versioning support, so we append a major version to the name. 24319ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 24329ab56c27Smrg ;; 24338c9fbc29Smrg 24349ab56c27Smrgaix[[4-9]]*) 24359ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 24369ab56c27Smrg need_lib_prefix=no 24379ab56c27Smrg need_version=no 24389ab56c27Smrg hardcode_into_libs=yes 24399ab56c27Smrg if test ia64 = "$host_cpu"; then 24409ab56c27Smrg # AIX 5 supports IA64 24419ab56c27Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24429ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 24439ab56c27Smrg else 24449ab56c27Smrg # With GCC up to 2.95.x, collect2 would create an import file 24459ab56c27Smrg # for dependence libraries. The import file would start with 24469ab56c27Smrg # the line '#! .'. This would cause the generated library to 24479ab56c27Smrg # depend on '.', always an invalid library. This was fixed in 24489ab56c27Smrg # development snapshots of GCC prior to 3.0. 24499ab56c27Smrg case $host_os in 24509ab56c27Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24519ab56c27Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24529ab56c27Smrg echo ' yes ' 24539ab56c27Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24549ab56c27Smrg : 24559ab56c27Smrg else 24569ab56c27Smrg can_build_shared=no 24579ab56c27Smrg fi 24589ab56c27Smrg ;; 24599ab56c27Smrg esac 24609ab56c27Smrg # Using Import Files as archive members, it is possible to support 24619ab56c27Smrg # filename-based versioning of shared library archives on AIX. While 24629ab56c27Smrg # this would work for both with and without runtime linking, it will 24639ab56c27Smrg # prevent static linking of such archives. So we do filename-based 24649ab56c27Smrg # shared library versioning with .so extension only, which is used 24659ab56c27Smrg # when both runtime linking and shared linking is enabled. 24669ab56c27Smrg # Unfortunately, runtime linking may impact performance, so we do 24679ab56c27Smrg # not want this to be the default eventually. Also, we use the 24689ab56c27Smrg # versioned .so libs for executables only if there is the -brtl 24699ab56c27Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24709ab56c27Smrg # To allow for filename-based versioning support, we need to create 24719ab56c27Smrg # libNAME.so.V as an archive file, containing: 24729ab56c27Smrg # *) an Import File, referring to the versioned filename of the 24739ab56c27Smrg # archive as well as the shared archive member, telling the 24749ab56c27Smrg # bitwidth (32 or 64) of that shared object, and providing the 24759ab56c27Smrg # list of exported symbols of that shared object, eventually 24769ab56c27Smrg # decorated with the 'weak' keyword 24779ab56c27Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24789ab56c27Smrg # it being seen by the linker. 24799ab56c27Smrg # At run time we better use the real file rather than another symlink, 24809ab56c27Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24818c9fbc29Smrg 24829ab56c27Smrg case $with_aix_soname,$aix_use_runtimelinking in 24839ab56c27Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24849ab56c27Smrg # soname into executable. Probably we can add versioning support to 24859ab56c27Smrg # collect2, so additional links can be useful in future. 24869ab56c27Smrg aix,yes) # traditional libtool 24879ab56c27Smrg dynamic_linker='AIX unversionable lib.so' 24889ab56c27Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24899ab56c27Smrg # instead of lib<name>.a to let people know that these are not 24909ab56c27Smrg # typical AIX shared libraries. 24919ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24929ab56c27Smrg ;; 24939ab56c27Smrg aix,no) # traditional AIX only 24949ab56c27Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24959ab56c27Smrg # We preserve .a as extension for shared libraries through AIX4.2 24969ab56c27Smrg # and later when we are not doing run time linking. 24979ab56c27Smrg library_names_spec='$libname$release.a $libname.a' 24989ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 24999ab56c27Smrg ;; 25009ab56c27Smrg svr4,*) # full svr4 only 25019ab56c27Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 25029ab56c27Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 25039ab56c27Smrg # We do not specify a path in Import Files, so LIBPATH fires. 25049ab56c27Smrg shlibpath_overrides_runpath=yes 25059ab56c27Smrg ;; 25069ab56c27Smrg *,yes) # both, prefer svr4 25079ab56c27Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 25089ab56c27Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 25099ab56c27Smrg # unpreferred sharedlib libNAME.a needs extra handling 25109ab56c27Smrg 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"' 25119ab56c27Smrg 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"' 25129ab56c27Smrg # We do not specify a path in Import Files, so LIBPATH fires. 25139ab56c27Smrg shlibpath_overrides_runpath=yes 25149ab56c27Smrg ;; 25159ab56c27Smrg *,no) # both, prefer aix 25169ab56c27Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 25179ab56c27Smrg library_names_spec='$libname$release.a $libname.a' 25189ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 25199ab56c27Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 25209ab56c27Smrg 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)' 25219ab56c27Smrg 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"' 25229ab56c27Smrg ;; 25239ab56c27Smrg esac 25249ab56c27Smrg shlibpath_var=LIBPATH 252554cef2ddSmrg fi 25268c9fbc29Smrg ;; 25278c9fbc29Smrg 25289ab56c27Smrgamigaos*) 25299ab56c27Smrg case $host_cpu in 25309ab56c27Smrg powerpc) 25319ab56c27Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25329ab56c27Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25339ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25349ab56c27Smrg ;; 25359ab56c27Smrg m68k) 25369ab56c27Smrg library_names_spec='$libname.ixlibrary $libname.a' 25379ab56c27Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25389ab56c27Smrg 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' 25399ab56c27Smrg ;; 25409ab56c27Smrg esac 25419ab56c27Smrg ;; 25428c9fbc29Smrg 25439ab56c27Smrgbeos*) 25449ab56c27Smrg library_names_spec='$libname$shared_ext' 25459ab56c27Smrg dynamic_linker="$host_os ld.so" 25469ab56c27Smrg shlibpath_var=LIBRARY_PATH 25479ab56c27Smrg ;; 25488c9fbc29Smrg 25499ab56c27Smrgbsdi[[45]]*) 25509ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 25519ab56c27Smrg need_version=no 25529ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25539ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 25549ab56c27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25559ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 25569ab56c27Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25579ab56c27Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25589ab56c27Smrg # the default ld.so.conf also contains /usr/contrib/lib and 25599ab56c27Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25609ab56c27Smrg # libtool to hard-code these into programs 25619ab56c27Smrg ;; 25628c9fbc29Smrg 25639ab56c27Smrgcygwin* | mingw* | pw32* | cegcc*) 25649ab56c27Smrg version_type=windows 25659ab56c27Smrg shrext_cmds=.dll 25669ab56c27Smrg need_version=no 25679ab56c27Smrg need_lib_prefix=no 25688c9fbc29Smrg 25699ab56c27Smrg case $GCC,$cc_basename in 25709ab56c27Smrg yes,*) 25719ab56c27Smrg # gcc 25729ab56c27Smrg library_names_spec='$libname.dll.a' 25739ab56c27Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25749ab56c27Smrg postinstall_cmds='base_file=`basename \$file`~ 25759ab56c27Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25769ab56c27Smrg dldir=$destdir/`dirname \$dlpath`~ 25779ab56c27Smrg test -d \$dldir || mkdir -p \$dldir~ 25789ab56c27Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 25799ab56c27Smrg chmod a+x \$dldir/$dlname~ 25809ab56c27Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25819ab56c27Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25829ab56c27Smrg fi' 25839ab56c27Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25849ab56c27Smrg dlpath=$dir/\$dldll~ 25859ab56c27Smrg $RM \$dlpath' 25869ab56c27Smrg shlibpath_overrides_runpath=yes 25878c9fbc29Smrg 25889ab56c27Smrg case $host_os in 25899ab56c27Smrg cygwin*) 25909ab56c27Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 25919ab56c27Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25929ab56c27Smrgm4_if([$1], [],[ 25939ab56c27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25949ab56c27Smrg ;; 25959ab56c27Smrg mingw* | cegcc*) 25969ab56c27Smrg # MinGW DLLs use traditional 'lib' prefix 25979ab56c27Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25989ab56c27Smrg ;; 25999ab56c27Smrg pw32*) 26009ab56c27Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 26019ab56c27Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26029ab56c27Smrg ;; 26039ab56c27Smrg esac 26049ab56c27Smrg dynamic_linker='Win32 ld.exe' 26059ab56c27Smrg ;; 26064cd6a3aeSmrg 26079ab56c27Smrg *,cl* | *,icl*) 26089ab56c27Smrg # Native MSVC or ICC 26099ab56c27Smrg libname_spec='$name' 26109ab56c27Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26119ab56c27Smrg library_names_spec='$libname.dll.lib' 26128c9fbc29Smrg 26139ab56c27Smrg case $build_os in 26149ab56c27Smrg mingw*) 26159ab56c27Smrg sys_lib_search_path_spec= 26169ab56c27Smrg lt_save_ifs=$IFS 26179ab56c27Smrg IFS=';' 26189ab56c27Smrg for lt_path in $LIB 26199ab56c27Smrg do 26209ab56c27Smrg IFS=$lt_save_ifs 26219ab56c27Smrg # Let DOS variable expansion print the short 8.3 style file name. 26229ab56c27Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26239ab56c27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26249ab56c27Smrg done 26259ab56c27Smrg IFS=$lt_save_ifs 26269ab56c27Smrg # Convert to MSYS style. 26279ab56c27Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26289ab56c27Smrg ;; 26299ab56c27Smrg cygwin*) 26309ab56c27Smrg # Convert to unix form, then to dos form, then back to unix form 26319ab56c27Smrg # but this time dos style (no spaces!) so that the unix form looks 26329ab56c27Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26339ab56c27Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26349ab56c27Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26359ab56c27Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26369ab56c27Smrg ;; 26379ab56c27Smrg *) 26389ab56c27Smrg sys_lib_search_path_spec=$LIB 26399ab56c27Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26409ab56c27Smrg # It is most probably a Windows format PATH. 26419ab56c27Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26429ab56c27Smrg else 26439ab56c27Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26449ab56c27Smrg fi 26459ab56c27Smrg # FIXME: find the short name or the path components, as spaces are 26469ab56c27Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26479ab56c27Smrg ;; 26489ab56c27Smrg esac 26498c9fbc29Smrg 26509ab56c27Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26519ab56c27Smrg postinstall_cmds='base_file=`basename \$file`~ 26529ab56c27Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26539ab56c27Smrg dldir=$destdir/`dirname \$dlpath`~ 26549ab56c27Smrg test -d \$dldir || mkdir -p \$dldir~ 26559ab56c27Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26569ab56c27Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26579ab56c27Smrg dlpath=$dir/\$dldll~ 26589ab56c27Smrg $RM \$dlpath' 26599ab56c27Smrg shlibpath_overrides_runpath=yes 26609ab56c27Smrg dynamic_linker='Win32 link.exe' 26619ab56c27Smrg ;; 26628c9fbc29Smrg 26639ab56c27Smrg *) 26649ab56c27Smrg # Assume MSVC and ICC wrapper 26659ab56c27Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26669ab56c27Smrg dynamic_linker='Win32 ld.exe' 26679ab56c27Smrg ;; 26689ab56c27Smrg esac 26699ab56c27Smrg # FIXME: first we should search . and the directory the executable is in 26709ab56c27Smrg shlibpath_var=PATH 26719ab56c27Smrg ;; 26728c9fbc29Smrg 26739ab56c27Smrgdarwin* | rhapsody*) 26749ab56c27Smrg dynamic_linker="$host_os dyld" 26759ab56c27Smrg version_type=darwin 26769ab56c27Smrg need_lib_prefix=no 26779ab56c27Smrg need_version=no 26789ab56c27Smrg library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' 26799ab56c27Smrg soname_spec='$libname$release$major$shared_ext' 26809ab56c27Smrg shlibpath_overrides_runpath=yes 26819ab56c27Smrg shlibpath_var=DYLD_LIBRARY_PATH 26829ab56c27Smrg shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' 26839ab56c27Smrgm4_if([$1], [],[ 26849ab56c27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26859ab56c27Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26869ab56c27Smrg ;; 26878c9fbc29Smrg 26889ab56c27Smrgdgux*) 26899ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 26909ab56c27Smrg need_lib_prefix=no 26919ab56c27Smrg need_version=no 26929ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26939ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 26949ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 26959ab56c27Smrg ;; 26968c9fbc29Smrg 26979ab56c27Smrgfreebsd* | dragonfly* | midnightbsd*) 26989ab56c27Smrg # DragonFly does not have aout. When/if they implement a new 26999ab56c27Smrg # versioning mechanism, adjust this. 27009ab56c27Smrg if test -x /usr/bin/objformat; then 27019ab56c27Smrg objformat=`/usr/bin/objformat` 27029ab56c27Smrg else 27039ab56c27Smrg case $host_os in 27049ab56c27Smrg freebsd[[23]].*) objformat=aout ;; 27059ab56c27Smrg *) objformat=elf ;; 27069ab56c27Smrg esac 27079ab56c27Smrg fi 27089ab56c27Smrg # Handle Gentoo/FreeBSD as it was Linux 27099ab56c27Smrg case $host_vendor in 27109ab56c27Smrg gentoo) 27119ab56c27Smrg version_type=linux ;; 27129ab56c27Smrg *) 27139ab56c27Smrg version_type=freebsd-$objformat ;; 27149ab56c27Smrg esac 27158c9fbc29Smrg 27169ab56c27Smrg case $version_type in 27179ab56c27Smrg freebsd-elf*) 27189ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27199ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 27209ab56c27Smrg need_version=no 27219ab56c27Smrg need_lib_prefix=no 27229ab56c27Smrg ;; 27239ab56c27Smrg freebsd-*) 27249ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27259ab56c27Smrg need_version=yes 27269ab56c27Smrg ;; 27279ab56c27Smrg linux) 27289ab56c27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27299ab56c27Smrg soname_spec='${libname}${release}${shared_ext}$major' 27309ab56c27Smrg need_lib_prefix=no 27319ab56c27Smrg need_version=no 27329ab56c27Smrg ;; 27339ab56c27Smrg esac 27349ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 27359ab56c27Smrg case $host_os in 27369ab56c27Smrg freebsd2.*) 27379ab56c27Smrg shlibpath_overrides_runpath=yes 27389ab56c27Smrg ;; 27399ab56c27Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27409ab56c27Smrg shlibpath_overrides_runpath=yes 27419ab56c27Smrg hardcode_into_libs=yes 27429ab56c27Smrg ;; 27439ab56c27Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27449ab56c27Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27459ab56c27Smrg shlibpath_overrides_runpath=no 27469ab56c27Smrg hardcode_into_libs=yes 27479ab56c27Smrg ;; 27489ab56c27Smrg *) # from 4.6 on, and DragonFly 27499ab56c27Smrg shlibpath_overrides_runpath=yes 27509ab56c27Smrg hardcode_into_libs=yes 27519ab56c27Smrg ;; 27529ab56c27Smrg esac 27539ab56c27Smrg ;; 27548c9fbc29Smrg 27559ab56c27Smrghaiku*) 27569ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 27579ab56c27Smrg need_lib_prefix=no 27589ab56c27Smrg need_version=no 27599ab56c27Smrg dynamic_linker="$host_os runtime_loader" 27609ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27619ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 27629ab56c27Smrg shlibpath_var=LIBRARY_PATH 27639ab56c27Smrg shlibpath_overrides_runpath=no 27649ab56c27Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27659ab56c27Smrg hardcode_into_libs=yes 27669ab56c27Smrg ;; 27674e411241Smrg 27689ab56c27Smrghpux9* | hpux10* | hpux11*) 27699ab56c27Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 27709ab56c27Smrg # link against other versions. 27719ab56c27Smrg version_type=sunos 27729ab56c27Smrg need_lib_prefix=no 27739ab56c27Smrg need_version=no 27749ab56c27Smrg case $host_cpu in 27759ab56c27Smrg ia64*) 27769ab56c27Smrg shrext_cmds='.so' 27779ab56c27Smrg hardcode_into_libs=yes 27789ab56c27Smrg dynamic_linker="$host_os dld.so" 27799ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 27809ab56c27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27819ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27829ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 27839ab56c27Smrg if test 32 = "$HPUX_IA64_MODE"; then 27849ab56c27Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27859ab56c27Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27869ab56c27Smrg else 27879ab56c27Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27889ab56c27Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27899ab56c27Smrg fi 27909ab56c27Smrg ;; 27919ab56c27Smrg hppa*64*) 27929ab56c27Smrg shrext_cmds='.sl' 27939ab56c27Smrg hardcode_into_libs=yes 27949ab56c27Smrg dynamic_linker="$host_os dld.sl" 27959ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27969ab56c27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27979ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27989ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 27999ab56c27Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 28009ab56c27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 28019ab56c27Smrg ;; 28029ab56c27Smrg *) 28039ab56c27Smrg shrext_cmds='.sl' 28049ab56c27Smrg dynamic_linker="$host_os dld.sl" 28059ab56c27Smrg shlibpath_var=SHLIB_PATH 28069ab56c27Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 28079ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28089ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 28099ab56c27Smrg ;; 28109ab56c27Smrg esac 28119ab56c27Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 28129ab56c27Smrg postinstall_cmds='chmod 555 $lib' 28139ab56c27Smrg # or fails outright, so override atomically: 28149ab56c27Smrg install_override_mode=555 28159ab56c27Smrg ;; 28168c9fbc29Smrg 28179ab56c27Smrginterix[[3-9]]*) 28189ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 28199ab56c27Smrg need_lib_prefix=no 28209ab56c27Smrg need_version=no 28219ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28229ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 28239ab56c27Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 28249ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 28259ab56c27Smrg shlibpath_overrides_runpath=no 28269ab56c27Smrg hardcode_into_libs=yes 28279ab56c27Smrg ;; 28288c9fbc29Smrg 28299ab56c27Smrgirix5* | irix6* | nonstopux*) 28309ab56c27Smrg case $host_os in 28319ab56c27Smrg nonstopux*) version_type=nonstopux ;; 28329ab56c27Smrg *) 28339ab56c27Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 28349ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 28359ab56c27Smrg else 28369ab56c27Smrg version_type=irix 28379ab56c27Smrg fi ;; 28389ab56c27Smrg esac 28399ab56c27Smrg need_lib_prefix=no 28409ab56c27Smrg need_version=no 28419ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 28429ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28439ab56c27Smrg case $host_os in 28449ab56c27Smrg irix5* | nonstopux*) 28459ab56c27Smrg libsuff= shlibsuff= 28469ab56c27Smrg ;; 28479ab56c27Smrg *) 28489ab56c27Smrg case $LD in # libtool.m4 will add one of these switches to LD 28499ab56c27Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28509ab56c27Smrg libsuff= shlibsuff= libmagic=32-bit;; 28519ab56c27Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28529ab56c27Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28539ab56c27Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28549ab56c27Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28559ab56c27Smrg *) libsuff= shlibsuff= libmagic=never-match;; 28569ab56c27Smrg esac 28579ab56c27Smrg ;; 28589ab56c27Smrg esac 28599ab56c27Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28609ab56c27Smrg shlibpath_overrides_runpath=no 28619ab56c27Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28629ab56c27Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28639ab56c27Smrg hardcode_into_libs=yes 28649ab56c27Smrg ;; 28658c9fbc29Smrg 28669ab56c27Smrg# No shared lib support for Linux oldld, aout, or coff. 28679ab56c27Smrglinux*oldld* | linux*aout* | linux*coff*) 28689ab56c27Smrg dynamic_linker=no 28699ab56c27Smrg ;; 28708c9fbc29Smrg 28719ab56c27Smrglinux*android*) 28729ab56c27Smrg version_type=none # Android doesn't support versioned libraries. 28739ab56c27Smrg need_lib_prefix=no 28749ab56c27Smrg need_version=no 28759ab56c27Smrg library_names_spec='$libname$release$shared_ext' 28769ab56c27Smrg soname_spec='$libname$release$shared_ext' 28779ab56c27Smrg finish_cmds= 28789ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 28799ab56c27Smrg shlibpath_overrides_runpath=yes 28808c9fbc29Smrg 28819ab56c27Smrg # This implies no fast_install, which is unacceptable. 28829ab56c27Smrg # Some rework will be needed to allow for fast_install 28839ab56c27Smrg # before this can be enabled. 28849ab56c27Smrg hardcode_into_libs=yes 28854cd6a3aeSmrg 28869ab56c27Smrg dynamic_linker='Android linker' 28879ab56c27Smrg # Don't embed -rpath directories since the linker doesn't support them. 28889ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28899ab56c27Smrg ;; 28908c9fbc29Smrg 28919ab56c27Smrg# This must be glibc/ELF. 28929ab56c27Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28939ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 28949ab56c27Smrg need_lib_prefix=no 28959ab56c27Smrg need_version=no 28969ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28979ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 28989ab56c27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28999ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 29009ab56c27Smrg shlibpath_overrides_runpath=no 29018c9fbc29Smrg 29029ab56c27Smrg # Some binutils ld are patched to set DT_RUNPATH 29039ab56c27Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 29049ab56c27Smrg [lt_cv_shlibpath_overrides_runpath=no 29059ab56c27Smrg save_LDFLAGS=$LDFLAGS 29069ab56c27Smrg save_libdir=$libdir 29079ab56c27Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 29089ab56c27Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 29099ab56c27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 29109ab56c27Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 29119ab56c27Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 29129ab56c27Smrg LDFLAGS=$save_LDFLAGS 29139ab56c27Smrg libdir=$save_libdir 29149ab56c27Smrg ]) 29159ab56c27Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 29168c9fbc29Smrg 29179ab56c27Smrg # This implies no fast_install, which is unacceptable. 29189ab56c27Smrg # Some rework will be needed to allow for fast_install 29199ab56c27Smrg # before this can be enabled. 29209ab56c27Smrg hardcode_into_libs=yes 29218c9fbc29Smrg 29229ab56c27Smrg # Ideally, we could use ldconfig to report *all* directores which are 29239ab56c27Smrg # searched for libraries, however this is still not possible. Aside from not 29249ab56c27Smrg # being certain /sbin/ldconfig is available, command 29259ab56c27Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 29269ab56c27Smrg # even though it is searched at run-time. Try to do the best guess by 29279ab56c27Smrg # appending ld.so.conf contents (and includes) to the search path. 29289ab56c27Smrg if test -f /etc/ld.so.conf; then 29299ab56c27Smrg 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' ' '` 29309ab56c27Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29319ab56c27Smrg fi 29324cd6a3aeSmrg 29339ab56c27Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29349ab56c27Smrg # powerpc, because MkLinux only supported shared libraries with the 29359ab56c27Smrg # GNU dynamic linker. Since this was broken with cross compilers, 29369ab56c27Smrg # most powerpc-linux boxes support dynamic linking these days and 29379ab56c27Smrg # people can always --disable-shared, the test was removed, and we 29389ab56c27Smrg # assume the GNU/Linux dynamic linker is in use. 29399ab56c27Smrg dynamic_linker='GNU/Linux ld.so' 29409ab56c27Smrg ;; 29414cd6a3aeSmrg 29429ab56c27Smrgnetbsd*) 29439ab56c27Smrg version_type=sunos 29449ab56c27Smrg need_lib_prefix=no 29459ab56c27Smrg need_version=no 29469ab56c27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29479ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29489ab56c27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29499ab56c27Smrg dynamic_linker='NetBSD (a.out) ld.so' 29509ab56c27Smrg else 29519ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29529ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 29539ab56c27Smrg dynamic_linker='NetBSD ld.elf_so' 29549ab56c27Smrg fi 29559ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 29569ab56c27Smrg shlibpath_overrides_runpath=yes 29579ab56c27Smrg hardcode_into_libs=yes 29589ab56c27Smrg ;; 295954cef2ddSmrg 29609ab56c27Smrgnewsos6) 29619ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 29629ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29639ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 29649ab56c27Smrg shlibpath_overrides_runpath=yes 29659ab56c27Smrg ;; 296654044362Smrg 29679ab56c27Smrg*nto* | *qnx*) 29689ab56c27Smrg version_type=qnx 29699ab56c27Smrg need_lib_prefix=no 29709ab56c27Smrg need_version=no 29719ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29729ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 29739ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 29749ab56c27Smrg shlibpath_overrides_runpath=no 29759ab56c27Smrg hardcode_into_libs=yes 29769ab56c27Smrg dynamic_linker='ldqnx.so' 29779ab56c27Smrg ;; 29788c9fbc29Smrg 29799ab56c27Smrgopenbsd* | bitrig*) 29809ab56c27Smrg version_type=sunos 29819ab56c27Smrg sys_lib_dlsearch_path_spec=/usr/lib 29829ab56c27Smrg need_lib_prefix=no 29839ab56c27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29849ab56c27Smrg need_version=no 29859ab56c27Smrg else 29869ab56c27Smrg need_version=yes 29879ab56c27Smrg fi 29889ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29899ab56c27Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29909ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 29919ab56c27Smrg shlibpath_overrides_runpath=yes 29929ab56c27Smrg ;; 29938c9fbc29Smrg 29949ab56c27Smrgos2*) 29959ab56c27Smrg libname_spec='$name' 29969ab56c27Smrg version_type=windows 29979ab56c27Smrg shrext_cmds=.dll 29989ab56c27Smrg need_version=no 29999ab56c27Smrg need_lib_prefix=no 30009ab56c27Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 30019ab56c27Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 30029ab56c27Smrg v=$($ECHO $release$versuffix | tr -d .-); 30039ab56c27Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 30049ab56c27Smrg $ECHO $n$v`$shared_ext' 30059ab56c27Smrg library_names_spec='${libname}_dll.$libext' 30069ab56c27Smrg dynamic_linker='OS/2 ld.exe' 30079ab56c27Smrg shlibpath_var=BEGINLIBPATH 30089ab56c27Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 30099ab56c27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30109ab56c27Smrg postinstall_cmds='base_file=`basename \$file`~ 30119ab56c27Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 30129ab56c27Smrg dldir=$destdir/`dirname \$dlpath`~ 30139ab56c27Smrg test -d \$dldir || mkdir -p \$dldir~ 30149ab56c27Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 30159ab56c27Smrg chmod a+x \$dldir/$dlname~ 30169ab56c27Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 30179ab56c27Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 30189ab56c27Smrg fi' 30199ab56c27Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 30209ab56c27Smrg dlpath=$dir/\$dldll~ 30219ab56c27Smrg $RM \$dlpath' 30229ab56c27Smrg ;; 30238c9fbc29Smrg 30249ab56c27Smrgosf3* | osf4* | osf5*) 30259ab56c27Smrg version_type=osf 30269ab56c27Smrg need_lib_prefix=no 30279ab56c27Smrg need_version=no 30289ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 30299ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30309ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 30319ab56c27Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30329ab56c27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30339ab56c27Smrg ;; 30348c9fbc29Smrg 30359ab56c27Smrgrdos*) 30369ab56c27Smrg dynamic_linker=no 30379ab56c27Smrg ;; 30388c9fbc29Smrg 30399ab56c27Smrgsolaris*) 30409ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 30419ab56c27Smrg need_lib_prefix=no 30429ab56c27Smrg need_version=no 30439ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30449ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 30459ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 30469ab56c27Smrg shlibpath_overrides_runpath=yes 30479ab56c27Smrg hardcode_into_libs=yes 30489ab56c27Smrg # ldd complains unless libraries are executable 30499ab56c27Smrg postinstall_cmds='chmod +x $lib' 30509ab56c27Smrg ;; 30518c9fbc29Smrg 30529ab56c27Smrgsunos4*) 30539ab56c27Smrg version_type=sunos 30549ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30559ab56c27Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30569ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 30579ab56c27Smrg shlibpath_overrides_runpath=yes 30589ab56c27Smrg if test yes = "$with_gnu_ld"; then 30599ab56c27Smrg need_lib_prefix=no 30609ab56c27Smrg fi 30619ab56c27Smrg need_version=yes 30629ab56c27Smrg ;; 30634cd6a3aeSmrg 30649ab56c27Smrgsysv4 | sysv4.3*) 30659ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 30669ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30679ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 30689ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 30699ab56c27Smrg case $host_vendor in 30709ab56c27Smrg sni) 30719ab56c27Smrg shlibpath_overrides_runpath=no 30729ab56c27Smrg need_lib_prefix=no 30739ab56c27Smrg runpath_var=LD_RUN_PATH 30749ab56c27Smrg ;; 30759ab56c27Smrg siemens) 30769ab56c27Smrg need_lib_prefix=no 30779ab56c27Smrg ;; 30789ab56c27Smrg motorola) 30799ab56c27Smrg need_lib_prefix=no 30809ab56c27Smrg need_version=no 30819ab56c27Smrg shlibpath_overrides_runpath=no 30829ab56c27Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30839ab56c27Smrg ;; 30849ab56c27Smrg esac 30859ab56c27Smrg ;; 30868c9fbc29Smrg 30879ab56c27Smrgsysv4*MP*) 30889ab56c27Smrg if test -d /usr/nec; then 30899ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 30909ab56c27Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30919ab56c27Smrg soname_spec='$libname$shared_ext.$major' 30929ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 30939ab56c27Smrg fi 30949ab56c27Smrg ;; 30958c9fbc29Smrg 30969ab56c27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30979ab56c27Smrg version_type=sco 30989ab56c27Smrg need_lib_prefix=no 30999ab56c27Smrg need_version=no 31009ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 31019ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 31029ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 31039ab56c27Smrg shlibpath_overrides_runpath=yes 31049ab56c27Smrg hardcode_into_libs=yes 31059ab56c27Smrg if test yes = "$with_gnu_ld"; then 31069ab56c27Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 31079ab56c27Smrg else 31089ab56c27Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 31099ab56c27Smrg case $host_os in 31109ab56c27Smrg sco3.2v5*) 31119ab56c27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 31129ab56c27Smrg ;; 31139ab56c27Smrg esac 31149ab56c27Smrg fi 31159ab56c27Smrg sys_lib_dlsearch_path_spec='/usr/lib' 31169ab56c27Smrg ;; 31178c9fbc29Smrg 31189ab56c27Smrgtpf*) 31199ab56c27Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 31209ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 31219ab56c27Smrg need_lib_prefix=no 31229ab56c27Smrg need_version=no 31239ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31249ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 31259ab56c27Smrg shlibpath_overrides_runpath=no 31269ab56c27Smrg hardcode_into_libs=yes 31279ab56c27Smrg ;; 31284cd6a3aeSmrg 31299ab56c27Smrguts4*) 31309ab56c27Smrg version_type=linux # correct to gnu/linux during the next big refactor 31319ab56c27Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31329ab56c27Smrg soname_spec='$libname$release$shared_ext$major' 31339ab56c27Smrg shlibpath_var=LD_LIBRARY_PATH 31349ab56c27Smrg ;; 31358c9fbc29Smrg 31369ab56c27Smrg*) 31379ab56c27Smrg dynamic_linker=no 31389ab56c27Smrg ;; 31399ab56c27Smrgesac 31409ab56c27SmrgAC_MSG_RESULT([$dynamic_linker]) 31419ab56c27Smrgtest no = "$dynamic_linker" && can_build_shared=no 31428c9fbc29Smrg 31439ab56c27Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31449ab56c27Smrgif test yes = "$GCC"; then 31459ab56c27Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31469ab56c27Smrgfi 31478c9fbc29Smrg 31489ab56c27Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31499ab56c27Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31509ab56c27Smrgfi 31518c9fbc29Smrg 31529ab56c27Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31539ab56c27Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31549ab56c27Smrgfi 31558c9fbc29Smrg 31569ab56c27Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31579ab56c27Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31588c9fbc29Smrg 31599ab56c27Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31609ab56c27Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31618c9fbc29Smrg 31629ab56c27Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31639ab56c27Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31648c9fbc29Smrg 31659ab56c27Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31669ab56c27Smrg [Variables whose values should be saved in libtool wrapper scripts and 31679ab56c27Smrg restored at link time]) 31689ab56c27Smrg_LT_DECL([], [need_lib_prefix], [0], 31699ab56c27Smrg [Do we need the "lib" prefix for modules?]) 31709ab56c27Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31719ab56c27Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31729ab56c27Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31739ab56c27Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31749ab56c27Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31759ab56c27Smrg [Is shlibpath searched before the hard-coded library search path?]) 31769ab56c27Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31779ab56c27Smrg_LT_DECL([], [library_names_spec], [1], 31789ab56c27Smrg [[List of archive names. First name is the real one, the rest are links. 31799ab56c27Smrg The last name is the one that the linker finds with -lNAME]]) 31809ab56c27Smrg_LT_DECL([], [soname_spec], [1], 31819ab56c27Smrg [[The coded name of the library, if different from the real name]]) 31829ab56c27Smrg_LT_DECL([], [install_override_mode], [1], 31839ab56c27Smrg [Permission mode override for installation of shared libraries]) 31849ab56c27Smrg_LT_DECL([], [postinstall_cmds], [2], 31859ab56c27Smrg [Command to use after installation of a shared archive]) 31869ab56c27Smrg_LT_DECL([], [postuninstall_cmds], [2], 31879ab56c27Smrg [Command to use after uninstallation of a shared archive]) 31889ab56c27Smrg_LT_DECL([], [finish_cmds], [2], 31899ab56c27Smrg [Commands used to finish a libtool library installation in a directory]) 31909ab56c27Smrg_LT_DECL([], [finish_eval], [1], 31919ab56c27Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31929ab56c27Smrg not shown]]) 31939ab56c27Smrg_LT_DECL([], [hardcode_into_libs], [0], 31949ab56c27Smrg [Whether we should hardcode library paths into libraries]) 31959ab56c27Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31969ab56c27Smrg [Compile-time system search path for libraries]) 31979ab56c27Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31989ab56c27Smrg [Detected run-time system search path for libraries]) 31999ab56c27Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 32009ab56c27Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 32019ab56c27Smrg])# _LT_SYS_DYNAMIC_LINKER 32028c9fbc29Smrg 32034cd6a3aeSmrg 32049ab56c27Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 32059ab56c27Smrg# -------------------------- 32069ab56c27Smrg# find a file program that can recognize shared library 32079ab56c27SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 32089ab56c27Smrg[m4_require([_LT_DECL_EGREP])dnl 32099ab56c27SmrgAC_MSG_CHECKING([for $1]) 32109ab56c27SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 32119ab56c27Smrg[case $MAGIC_CMD in 32129ab56c27Smrg[[\\/*] | ?:[\\/]*]) 32139ab56c27Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 32149ab56c27Smrg ;; 32159ab56c27Smrg*) 32169ab56c27Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 32179ab56c27Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 32189ab56c27Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 32199ab56c27Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 32209ab56c27Smrgdnl not every word. This closes a longstanding sh security hole. 32219ab56c27Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 32229ab56c27Smrg for ac_dir in $ac_dummy; do 32239ab56c27Smrg IFS=$lt_save_ifs 32249ab56c27Smrg test -z "$ac_dir" && ac_dir=. 32259ab56c27Smrg if test -f "$ac_dir/$1"; then 32269ab56c27Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32279ab56c27Smrg if test -n "$file_magic_test_file"; then 32289ab56c27Smrg case $deplibs_check_method in 32299ab56c27Smrg "file_magic "*) 32309ab56c27Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32319ab56c27Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32329ab56c27Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32339ab56c27Smrg $EGREP "$file_magic_regex" > /dev/null; then 32349ab56c27Smrg : 32359ab56c27Smrg else 32369ab56c27Smrg cat <<_LT_EOF 1>&2 32374cd6a3aeSmrg 32389ab56c27Smrg*** Warning: the command libtool uses to detect shared libraries, 32399ab56c27Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32409ab56c27Smrg*** The result is that libtool may fail to recognize shared libraries 32419ab56c27Smrg*** as such. This will affect the creation of libtool libraries that 32429ab56c27Smrg*** depend on shared libraries, but programs linked with such libtool 32439ab56c27Smrg*** libraries will work regardless of this problem. Nevertheless, you 32449ab56c27Smrg*** may want to report the problem to your system manager and/or to 32459ab56c27Smrg*** bug-libtool@gnu.org 324654044362Smrg 32479ab56c27Smrg_LT_EOF 32489ab56c27Smrg fi ;; 32499ab56c27Smrg esac 32509ab56c27Smrg fi 32519ab56c27Smrg break 32529ab56c27Smrg fi 32539ab56c27Smrg done 32549ab56c27Smrg IFS=$lt_save_ifs 32559ab56c27Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 32569ab56c27Smrg ;; 32579ab56c27Smrgesac]) 32589ab56c27SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32599ab56c27Smrgif test -n "$MAGIC_CMD"; then 32609ab56c27Smrg AC_MSG_RESULT($MAGIC_CMD) 32619ab56c27Smrgelse 32629ab56c27Smrg AC_MSG_RESULT(no) 32639ab56c27Smrgfi 32649ab56c27Smrg_LT_DECL([], [MAGIC_CMD], [0], 32659ab56c27Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32669ab56c27Smrg])# _LT_PATH_TOOL_PREFIX 32674cd6a3aeSmrg 32689ab56c27Smrg# Old name: 32699ab56c27SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32709ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 32719ab56c27Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32728c9fbc29Smrg 32734cd6a3aeSmrg 32749ab56c27Smrg# _LT_PATH_MAGIC 32759ab56c27Smrg# -------------- 32769ab56c27Smrg# find a file program that can recognize a shared library 32779ab56c27Smrgm4_defun([_LT_PATH_MAGIC], 32789ab56c27Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32799ab56c27Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32809ab56c27Smrg if test -n "$ac_tool_prefix"; then 32819ab56c27Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32829ab56c27Smrg else 32839ab56c27Smrg MAGIC_CMD=: 32849ab56c27Smrg fi 32859ab56c27Smrgfi 32869ab56c27Smrg])# _LT_PATH_MAGIC 32878c9fbc29Smrg 32888c9fbc29Smrg 32899ab56c27Smrg# LT_PATH_LD 32909ab56c27Smrg# ---------- 32919ab56c27Smrg# find the pathname to the GNU or non-GNU linker 32929ab56c27SmrgAC_DEFUN([LT_PATH_LD], 32939ab56c27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 32949ab56c27SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32959ab56c27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32969ab56c27Smrgm4_require([_LT_DECL_SED])dnl 32979ab56c27Smrgm4_require([_LT_DECL_EGREP])dnl 32989ab56c27Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32998c9fbc29Smrg 33009ab56c27SmrgAC_ARG_WITH([gnu-ld], 33019ab56c27Smrg [AS_HELP_STRING([--with-gnu-ld], 33029ab56c27Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 33039ab56c27Smrg [test no = "$withval" || with_gnu_ld=yes], 33049ab56c27Smrg [with_gnu_ld=no])dnl 33058c9fbc29Smrg 33069ab56c27Smrgac_prog=ld 33079ab56c27Smrgif test yes = "$GCC"; then 33089ab56c27Smrg # Check if gcc -print-prog-name=ld gives a path. 33099ab56c27Smrg AC_MSG_CHECKING([for ld used by $CC]) 33109ab56c27Smrg case $host in 33119ab56c27Smrg *-*-mingw*) 33129ab56c27Smrg # gcc leaves a trailing carriage return, which upsets mingw 33139ab56c27Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 33149ab56c27Smrg *) 33159ab56c27Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 33169ab56c27Smrg esac 33179ab56c27Smrg case $ac_prog in 33189ab56c27Smrg # Accept absolute paths. 33199ab56c27Smrg [[\\/]]* | ?:[[\\/]]*) 33209ab56c27Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 33219ab56c27Smrg # Canonicalize the pathname of ld 33229ab56c27Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 33239ab56c27Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 33249ab56c27Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 33259ab56c27Smrg done 33269ab56c27Smrg test -z "$LD" && LD=$ac_prog 332754cef2ddSmrg ;; 33289ab56c27Smrg "") 33299ab56c27Smrg # If it fails, then pretend we aren't using GCC. 33309ab56c27Smrg ac_prog=ld 33319ab56c27Smrg ;; 33329ab56c27Smrg *) 33339ab56c27Smrg # If it is relative, then search for the first ld in PATH. 33349ab56c27Smrg with_gnu_ld=unknown 33359ab56c27Smrg ;; 33369ab56c27Smrg esac 33379ab56c27Smrgelif test yes = "$with_gnu_ld"; then 33389ab56c27Smrg AC_MSG_CHECKING([for GNU ld]) 33399ab56c27Smrgelse 33409ab56c27Smrg AC_MSG_CHECKING([for non-GNU ld]) 33419ab56c27Smrgfi 33429ab56c27SmrgAC_CACHE_VAL(lt_cv_path_LD, 33439ab56c27Smrg[if test -z "$LD"; then 33449ab56c27Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33459ab56c27Smrg for ac_dir in $PATH; do 33469ab56c27Smrg IFS=$lt_save_ifs 33479ab56c27Smrg test -z "$ac_dir" && ac_dir=. 33489ab56c27Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33499ab56c27Smrg lt_cv_path_LD=$ac_dir/$ac_prog 33509ab56c27Smrg # Check to see if the program is GNU ld. I'd rather use --version, 33519ab56c27Smrg # but apparently some variants of GNU ld only accept -v. 33529ab56c27Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 33539ab56c27Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33549ab56c27Smrg *GNU* | *'with BFD'*) 33559ab56c27Smrg test no != "$with_gnu_ld" && break 33569ab56c27Smrg ;; 33579ab56c27Smrg *) 33589ab56c27Smrg test yes != "$with_gnu_ld" && break 33599ab56c27Smrg ;; 33609ab56c27Smrg esac 33619ab56c27Smrg fi 33629ab56c27Smrg done 33639ab56c27Smrg IFS=$lt_save_ifs 33649ab56c27Smrgelse 33659ab56c27Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33669ab56c27Smrgfi]) 33679ab56c27SmrgLD=$lt_cv_path_LD 33689ab56c27Smrgif test -n "$LD"; then 33699ab56c27Smrg AC_MSG_RESULT($LD) 33709ab56c27Smrgelse 33719ab56c27Smrg AC_MSG_RESULT(no) 33729ab56c27Smrgfi 33739ab56c27Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33749ab56c27Smrg_LT_PATH_LD_GNU 33759ab56c27SmrgAC_SUBST([LD]) 33768c9fbc29Smrg 33779ab56c27Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33789ab56c27Smrg])# LT_PATH_LD 33798c9fbc29Smrg 33809ab56c27Smrg# Old names: 33819ab56c27SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33829ab56c27SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33839ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 33849ab56c27Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33859ab56c27Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33868c9fbc29Smrg 33878c9fbc29Smrg 33889ab56c27Smrg# _LT_PATH_LD_GNU 33899ab56c27Smrg#- -------------- 33909ab56c27Smrgm4_defun([_LT_PATH_LD_GNU], 33919ab56c27Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33929ab56c27Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33939ab56c27Smrgcase `$LD -v 2>&1 </dev/null` in 33949ab56c27Smrg*GNU* | *'with BFD'*) 33959ab56c27Smrg lt_cv_prog_gnu_ld=yes 33969ab56c27Smrg ;; 33979ab56c27Smrg*) 33989ab56c27Smrg lt_cv_prog_gnu_ld=no 33999ab56c27Smrg ;; 34009ab56c27Smrgesac]) 34019ab56c27Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 34029ab56c27Smrg])# _LT_PATH_LD_GNU 34038c9fbc29Smrg 34048c9fbc29Smrg 34059ab56c27Smrg# _LT_CMD_RELOAD 34069ab56c27Smrg# -------------- 34079ab56c27Smrg# find reload flag for linker 34089ab56c27Smrg# -- PORTME Some linkers may need a different reload flag. 34099ab56c27Smrgm4_defun([_LT_CMD_RELOAD], 34109ab56c27Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 34119ab56c27Smrg lt_cv_ld_reload_flag, 34129ab56c27Smrg [lt_cv_ld_reload_flag='-r']) 34139ab56c27Smrgreload_flag=$lt_cv_ld_reload_flag 34149ab56c27Smrgcase $reload_flag in 34159ab56c27Smrg"" | " "*) ;; 34169ab56c27Smrg*) reload_flag=" $reload_flag" ;; 34179ab56c27Smrgesac 34189ab56c27Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 34199ab56c27Smrgcase $host_os in 34209ab56c27Smrg cygwin* | mingw* | pw32* | cegcc*) 34219ab56c27Smrg if test yes != "$GCC"; then 34229ab56c27Smrg reload_cmds=false 34239ab56c27Smrg fi 34249ab56c27Smrg ;; 34259ab56c27Smrg darwin*) 34269ab56c27Smrg if test yes = "$GCC"; then 34279ab56c27Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34289ab56c27Smrg else 34299ab56c27Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34309ab56c27Smrg fi 34319ab56c27Smrg ;; 34329ab56c27Smrgesac 34339ab56c27Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34349ab56c27Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34359ab56c27Smrg])# _LT_CMD_RELOAD 34368c9fbc29Smrg 34378c9fbc29Smrg 34389ab56c27Smrg# _LT_PATH_DD 34399ab56c27Smrg# ----------- 34409ab56c27Smrg# find a working dd 34419ab56c27Smrgm4_defun([_LT_PATH_DD], 34429ab56c27Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34439ab56c27Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34449ab56c27Smrgcat conftest.i conftest.i >conftest2.i 34459ab56c27Smrg: ${lt_DD:=$DD} 34469ab56c27SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34479ab56c27Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34489ab56c27Smrg cmp -s conftest.i conftest.out \ 34499ab56c27Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34509ab56c27Smrgfi]) 34519ab56c27Smrgrm -f conftest.i conftest2.i conftest.out]) 34529ab56c27Smrg])# _LT_PATH_DD 34534cd6a3aeSmrg 34544cd6a3aeSmrg 34559ab56c27Smrg# _LT_CMD_TRUNCATE 34569ab56c27Smrg# ---------------- 34579ab56c27Smrg# find command to truncate a binary pipe 34589ab56c27Smrgm4_defun([_LT_CMD_TRUNCATE], 34599ab56c27Smrg[m4_require([_LT_PATH_DD]) 34609ab56c27SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34619ab56c27Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34629ab56c27Smrgcat conftest.i conftest.i >conftest2.i 34639ab56c27Smrglt_cv_truncate_bin= 34649ab56c27Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34659ab56c27Smrg cmp -s conftest.i conftest.out \ 34669ab56c27Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34679ab56c27Smrgfi 34689ab56c27Smrgrm -f conftest.i conftest2.i conftest.out 34699ab56c27Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34709ab56c27Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34719ab56c27Smrg [Command to truncate a binary pipe]) 34729ab56c27Smrg])# _LT_CMD_TRUNCATE 34738c9fbc29Smrg 34748c9fbc29Smrg 34759ab56c27Smrg# _LT_CHECK_MAGIC_METHOD 34769ab56c27Smrg# ---------------------- 34779ab56c27Smrg# how to check for library dependencies 34789ab56c27Smrg# -- PORTME fill in with the dynamic library characteristics 34799ab56c27Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34809ab56c27Smrg[m4_require([_LT_DECL_EGREP]) 34819ab56c27Smrgm4_require([_LT_DECL_OBJDUMP]) 34829ab56c27SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34839ab56c27Smrglt_cv_deplibs_check_method, 34849ab56c27Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34859ab56c27Smrglt_cv_file_magic_test_file= 34869ab56c27Smrglt_cv_deplibs_check_method='unknown' 34879ab56c27Smrg# Need to set the preceding variable on all platforms that support 34889ab56c27Smrg# interlibrary dependencies. 34899ab56c27Smrg# 'none' -- dependencies not supported. 34909ab56c27Smrg# 'unknown' -- same as none, but documents that we really don't know. 34919ab56c27Smrg# 'pass_all' -- all dependencies passed with no checks. 34929ab56c27Smrg# 'test_compile' -- check by making test program. 34939ab56c27Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 34949ab56c27Smrg# that responds to the $file_magic_cmd with a given extended regex. 34959ab56c27Smrg# If you have 'file' or equivalent on your system and you're not sure 34969ab56c27Smrg# whether 'pass_all' will *always* work, you probably want this one. 34978c9fbc29Smrg 34989ab56c27Smrgcase $host_os in 34999ab56c27Smrgaix[[4-9]]*) 35009ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35019ab56c27Smrg ;; 35028c9fbc29Smrg 35039ab56c27Smrgbeos*) 35049ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35059ab56c27Smrg ;; 35068c9fbc29Smrg 35079ab56c27Smrgbsdi[[45]]*) 35089ab56c27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 35099ab56c27Smrg lt_cv_file_magic_cmd='$FILECMD -L' 35109ab56c27Smrg lt_cv_file_magic_test_file=/shlib/libc.so 35119ab56c27Smrg ;; 35128c9fbc29Smrg 35139ab56c27Smrgcygwin*) 35149ab56c27Smrg # func_win32_libid is a shell function defined in ltmain.sh 35159ab56c27Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35169ab56c27Smrg lt_cv_file_magic_cmd='func_win32_libid' 35179ab56c27Smrg ;; 35188c9fbc29Smrg 35199ab56c27Smrgmingw* | pw32*) 35209ab56c27Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 35219ab56c27Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 35229ab56c27Smrg # unless we find 'file', for example because we are cross-compiling. 35239ab56c27Smrg if ( file / ) >/dev/null 2>&1; then 35249ab56c27Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35259ab56c27Smrg lt_cv_file_magic_cmd='func_win32_libid' 35269ab56c27Smrg else 35279ab56c27Smrg # Keep this pattern in sync with the one in func_win32_libid. 35289ab56c27Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35299ab56c27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35309ab56c27Smrg fi 35319ab56c27Smrg ;; 35328c9fbc29Smrg 35339ab56c27Smrgcegcc*) 35349ab56c27Smrg # use the weaker test based on 'objdump'. See mingw*. 35359ab56c27Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35369ab56c27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35379ab56c27Smrg ;; 35388c9fbc29Smrg 35399ab56c27Smrgdarwin* | rhapsody*) 35409ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35419ab56c27Smrg ;; 35428c9fbc29Smrg 35439ab56c27Smrgfreebsd* | dragonfly* | midnightbsd*) 35449ab56c27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35459ab56c27Smrg case $host_cpu in 35469ab56c27Smrg i*86 ) 35479ab56c27Smrg # Not sure whether the presence of OpenBSD here was a mistake. 35489ab56c27Smrg # Let's accept both of them until this is cleared up. 35499ab56c27Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35509ab56c27Smrg lt_cv_file_magic_cmd=$FILECMD 35519ab56c27Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35529ab56c27Smrg ;; 35539ab56c27Smrg esac 35549ab56c27Smrg else 35559ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35569ab56c27Smrg fi 35579ab56c27Smrg ;; 355854cef2ddSmrg 35599ab56c27Smrghaiku*) 35609ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35619ab56c27Smrg ;; 356254cef2ddSmrg 35639ab56c27Smrghpux10.20* | hpux11*) 35649ab56c27Smrg lt_cv_file_magic_cmd=$FILECMD 35659ab56c27Smrg case $host_cpu in 35669ab56c27Smrg ia64*) 35679ab56c27Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35689ab56c27Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35699ab56c27Smrg ;; 35709ab56c27Smrg hppa*64*) 35719ab56c27Smrg [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]'] 35729ab56c27Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35739ab56c27Smrg ;; 35749ab56c27Smrg *) 35759ab56c27Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35769ab56c27Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35779ab56c27Smrg ;; 35789ab56c27Smrg esac 35799ab56c27Smrg ;; 358054cef2ddSmrg 35819ab56c27Smrginterix[[3-9]]*) 35829ab56c27Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35839ab56c27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35849ab56c27Smrg ;; 358554cef2ddSmrg 35869ab56c27Smrgirix5* | irix6* | nonstopux*) 35879ab56c27Smrg case $LD in 35889ab56c27Smrg *-32|*"-32 ") libmagic=32-bit;; 35899ab56c27Smrg *-n32|*"-n32 ") libmagic=N32;; 35909ab56c27Smrg *-64|*"-64 ") libmagic=64-bit;; 35919ab56c27Smrg *) libmagic=never-match;; 35929ab56c27Smrg esac 35939ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35949ab56c27Smrg ;; 35958c9fbc29Smrg 35969ab56c27Smrg# This must be glibc/ELF. 35979ab56c27Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35989ab56c27Smrg lt_cv_deplibs_check_method=pass_all 35999ab56c27Smrg ;; 36008c9fbc29Smrg 36019ab56c27Smrgnetbsd*) 36029ab56c27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 36039ab56c27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36049ab56c27Smrg else 36059ab56c27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 36069ab56c27Smrg fi 36079ab56c27Smrg ;; 36088c9fbc29Smrg 36099ab56c27Smrgnewos6*) 36109ab56c27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 36119ab56c27Smrg lt_cv_file_magic_cmd=$FILECMD 36129ab56c27Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 36139ab56c27Smrg ;; 36148c9fbc29Smrg 36159ab56c27Smrg*nto* | *qnx*) 36169ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36179ab56c27Smrg ;; 36188c9fbc29Smrg 36199ab56c27Smrgopenbsd* | bitrig*) 36209ab56c27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 36219ab56c27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 36229ab56c27Smrg else 36239ab56c27Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36249ab56c27Smrg fi 36259ab56c27Smrg ;; 36268c9fbc29Smrg 36279ab56c27Smrgosf3* | osf4* | osf5*) 36289ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36299ab56c27Smrg ;; 363054cef2ddSmrg 36319ab56c27Smrgrdos*) 36329ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36339ab56c27Smrg ;; 363454cef2ddSmrg 36359ab56c27Smrgsolaris*) 36369ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36379ab56c27Smrg ;; 36388c9fbc29Smrg 36399ab56c27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36409ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36419ab56c27Smrg ;; 36428c9fbc29Smrg 36439ab56c27Smrgsysv4 | sysv4.3*) 36449ab56c27Smrg case $host_vendor in 36459ab56c27Smrg motorola) 36469ab56c27Smrg 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]]' 36479ab56c27Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36489ab56c27Smrg ;; 36499ab56c27Smrg ncr) 36509ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36519ab56c27Smrg ;; 36529ab56c27Smrg sequent) 36539ab56c27Smrg lt_cv_file_magic_cmd='/bin/file' 36549ab56c27Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36559ab56c27Smrg ;; 36569ab56c27Smrg sni) 36579ab56c27Smrg lt_cv_file_magic_cmd='/bin/file' 36589ab56c27Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36599ab56c27Smrg lt_cv_file_magic_test_file=/lib/libc.so 36609ab56c27Smrg ;; 36619ab56c27Smrg siemens) 36629ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36639ab56c27Smrg ;; 36649ab56c27Smrg pc) 36659ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36669ab56c27Smrg ;; 36679ab56c27Smrg esac 36689ab56c27Smrg ;; 36698c9fbc29Smrg 36709ab56c27Smrgtpf*) 36719ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36729ab56c27Smrg ;; 36739ab56c27Smrgos2*) 36749ab56c27Smrg lt_cv_deplibs_check_method=pass_all 36759ab56c27Smrg ;; 36769ab56c27Smrgesac 36779ab56c27Smrg]) 36788c9fbc29Smrg 36799ab56c27Smrgfile_magic_glob= 36809ab56c27Smrgwant_nocaseglob=no 36819ab56c27Smrgif test "$build" = "$host"; then 36829ab56c27Smrg case $host_os in 36839ab56c27Smrg mingw* | pw32*) 36849ab56c27Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36859ab56c27Smrg want_nocaseglob=yes 36869ab56c27Smrg else 36879ab56c27Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36889ab56c27Smrg fi 36899ab56c27Smrg ;; 36909ab56c27Smrg esac 36919ab56c27Smrgfi 369254cef2ddSmrg 36939ab56c27Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 36949ab56c27Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 36959ab56c27Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 369654cef2ddSmrg 36979ab56c27Smrg_LT_DECL([], [deplibs_check_method], [1], 36989ab56c27Smrg [Method to check whether dependent libraries are shared objects]) 36999ab56c27Smrg_LT_DECL([], [file_magic_cmd], [1], 37009ab56c27Smrg [Command to use when deplibs_check_method = "file_magic"]) 37019ab56c27Smrg_LT_DECL([], [file_magic_glob], [1], 37029ab56c27Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 37039ab56c27Smrg_LT_DECL([], [want_nocaseglob], [1], 37049ab56c27Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 37059ab56c27Smrg])# _LT_CHECK_MAGIC_METHOD 370654cef2ddSmrg 37078c9fbc29Smrg 37089ab56c27Smrg# LT_PATH_NM 37099ab56c27Smrg# ---------- 37109ab56c27Smrg# find the pathname to a BSD- or MS-compatible name lister 37119ab56c27SmrgAC_DEFUN([LT_PATH_NM], 37129ab56c27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 37139ab56c27SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 37149ab56c27Smrg[if test -n "$NM"; then 37159ab56c27Smrg # Let the user override the test. 37169ab56c27Smrg lt_cv_path_NM=$NM 37179ab56c27Smrgelse 37189ab56c27Smrg lt_nm_to_check=${ac_tool_prefix}nm 37199ab56c27Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 37209ab56c27Smrg lt_nm_to_check="$lt_nm_to_check nm" 37219ab56c27Smrg fi 37229ab56c27Smrg for lt_tmp_nm in $lt_nm_to_check; do 37239ab56c27Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 37249ab56c27Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 37259ab56c27Smrg IFS=$lt_save_ifs 37269ab56c27Smrg test -z "$ac_dir" && ac_dir=. 37279ab56c27Smrg tmp_nm=$ac_dir/$lt_tmp_nm 37289ab56c27Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37299ab56c27Smrg # Check to see if the nm accepts a BSD-compat flag. 37309ab56c27Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37319ab56c27Smrg # nm: unknown option "B" ignored 37329ab56c27Smrg # Tru64's nm complains that /dev/null is an invalid object file 37339ab56c27Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37349ab56c27Smrg case $build_os in 37359ab56c27Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37369ab56c27Smrg *) lt_bad_file=/dev/null ;; 37379ab56c27Smrg esac 37389ab56c27Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 37399ab56c27Smrg *$lt_bad_file* | *'Invalid file or object type'*) 37409ab56c27Smrg lt_cv_path_NM="$tmp_nm -B" 37419ab56c27Smrg break 2 37429ab56c27Smrg ;; 37439ab56c27Smrg *) 37449ab56c27Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 37459ab56c27Smrg */dev/null*) 37469ab56c27Smrg lt_cv_path_NM="$tmp_nm -p" 37479ab56c27Smrg break 2 37489ab56c27Smrg ;; 37499ab56c27Smrg *) 37509ab56c27Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37519ab56c27Smrg continue # so that we can try to find one that supports BSD flags 37529ab56c27Smrg ;; 37539ab56c27Smrg esac 37549ab56c27Smrg ;; 37559ab56c27Smrg esac 37569ab56c27Smrg fi 37579ab56c27Smrg done 37589ab56c27Smrg IFS=$lt_save_ifs 37599ab56c27Smrg done 37609ab56c27Smrg : ${lt_cv_path_NM=no} 37619ab56c27Smrgfi]) 37629ab56c27Smrgif test no != "$lt_cv_path_NM"; then 37639ab56c27Smrg NM=$lt_cv_path_NM 37649ab56c27Smrgelse 37659ab56c27Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 37669ab56c27Smrg if test -n "$DUMPBIN"; then : 37679ab56c27Smrg # Let the user override the test. 37689ab56c27Smrg else 37699ab56c27Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37709ab56c27Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 37719ab56c27Smrg *COFF*) 37729ab56c27Smrg DUMPBIN="$DUMPBIN -symbols -headers" 37739ab56c27Smrg ;; 37749ab56c27Smrg *) 37759ab56c27Smrg DUMPBIN=: 37769ab56c27Smrg ;; 37779ab56c27Smrg esac 37789ab56c27Smrg fi 37799ab56c27Smrg AC_SUBST([DUMPBIN]) 37809ab56c27Smrg if test : != "$DUMPBIN"; then 37819ab56c27Smrg NM=$DUMPBIN 378254cef2ddSmrg fi 378354cef2ddSmrgfi 37849ab56c27Smrgtest -z "$NM" && NM=nm 37859ab56c27SmrgAC_SUBST([NM]) 37869ab56c27Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37878c9fbc29Smrg 37889ab56c27SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37899ab56c27Smrg [lt_cv_nm_interface="BSD nm" 37909ab56c27Smrg echo "int some_variable = 0;" > conftest.$ac_ext 37919ab56c27Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37929ab56c27Smrg (eval "$ac_compile" 2>conftest.err) 37939ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37949ab56c27Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37959ab56c27Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37969ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37979ab56c27Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37989ab56c27Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37999ab56c27Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 38009ab56c27Smrg lt_cv_nm_interface="MS dumpbin" 38019ab56c27Smrg fi 38029ab56c27Smrg rm -f conftest*]) 38039ab56c27Smrg])# LT_PATH_NM 38044cd6a3aeSmrg 38059ab56c27Smrg# Old names: 38069ab56c27SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 38079ab56c27SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 38089ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 38099ab56c27Smrgdnl AC_DEFUN([AM_PROG_NM], []) 38109ab56c27Smrgdnl AC_DEFUN([AC_PROG_NM], []) 38118c9fbc29Smrg 38129ab56c27Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38139ab56c27Smrg# -------------------------------- 38149ab56c27Smrg# how to determine the name of the shared library 38159ab56c27Smrg# associated with a specific link library. 38169ab56c27Smrg# -- PORTME fill in with the dynamic library characteristics 38179ab56c27Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 38189ab56c27Smrg[m4_require([_LT_DECL_EGREP]) 38199ab56c27Smrgm4_require([_LT_DECL_OBJDUMP]) 38209ab56c27Smrgm4_require([_LT_DECL_DLLTOOL]) 38219ab56c27SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 38229ab56c27Smrglt_cv_sharedlib_from_linklib_cmd, 38239ab56c27Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 38248c9fbc29Smrg 38259ab56c27Smrgcase $host_os in 38269ab56c27Smrgcygwin* | mingw* | pw32* | cegcc*) 38279ab56c27Smrg # two different shell functions defined in ltmain.sh; 38289ab56c27Smrg # decide which one to use based on capabilities of $DLLTOOL 38299ab56c27Smrg case `$DLLTOOL --help 2>&1` in 38309ab56c27Smrg *--identify-strict*) 38319ab56c27Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38329ab56c27Smrg ;; 38339ab56c27Smrg *) 38349ab56c27Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38359ab56c27Smrg ;; 38369ab56c27Smrg esac 38379ab56c27Smrg ;; 38389ab56c27Smrg*) 38399ab56c27Smrg # fallback: assume linklib IS sharedlib 38409ab56c27Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38419ab56c27Smrg ;; 38429ab56c27Smrgesac 38439ab56c27Smrg]) 38449ab56c27Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38459ab56c27Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38468c9fbc29Smrg 38479ab56c27Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38489ab56c27Smrg [Command to associate shared and link libraries]) 38499ab56c27Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38508c9fbc29Smrg 38518c9fbc29Smrg 38529ab56c27Smrg# _LT_PATH_MANIFEST_TOOL 38539ab56c27Smrg# ---------------------- 38549ab56c27Smrg# locate the manifest tool 38559ab56c27Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38569ab56c27Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38579ab56c27Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38589ab56c27SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38599ab56c27Smrg [lt_cv_path_mainfest_tool=no 38609ab56c27Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38619ab56c27Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38629ab56c27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38639ab56c27Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38649ab56c27Smrg lt_cv_path_mainfest_tool=yes 38659ab56c27Smrg fi 38669ab56c27Smrg rm -f conftest*]) 38679ab56c27Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 38689ab56c27Smrg MANIFEST_TOOL=: 38699ab56c27Smrgfi 38709ab56c27Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38719ab56c27Smrg])# _LT_PATH_MANIFEST_TOOL 38728c9fbc29Smrg 38738c9fbc29Smrg 38749ab56c27Smrg# _LT_DLL_DEF_P([FILE]) 38759ab56c27Smrg# --------------------- 38769ab56c27Smrg# True iff FILE is a Windows DLL '.def' file. 38779ab56c27Smrg# Keep in sync with func_dll_def_p in the libtool script 38789ab56c27SmrgAC_DEFUN([_LT_DLL_DEF_P], 38799ab56c27Smrg[dnl 38809ab56c27Smrg test DEF = "`$SED -n dnl 38819ab56c27Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38829ab56c27Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38839ab56c27Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38849ab56c27Smrg -e q dnl Only consider the first "real" line 38859ab56c27Smrg $1`" dnl 38869ab56c27Smrg])# _LT_DLL_DEF_P 38878c9fbc29Smrg 38888c9fbc29Smrg 38899ab56c27Smrg# LT_LIB_M 38909ab56c27Smrg# -------- 38919ab56c27Smrg# check for math library 38929ab56c27SmrgAC_DEFUN([LT_LIB_M], 38939ab56c27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38949ab56c27SmrgLIBM= 38959ab56c27Smrgcase $host in 38969ab56c27Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38979ab56c27Smrg # These system don't have libm, or don't need it 38989ab56c27Smrg ;; 38999ab56c27Smrg*-ncr-sysv4.3*) 39009ab56c27Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 39019ab56c27Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 39029ab56c27Smrg ;; 39039ab56c27Smrg*) 39049ab56c27Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 39059ab56c27Smrg ;; 39069ab56c27Smrgesac 39079ab56c27SmrgAC_SUBST([LIBM]) 39089ab56c27Smrg])# LT_LIB_M 390954cef2ddSmrg 39109ab56c27Smrg# Old name: 39119ab56c27SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 39129ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 39139ab56c27Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 391454cef2ddSmrg 391554cef2ddSmrg 39169ab56c27Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 39179ab56c27Smrg# ------------------------------- 39189ab56c27Smrgm4_defun([_LT_COMPILER_NO_RTTI], 39199ab56c27Smrg[m4_require([_LT_TAG_COMPILER])dnl 392054cef2ddSmrg 39219ab56c27Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 392254cef2ddSmrg 39239ab56c27Smrgif test yes = "$GCC"; then 39249ab56c27Smrg case $cc_basename in 39259ab56c27Smrg nvcc*) 39269ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39279ab56c27Smrg *) 39289ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39299ab56c27Smrg esac 39309ab56c27Smrg 39319ab56c27Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39329ab56c27Smrg lt_cv_prog_compiler_rtti_exceptions, 39339ab56c27Smrg [-fno-rtti -fno-exceptions], [], 39349ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39359ab56c27Smrgfi 39369ab56c27Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39379ab56c27Smrg [Compiler flag to turn off builtin functions]) 39389ab56c27Smrg])# _LT_COMPILER_NO_RTTI 393954044362Smrg 39408c9fbc29Smrg 39419ab56c27Smrg# _LT_CMD_GLOBAL_SYMBOLS 394254cef2ddSmrg# ---------------------- 39439ab56c27Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39449ab56c27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39459ab56c27SmrgAC_REQUIRE([AC_PROG_CC])dnl 39469ab56c27SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39479ab56c27SmrgAC_REQUIRE([LT_PATH_NM])dnl 39489ab56c27SmrgAC_REQUIRE([LT_PATH_LD])dnl 39499ab56c27Smrgm4_require([_LT_DECL_SED])dnl 39509ab56c27Smrgm4_require([_LT_DECL_EGREP])dnl 39519ab56c27Smrgm4_require([_LT_TAG_COMPILER])dnl 39528c9fbc29Smrg 39539ab56c27Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39549ab56c27SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39559ab56c27SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39569ab56c27Smrg[ 39579ab56c27Smrg# These are sane defaults that work on at least a few old systems. 39589ab56c27Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39598c9fbc29Smrg 39609ab56c27Smrg# Character class describing NM global symbol codes. 39619ab56c27Smrgsymcode='[[BCDEGRST]]' 39628c9fbc29Smrg 39639ab56c27Smrg# Regexp to match symbols that can be accessed directly from C. 39649ab56c27Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39658c9fbc29Smrg 39669ab56c27Smrg# Define system-specific variables. 39679ab56c27Smrgcase $host_os in 39689ab56c27Smrgaix*) 39699ab56c27Smrg symcode='[[BCDT]]' 39709ab56c27Smrg ;; 39719ab56c27Smrgcygwin* | mingw* | pw32* | cegcc*) 39729ab56c27Smrg symcode='[[ABCDGISTW]]' 39739ab56c27Smrg ;; 39749ab56c27Smrghpux*) 39759ab56c27Smrg if test ia64 = "$host_cpu"; then 39769ab56c27Smrg symcode='[[ABCDEGRST]]' 397754cef2ddSmrg fi 39789ab56c27Smrg ;; 39799ab56c27Smrgirix* | nonstopux*) 39809ab56c27Smrg symcode='[[BCDEGRST]]' 39819ab56c27Smrg ;; 39829ab56c27Smrgosf*) 39839ab56c27Smrg symcode='[[BCDEGQRST]]' 39849ab56c27Smrg ;; 39859ab56c27Smrgsolaris*) 39869ab56c27Smrg symcode='[[BDRT]]' 39879ab56c27Smrg ;; 39889ab56c27Smrgsco3.2v5*) 39899ab56c27Smrg symcode='[[DT]]' 39909ab56c27Smrg ;; 39919ab56c27Smrgsysv4.2uw2*) 39929ab56c27Smrg symcode='[[DT]]' 39939ab56c27Smrg ;; 39949ab56c27Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39959ab56c27Smrg symcode='[[ABDT]]' 39969ab56c27Smrg ;; 39979ab56c27Smrgsysv4) 39989ab56c27Smrg symcode='[[DFNSTU]]' 39999ab56c27Smrg ;; 40009ab56c27Smrgesac 400154cef2ddSmrg 40029ab56c27Smrg# If we're using GNU nm, then use its standard symbol codes. 40039ab56c27Smrgcase `$NM -V 2>&1` in 40049ab56c27Smrg*GNU* | *'with BFD'*) 40059ab56c27Smrg symcode='[[ABCDGIRSTW]]' ;; 40069ab56c27Smrgesac 40079ab56c27Smrg 40089ab56c27Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 40099ab56c27Smrg # Gets list of data symbols to import. 40109ab56c27Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 40119ab56c27Smrg # Adjust the below global symbol transforms to fixup imported variables. 40129ab56c27Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 40139ab56c27Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 40149ab56c27Smrg lt_c_name_lib_hook="\ 40159ab56c27Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 40169ab56c27Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 401754cef2ddSmrgelse 40189ab56c27Smrg # Disable hooks by default. 40199ab56c27Smrg lt_cv_sys_global_symbol_to_import= 40209ab56c27Smrg lt_cdecl_hook= 40219ab56c27Smrg lt_c_name_hook= 40229ab56c27Smrg lt_c_name_lib_hook= 402354cef2ddSmrgfi 402454cef2ddSmrg 40259ab56c27Smrg# Transform an extracted symbol line into a proper C declaration. 40269ab56c27Smrg# Some systems (esp. on ia64) link data and code symbols differently, 40279ab56c27Smrg# so use this general approach. 40289ab56c27Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 40299ab56c27Smrg$lt_cdecl_hook\ 40309ab56c27Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40319ab56c27Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40328c9fbc29Smrg 40339ab56c27Smrg# Transform an extracted symbol line into symbol name and symbol address 40349ab56c27Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 40359ab56c27Smrg$lt_c_name_hook\ 40369ab56c27Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40379ab56c27Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40388c9fbc29Smrg 40399ab56c27Smrg# Transform an extracted symbol line into symbol name with lib prefix and 40409ab56c27Smrg# symbol address. 40419ab56c27Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 40429ab56c27Smrg$lt_c_name_lib_hook\ 40439ab56c27Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40449ab56c27Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40459ab56c27Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40468c9fbc29Smrg 40479ab56c27Smrg# Handle CRLF in mingw tool chain 40489ab56c27Smrgopt_cr= 40499ab56c27Smrgcase $build_os in 40509ab56c27Smrgmingw*) 40519ab56c27Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40529ab56c27Smrg ;; 40539ab56c27Smrgesac 40548c9fbc29Smrg 40559ab56c27Smrg# Try without a prefix underscore, then with it. 40569ab56c27Smrgfor ac_symprfx in "" "_"; do 40578c9fbc29Smrg 40589ab56c27Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40599ab56c27Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40608c9fbc29Smrg 40619ab56c27Smrg # Write the raw and C identifiers. 40629ab56c27Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40639ab56c27Smrg # Fake it for dumpbin and say T for any non-static function, 40649ab56c27Smrg # D for any global variable and I for any imported variable. 40659ab56c27Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 40669ab56c27Smrg # which start with @ or ?. 40679ab56c27Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40689ab56c27Smrg" {last_section=section; section=\$ 3};"\ 40699ab56c27Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40709ab56c27Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40719ab56c27Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40729ab56c27Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40739ab56c27Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40749ab56c27Smrg" \$ 0!~/External *\|/{next};"\ 40759ab56c27Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40769ab56c27Smrg" {if(hide[section]) next};"\ 40779ab56c27Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40789ab56c27Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40799ab56c27Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40809ab56c27Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40819ab56c27Smrg" ' prfx=^$ac_symprfx]" 40829ab56c27Smrg else 40839ab56c27Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40849ab56c27Smrg fi 40859ab56c27Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 40868c9fbc29Smrg 40879ab56c27Smrg # Check to see that the pipe works correctly. 40889ab56c27Smrg pipe_works=no 40898c9fbc29Smrg 40909ab56c27Smrg rm -f conftest* 40919ab56c27Smrg cat > conftest.$ac_ext <<_LT_EOF 40929ab56c27Smrg#ifdef __cplusplus 40939ab56c27Smrgextern "C" { 40949ab56c27Smrg#endif 40959ab56c27Smrgchar nm_test_var; 40969ab56c27Smrgvoid nm_test_func(void); 40979ab56c27Smrgvoid nm_test_func(void){} 40989ab56c27Smrg#ifdef __cplusplus 40999ab56c27Smrg} 41009ab56c27Smrg#endif 41019ab56c27Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 41029ab56c27Smrg_LT_EOF 41038c9fbc29Smrg 41049ab56c27Smrg if AC_TRY_EVAL(ac_compile); then 41059ab56c27Smrg # Now try to grab the symbols. 41069ab56c27Smrg nlist=conftest.nm 41079ab56c27Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 41089ab56c27Smrg # Try sorting and uniquifying the output. 41099ab56c27Smrg if sort "$nlist" | uniq > "$nlist"T; then 41109ab56c27Smrg mv -f "$nlist"T "$nlist" 41119ab56c27Smrg else 41129ab56c27Smrg rm -f "$nlist"T 41139ab56c27Smrg fi 41148c9fbc29Smrg 41159ab56c27Smrg # Make sure that we snagged all the symbols we need. 41169ab56c27Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 41179ab56c27Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 41189ab56c27Smrg cat <<_LT_EOF > conftest.$ac_ext 41199ab56c27Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 41209ab56c27Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 41219ab56c27Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 41229ab56c27Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 41239ab56c27Smrg# define LT@&t@_DLSYM_CONST 41249ab56c27Smrg#elif defined __osf__ 41259ab56c27Smrg/* This system does not cope well with relocations in const data. */ 41269ab56c27Smrg# define LT@&t@_DLSYM_CONST 41279ab56c27Smrg#else 41289ab56c27Smrg# define LT@&t@_DLSYM_CONST const 41299ab56c27Smrg#endif 41308c9fbc29Smrg 41319ab56c27Smrg#ifdef __cplusplus 41329ab56c27Smrgextern "C" { 41339ab56c27Smrg#endif 41348c9fbc29Smrg 41359ab56c27Smrg_LT_EOF 41369ab56c27Smrg # Now generate the symbol file. 41379ab56c27Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 413854cef2ddSmrg 41399ab56c27Smrg cat <<_LT_EOF >> conftest.$ac_ext 414054cef2ddSmrg 41419ab56c27Smrg/* The mapping between symbol names and symbols. */ 41429ab56c27SmrgLT@&t@_DLSYM_CONST struct { 41439ab56c27Smrg const char *name; 41449ab56c27Smrg void *address; 41459ab56c27Smrg} 41469ab56c27Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41479ab56c27Smrg{ 41489ab56c27Smrg { "@PROGRAM@", (void *) 0 }, 41499ab56c27Smrg_LT_EOF 41509ab56c27Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41519ab56c27Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41529ab56c27Smrg {0, (void *) 0} 41539ab56c27Smrg}; 41548c9fbc29Smrg 41559ab56c27Smrg/* This works around a problem in FreeBSD linker */ 41569ab56c27Smrg#ifdef FREEBSD_WORKAROUND 41579ab56c27Smrgstatic const void *lt_preloaded_setup() { 41589ab56c27Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41599ab56c27Smrg} 41609ab56c27Smrg#endif 41619ab56c27Smrg 41629ab56c27Smrg#ifdef __cplusplus 41639ab56c27Smrg} 41649ab56c27Smrg#endif 41659ab56c27Smrg_LT_EOF 41669ab56c27Smrg # Now try linking the two files. 41679ab56c27Smrg mv conftest.$ac_objext conftstm.$ac_objext 41689ab56c27Smrg lt_globsym_save_LIBS=$LIBS 41699ab56c27Smrg lt_globsym_save_CFLAGS=$CFLAGS 41709ab56c27Smrg LIBS=conftstm.$ac_objext 41719ab56c27Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41729ab56c27Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41739ab56c27Smrg pipe_works=yes 41749ab56c27Smrg fi 41759ab56c27Smrg LIBS=$lt_globsym_save_LIBS 41769ab56c27Smrg CFLAGS=$lt_globsym_save_CFLAGS 41779ab56c27Smrg else 41789ab56c27Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41799ab56c27Smrg fi 41809ab56c27Smrg else 41819ab56c27Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41829ab56c27Smrg fi 418354cef2ddSmrg else 41849ab56c27Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41854cd6a3aeSmrg fi 41869ab56c27Smrg else 41879ab56c27Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41889ab56c27Smrg cat conftest.$ac_ext >&5 41894cd6a3aeSmrg fi 41909ab56c27Smrg rm -rf conftest* conftst* 41914cd6a3aeSmrg 41929ab56c27Smrg # Do not use the global_symbol_pipe unless it works. 41939ab56c27Smrg if test yes = "$pipe_works"; then 41949ab56c27Smrg break 41959ab56c27Smrg else 41969ab56c27Smrg lt_cv_sys_global_symbol_pipe= 41974cd6a3aeSmrg fi 41989ab56c27Smrgdone 41999ab56c27Smrg]) 42009ab56c27Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 42019ab56c27Smrg lt_cv_sys_global_symbol_to_cdecl= 42029ab56c27Smrgfi 42039ab56c27Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 42049ab56c27Smrg AC_MSG_RESULT(failed) 42059ab56c27Smrgelse 42069ab56c27Smrg AC_MSG_RESULT(ok) 42079ab56c27Smrgfi 42088c9fbc29Smrg 42099ab56c27Smrg# Response file support. 42109ab56c27Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 42119ab56c27Smrg nm_file_list_spec='@' 42129ab56c27Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 42139ab56c27Smrg nm_file_list_spec='@' 42149ab56c27Smrgfi 42159ab56c27Smrg 42169ab56c27Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 42179ab56c27Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 42189ab56c27Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 42199ab56c27Smrg [Transform the output of nm in a proper C declaration]) 42209ab56c27Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 42219ab56c27Smrg [Transform the output of nm into a list of symbols to manually relocate]) 42229ab56c27Smrg_LT_DECL([global_symbol_to_c_name_address], 42239ab56c27Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 42249ab56c27Smrg [Transform the output of nm in a C name address pair]) 42259ab56c27Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42269ab56c27Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42279ab56c27Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42289ab56c27Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42299ab56c27Smrg [The name lister interface]) 42309ab56c27Smrg_LT_DECL([], [nm_file_list_spec], [1], 42319ab56c27Smrg [Specify filename containing input files for $NM]) 42329ab56c27Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 42339ab56c27Smrg 42349ab56c27Smrg 42359ab56c27Smrg# _LT_COMPILER_PIC([TAGNAME]) 42369ab56c27Smrg# --------------------------- 42379ab56c27Smrgm4_defun([_LT_COMPILER_PIC], 42389ab56c27Smrg[m4_require([_LT_TAG_COMPILER])dnl 42399ab56c27Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42409ab56c27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42419ab56c27Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42429ab56c27Smrg 42439ab56c27Smrgm4_if([$1], [CXX], [ 42449ab56c27Smrg # C++ specific cases for pic, static, wl, etc. 42459ab56c27Smrg if test yes = "$GXX"; then 42469ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42479ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42489ab56c27Smrg 42499ab56c27Smrg case $host_os in 42509ab56c27Smrg aix*) 42519ab56c27Smrg # All AIX code is PIC. 42529ab56c27Smrg if test ia64 = "$host_cpu"; then 42539ab56c27Smrg # AIX 5 now supports IA64 processor 42549ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42559ab56c27Smrg fi 42569ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42579ab56c27Smrg ;; 42589ab56c27Smrg 42599ab56c27Smrg amigaos*) 42609ab56c27Smrg case $host_cpu in 42619ab56c27Smrg powerpc) 42629ab56c27Smrg # see comment about AmigaOS4 .so support 42639ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42649ab56c27Smrg ;; 42659ab56c27Smrg m68k) 42669ab56c27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42679ab56c27Smrg # adding the '-m68020' flag to GCC prevents building anything better, 42689ab56c27Smrg # like '-m68040'. 42699ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42709ab56c27Smrg ;; 42719ab56c27Smrg esac 42729ab56c27Smrg ;; 42739ab56c27Smrg 42749ab56c27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42759ab56c27Smrg # PIC is the default for these OSes. 42769ab56c27Smrg ;; 42779ab56c27Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42789ab56c27Smrg # This hack is so that the source file can tell whether it is being 42799ab56c27Smrg # built for inclusion in a dll (and should export symbols for example). 42809ab56c27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42819ab56c27Smrg # (--disable-auto-import) libraries 42829ab56c27Smrg m4_if([$1], [GCJ], [], 42839ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42849ab56c27Smrg case $host_os in 42859ab56c27Smrg os2*) 42869ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42879ab56c27Smrg ;; 42889ab56c27Smrg esac 42899ab56c27Smrg ;; 42909ab56c27Smrg darwin* | rhapsody*) 42919ab56c27Smrg # PIC is the default on this platform 42929ab56c27Smrg # Common symbols not allowed in MH_DYLIB files 42939ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42949ab56c27Smrg ;; 42959ab56c27Smrg *djgpp*) 42969ab56c27Smrg # DJGPP does not support shared libraries at all 42979ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42989ab56c27Smrg ;; 42999ab56c27Smrg haiku*) 43009ab56c27Smrg # PIC is the default for Haiku. 43019ab56c27Smrg # The "-static" flag exists, but is broken. 43029ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 43039ab56c27Smrg ;; 43049ab56c27Smrg interix[[3-9]]*) 43059ab56c27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 43069ab56c27Smrg # Instead, we relocate shared libraries at runtime. 43079ab56c27Smrg ;; 43089ab56c27Smrg sysv4*MP*) 43099ab56c27Smrg if test -d /usr/nec; then 43109ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43119ab56c27Smrg fi 43129ab56c27Smrg ;; 43139ab56c27Smrg hpux*) 43149ab56c27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 43159ab56c27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 43169ab56c27Smrg # sets the default TLS model and affects inlining. 43179ab56c27Smrg case $host_cpu in 43189ab56c27Smrg hppa*64*) 43199ab56c27Smrg ;; 43209ab56c27Smrg *) 43219ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43229ab56c27Smrg ;; 43239ab56c27Smrg esac 43249ab56c27Smrg ;; 43259ab56c27Smrg *qnx* | *nto*) 43269ab56c27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43279ab56c27Smrg # it will coredump. 43289ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43299ab56c27Smrg ;; 43309ab56c27Smrg *) 43319ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43329ab56c27Smrg ;; 43339ab56c27Smrg esac 43349ab56c27Smrg else 43359ab56c27Smrg case $host_os in 43369ab56c27Smrg aix[[4-9]]*) 43379ab56c27Smrg # All AIX code is PIC. 43389ab56c27Smrg if test ia64 = "$host_cpu"; then 43399ab56c27Smrg # AIX 5 now supports IA64 processor 43409ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43419ab56c27Smrg else 43429ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43439ab56c27Smrg fi 43449ab56c27Smrg ;; 43459ab56c27Smrg chorus*) 43469ab56c27Smrg case $cc_basename in 43479ab56c27Smrg cxch68*) 43489ab56c27Smrg # Green Hills C++ Compiler 43499ab56c27Smrg # _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" 43509ab56c27Smrg ;; 435154cef2ddSmrg esac 435254cef2ddSmrg ;; 43539ab56c27Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43549ab56c27Smrg # This hack is so that the source file can tell whether it is being 43559ab56c27Smrg # built for inclusion in a dll (and should export symbols for example). 43569ab56c27Smrg m4_if([$1], [GCJ], [], 43579ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43589ab56c27Smrg ;; 43599ab56c27Smrg dgux*) 43609ab56c27Smrg case $cc_basename in 43619ab56c27Smrg ec++*) 43629ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 436354cef2ddSmrg ;; 43649ab56c27Smrg ghcx*) 43659ab56c27Smrg # Green Hills C++ Compiler 43669ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 436754cef2ddSmrg ;; 43689ab56c27Smrg *) 436954cef2ddSmrg ;; 43709ab56c27Smrg esac 43719ab56c27Smrg ;; 43729ab56c27Smrg freebsd* | dragonfly* | midnightbsd*) 43739ab56c27Smrg # FreeBSD uses GNU C++ 43749ab56c27Smrg ;; 43759ab56c27Smrg hpux9* | hpux10* | hpux11*) 43769ab56c27Smrg case $cc_basename in 43779ab56c27Smrg CC*) 43789ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43799ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43809ab56c27Smrg if test ia64 != "$host_cpu"; then 43819ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43829ab56c27Smrg fi 438354cef2ddSmrg ;; 43849ab56c27Smrg aCC*) 43859ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43869ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43879ab56c27Smrg case $host_cpu in 43889ab56c27Smrg hppa*64*|ia64*) 43899ab56c27Smrg # +Z the default 43909ab56c27Smrg ;; 43919ab56c27Smrg *) 43929ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43939ab56c27Smrg ;; 43949ab56c27Smrg esac 439554cef2ddSmrg ;; 43969ab56c27Smrg *) 439754cef2ddSmrg ;; 439854cef2ddSmrg esac 439954cef2ddSmrg ;; 44009ab56c27Smrg interix*) 44019ab56c27Smrg # This is c89, which is MS Visual C++ (no shared libs) 44029ab56c27Smrg # Anyone wants to do a port? 44039ab56c27Smrg ;; 44049ab56c27Smrg irix5* | irix6* | nonstopux*) 44059ab56c27Smrg case $cc_basename in 44069ab56c27Smrg CC*) 44079ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44089ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44099ab56c27Smrg # CC pic flag -KPIC is the default. 44109ab56c27Smrg ;; 44119ab56c27Smrg *) 44129ab56c27Smrg ;; 44139ab56c27Smrg esac 44149ab56c27Smrg ;; 44159ab56c27Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 44169ab56c27Smrg case $cc_basename in 44179ab56c27Smrg KCC*) 44189ab56c27Smrg # KAI C++ Compiler 44199ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44209ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44219ab56c27Smrg ;; 44229ab56c27Smrg ecpc* ) 44239ab56c27Smrg # old Intel C++ for x86_64, which still supported -KPIC. 44249ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44259ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44269ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44279ab56c27Smrg ;; 44289ab56c27Smrg icpc* ) 44299ab56c27Smrg # Intel C++, used to be incompatible with GCC. 44309ab56c27Smrg # ICC 10 doesn't accept -KPIC any more. 44319ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44329ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44339ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44349ab56c27Smrg ;; 44359ab56c27Smrg pgCC* | pgcpp*) 44369ab56c27Smrg # Portland Group C++ compiler 44379ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44389ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44399ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44409ab56c27Smrg ;; 44419ab56c27Smrg cxx*) 44429ab56c27Smrg # Compaq C++ 44439ab56c27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44449ab56c27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44459ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44469ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44479ab56c27Smrg ;; 44489ab56c27Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44499ab56c27Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44509ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44519ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44529ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44539ab56c27Smrg ;; 44549ab56c27Smrg *) 44559ab56c27Smrg case `$CC -V 2>&1 | $SED 5q` in 44569ab56c27Smrg *Sun\ C*) 44579ab56c27Smrg # Sun C++ 5.9 44589ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44599ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44609ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44619ab56c27Smrg ;; 44629ab56c27Smrg esac 44639ab56c27Smrg ;; 44649ab56c27Smrg esac 44659ab56c27Smrg ;; 44669ab56c27Smrg lynxos*) 44679ab56c27Smrg ;; 44689ab56c27Smrg m88k*) 44699ab56c27Smrg ;; 44709ab56c27Smrg mvs*) 44719ab56c27Smrg case $cc_basename in 44729ab56c27Smrg cxx*) 44739ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44749ab56c27Smrg ;; 44759ab56c27Smrg *) 44769ab56c27Smrg ;; 44779ab56c27Smrg esac 44789ab56c27Smrg ;; 44799ab56c27Smrg netbsd*) 44809ab56c27Smrg ;; 44819ab56c27Smrg *qnx* | *nto*) 44829ab56c27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44839ab56c27Smrg # it will coredump. 44849ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 448554cef2ddSmrg ;; 44869ab56c27Smrg osf3* | osf4* | osf5*) 44879ab56c27Smrg case $cc_basename in 44889ab56c27Smrg KCC*) 44899ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44909ab56c27Smrg ;; 44919ab56c27Smrg RCC*) 44929ab56c27Smrg # Rational C++ 2.4.1 44939ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44949ab56c27Smrg ;; 44959ab56c27Smrg cxx*) 44969ab56c27Smrg # Digital/Compaq C++ 44979ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44989ab56c27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44999ab56c27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 45009ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45019ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 45029ab56c27Smrg ;; 45039ab56c27Smrg *) 45049ab56c27Smrg ;; 45059ab56c27Smrg esac 45069ab56c27Smrg ;; 45079ab56c27Smrg psos*) 45089ab56c27Smrg ;; 45099ab56c27Smrg solaris*) 45109ab56c27Smrg case $cc_basename in 45119ab56c27Smrg CC* | sunCC*) 45129ab56c27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 45139ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45149ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45159ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 45169ab56c27Smrg ;; 45179ab56c27Smrg gcx*) 45189ab56c27Smrg # Green Hills C++ Compiler 45199ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 45209ab56c27Smrg ;; 45219ab56c27Smrg *) 45229ab56c27Smrg ;; 45239ab56c27Smrg esac 45249ab56c27Smrg ;; 45259ab56c27Smrg sunos4*) 45269ab56c27Smrg case $cc_basename in 45279ab56c27Smrg CC*) 45289ab56c27Smrg # Sun C++ 4.x 45299ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45309ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45319ab56c27Smrg ;; 45329ab56c27Smrg lcc*) 45339ab56c27Smrg # Lucid 45349ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45359ab56c27Smrg ;; 45369ab56c27Smrg *) 45379ab56c27Smrg ;; 45389ab56c27Smrg esac 45399ab56c27Smrg ;; 45409ab56c27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45419ab56c27Smrg case $cc_basename in 45429ab56c27Smrg CC*) 45439ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45449ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45459ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45469ab56c27Smrg ;; 45479ab56c27Smrg esac 45489ab56c27Smrg ;; 45499ab56c27Smrg tandem*) 45509ab56c27Smrg case $cc_basename in 45519ab56c27Smrg NCC*) 45529ab56c27Smrg # NonStop-UX NCC 3.20 45539ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45549ab56c27Smrg ;; 45559ab56c27Smrg *) 45569ab56c27Smrg ;; 45579ab56c27Smrg esac 45589ab56c27Smrg ;; 45599ab56c27Smrg vxworks*) 45609ab56c27Smrg ;; 456154cef2ddSmrg *) 45629ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 456354cef2ddSmrg ;; 456454cef2ddSmrg esac 456554cef2ddSmrg fi 45669ab56c27Smrg], 45679ab56c27Smrg[ 45689ab56c27Smrg if test yes = "$GCC"; then 45699ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45709ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45718c9fbc29Smrg 45729ab56c27Smrg case $host_os in 45739ab56c27Smrg aix*) 45749ab56c27Smrg # All AIX code is PIC. 45759ab56c27Smrg if test ia64 = "$host_cpu"; then 45769ab56c27Smrg # AIX 5 now supports IA64 processor 45779ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45789ab56c27Smrg fi 45799ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45809ab56c27Smrg ;; 45818c9fbc29Smrg 45829ab56c27Smrg amigaos*) 45839ab56c27Smrg case $host_cpu in 45849ab56c27Smrg powerpc) 45859ab56c27Smrg # see comment about AmigaOS4 .so support 45869ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45879ab56c27Smrg ;; 45889ab56c27Smrg m68k) 45899ab56c27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45909ab56c27Smrg # adding the '-m68020' flag to GCC prevents building anything better, 45919ab56c27Smrg # like '-m68040'. 45929ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45939ab56c27Smrg ;; 45949ab56c27Smrg esac 45959ab56c27Smrg ;; 45968c9fbc29Smrg 45979ab56c27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45989ab56c27Smrg # PIC is the default for these OSes. 45999ab56c27Smrg ;; 46008c9fbc29Smrg 46019ab56c27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46029ab56c27Smrg # This hack is so that the source file can tell whether it is being 46039ab56c27Smrg # built for inclusion in a dll (and should export symbols for example). 46049ab56c27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 46059ab56c27Smrg # (--disable-auto-import) libraries 46069ab56c27Smrg m4_if([$1], [GCJ], [], 46079ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46089ab56c27Smrg case $host_os in 46099ab56c27Smrg os2*) 46109ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46119ab56c27Smrg ;; 46129ab56c27Smrg esac 46139ab56c27Smrg ;; 46148c9fbc29Smrg 46159ab56c27Smrg darwin* | rhapsody*) 46169ab56c27Smrg # PIC is the default on this platform 46179ab56c27Smrg # Common symbols not allowed in MH_DYLIB files 46189ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46199ab56c27Smrg ;; 46204cd6a3aeSmrg 46219ab56c27Smrg haiku*) 46229ab56c27Smrg # PIC is the default for Haiku. 46239ab56c27Smrg # The "-static" flag exists, but is broken. 46249ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46259ab56c27Smrg ;; 46264cd6a3aeSmrg 46279ab56c27Smrg hpux*) 46289ab56c27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46299ab56c27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46309ab56c27Smrg # sets the default TLS model and affects inlining. 46319ab56c27Smrg case $host_cpu in 46329ab56c27Smrg hppa*64*) 46339ab56c27Smrg # +Z the default 46349ab56c27Smrg ;; 46359ab56c27Smrg *) 46369ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46379ab56c27Smrg ;; 46389ab56c27Smrg esac 46399ab56c27Smrg ;; 46404cd6a3aeSmrg 46419ab56c27Smrg interix[[3-9]]*) 46429ab56c27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46439ab56c27Smrg # Instead, we relocate shared libraries at runtime. 46449ab56c27Smrg ;; 464554cef2ddSmrg 46469ab56c27Smrg msdosdjgpp*) 46479ab56c27Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46489ab56c27Smrg # on systems that don't support them. 46499ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46509ab56c27Smrg enable_shared=no 46519ab56c27Smrg ;; 465254cef2ddSmrg 46539ab56c27Smrg *nto* | *qnx*) 46549ab56c27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46559ab56c27Smrg # it will coredump. 46569ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46579ab56c27Smrg ;; 465854cef2ddSmrg 46599ab56c27Smrg sysv4*MP*) 46609ab56c27Smrg if test -d /usr/nec; then 46619ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46629ab56c27Smrg fi 46639ab56c27Smrg ;; 46648c9fbc29Smrg 46659ab56c27Smrg *) 46669ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46679ab56c27Smrg ;; 46689ab56c27Smrg esac 46698c9fbc29Smrg 46709ab56c27Smrg case $cc_basename in 46719ab56c27Smrg nvcc*) # Cuda Compiler Driver 2.2 46729ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46739ab56c27Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46749ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46759ab56c27Smrg fi 46769ab56c27Smrg ;; 46779ab56c27Smrg esac 46789ab56c27Smrg else 46799ab56c27Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46809ab56c27Smrg case $host_os in 46819ab56c27Smrg aix*) 46829ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46839ab56c27Smrg if test ia64 = "$host_cpu"; then 46849ab56c27Smrg # AIX 5 now supports IA64 processor 46859ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46869ab56c27Smrg else 46879ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46889ab56c27Smrg fi 46899ab56c27Smrg ;; 46908c9fbc29Smrg 46919ab56c27Smrg darwin* | rhapsody*) 46929ab56c27Smrg # PIC is the default on this platform 46939ab56c27Smrg # Common symbols not allowed in MH_DYLIB files 46949ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46959ab56c27Smrg case $cc_basename in 46969ab56c27Smrg nagfor*) 46979ab56c27Smrg # NAG Fortran compiler 46989ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46999ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47009ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47019ab56c27Smrg ;; 47029ab56c27Smrg esac 47039ab56c27Smrg ;; 470454cef2ddSmrg 47059ab56c27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 47069ab56c27Smrg # This hack is so that the source file can tell whether it is being 47079ab56c27Smrg # built for inclusion in a dll (and should export symbols for example). 47089ab56c27Smrg m4_if([$1], [GCJ], [], 47099ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 47109ab56c27Smrg case $host_os in 47119ab56c27Smrg os2*) 47129ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 47139ab56c27Smrg ;; 47149ab56c27Smrg esac 47159ab56c27Smrg ;; 47168c9fbc29Smrg 47179ab56c27Smrg hpux9* | hpux10* | hpux11*) 47189ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47199ab56c27Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 47209ab56c27Smrg # not for PA HP-UX. 47219ab56c27Smrg case $host_cpu in 47229ab56c27Smrg hppa*64*|ia64*) 47239ab56c27Smrg # +Z the default 47249ab56c27Smrg ;; 47259ab56c27Smrg *) 47269ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47279ab56c27Smrg ;; 47289ab56c27Smrg esac 47299ab56c27Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47309ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47319ab56c27Smrg ;; 473254cef2ddSmrg 47339ab56c27Smrg irix5* | irix6* | nonstopux*) 47349ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47359ab56c27Smrg # PIC (with -KPIC) is the default. 47369ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47379ab56c27Smrg ;; 473854cef2ddSmrg 47399ab56c27Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47409ab56c27Smrg case $cc_basename in 47419ab56c27Smrg # old Intel for x86_64, which still supported -KPIC. 47429ab56c27Smrg ecc*) 47439ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47449ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47459ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47469ab56c27Smrg ;; 47479ab56c27Smrg # icc used to be incompatible with GCC. 47489ab56c27Smrg # ICC 10 doesn't accept -KPIC any more. 47499ab56c27Smrg icc* | ifort*) 47509ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47519ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47529ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47539ab56c27Smrg ;; 47549ab56c27Smrg # Lahey Fortran 8.1. 47559ab56c27Smrg lf95*) 47569ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47579ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47589ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47599ab56c27Smrg ;; 47609ab56c27Smrg nagfor*) 47619ab56c27Smrg # NAG Fortran compiler 47629ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47639ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47649ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47659ab56c27Smrg ;; 47669ab56c27Smrg tcc*) 47679ab56c27Smrg # Fabrice Bellard et al's Tiny C Compiler 47689ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47699ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47709ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47719ab56c27Smrg ;; 47729ab56c27Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47739ab56c27Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47749ab56c27Smrg # which looks to be a dead project) 47759ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47769ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47779ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47789ab56c27Smrg ;; 47799ab56c27Smrg ccc*) 47809ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47819ab56c27Smrg # All Alpha code is PIC. 47829ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47839ab56c27Smrg ;; 47849ab56c27Smrg xl* | bgxl* | bgf* | mpixl*) 47859ab56c27Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47869ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47879ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47889ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47899ab56c27Smrg ;; 47909ab56c27Smrg *) 47919ab56c27Smrg case `$CC -V 2>&1 | $SED 5q` in 47929ab56c27Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47939ab56c27Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47949ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47959ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47969ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47979ab56c27Smrg ;; 47989ab56c27Smrg *Sun\ F* | *Sun*Fortran*) 47999ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48009ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48019ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48029ab56c27Smrg ;; 48039ab56c27Smrg *Sun\ C*) 48049ab56c27Smrg # Sun C 5.9 48059ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48069ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48079ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48089ab56c27Smrg ;; 48099ab56c27Smrg *Intel*\ [[CF]]*Compiler*) 48109ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48119ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 48129ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 48139ab56c27Smrg ;; 48149ab56c27Smrg *Portland\ Group*) 48159ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48169ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 48179ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48189ab56c27Smrg ;; 48199ab56c27Smrg esac 48209ab56c27Smrg ;; 48219ab56c27Smrg esac 48229ab56c27Smrg ;; 48238c9fbc29Smrg 48249ab56c27Smrg newsos6) 48259ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48269ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48279ab56c27Smrg ;; 48288c9fbc29Smrg 48299ab56c27Smrg *nto* | *qnx*) 48309ab56c27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48319ab56c27Smrg # it will coredump. 48329ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48339ab56c27Smrg ;; 48348c9fbc29Smrg 48359ab56c27Smrg osf3* | osf4* | osf5*) 48369ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48379ab56c27Smrg # All OSF/1 code is PIC. 48389ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48399ab56c27Smrg ;; 48404cd6a3aeSmrg 48419ab56c27Smrg rdos*) 48429ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48439ab56c27Smrg ;; 48444cd6a3aeSmrg 48459ab56c27Smrg solaris*) 48469ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48479ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48489ab56c27Smrg case $cc_basename in 48499ab56c27Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48509ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48519ab56c27Smrg *) 48529ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48539ab56c27Smrg esac 48549ab56c27Smrg ;; 48554cd6a3aeSmrg 48569ab56c27Smrg sunos4*) 48579ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48589ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48599ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48609ab56c27Smrg ;; 48614cd6a3aeSmrg 48629ab56c27Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48639ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48649ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48659ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48669ab56c27Smrg ;; 48674cd6a3aeSmrg 48689ab56c27Smrg sysv4*MP*) 48699ab56c27Smrg if test -d /usr/nec; then 48709ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48719ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48729ab56c27Smrg fi 48739ab56c27Smrg ;; 48748c9fbc29Smrg 48759ab56c27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48769ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48779ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48789ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48799ab56c27Smrg ;; 48808c9fbc29Smrg 48819ab56c27Smrg unicos*) 48829ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48839ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48849ab56c27Smrg ;; 48858c9fbc29Smrg 48869ab56c27Smrg uts4*) 48879ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48889ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48899ab56c27Smrg ;; 48908c9fbc29Smrg 48919ab56c27Smrg *) 48929ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48939ab56c27Smrg ;; 48949ab56c27Smrg esac 48959ab56c27Smrg fi 48969ab56c27Smrg]) 48979ab56c27Smrgcase $host_os in 48989ab56c27Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48999ab56c27Smrg *djgpp*) 49009ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 490154cef2ddSmrg ;; 49029ab56c27Smrg *) 49039ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 490454cef2ddSmrg ;; 49059ab56c27Smrgesac 49069ab56c27Smrg 49079ab56c27SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 49089ab56c27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 49099ab56c27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 49109ab56c27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 49119ab56c27Smrg 49129ab56c27Smrg# 49139ab56c27Smrg# Check to make sure the PIC flag actually works. 49149ab56c27Smrg# 49159ab56c27Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 49169ab56c27Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 49179ab56c27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 49189ab56c27Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 49199ab56c27Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 49209ab56c27Smrg "" | " "*) ;; 49219ab56c27Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 49229ab56c27Smrg esac], 49239ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49249ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49259ab56c27Smrgfi 49269ab56c27Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49279ab56c27Smrg [Additional compiler flags for building library objects]) 49289ab56c27Smrg 49299ab56c27Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49309ab56c27Smrg [How to pass a linker flag through the compiler]) 49319ab56c27Smrg# 49329ab56c27Smrg# Check to make sure the static flag actually works. 49339ab56c27Smrg# 49349ab56c27Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49359ab56c27Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49369ab56c27Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49379ab56c27Smrg $lt_tmp_static_flag, 49389ab56c27Smrg [], 49399ab56c27Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49409ab56c27Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49419ab56c27Smrg [Compiler flag to prevent dynamic linking]) 49429ab56c27Smrg])# _LT_COMPILER_PIC 49439ab56c27Smrg 49449ab56c27Smrg 49459ab56c27Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49469ab56c27Smrg# ---------------------------- 49479ab56c27Smrg# See if the linker supports building shared libraries. 49489ab56c27Smrgm4_defun([_LT_LINKER_SHLIBS], 49499ab56c27Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49509ab56c27SmrgAC_REQUIRE([LT_PATH_NM])dnl 49519ab56c27Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49529ab56c27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49539ab56c27Smrgm4_require([_LT_DECL_EGREP])dnl 49549ab56c27Smrgm4_require([_LT_DECL_SED])dnl 49559ab56c27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49569ab56c27Smrgm4_require([_LT_TAG_COMPILER])dnl 49579ab56c27SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49589ab56c27Smrgm4_if([$1], [CXX], [ 49599ab56c27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49609ab56c27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49619ab56c27Smrg case $host_os in 49629ab56c27Smrg aix[[4-9]]*) 49639ab56c27Smrg # If we're using GNU nm, then we don't want the "-C" option. 49649ab56c27Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49659ab56c27Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49669ab56c27Smrg # weak defined symbols like other global defined symbols, whereas 49679ab56c27Smrg # GNU nm marks them as "W". 49689ab56c27Smrg # While the 'weak' keyword is ignored in the Export File, we need 49699ab56c27Smrg # it in the Import File for the 'aix-soname' feature, so we have 49709ab56c27Smrg # to replace the "-B" option with "-P" for AIX nm. 49719ab56c27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49729ab56c27Smrg _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' 497354cef2ddSmrg else 49749ab56c27Smrg _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' 497554cef2ddSmrg fi 497654cef2ddSmrg ;; 49779ab56c27Smrg pw32*) 49789ab56c27Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49799ab56c27Smrg ;; 49809ab56c27Smrg cygwin* | mingw* | cegcc*) 49819ab56c27Smrg case $cc_basename in 49829ab56c27Smrg cl* | icl*) 49839ab56c27Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49849ab56c27Smrg ;; 49859ab56c27Smrg *) 49869ab56c27Smrg _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' 49879ab56c27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49889ab56c27Smrg ;; 49899ab56c27Smrg esac 49909ab56c27Smrg ;; 499154cef2ddSmrg *) 49929ab56c27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 499354cef2ddSmrg ;; 499454cef2ddSmrg esac 49959ab56c27Smrg], [ 49969ab56c27Smrg runpath_var= 49979ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49989ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49999ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)= 50009ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 50019ab56c27Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 50029ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 50039ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 50049ab56c27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 50059ab56c27Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 50069ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 50079ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 50089ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 50099ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50109ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 50119ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 50129ab56c27Smrg _LT_TAGVAR(inherit_rpath, $1)=no 50139ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 50149ab56c27Smrg _LT_TAGVAR(module_cmds, $1)= 50159ab56c27Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 50169ab56c27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 50179ab56c27Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 50189ab56c27Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 50199ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50209ab56c27Smrg # include_expsyms should be a list of space-separated symbols to be *always* 50219ab56c27Smrg # included in the symbol list 50229ab56c27Smrg _LT_TAGVAR(include_expsyms, $1)= 50239ab56c27Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 50249ab56c27Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50259ab56c27Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50269ab56c27Smrg # as well as any symbol that contains 'd'. 50279ab56c27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50289ab56c27Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50299ab56c27Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 50309ab56c27Smrg # the symbol is explicitly referenced. Since portable code cannot 50319ab56c27Smrg # rely on this symbol name, it's probably fine to never include it in 50329ab56c27Smrg # preloaded symbol tables. 50339ab56c27Smrg # Exclude shared library initialization/finalization symbols. 50349ab56c27Smrgdnl Note also adjust exclude_expsyms for C++ above. 50359ab56c27Smrg extract_expsyms_cmds= 50368c9fbc29Smrg 50379ab56c27Smrg case $host_os in 50389ab56c27Smrg cygwin* | mingw* | pw32* | cegcc*) 50399ab56c27Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 50409ab56c27Smrg # When not using gcc, we currently assume that we are using 50419ab56c27Smrg # Microsoft Visual C++ or Intel C++ Compiler. 50429ab56c27Smrg if test yes != "$GCC"; then 50439ab56c27Smrg with_gnu_ld=no 50449ab56c27Smrg fi 50459ab56c27Smrg ;; 50469ab56c27Smrg interix*) 50479ab56c27Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 50489ab56c27Smrg with_gnu_ld=yes 50499ab56c27Smrg ;; 50509ab56c27Smrg openbsd* | bitrig*) 50519ab56c27Smrg with_gnu_ld=no 50529ab56c27Smrg ;; 50539ab56c27Smrg esac 50548c9fbc29Smrg 50559ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50568c9fbc29Smrg 50579ab56c27Smrg # On some targets, GNU ld is compatible enough with the native linker 50589ab56c27Smrg # that we're better off using the native interface for both. 50599ab56c27Smrg lt_use_gnu_ld_interface=no 50609ab56c27Smrg if test yes = "$with_gnu_ld"; then 50619ab56c27Smrg case $host_os in 50629ab56c27Smrg aix*) 50639ab56c27Smrg # The AIX port of GNU ld has always aspired to compatibility 50649ab56c27Smrg # with the native linker. However, as the warning in the GNU ld 50659ab56c27Smrg # block says, versions before 2.19.5* couldn't really create working 50669ab56c27Smrg # shared libraries, regardless of the interface used. 50679ab56c27Smrg case `$LD -v 2>&1` in 50689ab56c27Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50699ab56c27Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50709ab56c27Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50719ab56c27Smrg *) 50729ab56c27Smrg lt_use_gnu_ld_interface=yes 50739ab56c27Smrg ;; 50749ab56c27Smrg esac 50759ab56c27Smrg ;; 50769ab56c27Smrg *) 50779ab56c27Smrg lt_use_gnu_ld_interface=yes 50789ab56c27Smrg ;; 50799ab56c27Smrg esac 50809ab56c27Smrg fi 50814cd6a3aeSmrg 50829ab56c27Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50839ab56c27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50849ab56c27Smrg wlarc='$wl' 50858c9fbc29Smrg 50869ab56c27Smrg # Set some defaults for GNU ld with shared library support. These 50879ab56c27Smrg # are reset later if shared libraries are not supported. Putting them 50889ab56c27Smrg # here allows them to be overridden if necessary. 50899ab56c27Smrg runpath_var=LD_RUN_PATH 50909ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50919ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50929ab56c27Smrg # ancient GNU ld didn't support --whole-archive et. al. 50939ab56c27Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50949ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50959ab56c27Smrg else 50969ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50979ab56c27Smrg fi 50989ab56c27Smrg supports_anon_versioning=no 50999ab56c27Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 51009ab56c27Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 51019ab56c27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 51029ab56c27Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 51039ab56c27Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 51049ab56c27Smrg *\ 2.11.*) ;; # other 2.11 versions 51059ab56c27Smrg *) supports_anon_versioning=yes ;; 51069ab56c27Smrg esac 51078c9fbc29Smrg 51089ab56c27Smrg # See if GNU ld supports shared libraries. 51099ab56c27Smrg case $host_os in 51109ab56c27Smrg aix[[3-9]]*) 51119ab56c27Smrg # On AIX/PPC, the GNU linker is very broken 51129ab56c27Smrg if test ia64 != "$host_cpu"; then 51139ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51149ab56c27Smrg cat <<_LT_EOF 1>&2 51158c9fbc29Smrg 51169ab56c27Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 51179ab56c27Smrg*** to be unable to reliably create shared libraries on AIX. 51189ab56c27Smrg*** Therefore, libtool is disabling shared libraries support. If you 51199ab56c27Smrg*** really care for shared libraries, you may want to install binutils 51209ab56c27Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 51219ab56c27Smrg*** You will then need to restart the configuration process. 51224cd6a3aeSmrg 51239ab56c27Smrg_LT_EOF 51249ab56c27Smrg fi 51259ab56c27Smrg ;; 51268c9fbc29Smrg 51279ab56c27Smrg amigaos*) 51289ab56c27Smrg case $host_cpu in 51299ab56c27Smrg powerpc) 51309ab56c27Smrg # see comment about AmigaOS4 .so support 51319ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51329ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51339ab56c27Smrg ;; 51349ab56c27Smrg m68k) 51359ab56c27Smrg _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)' 51369ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51379ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51389ab56c27Smrg ;; 51399ab56c27Smrg esac 51409ab56c27Smrg ;; 51418c9fbc29Smrg 51429ab56c27Smrg beos*) 51439ab56c27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51449ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51459ab56c27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51469ab56c27Smrg # support --undefined. This deserves some investigation. FIXME 51479ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51489ab56c27Smrg else 51499ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51509ab56c27Smrg fi 51519ab56c27Smrg ;; 51524cd6a3aeSmrg 51539ab56c27Smrg cygwin* | mingw* | pw32* | cegcc*) 51549ab56c27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51559ab56c27Smrg # as there is no search path for DLLs. 51569ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51579ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51589ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51599ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51609ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51619ab56c27Smrg _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' 51629ab56c27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51634cd6a3aeSmrg 51649ab56c27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51659ab56c27Smrg _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' 51669ab56c27Smrg # If the export-symbols file already is a .def file, use it as 51679ab56c27Smrg # is; otherwise, prepend EXPORTS... 51689ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51699ab56c27Smrg cp $export_symbols $output_objdir/$soname.def; 51709ab56c27Smrg else 51719ab56c27Smrg echo EXPORTS > $output_objdir/$soname.def; 51729ab56c27Smrg cat $export_symbols >> $output_objdir/$soname.def; 51739ab56c27Smrg fi~ 51749ab56c27Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 517554cef2ddSmrg else 51769ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51779ab56c27Smrg fi 51789ab56c27Smrg ;; 51794cd6a3aeSmrg 51809ab56c27Smrg haiku*) 51819ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51829ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51839ab56c27Smrg ;; 51844e411241Smrg 51859ab56c27Smrg os2*) 51869ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51879ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51889ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51899ab56c27Smrg shrext_cmds=.dll 51909ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51919ab56c27Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51929ab56c27Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51939ab56c27Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51949ab56c27Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51959ab56c27Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51969ab56c27Smrg emximp -o $lib $output_objdir/$libname.def' 51979ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51989ab56c27Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51999ab56c27Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 52009ab56c27Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 52019ab56c27Smrg prefix_cmds="$SED"~ 52029ab56c27Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 52039ab56c27Smrg prefix_cmds="$prefix_cmds -e 1d"; 52049ab56c27Smrg fi~ 52059ab56c27Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 52069ab56c27Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 52079ab56c27Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 52089ab56c27Smrg emximp -o $lib $output_objdir/$libname.def' 52099ab56c27Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 52109ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 52119ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='@' 52129ab56c27Smrg ;; 52138c9fbc29Smrg 52149ab56c27Smrg interix[[3-9]]*) 52159ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 52169ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52179ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 52189ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 52199ab56c27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 52209ab56c27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 52219ab56c27Smrg # default) and relocated if they conflict, which is a slow very memory 52229ab56c27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 52239ab56c27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 52249ab56c27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 52259ab56c27Smrg _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' 52269ab56c27Smrg _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' 52279ab56c27Smrg ;; 52288c9fbc29Smrg 52299ab56c27Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52309ab56c27Smrg tmp_diet=no 52319ab56c27Smrg if test linux-dietlibc = "$host_os"; then 52329ab56c27Smrg case $cc_basename in 52339ab56c27Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52349ab56c27Smrg esac 52359ab56c27Smrg fi 52369ab56c27Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52379ab56c27Smrg && test no = "$tmp_diet" 52389ab56c27Smrg then 52399ab56c27Smrg tmp_addflag=' $pic_flag' 52409ab56c27Smrg tmp_sharedflag='-shared' 52419ab56c27Smrg case $cc_basename,$host_cpu in 52429ab56c27Smrg pgcc*) # Portland Group C compiler 52439ab56c27Smrg _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' 52449ab56c27Smrg tmp_addflag=' $pic_flag' 52459ab56c27Smrg ;; 52469ab56c27Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52479ab56c27Smrg # Portland Group f77 and f90 compilers 52489ab56c27Smrg _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' 52499ab56c27Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52509ab56c27Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52519ab56c27Smrg tmp_addflag=' -i_dynamic' ;; 52529ab56c27Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52539ab56c27Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52549ab56c27Smrg ifc* | ifort*) # Intel Fortran compiler 52559ab56c27Smrg tmp_addflag=' -nofor_main' ;; 52569ab56c27Smrg lf95*) # Lahey Fortran 8.1 52579ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52589ab56c27Smrg tmp_sharedflag='--shared' ;; 52599ab56c27Smrg nagfor*) # NAGFOR 5.3 52609ab56c27Smrg tmp_sharedflag='-Wl,-shared' ;; 52619ab56c27Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52629ab56c27Smrg tmp_sharedflag='-qmkshrobj' 52639ab56c27Smrg tmp_addflag= ;; 52649ab56c27Smrg nvcc*) # Cuda Compiler Driver 2.2 52659ab56c27Smrg _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' 52669ab56c27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52679ab56c27Smrg ;; 52689ab56c27Smrg esac 52699ab56c27Smrg case `$CC -V 2>&1 | $SED 5q` in 52709ab56c27Smrg *Sun\ C*) # Sun C 5.9 52719ab56c27Smrg _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' 52729ab56c27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52739ab56c27Smrg tmp_sharedflag='-G' ;; 52749ab56c27Smrg *Sun\ F*) # Sun Fortran 8.3 52759ab56c27Smrg tmp_sharedflag='-G' ;; 52769ab56c27Smrg esac 52779ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52784cd6a3aeSmrg 52799ab56c27Smrg if test yes = "$supports_anon_versioning"; then 52809ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52819ab56c27Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52829ab56c27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52839ab56c27Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52849ab56c27Smrg fi 52858c9fbc29Smrg 52869ab56c27Smrg case $cc_basename in 52879ab56c27Smrg tcc*) 52889ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52899ab56c27Smrg ;; 52909ab56c27Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52919ab56c27Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52929ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52939ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52949ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52959ab56c27Smrg if test yes = "$supports_anon_versioning"; then 52969ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52979ab56c27Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52989ab56c27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52999ab56c27Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 53009ab56c27Smrg fi 53019ab56c27Smrg ;; 53029ab56c27Smrg esac 53039ab56c27Smrg else 53049ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53059ab56c27Smrg fi 53069ab56c27Smrg ;; 530754cef2ddSmrg 53089ab56c27Smrg netbsd*) 53099ab56c27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53109ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 53119ab56c27Smrg wlarc= 53129ab56c27Smrg else 53139ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53149ab56c27Smrg _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' 53159ab56c27Smrg fi 53169ab56c27Smrg ;; 53178c9fbc29Smrg 53189ab56c27Smrg solaris*) 53199ab56c27Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 53209ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53219ab56c27Smrg cat <<_LT_EOF 1>&2 53228c9fbc29Smrg 53239ab56c27Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 53249ab56c27Smrg*** create shared libraries on Solaris systems. Therefore, libtool 53259ab56c27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53269ab56c27Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 53279ab56c27Smrg*** your PATH or compiler configuration so that the native linker is 53289ab56c27Smrg*** used, and then restart. 53298c9fbc29Smrg 53309ab56c27Smrg_LT_EOF 53319ab56c27Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53329ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53339ab56c27Smrg _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' 53349ab56c27Smrg else 53359ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53369ab56c27Smrg fi 53379ab56c27Smrg ;; 53384cd6a3aeSmrg 53399ab56c27Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53409ab56c27Smrg case `$LD -v 2>&1` in 53419ab56c27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53429ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53439ab56c27Smrg cat <<_LT_EOF 1>&2 53448c9fbc29Smrg 53459ab56c27Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53469ab56c27Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53479ab56c27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53489ab56c27Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53499ab56c27Smrg*** your PATH or compiler configuration so that the native linker is 53509ab56c27Smrg*** used, and then restart. 53514cd6a3aeSmrg 53529ab56c27Smrg_LT_EOF 53539ab56c27Smrg ;; 53549ab56c27Smrg *) 53559ab56c27Smrg # For security reasons, it is highly recommended that you always 53569ab56c27Smrg # use absolute paths for naming shared libraries, and exclude the 53579ab56c27Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53589ab56c27Smrg # requires that you compile everything twice, which is a pain. 53599ab56c27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53609ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53619ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53629ab56c27Smrg _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' 53639ab56c27Smrg else 53649ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53659ab56c27Smrg fi 53669ab56c27Smrg ;; 53679ab56c27Smrg esac 53689ab56c27Smrg ;; 53694cd6a3aeSmrg 53709ab56c27Smrg sunos4*) 53719ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53729ab56c27Smrg wlarc= 53739ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53749ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53759ab56c27Smrg ;; 53768c9fbc29Smrg 53779ab56c27Smrg *) 53789ab56c27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53799ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53809ab56c27Smrg _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' 53819ab56c27Smrg else 53829ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53839ab56c27Smrg fi 53849ab56c27Smrg ;; 53859ab56c27Smrg esac 53864cd6a3aeSmrg 53879ab56c27Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53889ab56c27Smrg runpath_var= 53899ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53909ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53919ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53929ab56c27Smrg fi 53939ab56c27Smrg else 53949ab56c27Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53959ab56c27Smrg case $host_os in 53969ab56c27Smrg aix3*) 53979ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53989ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53999ab56c27Smrg _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' 54009ab56c27Smrg # Note: this linker hardcodes the directories in LIBPATH if there 54019ab56c27Smrg # are no directories specified by -L. 54029ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54039ab56c27Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 54049ab56c27Smrg # Neither direct hardcoding nor static linking is supported with a 54059ab56c27Smrg # broken collect2. 54069ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54079ab56c27Smrg fi 54089ab56c27Smrg ;; 54098c9fbc29Smrg 54109ab56c27Smrg aix[[4-9]]*) 54119ab56c27Smrg if test ia64 = "$host_cpu"; then 54129ab56c27Smrg # On IA64, the linker does run time linking by default, so we don't 54139ab56c27Smrg # have to do anything special. 54149ab56c27Smrg aix_use_runtimelinking=no 54159ab56c27Smrg exp_sym_flag='-Bexport' 54169ab56c27Smrg no_entry_flag= 54179ab56c27Smrg else 54189ab56c27Smrg # If we're using GNU nm, then we don't want the "-C" option. 54199ab56c27Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 54209ab56c27Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 54219ab56c27Smrg # weak defined symbols like other global defined symbols, whereas 54229ab56c27Smrg # GNU nm marks them as "W". 54239ab56c27Smrg # While the 'weak' keyword is ignored in the Export File, we need 54249ab56c27Smrg # it in the Import File for the 'aix-soname' feature, so we have 54259ab56c27Smrg # to replace the "-B" option with "-P" for AIX nm. 54269ab56c27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54279ab56c27Smrg _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' 54289ab56c27Smrg else 54299ab56c27Smrg _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' 54309ab56c27Smrg fi 54319ab56c27Smrg aix_use_runtimelinking=no 54328c9fbc29Smrg 54339ab56c27Smrg # Test if we are trying to use run time linking or normal 54349ab56c27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54359ab56c27Smrg # have runtime linking enabled, and use it for executables. 54369ab56c27Smrg # For shared libraries, we enable/disable runtime linking 54379ab56c27Smrg # depending on the kind of the shared library created - 54389ab56c27Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 54399ab56c27Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54409ab56c27Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 54419ab56c27Smrg # lib.a static archive 54429ab56c27Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54439ab56c27Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 54449ab56c27Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54459ab56c27Smrg # lib.a(lib.so.V) shared, rtl:no 54469ab56c27Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54479ab56c27Smrg # lib.a static archive 54489ab56c27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54499ab56c27Smrg for ld_flag in $LDFLAGS; do 54509ab56c27Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54519ab56c27Smrg aix_use_runtimelinking=yes 54529ab56c27Smrg break 54539ab56c27Smrg fi 54549ab56c27Smrg done 54559ab56c27Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54569ab56c27Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54579ab56c27Smrg # so we don't have lib.a shared libs to link our executables. 54589ab56c27Smrg # We have to force runtime linking in this case. 54599ab56c27Smrg aix_use_runtimelinking=yes 54609ab56c27Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54619ab56c27Smrg fi 54629ab56c27Smrg ;; 54639ab56c27Smrg esac 54644cd6a3aeSmrg 54659ab56c27Smrg exp_sym_flag='-bexport' 54669ab56c27Smrg no_entry_flag='-bnoentry' 54679ab56c27Smrg fi 54684cd6a3aeSmrg 54699ab56c27Smrg # When large executables or shared objects are built, AIX ld can 54709ab56c27Smrg # have problems creating the table of contents. If linking a library 54719ab56c27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54729ab56c27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54739ab56c27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54748c9fbc29Smrg 54759ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='' 54769ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54779ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54789ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54799ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54809ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54819ab56c27Smrg case $with_aix_soname,$aix_use_runtimelinking in 54829ab56c27Smrg aix,*) ;; # traditional, no import file 54839ab56c27Smrg svr4,* | *,yes) # use import file 54849ab56c27Smrg # The Import File defines what to hardcode. 54859ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 54869ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54879ab56c27Smrg ;; 54889ab56c27Smrg esac 54898c9fbc29Smrg 54909ab56c27Smrg if test yes = "$GCC"; then 54919ab56c27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54929ab56c27Smrg # We only want to do this on AIX 4.2 and lower, the check 54939ab56c27Smrg # below for broken collect2 doesn't work under 4.3+ 54949ab56c27Smrg collect2name=`$CC -print-prog-name=collect2` 54959ab56c27Smrg if test -f "$collect2name" && 54969ab56c27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54979ab56c27Smrg then 54989ab56c27Smrg # We have reworked collect2 54999ab56c27Smrg : 55009ab56c27Smrg else 55019ab56c27Smrg # We have old collect2 55029ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55039ab56c27Smrg # It fails to find uninstalled libraries when the uninstalled 55049ab56c27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 55059ab56c27Smrg # to unsupported forces relinking 55069ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55079ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55089ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55099ab56c27Smrg fi 55109ab56c27Smrg ;; 55119ab56c27Smrg esac 55129ab56c27Smrg shared_flag='-shared' 55139ab56c27Smrg if test yes = "$aix_use_runtimelinking"; then 55149ab56c27Smrg shared_flag="$shared_flag "'$wl-G' 55159ab56c27Smrg fi 55169ab56c27Smrg # Need to ensure runtime linking is disabled for the traditional 55179ab56c27Smrg # shared library, or the linker may eventually find shared libraries 55189ab56c27Smrg # /with/ Import File - we do not want to mix them. 55199ab56c27Smrg shared_flag_aix='-shared' 55209ab56c27Smrg shared_flag_svr4='-shared $wl-G' 55219ab56c27Smrg else 55229ab56c27Smrg # not using gcc 55239ab56c27Smrg if test ia64 = "$host_cpu"; then 55249ab56c27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55259ab56c27Smrg # chokes on -Wl,-G. The following line is correct: 55269ab56c27Smrg shared_flag='-G' 55279ab56c27Smrg else 55289ab56c27Smrg if test yes = "$aix_use_runtimelinking"; then 55299ab56c27Smrg shared_flag='$wl-G' 55309ab56c27Smrg else 55319ab56c27Smrg shared_flag='$wl-bM:SRE' 55329ab56c27Smrg fi 55339ab56c27Smrg shared_flag_aix='$wl-bM:SRE' 55349ab56c27Smrg shared_flag_svr4='$wl-G' 55359ab56c27Smrg fi 55369ab56c27Smrg fi 55378c9fbc29Smrg 55389ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55399ab56c27Smrg # It seems that -bexpall does not export symbols beginning with 55409ab56c27Smrg # underscore (_), so it is better to generate a list of symbols to export. 55419ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55429ab56c27Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55439ab56c27Smrg # Warning - without using the other runtime loading flags (-brtl), 55449ab56c27Smrg # -berok will link without error, but may produce a broken library. 55459ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55469ab56c27Smrg # Determine the default libpath from the value encoded in an 55479ab56c27Smrg # empty executable. 55489ab56c27Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55499ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55509ab56c27Smrg _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 55519ab56c27Smrg else 55529ab56c27Smrg if test ia64 = "$host_cpu"; then 55539ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55549ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55559ab56c27Smrg _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" 55569ab56c27Smrg else 55579ab56c27Smrg # Determine the default libpath from the value encoded in an 55589ab56c27Smrg # empty executable. 55599ab56c27Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55609ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55619ab56c27Smrg # Warning - without using the other run time loading flags, 55629ab56c27Smrg # -berok will link without error, but may produce a broken library. 55639ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55649ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55659ab56c27Smrg if test yes = "$with_gnu_ld"; then 55669ab56c27Smrg # We only use this code for GNU lds that support --whole-archive. 55679ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55689ab56c27Smrg else 55699ab56c27Smrg # Exported symbols can be pulled into shared objects from archives 55709ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55719ab56c27Smrg fi 55729ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55739ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55749ab56c27Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55759ab56c27Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55769ab56c27Smrg if test svr4 != "$with_aix_soname"; then 55779ab56c27Smrg # This is similar to how AIX traditionally builds its shared libraries. 55789ab56c27Smrg _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' 55799ab56c27Smrg fi 55809ab56c27Smrg if test aix != "$with_aix_soname"; then 55819ab56c27Smrg _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' 55829ab56c27Smrg else 55839ab56c27Smrg # used by -dlpreopen to get the symbols 55849ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55859ab56c27Smrg fi 55869ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55879ab56c27Smrg fi 55889ab56c27Smrg fi 55899ab56c27Smrg ;; 55904cd6a3aeSmrg 55919ab56c27Smrg amigaos*) 55929ab56c27Smrg case $host_cpu in 55939ab56c27Smrg powerpc) 55949ab56c27Smrg # see comment about AmigaOS4 .so support 55959ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55969ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55979ab56c27Smrg ;; 55989ab56c27Smrg m68k) 55999ab56c27Smrg _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)' 56009ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56019ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56029ab56c27Smrg ;; 56039ab56c27Smrg esac 56049ab56c27Smrg ;; 56054cd6a3aeSmrg 56069ab56c27Smrg bsdi[[45]]*) 56079ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 56089ab56c27Smrg ;; 56098c9fbc29Smrg 56109ab56c27Smrg cygwin* | mingw* | pw32* | cegcc*) 56119ab56c27Smrg # When not using gcc, we currently assume that we are using 56129ab56c27Smrg # Microsoft Visual C++ or Intel C++ Compiler. 56139ab56c27Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 56149ab56c27Smrg # no search path for DLLs. 56159ab56c27Smrg case $cc_basename in 56169ab56c27Smrg cl* | icl*) 56179ab56c27Smrg # Native MSVC or ICC 56189ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56199ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56209ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 56219ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='@' 56229ab56c27Smrg # Tell ltmain to make .lib files, not .a files. 56239ab56c27Smrg libext=lib 56249ab56c27Smrg # Tell ltmain to make .dll files, not .so files. 56259ab56c27Smrg shrext_cmds=.dll 56269ab56c27Smrg # FIXME: Setting linknames here is a bad hack. 56279ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56289ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56299ab56c27Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 56309ab56c27Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56319ab56c27Smrg else 56329ab56c27Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56339ab56c27Smrg fi~ 56349ab56c27Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56359ab56c27Smrg linknames=' 56369ab56c27Smrg # The linker will not automatically build a static lib if we build a DLL. 56379ab56c27Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56389ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56399ab56c27Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56409ab56c27Smrg _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' 56419ab56c27Smrg # Don't use ranlib 56429ab56c27Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56439ab56c27Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56449ab56c27Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56459ab56c27Smrg case $lt_outputfile in 56469ab56c27Smrg *.exe|*.EXE) ;; 56479ab56c27Smrg *) 56489ab56c27Smrg lt_outputfile=$lt_outputfile.exe 56499ab56c27Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 56509ab56c27Smrg ;; 56519ab56c27Smrg esac~ 56529ab56c27Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56539ab56c27Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56549ab56c27Smrg $RM "$lt_outputfile.manifest"; 56559ab56c27Smrg fi' 56569ab56c27Smrg ;; 56579ab56c27Smrg *) 56589ab56c27Smrg # Assume MSVC and ICC wrapper 56599ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56609ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56619ab56c27Smrg # Tell ltmain to make .lib files, not .a files. 56629ab56c27Smrg libext=lib 56639ab56c27Smrg # Tell ltmain to make .dll files, not .so files. 56649ab56c27Smrg shrext_cmds=.dll 56659ab56c27Smrg # FIXME: Setting linknames here is a bad hack. 56669ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56679ab56c27Smrg # The linker will automatically build a .lib file if we build a DLL. 56689ab56c27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56699ab56c27Smrg # FIXME: Should let the user specify the lib program. 56709ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56719ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56729ab56c27Smrg ;; 56739ab56c27Smrg esac 56749ab56c27Smrg ;; 56758c9fbc29Smrg 56769ab56c27Smrg darwin* | rhapsody*) 56779ab56c27Smrg _LT_DARWIN_LINKER_FEATURES($1) 56789ab56c27Smrg ;; 56798c9fbc29Smrg 56809ab56c27Smrg dgux*) 56819ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56829ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56839ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56849ab56c27Smrg ;; 56858c9fbc29Smrg 56869ab56c27Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56879ab56c27Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56889ab56c27Smrg # does not break anything, and helps significantly (at the cost of a little 56899ab56c27Smrg # extra space). 56909ab56c27Smrg freebsd2.2*) 56919ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56929ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56939ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56949ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 569554cef2ddSmrg ;; 56969ab56c27Smrg 56979ab56c27Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56989ab56c27Smrg freebsd2.*) 56999ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 57009ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57019ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57029ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 570354cef2ddSmrg ;; 57049ab56c27Smrg 57059ab56c27Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 57069ab56c27Smrg freebsd* | dragonfly* | midnightbsd*) 57079ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 57089ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 57099ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57109ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 571154cef2ddSmrg ;; 57128c9fbc29Smrg 57139ab56c27Smrg hpux9*) 57149ab56c27Smrg if test yes = "$GCC"; then 57159ab56c27Smrg _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' 57169ab56c27Smrg else 57179ab56c27Smrg _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' 57189ab56c27Smrg fi 57199ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57209ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57219ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57228c9fbc29Smrg 57239ab56c27Smrg # hardcode_minus_L: Not really in the search PATH, 57249ab56c27Smrg # but as the default location of the library. 57259ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57269ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57279ab56c27Smrg ;; 57288c9fbc29Smrg 57299ab56c27Smrg hpux10*) 57309ab56c27Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57319ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57329ab56c27Smrg else 57339ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57349ab56c27Smrg fi 57359ab56c27Smrg if test no = "$with_gnu_ld"; then 57369ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57379ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57389ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57399ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57409ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57419ab56c27Smrg # hardcode_minus_L: Not really in the search PATH, 57429ab56c27Smrg # but as the default location of the library. 57439ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57449ab56c27Smrg fi 57459ab56c27Smrg ;; 57464cd6a3aeSmrg 57479ab56c27Smrg hpux11*) 57489ab56c27Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57499ab56c27Smrg case $host_cpu in 57509ab56c27Smrg hppa*64*) 57519ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57529ab56c27Smrg ;; 57539ab56c27Smrg ia64*) 57549ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57559ab56c27Smrg ;; 57569ab56c27Smrg *) 57579ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57589ab56c27Smrg ;; 57599ab56c27Smrg esac 57609ab56c27Smrg else 57619ab56c27Smrg case $host_cpu in 57629ab56c27Smrg hppa*64*) 57639ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57649ab56c27Smrg ;; 57659ab56c27Smrg ia64*) 57669ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57679ab56c27Smrg ;; 57689ab56c27Smrg *) 57699ab56c27Smrg m4_if($1, [], [ 57709ab56c27Smrg # Older versions of the 11.00 compiler do not understand -b yet 57719ab56c27Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57729ab56c27Smrg _LT_LINKER_OPTION([if $CC understands -b], 57739ab56c27Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57749ab56c27Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57759ab56c27Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57769ab56c27Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57779ab56c27Smrg ;; 57789ab56c27Smrg esac 57799ab56c27Smrg fi 57809ab56c27Smrg if test no = "$with_gnu_ld"; then 57819ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57829ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57834cd6a3aeSmrg 57849ab56c27Smrg case $host_cpu in 57859ab56c27Smrg hppa*64*|ia64*) 57869ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57879ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57889ab56c27Smrg ;; 57899ab56c27Smrg *) 57909ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57919ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57929ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57934cd6a3aeSmrg 57949ab56c27Smrg # hardcode_minus_L: Not really in the search PATH, 57959ab56c27Smrg # but as the default location of the library. 57969ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57979ab56c27Smrg ;; 57989ab56c27Smrg esac 57999ab56c27Smrg fi 58009ab56c27Smrg ;; 58018c9fbc29Smrg 58029ab56c27Smrg irix5* | irix6* | nonstopux*) 58039ab56c27Smrg if test yes = "$GCC"; then 58049ab56c27Smrg _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' 58059ab56c27Smrg # Try to use the -exported_symbol ld option, if it does not 58069ab56c27Smrg # work, assume that -exports_file does not work either and 58079ab56c27Smrg # implicitly export all symbols. 58089ab56c27Smrg # This should be the same for all languages, so no per-tag cache variable. 58099ab56c27Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 58109ab56c27Smrg [lt_cv_irix_exported_symbol], 58119ab56c27Smrg [save_LDFLAGS=$LDFLAGS 58129ab56c27Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 58139ab56c27Smrg AC_LINK_IFELSE( 58149ab56c27Smrg [AC_LANG_SOURCE( 58159ab56c27Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 58169ab56c27Smrg [C++], [[int foo (void) { return 0; }]], 58179ab56c27Smrg [Fortran 77], [[ 58189ab56c27Smrg subroutine foo 58199ab56c27Smrg end]], 58209ab56c27Smrg [Fortran], [[ 58219ab56c27Smrg subroutine foo 58229ab56c27Smrg end]])])], 58239ab56c27Smrg [lt_cv_irix_exported_symbol=yes], 58249ab56c27Smrg [lt_cv_irix_exported_symbol=no]) 58259ab56c27Smrg LDFLAGS=$save_LDFLAGS]) 58269ab56c27Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 58279ab56c27Smrg _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' 58289ab56c27Smrg fi 58299ab56c27Smrg else 58309ab56c27Smrg _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' 58319ab56c27Smrg _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' 58329ab56c27Smrg fi 58339ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58349ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58359ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58369ab56c27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58379ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58389ab56c27Smrg ;; 58398c9fbc29Smrg 58409ab56c27Smrg linux*) 58419ab56c27Smrg case $cc_basename in 58429ab56c27Smrg tcc*) 58439ab56c27Smrg # Fabrice Bellard et al's Tiny C Compiler 58449ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 58459ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58469ab56c27Smrg ;; 58479ab56c27Smrg esac 58489ab56c27Smrg ;; 58494cd6a3aeSmrg 58509ab56c27Smrg netbsd*) 58519ab56c27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58529ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 585354cef2ddSmrg else 58549ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 585554cef2ddSmrg fi 58569ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58579ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58589ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 585954cef2ddSmrg ;; 58604cd6a3aeSmrg 58619ab56c27Smrg newsos6) 58629ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58639ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58649ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58659ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58669ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 586754cef2ddSmrg ;; 58689ab56c27Smrg 58699ab56c27Smrg *nto* | *qnx*) 587054cef2ddSmrg ;; 58719ab56c27Smrg 58729ab56c27Smrg openbsd* | bitrig*) 58739ab56c27Smrg if test -f /usr/libexec/ld.so; then 58749ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58759ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58769ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58779ab56c27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58789ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58799ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58809ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58819ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58829ab56c27Smrg else 58839ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58849ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58859ab56c27Smrg fi 58869ab56c27Smrg else 58879ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58889ab56c27Smrg fi 588954cef2ddSmrg ;; 58904cd6a3aeSmrg 58919ab56c27Smrg os2*) 58929ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58939ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58949ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58959ab56c27Smrg shrext_cmds=.dll 58969ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58979ab56c27Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58989ab56c27Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58999ab56c27Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 59009ab56c27Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 59019ab56c27Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 59029ab56c27Smrg emximp -o $lib $output_objdir/$libname.def' 59039ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 59049ab56c27Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 59059ab56c27Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 59069ab56c27Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 59079ab56c27Smrg prefix_cmds="$SED"~ 59089ab56c27Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 59099ab56c27Smrg prefix_cmds="$prefix_cmds -e 1d"; 59109ab56c27Smrg fi~ 59119ab56c27Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 59129ab56c27Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 59139ab56c27Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 59149ab56c27Smrg emximp -o $lib $output_objdir/$libname.def' 59159ab56c27Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 59169ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 59179ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='@' 59189ab56c27Smrg ;; 59198c9fbc29Smrg 59209ab56c27Smrg osf3*) 59219ab56c27Smrg if test yes = "$GCC"; then 59229ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59239ab56c27Smrg _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' 59249ab56c27Smrg else 59259ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59269ab56c27Smrg _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' 59279ab56c27Smrg fi 59289ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59299ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59309ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59319ab56c27Smrg ;; 59328c9fbc29Smrg 59339ab56c27Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59349ab56c27Smrg if test yes = "$GCC"; then 59359ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59369ab56c27Smrg _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' 59379ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59389ab56c27Smrg else 59399ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59409ab56c27Smrg _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' 59419ab56c27Smrg _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~ 59429ab56c27Smrg $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' 59438c9fbc29Smrg 59449ab56c27Smrg # Both c and cxx compiler support -rpath directly 59459ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59469ab56c27Smrg fi 59479ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59489ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59499ab56c27Smrg ;; 59504cd6a3aeSmrg 59519ab56c27Smrg solaris*) 59529ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59539ab56c27Smrg if test yes = "$GCC"; then 59549ab56c27Smrg wlarc='$wl' 59559ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59569ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59579ab56c27Smrg $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' 59589ab56c27Smrg else 59599ab56c27Smrg case `$CC -V 2>&1` in 59609ab56c27Smrg *"Compilers 5.0"*) 59619ab56c27Smrg wlarc='' 59629ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59639ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59649ab56c27Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59659ab56c27Smrg ;; 59669ab56c27Smrg *) 59679ab56c27Smrg wlarc='$wl' 59689ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59699ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59709ab56c27Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59719ab56c27Smrg ;; 59729ab56c27Smrg esac 59739ab56c27Smrg fi 59749ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59759ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59769ab56c27Smrg case $host_os in 59779ab56c27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59789ab56c27Smrg *) 59799ab56c27Smrg # The compiler driver will combine and reorder linker options, 59809ab56c27Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59819ab56c27Smrg # but is careful enough not to reorder. 59829ab56c27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59839ab56c27Smrg if test yes = "$GCC"; then 59849ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59859ab56c27Smrg else 59869ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59879ab56c27Smrg fi 59889ab56c27Smrg ;; 59899ab56c27Smrg esac 59909ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59919ab56c27Smrg ;; 59928c9fbc29Smrg 59939ab56c27Smrg sunos4*) 59949ab56c27Smrg if test sequent = "$host_vendor"; then 59959ab56c27Smrg # Use $CC to link under sequent, because it throws in some extra .o 59969ab56c27Smrg # files that make .init and .fini sections work. 59979ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59989ab56c27Smrg else 59999ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 60009ab56c27Smrg fi 60019ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60029ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60039ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60049ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600554cef2ddSmrg ;; 60069ab56c27Smrg 60079ab56c27Smrg sysv4) 60089ab56c27Smrg case $host_vendor in 60099ab56c27Smrg sni) 60109ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60119ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 60129ab56c27Smrg ;; 60139ab56c27Smrg siemens) 60149ab56c27Smrg ## LD is ld it makes a PLAMLIB 60159ab56c27Smrg ## CC just makes a GrossModule. 60169ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 60179ab56c27Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 60189ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 60199ab56c27Smrg ;; 60209ab56c27Smrg motorola) 60219ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60229ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 60239ab56c27Smrg ;; 60249ab56c27Smrg esac 60259ab56c27Smrg runpath_var='LD_RUN_PATH' 60269ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 602754cef2ddSmrg ;; 60289ab56c27Smrg 60299ab56c27Smrg sysv4.3*) 60309ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60319ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60329ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 603354cef2ddSmrg ;; 60348c9fbc29Smrg 60359ab56c27Smrg sysv4*MP*) 60369ab56c27Smrg if test -d /usr/nec; then 60379ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60389ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60399ab56c27Smrg runpath_var=LD_RUN_PATH 60409ab56c27Smrg hardcode_runpath_var=yes 60419ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60429ab56c27Smrg fi 604354cef2ddSmrg ;; 60449ab56c27Smrg 60459ab56c27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60469ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60479ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60489ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60499ab56c27Smrg runpath_var='LD_RUN_PATH' 60509ab56c27Smrg 60519ab56c27Smrg if test yes = "$GCC"; then 60529ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60539ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60549ab56c27Smrg else 60559ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60569ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60579ab56c27Smrg fi 605854cef2ddSmrg ;; 60599ab56c27Smrg 60609ab56c27Smrg sysv5* | sco3.2v5* | sco5v6*) 60619ab56c27Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60629ab56c27Smrg # link with -lc, and that would cause any symbols used from libc to 60639ab56c27Smrg # always be unresolved, which means just about no library would 60649ab56c27Smrg # ever link correctly. If we're not using GNU ld we use -z text 60659ab56c27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60669ab56c27Smrg # as -z defs. 60679ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60689ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60699ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60709ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60719ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60729ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60739ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60749ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60759ab56c27Smrg runpath_var='LD_RUN_PATH' 60769ab56c27Smrg 60779ab56c27Smrg if test yes = "$GCC"; then 60789ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60799ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 608054cef2ddSmrg else 60819ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60829ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 608354cef2ddSmrg fi 60849ab56c27Smrg ;; 60859ab56c27Smrg 60869ab56c27Smrg uts4*) 60879ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60889ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60899ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60909ab56c27Smrg ;; 60919ab56c27Smrg 60929ab56c27Smrg *) 60939ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 609454cef2ddSmrg ;; 609554cef2ddSmrg esac 60964cd6a3aeSmrg 60979ab56c27Smrg if test sni = "$host_vendor"; then 60989ab56c27Smrg case $host in 60999ab56c27Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 61009ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 61019ab56c27Smrg ;; 61029ab56c27Smrg esac 61039ab56c27Smrg fi 61049ab56c27Smrg fi 61059ab56c27Smrg]) 61069ab56c27SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 61079ab56c27Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 61084cd6a3aeSmrg 61099ab56c27Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 61104cd6a3aeSmrg 61119ab56c27Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 61129ab56c27Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 61139ab56c27Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 61149ab56c27Smrg [The commands to extract the exported symbol list from a shared archive]) 61158c9fbc29Smrg 61169ab56c27Smrg# 61179ab56c27Smrg# Do we need to explicitly link libc? 61189ab56c27Smrg# 61199ab56c27Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 61209ab56c27Smrgx|xyes) 61219ab56c27Smrg # Assume -lc should be added 61229ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61238c9fbc29Smrg 61249ab56c27Smrg if test yes,yes = "$GCC,$enable_shared"; then 61259ab56c27Smrg case $_LT_TAGVAR(archive_cmds, $1) in 61269ab56c27Smrg *'~'*) 61279ab56c27Smrg # FIXME: we may have to deal with multi-command sequences. 61284cd6a3aeSmrg ;; 61299ab56c27Smrg '$CC '*) 61309ab56c27Smrg # Test whether the compiler implicitly links with -lc since on some 61319ab56c27Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61329ab56c27Smrg # to ld, don't add -lc before -lgcc. 61339ab56c27Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61349ab56c27Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61359ab56c27Smrg [$RM conftest* 61369ab56c27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61378c9fbc29Smrg 61389ab56c27Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61399ab56c27Smrg soname=conftest 61409ab56c27Smrg lib=conftest 61419ab56c27Smrg libobjs=conftest.$ac_objext 61429ab56c27Smrg deplibs= 61439ab56c27Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61449ab56c27Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61459ab56c27Smrg compiler_flags=-v 61469ab56c27Smrg linker_flags=-v 61479ab56c27Smrg verstring= 61489ab56c27Smrg output_objdir=. 61499ab56c27Smrg libname=conftest 61509ab56c27Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61519ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61529ab56c27Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61539ab56c27Smrg then 61549ab56c27Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61559ab56c27Smrg else 61569ab56c27Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61579ab56c27Smrg fi 61589ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61599ab56c27Smrg else 61609ab56c27Smrg cat conftest.err 1>&5 61619ab56c27Smrg fi 61629ab56c27Smrg $RM conftest* 61639ab56c27Smrg ]) 61649ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61659ab56c27Smrg ;; 61669ab56c27Smrg esac 61679ab56c27Smrg fi 616854cef2ddSmrg ;; 61699ab56c27Smrgesac 61708c9fbc29Smrg 61719ab56c27Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61729ab56c27Smrg [Whether or not to add -lc for building shared libraries]) 61739ab56c27Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61749ab56c27Smrg [enable_shared_with_static_runtimes], [0], 61759ab56c27Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61769ab56c27Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61779ab56c27Smrg [Compiler flag to allow reflexive dlopens]) 61789ab56c27Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61799ab56c27Smrg [Compiler flag to generate shared objects directly from archives]) 61809ab56c27Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61819ab56c27Smrg [Whether the compiler copes with passing no objects directly]) 61829ab56c27Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61839ab56c27Smrg [Create an old-style archive from a shared archive]) 61849ab56c27Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61859ab56c27Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61869ab56c27Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61879ab56c27Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61889ab56c27Smrg_LT_TAGDECL([], [module_cmds], [2], 61899ab56c27Smrg [Commands used to build a loadable module if different from building 61909ab56c27Smrg a shared archive.]) 61919ab56c27Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61929ab56c27Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61939ab56c27Smrg [Whether we are building with GNU ld or not]) 61949ab56c27Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61959ab56c27Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61969ab56c27Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61979ab56c27Smrg [Flag that enforces no undefined symbols]) 61989ab56c27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61999ab56c27Smrg [Flag to hardcode $libdir into a binary during linking. 62009ab56c27Smrg This must work even if $libdir does not exist]) 62019ab56c27Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 62029ab56c27Smrg [Whether we need a single "-rpath" flag with a separated argument]) 62039ab56c27Smrg_LT_TAGDECL([], [hardcode_direct], [0], 62049ab56c27Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 62059ab56c27Smrg DIR into the resulting binary]) 62069ab56c27Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 62079ab56c27Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 62089ab56c27Smrg DIR into the resulting binary and the resulting library dependency is 62099ab56c27Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 62109ab56c27Smrg library is relocated]) 62119ab56c27Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 62129ab56c27Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 62139ab56c27Smrg into the resulting binary]) 62149ab56c27Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 62159ab56c27Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 62169ab56c27Smrg into the resulting binary]) 62179ab56c27Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 62189ab56c27Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 62199ab56c27Smrg into the library and all subsequent libraries and executables linked 62209ab56c27Smrg against it]) 62219ab56c27Smrg_LT_TAGDECL([], [inherit_rpath], [0], 62229ab56c27Smrg [Set to yes if linker adds runtime paths of dependent libraries 62239ab56c27Smrg to runtime path list]) 62249ab56c27Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 62259ab56c27Smrg [Whether libtool must link a program against all its dependency libraries]) 62269ab56c27Smrg_LT_TAGDECL([], [always_export_symbols], [0], 62279ab56c27Smrg [Set to "yes" if exported symbols are required]) 62289ab56c27Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62299ab56c27Smrg [The commands to list exported symbols]) 62309ab56c27Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 62319ab56c27Smrg [Symbols that should not be listed in the preloaded symbols]) 62329ab56c27Smrg_LT_TAGDECL([], [include_expsyms], [1], 62339ab56c27Smrg [Symbols that must always be exported]) 62349ab56c27Smrg_LT_TAGDECL([], [prelink_cmds], [2], 62359ab56c27Smrg [Commands necessary for linking programs (against libraries) with templates]) 62369ab56c27Smrg_LT_TAGDECL([], [postlink_cmds], [2], 62379ab56c27Smrg [Commands necessary for finishing linking programs]) 62389ab56c27Smrg_LT_TAGDECL([], [file_list_spec], [1], 62399ab56c27Smrg [Specify filename containing input files]) 62409ab56c27Smrgdnl FIXME: Not yet implemented 62419ab56c27Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62429ab56c27Smrgdnl [Compiler flag to generate thread safe objects]) 62439ab56c27Smrg])# _LT_LINKER_SHLIBS 624454cef2ddSmrg 62458c9fbc29Smrg 62469ab56c27Smrg# _LT_LANG_C_CONFIG([TAG]) 62479ab56c27Smrg# ------------------------ 62489ab56c27Smrg# Ensure that the configuration variables for a C compiler are suitably 62499ab56c27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62509ab56c27Smrg# the compiler configuration to 'libtool'. 62519ab56c27Smrgm4_defun([_LT_LANG_C_CONFIG], 62529ab56c27Smrg[m4_require([_LT_DECL_EGREP])dnl 62539ab56c27Smrglt_save_CC=$CC 62549ab56c27SmrgAC_LANG_PUSH(C) 62558c9fbc29Smrg 62569ab56c27Smrg# Source file extension for C test sources. 62579ab56c27Smrgac_ext=c 62584cd6a3aeSmrg 62599ab56c27Smrg# Object file extension for compiled C test sources. 62609ab56c27Smrgobjext=o 62619ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 62624cd6a3aeSmrg 62639ab56c27Smrg# Code to be used in simple compile tests 62649ab56c27Smrglt_simple_compile_test_code="int some_variable = 0;" 62654cd6a3aeSmrg 62669ab56c27Smrg# Code to be used in simple link tests 62679ab56c27Smrglt_simple_link_test_code='int main(){return(0);}' 62688c9fbc29Smrg 62699ab56c27Smrg_LT_TAG_COMPILER 62709ab56c27Smrg# Save the default compiler, since it gets overwritten when the other 62719ab56c27Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62729ab56c27Smrgcompiler_DEFAULT=$CC 62738c9fbc29Smrg 62749ab56c27Smrg# save warnings/boilerplate of simple test code 62759ab56c27Smrg_LT_COMPILER_BOILERPLATE 62769ab56c27Smrg_LT_LINKER_BOILERPLATE 62778c9fbc29Smrg 62789ab56c27Smrgif test -n "$compiler"; then 62799ab56c27Smrg _LT_COMPILER_NO_RTTI($1) 62809ab56c27Smrg _LT_COMPILER_PIC($1) 62819ab56c27Smrg _LT_COMPILER_C_O($1) 62829ab56c27Smrg _LT_COMPILER_FILE_LOCKS($1) 62839ab56c27Smrg _LT_LINKER_SHLIBS($1) 62849ab56c27Smrg _LT_SYS_DYNAMIC_LINKER($1) 62859ab56c27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62869ab56c27Smrg LT_SYS_DLOPEN_SELF 62879ab56c27Smrg _LT_CMD_STRIPLIB 62888c9fbc29Smrg 62899ab56c27Smrg # Report what library types will actually be built 62909ab56c27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62919ab56c27Smrg AC_MSG_RESULT([$can_build_shared]) 629254044362Smrg 62939ab56c27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62949ab56c27Smrg test no = "$can_build_shared" && enable_shared=no 62958c9fbc29Smrg 62969ab56c27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62979ab56c27Smrg # are all built from PIC. 62989ab56c27Smrg case $host_os in 62999ab56c27Smrg aix3*) 63009ab56c27Smrg test yes = "$enable_shared" && enable_static=no 63019ab56c27Smrg if test -n "$RANLIB"; then 63029ab56c27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 63039ab56c27Smrg postinstall_cmds='$RANLIB $lib' 63049ab56c27Smrg fi 63059ab56c27Smrg ;; 63068c9fbc29Smrg 63079ab56c27Smrg aix[[4-9]]*) 63089ab56c27Smrg if test ia64 != "$host_cpu"; then 63099ab56c27Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 63109ab56c27Smrg yes,aix,yes) ;; # shared object as lib.so file only 63119ab56c27Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 63129ab56c27Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 63139ab56c27Smrg esac 63149ab56c27Smrg fi 63159ab56c27Smrg ;; 63169ab56c27Smrg esac 63179ab56c27Smrg AC_MSG_RESULT([$enable_shared]) 63188c9fbc29Smrg 63199ab56c27Smrg AC_MSG_CHECKING([whether to build static libraries]) 63209ab56c27Smrg # Make sure either enable_shared or enable_static is yes. 63219ab56c27Smrg test yes = "$enable_shared" || enable_static=yes 63229ab56c27Smrg AC_MSG_RESULT([$enable_static]) 63238c9fbc29Smrg 63249ab56c27Smrg _LT_CONFIG($1) 63259ab56c27Smrgfi 63269ab56c27SmrgAC_LANG_POP 63279ab56c27SmrgCC=$lt_save_CC 63289ab56c27Smrg])# _LT_LANG_C_CONFIG 63298c9fbc29Smrg 63308c9fbc29Smrg 63319ab56c27Smrg# _LT_LANG_CXX_CONFIG([TAG]) 63329ab56c27Smrg# -------------------------- 63339ab56c27Smrg# Ensure that the configuration variables for a C++ compiler are suitably 63349ab56c27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63359ab56c27Smrg# the compiler configuration to 'libtool'. 63369ab56c27Smrgm4_defun([_LT_LANG_CXX_CONFIG], 63379ab56c27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63389ab56c27Smrgm4_require([_LT_DECL_EGREP])dnl 63399ab56c27Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63409ab56c27Smrgif test -n "$CXX" && ( test no != "$CXX" && 63419ab56c27Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63429ab56c27Smrg (test g++ != "$CXX"))); then 63439ab56c27Smrg AC_PROG_CXXCPP 63449ab56c27Smrgelse 63459ab56c27Smrg _lt_caught_CXX_error=yes 63469ab56c27Smrgfi 63478c9fbc29Smrg 63489ab56c27SmrgAC_LANG_PUSH(C++) 63499ab56c27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63509ab56c27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63519ab56c27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63529ab56c27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63539ab56c27Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63549ab56c27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63559ab56c27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63569ab56c27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63579ab56c27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63589ab56c27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63599ab56c27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63609ab56c27Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63619ab56c27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63629ab56c27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63639ab56c27Smrg_LT_TAGVAR(module_cmds, $1)= 63649ab56c27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63659ab56c27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63669ab56c27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63679ab56c27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63689ab56c27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63699ab56c27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63709ab56c27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63719ab56c27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63728c9fbc29Smrg 63739ab56c27Smrg# Source file extension for C++ test sources. 63749ab56c27Smrgac_ext=cpp 63758c9fbc29Smrg 63769ab56c27Smrg# Object file extension for compiled C++ test sources. 63779ab56c27Smrgobjext=o 63789ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 63798c9fbc29Smrg 63809ab56c27Smrg# No sense in running all these tests if we already determined that 63819ab56c27Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63829ab56c27Smrg# are currently assumed to apply to all compilers on this platform, 63839ab56c27Smrg# and will be corrupted by setting them based on a non-working compiler. 63849ab56c27Smrgif test yes != "$_lt_caught_CXX_error"; then 63859ab56c27Smrg # Code to be used in simple compile tests 63869ab56c27Smrg lt_simple_compile_test_code="int some_variable = 0;" 63878c9fbc29Smrg 63889ab56c27Smrg # Code to be used in simple link tests 63899ab56c27Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 639054cef2ddSmrg 63919ab56c27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63929ab56c27Smrg _LT_TAG_COMPILER 63934cd6a3aeSmrg 63949ab56c27Smrg # save warnings/boilerplate of simple test code 63959ab56c27Smrg _LT_COMPILER_BOILERPLATE 63969ab56c27Smrg _LT_LINKER_BOILERPLATE 63974cd6a3aeSmrg 63989ab56c27Smrg # Allow CC to be a program name with arguments. 63999ab56c27Smrg lt_save_CC=$CC 64009ab56c27Smrg lt_save_CFLAGS=$CFLAGS 64019ab56c27Smrg lt_save_LD=$LD 64029ab56c27Smrg lt_save_GCC=$GCC 64039ab56c27Smrg GCC=$GXX 64049ab56c27Smrg lt_save_with_gnu_ld=$with_gnu_ld 64059ab56c27Smrg lt_save_path_LD=$lt_cv_path_LD 64069ab56c27Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 64079ab56c27Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 64089ab56c27Smrg else 64099ab56c27Smrg $as_unset lt_cv_prog_gnu_ld 64109ab56c27Smrg fi 64119ab56c27Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 64129ab56c27Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 64139ab56c27Smrg else 64149ab56c27Smrg $as_unset lt_cv_path_LD 64159ab56c27Smrg fi 64169ab56c27Smrg test -z "${LDCXX+set}" || LD=$LDCXX 64179ab56c27Smrg CC=${CXX-"c++"} 64189ab56c27Smrg CFLAGS=$CXXFLAGS 64199ab56c27Smrg compiler=$CC 64209ab56c27Smrg _LT_TAGVAR(compiler, $1)=$CC 64219ab56c27Smrg _LT_CC_BASENAME([$compiler]) 64224cd6a3aeSmrg 64239ab56c27Smrg if test -n "$compiler"; then 64249ab56c27Smrg # We don't want -fno-exception when compiling C++ code, so set the 64259ab56c27Smrg # no_builtin_flag separately 64269ab56c27Smrg if test yes = "$GXX"; then 64279ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64289ab56c27Smrg else 64299ab56c27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64309ab56c27Smrg fi 64314cd6a3aeSmrg 64329ab56c27Smrg if test yes = "$GXX"; then 64339ab56c27Smrg # Set up default GNU C++ configuration 64344cd6a3aeSmrg 64359ab56c27Smrg LT_PATH_LD 64364cd6a3aeSmrg 64379ab56c27Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64389ab56c27Smrg # archiving commands below assume that GNU ld is being used. 64399ab56c27Smrg if test yes = "$with_gnu_ld"; then 64409ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64419ab56c27Smrg _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' 64424cd6a3aeSmrg 64439ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64449ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64454cd6a3aeSmrg 64469ab56c27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64479ab56c27Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64489ab56c27Smrg # investigate it a little bit more. (MM) 64499ab56c27Smrg wlarc='$wl' 64504cd6a3aeSmrg 64519ab56c27Smrg # ancient GNU ld didn't support --whole-archive et. al. 64529ab56c27Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64539ab56c27Smrg $GREP 'no-whole-archive' > /dev/null; then 64549ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64559ab56c27Smrg else 64569ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64579ab56c27Smrg fi 64589ab56c27Smrg else 64599ab56c27Smrg with_gnu_ld=no 64609ab56c27Smrg wlarc= 64614cd6a3aeSmrg 64629ab56c27Smrg # A generic and very simple default shared library creation 64639ab56c27Smrg # command for GNU C++ for the case where it uses the native 64649ab56c27Smrg # linker, instead of GNU ld. If possible, this setting should 64659ab56c27Smrg # overridden to take advantage of the native linker features on 64669ab56c27Smrg # the platform it is being used on. 64679ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 646854cef2ddSmrg fi 64694cd6a3aeSmrg 64709ab56c27Smrg # Commands to make compiler produce verbose output that lists 64719ab56c27Smrg # what "hidden" libraries, object files and flags are used when 64729ab56c27Smrg # linking a shared library. 64739ab56c27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64744cd6a3aeSmrg 64759ab56c27Smrg else 64769ab56c27Smrg GXX=no 64779ab56c27Smrg with_gnu_ld=no 64789ab56c27Smrg wlarc= 64799ab56c27Smrg fi 648054cef2ddSmrg 64819ab56c27Smrg # PORTME: fill in a description of your system's C++ link characteristics 64829ab56c27Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64839ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64849ab56c27Smrg case $host_os in 64859ab56c27Smrg aix3*) 64869ab56c27Smrg # FIXME: insert proper C++ library support 64879ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64889ab56c27Smrg ;; 64899ab56c27Smrg aix[[4-9]]*) 64909ab56c27Smrg if test ia64 = "$host_cpu"; then 64919ab56c27Smrg # On IA64, the linker does run time linking by default, so we don't 64929ab56c27Smrg # have to do anything special. 64939ab56c27Smrg aix_use_runtimelinking=no 64949ab56c27Smrg exp_sym_flag='-Bexport' 64959ab56c27Smrg no_entry_flag= 64969ab56c27Smrg else 64979ab56c27Smrg aix_use_runtimelinking=no 649854cef2ddSmrg 64999ab56c27Smrg # Test if we are trying to use run time linking or normal 65009ab56c27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 65019ab56c27Smrg # have runtime linking enabled, and use it for executables. 65029ab56c27Smrg # For shared libraries, we enable/disable runtime linking 65039ab56c27Smrg # depending on the kind of the shared library created - 65049ab56c27Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 65059ab56c27Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 65069ab56c27Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 65079ab56c27Smrg # lib.a static archive 65089ab56c27Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 65099ab56c27Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 65109ab56c27Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 65119ab56c27Smrg # lib.a(lib.so.V) shared, rtl:no 65129ab56c27Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 65139ab56c27Smrg # lib.a static archive 65149ab56c27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 65159ab56c27Smrg for ld_flag in $LDFLAGS; do 65169ab56c27Smrg case $ld_flag in 65179ab56c27Smrg *-brtl*) 65189ab56c27Smrg aix_use_runtimelinking=yes 65199ab56c27Smrg break 65209ab56c27Smrg ;; 65219ab56c27Smrg esac 65229ab56c27Smrg done 65239ab56c27Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 65249ab56c27Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 65259ab56c27Smrg # so we don't have lib.a shared libs to link our executables. 65269ab56c27Smrg # We have to force runtime linking in this case. 65279ab56c27Smrg aix_use_runtimelinking=yes 65289ab56c27Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65299ab56c27Smrg fi 65309ab56c27Smrg ;; 65319ab56c27Smrg esac 65324cd6a3aeSmrg 65339ab56c27Smrg exp_sym_flag='-bexport' 65349ab56c27Smrg no_entry_flag='-bnoentry' 65359ab56c27Smrg fi 65364cd6a3aeSmrg 65379ab56c27Smrg # When large executables or shared objects are built, AIX ld can 65389ab56c27Smrg # have problems creating the table of contents. If linking a library 65399ab56c27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65409ab56c27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65419ab56c27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65424cd6a3aeSmrg 65439ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='' 65449ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65459ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65469ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65479ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65489ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65499ab56c27Smrg case $with_aix_soname,$aix_use_runtimelinking in 65509ab56c27Smrg aix,*) ;; # no import file 65519ab56c27Smrg svr4,* | *,yes) # use import file 65529ab56c27Smrg # The Import File defines what to hardcode. 65539ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 65549ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65559ab56c27Smrg ;; 65569ab56c27Smrg esac 65574cd6a3aeSmrg 65589ab56c27Smrg if test yes = "$GXX"; then 65599ab56c27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65609ab56c27Smrg # We only want to do this on AIX 4.2 and lower, the check 65619ab56c27Smrg # below for broken collect2 doesn't work under 4.3+ 65629ab56c27Smrg collect2name=`$CC -print-prog-name=collect2` 65639ab56c27Smrg if test -f "$collect2name" && 65649ab56c27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65659ab56c27Smrg then 65669ab56c27Smrg # We have reworked collect2 65679ab56c27Smrg : 65689ab56c27Smrg else 65699ab56c27Smrg # We have old collect2 65709ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65719ab56c27Smrg # It fails to find uninstalled libraries when the uninstalled 65729ab56c27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65739ab56c27Smrg # to unsupported forces relinking 65749ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65759ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65769ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65779ab56c27Smrg fi 65789ab56c27Smrg esac 65799ab56c27Smrg shared_flag='-shared' 65809ab56c27Smrg if test yes = "$aix_use_runtimelinking"; then 65819ab56c27Smrg shared_flag=$shared_flag' $wl-G' 65829ab56c27Smrg fi 65839ab56c27Smrg # Need to ensure runtime linking is disabled for the traditional 65849ab56c27Smrg # shared library, or the linker may eventually find shared libraries 65859ab56c27Smrg # /with/ Import File - we do not want to mix them. 65869ab56c27Smrg shared_flag_aix='-shared' 65879ab56c27Smrg shared_flag_svr4='-shared $wl-G' 65889ab56c27Smrg else 65899ab56c27Smrg # not using gcc 65909ab56c27Smrg if test ia64 = "$host_cpu"; then 65919ab56c27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65929ab56c27Smrg # chokes on -Wl,-G. The following line is correct: 65939ab56c27Smrg shared_flag='-G' 65949ab56c27Smrg else 65959ab56c27Smrg if test yes = "$aix_use_runtimelinking"; then 65969ab56c27Smrg shared_flag='$wl-G' 65979ab56c27Smrg else 65989ab56c27Smrg shared_flag='$wl-bM:SRE' 65999ab56c27Smrg fi 66009ab56c27Smrg shared_flag_aix='$wl-bM:SRE' 66019ab56c27Smrg shared_flag_svr4='$wl-G' 66029ab56c27Smrg fi 66039ab56c27Smrg fi 66044cd6a3aeSmrg 66059ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 66069ab56c27Smrg # It seems that -bexpall does not export symbols beginning with 66079ab56c27Smrg # underscore (_), so it is better to generate a list of symbols to 66089ab56c27Smrg # export. 66099ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66109ab56c27Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 66119ab56c27Smrg # Warning - without using the other runtime loading flags (-brtl), 66129ab56c27Smrg # -berok will link without error, but may produce a broken library. 66139ab56c27Smrg # The "-G" linker flag allows undefined symbols. 66149ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 66159ab56c27Smrg # Determine the default libpath from the value encoded in an empty 66169ab56c27Smrg # executable. 66179ab56c27Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66189ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66194cd6a3aeSmrg 66209ab56c27Smrg _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 66219ab56c27Smrg else 66229ab56c27Smrg if test ia64 = "$host_cpu"; then 66239ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 66249ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 66259ab56c27Smrg _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" 66269ab56c27Smrg else 66279ab56c27Smrg # Determine the default libpath from the value encoded in an 66289ab56c27Smrg # empty executable. 66299ab56c27Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 66309ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66319ab56c27Smrg # Warning - without using the other run time loading flags, 66329ab56c27Smrg # -berok will link without error, but may produce a broken library. 66339ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66349ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66359ab56c27Smrg if test yes = "$with_gnu_ld"; then 66369ab56c27Smrg # We only use this code for GNU lds that support --whole-archive. 66379ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66389ab56c27Smrg else 66399ab56c27Smrg # Exported symbols can be pulled into shared objects from archives 66409ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66419ab56c27Smrg fi 66429ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66439ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66449ab56c27Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66459ab56c27Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66469ab56c27Smrg if test svr4 != "$with_aix_soname"; then 66479ab56c27Smrg # This is similar to how AIX traditionally builds its shared 66489ab56c27Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66499ab56c27Smrg _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' 66509ab56c27Smrg fi 66519ab56c27Smrg if test aix != "$with_aix_soname"; then 66529ab56c27Smrg _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' 66539ab56c27Smrg else 66549ab56c27Smrg # used by -dlpreopen to get the symbols 66559ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66569ab56c27Smrg fi 66579ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66589ab56c27Smrg fi 66599ab56c27Smrg fi 66609ab56c27Smrg ;; 66614cd6a3aeSmrg 66629ab56c27Smrg beos*) 66639ab56c27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66649ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66659ab56c27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66669ab56c27Smrg # support --undefined. This deserves some investigation. FIXME 66679ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66689ab56c27Smrg else 66699ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66709ab56c27Smrg fi 66719ab56c27Smrg ;; 66724cd6a3aeSmrg 66739ab56c27Smrg chorus*) 66749ab56c27Smrg case $cc_basename in 66759ab56c27Smrg *) 66769ab56c27Smrg # FIXME: insert proper C++ library support 66779ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66789ab56c27Smrg ;; 66799ab56c27Smrg esac 66809ab56c27Smrg ;; 66814cd6a3aeSmrg 66829ab56c27Smrg cygwin* | mingw* | pw32* | cegcc*) 66839ab56c27Smrg case $GXX,$cc_basename in 66849ab56c27Smrg ,cl* | no,cl* | ,icl* | no,icl*) 66859ab56c27Smrg # Native MSVC or ICC 66869ab56c27Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66879ab56c27Smrg # no search path for DLLs. 66889ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66899ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66909ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66919ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66929ab56c27Smrg # Tell ltmain to make .lib files, not .a files. 66939ab56c27Smrg libext=lib 66949ab56c27Smrg # Tell ltmain to make .dll files, not .so files. 66959ab56c27Smrg shrext_cmds=.dll 66969ab56c27Smrg # FIXME: Setting linknames here is a bad hack. 66979ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66989ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66999ab56c27Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 67009ab56c27Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 67019ab56c27Smrg else 67029ab56c27Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 67039ab56c27Smrg fi~ 67049ab56c27Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 67059ab56c27Smrg linknames=' 67069ab56c27Smrg # The linker will not automatically build a static lib if we build a DLL. 67079ab56c27Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 67089ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67099ab56c27Smrg # Don't use ranlib 67109ab56c27Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 67119ab56c27Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 67129ab56c27Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 67139ab56c27Smrg case $lt_outputfile in 67149ab56c27Smrg *.exe|*.EXE) ;; 67159ab56c27Smrg *) 67169ab56c27Smrg lt_outputfile=$lt_outputfile.exe 67179ab56c27Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 67189ab56c27Smrg ;; 67199ab56c27Smrg esac~ 67209ab56c27Smrg func_to_tool_file "$lt_outputfile"~ 67219ab56c27Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 67229ab56c27Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 67239ab56c27Smrg $RM "$lt_outputfile.manifest"; 67249ab56c27Smrg fi' 67259ab56c27Smrg ;; 67269ab56c27Smrg *) 67279ab56c27Smrg # g++ 67289ab56c27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67299ab56c27Smrg # as there is no search path for DLLs. 67309ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67319ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67329ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67339ab56c27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 67349ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67354cd6a3aeSmrg 67369ab56c27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67379ab56c27Smrg _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' 67389ab56c27Smrg # If the export-symbols file already is a .def file, use it as 67399ab56c27Smrg # is; otherwise, prepend EXPORTS... 67409ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67419ab56c27Smrg cp $export_symbols $output_objdir/$soname.def; 67429ab56c27Smrg else 67439ab56c27Smrg echo EXPORTS > $output_objdir/$soname.def; 67449ab56c27Smrg cat $export_symbols >> $output_objdir/$soname.def; 67459ab56c27Smrg fi~ 67469ab56c27Smrg $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' 67479ab56c27Smrg else 67489ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67499ab56c27Smrg fi 67509ab56c27Smrg ;; 67519ab56c27Smrg esac 67529ab56c27Smrg ;; 67539ab56c27Smrg darwin* | rhapsody*) 67549ab56c27Smrg _LT_DARWIN_LINKER_FEATURES($1) 67559ab56c27Smrg ;; 67564cd6a3aeSmrg 67579ab56c27Smrg os2*) 67589ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67599ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67609ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67619ab56c27Smrg shrext_cmds=.dll 67629ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67639ab56c27Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67649ab56c27Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67659ab56c27Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67669ab56c27Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67679ab56c27Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67689ab56c27Smrg emximp -o $lib $output_objdir/$libname.def' 67699ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67709ab56c27Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67719ab56c27Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67729ab56c27Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67739ab56c27Smrg prefix_cmds="$SED"~ 67749ab56c27Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67759ab56c27Smrg prefix_cmds="$prefix_cmds -e 1d"; 67769ab56c27Smrg fi~ 67779ab56c27Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67789ab56c27Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67799ab56c27Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67809ab56c27Smrg emximp -o $lib $output_objdir/$libname.def' 67819ab56c27Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67829ab56c27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67839ab56c27Smrg _LT_TAGVAR(file_list_spec, $1)='@' 67849ab56c27Smrg ;; 678554cef2ddSmrg 67869ab56c27Smrg dgux*) 67879ab56c27Smrg case $cc_basename in 67889ab56c27Smrg ec++*) 67899ab56c27Smrg # FIXME: insert proper C++ library support 67909ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67919ab56c27Smrg ;; 67929ab56c27Smrg ghcx*) 67939ab56c27Smrg # Green Hills C++ Compiler 67949ab56c27Smrg # FIXME: insert proper C++ library support 67959ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67969ab56c27Smrg ;; 67979ab56c27Smrg *) 67989ab56c27Smrg # FIXME: insert proper C++ library support 67999ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68009ab56c27Smrg ;; 68019ab56c27Smrg esac 68029ab56c27Smrg ;; 68034cd6a3aeSmrg 68049ab56c27Smrg freebsd2.*) 68059ab56c27Smrg # C++ shared libraries reported to be fairly broken before 68069ab56c27Smrg # switch to ELF 68079ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68089ab56c27Smrg ;; 68094cd6a3aeSmrg 68109ab56c27Smrg freebsd-elf*) 68119ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68129ab56c27Smrg ;; 68134cd6a3aeSmrg 68149ab56c27Smrg freebsd* | dragonfly* | midnightbsd*) 68159ab56c27Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 68169ab56c27Smrg # conventions 68179ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 68189ab56c27Smrg ;; 68194cd6a3aeSmrg 68209ab56c27Smrg haiku*) 68219ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 68229ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68239ab56c27Smrg ;; 68244cd6a3aeSmrg 68259ab56c27Smrg hpux9*) 68269ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68279ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68289ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68299ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68309ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68319ab56c27Smrg # but as the default 68329ab56c27Smrg # location of the library. 68334cd6a3aeSmrg 68349ab56c27Smrg case $cc_basename in 68359ab56c27Smrg CC*) 68369ab56c27Smrg # FIXME: insert proper C++ library support 68379ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68389ab56c27Smrg ;; 68399ab56c27Smrg aCC*) 68409ab56c27Smrg _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' 68419ab56c27Smrg # Commands to make compiler produce verbose output that lists 68429ab56c27Smrg # what "hidden" libraries, object files and flags are used when 68439ab56c27Smrg # linking a shared library. 68449ab56c27Smrg # 68459ab56c27Smrg # There doesn't appear to be a way to prevent this compiler from 68469ab56c27Smrg # explicitly linking system object files so we need to strip them 68479ab56c27Smrg # from the output so that they don't get included in the library 68489ab56c27Smrg # dependencies. 68499ab56c27Smrg 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"' 68509ab56c27Smrg ;; 68519ab56c27Smrg *) 68529ab56c27Smrg if test yes = "$GXX"; then 68539ab56c27Smrg _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' 68549ab56c27Smrg else 68559ab56c27Smrg # FIXME: insert proper C++ library support 68569ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68579ab56c27Smrg fi 68589ab56c27Smrg ;; 68599ab56c27Smrg esac 68609ab56c27Smrg ;; 68614cd6a3aeSmrg 68629ab56c27Smrg hpux10*|hpux11*) 68639ab56c27Smrg if test no = "$with_gnu_ld"; then 68649ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68659ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68664cd6a3aeSmrg 68679ab56c27Smrg case $host_cpu in 68689ab56c27Smrg hppa*64*|ia64*) 68699ab56c27Smrg ;; 68709ab56c27Smrg *) 68719ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68729ab56c27Smrg ;; 68739ab56c27Smrg esac 68749ab56c27Smrg fi 68759ab56c27Smrg case $host_cpu in 68769ab56c27Smrg hppa*64*|ia64*) 68779ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68789ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68799ab56c27Smrg ;; 68809ab56c27Smrg *) 68819ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68829ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68839ab56c27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68849ab56c27Smrg # but as the default 68859ab56c27Smrg # location of the library. 68869ab56c27Smrg ;; 68879ab56c27Smrg esac 68884cd6a3aeSmrg 68899ab56c27Smrg case $cc_basename in 68909ab56c27Smrg CC*) 68919ab56c27Smrg # FIXME: insert proper C++ library support 68929ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68939ab56c27Smrg ;; 68949ab56c27Smrg aCC*) 68959ab56c27Smrg case $host_cpu in 68969ab56c27Smrg hppa*64*) 68979ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68989ab56c27Smrg ;; 68999ab56c27Smrg ia64*) 69009ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69019ab56c27Smrg ;; 69029ab56c27Smrg *) 69039ab56c27Smrg _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' 69049ab56c27Smrg ;; 69059ab56c27Smrg esac 69069ab56c27Smrg # Commands to make compiler produce verbose output that lists 69079ab56c27Smrg # what "hidden" libraries, object files and flags are used when 69089ab56c27Smrg # linking a shared library. 69099ab56c27Smrg # 69109ab56c27Smrg # There doesn't appear to be a way to prevent this compiler from 69119ab56c27Smrg # explicitly linking system object files so we need to strip them 69129ab56c27Smrg # from the output so that they don't get included in the library 69139ab56c27Smrg # dependencies. 69149ab56c27Smrg 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"' 69159ab56c27Smrg ;; 69169ab56c27Smrg *) 69179ab56c27Smrg if test yes = "$GXX"; then 69189ab56c27Smrg if test no = "$with_gnu_ld"; then 69199ab56c27Smrg case $host_cpu in 69209ab56c27Smrg hppa*64*) 69219ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69229ab56c27Smrg ;; 69239ab56c27Smrg ia64*) 69249ab56c27Smrg _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' 69259ab56c27Smrg ;; 69269ab56c27Smrg *) 69279ab56c27Smrg _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' 69289ab56c27Smrg ;; 69299ab56c27Smrg esac 69309ab56c27Smrg fi 69319ab56c27Smrg else 69329ab56c27Smrg # FIXME: insert proper C++ library support 69339ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69349ab56c27Smrg fi 69359ab56c27Smrg ;; 69369ab56c27Smrg esac 69379ab56c27Smrg ;; 69384cd6a3aeSmrg 69399ab56c27Smrg interix[[3-9]]*) 69409ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69419ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69429ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69439ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69449ab56c27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69459ab56c27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69469ab56c27Smrg # default) and relocated if they conflict, which is a slow very memory 69479ab56c27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69489ab56c27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69499ab56c27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69509ab56c27Smrg _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' 69519ab56c27Smrg _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' 69529ab56c27Smrg ;; 69539ab56c27Smrg irix5* | irix6*) 69549ab56c27Smrg case $cc_basename in 69559ab56c27Smrg CC*) 69569ab56c27Smrg # SGI C++ 69579ab56c27Smrg _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' 69584cd6a3aeSmrg 69599ab56c27Smrg # Archives containing C++ object files must be created using 69609ab56c27Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69619ab56c27Smrg # necessary to make sure instantiated templates are included 69629ab56c27Smrg # in the archive. 69639ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69649ab56c27Smrg ;; 69659ab56c27Smrg *) 69669ab56c27Smrg if test yes = "$GXX"; then 69679ab56c27Smrg if test no = "$with_gnu_ld"; then 69689ab56c27Smrg _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' 69699ab56c27Smrg else 69709ab56c27Smrg _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' 69719ab56c27Smrg fi 69729ab56c27Smrg fi 69739ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69749ab56c27Smrg ;; 69759ab56c27Smrg esac 69769ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69779ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69789ab56c27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69799ab56c27Smrg ;; 69804cd6a3aeSmrg 69819ab56c27Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69829ab56c27Smrg case $cc_basename in 69839ab56c27Smrg KCC*) 69849ab56c27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69854cd6a3aeSmrg 69869ab56c27Smrg # KCC will only create a shared library if the output file 69879ab56c27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69889ab56c27Smrg # to its proper name (with version) after linking. 69899ab56c27Smrg _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' 69909ab56c27Smrg _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' 69919ab56c27Smrg # Commands to make compiler produce verbose output that lists 69929ab56c27Smrg # what "hidden" libraries, object files and flags are used when 69939ab56c27Smrg # linking a shared library. 69949ab56c27Smrg # 69959ab56c27Smrg # There doesn't appear to be a way to prevent this compiler from 69969ab56c27Smrg # explicitly linking system object files so we need to strip them 69979ab56c27Smrg # from the output so that they don't get included in the library 69989ab56c27Smrg # dependencies. 69999ab56c27Smrg 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"' 70004cd6a3aeSmrg 70019ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70029ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70034cd6a3aeSmrg 70049ab56c27Smrg # Archives containing C++ object files must be created using 70059ab56c27Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 70069ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 70079ab56c27Smrg ;; 70089ab56c27Smrg icpc* | ecpc* ) 70099ab56c27Smrg # Intel C++ 70109ab56c27Smrg with_gnu_ld=yes 70119ab56c27Smrg # version 8.0 and above of icpc choke on multiply defined symbols 70129ab56c27Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 70139ab56c27Smrg # earlier do not add the objects themselves. 70149ab56c27Smrg case `$CC -V 2>&1` in 70159ab56c27Smrg *"Version 7."*) 70169ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70179ab56c27Smrg _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' 70189ab56c27Smrg ;; 70199ab56c27Smrg *) # Version 8.0 or newer 70209ab56c27Smrg tmp_idyn= 70219ab56c27Smrg case $host_cpu in 70229ab56c27Smrg ia64*) tmp_idyn=' -i_dynamic';; 70239ab56c27Smrg esac 70249ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70259ab56c27Smrg _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' 70269ab56c27Smrg ;; 70279ab56c27Smrg esac 70289ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70299ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70309ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70319ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70329ab56c27Smrg ;; 70339ab56c27Smrg pgCC* | pgcpp*) 70349ab56c27Smrg # Portland Group C++ compiler 70359ab56c27Smrg case `$CC -V` in 70369ab56c27Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70379ab56c27Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70389ab56c27Smrg rm -rf $tpldir~ 70399ab56c27Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70409ab56c27Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70419ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70429ab56c27Smrg rm -rf $tpldir~ 70439ab56c27Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70449ab56c27Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70459ab56c27Smrg $RANLIB $oldlib' 70469ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70479ab56c27Smrg rm -rf $tpldir~ 70489ab56c27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70499ab56c27Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70509ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70519ab56c27Smrg rm -rf $tpldir~ 70529ab56c27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70539ab56c27Smrg $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' 70549ab56c27Smrg ;; 70559ab56c27Smrg *) # Version 6 and above use weak symbols 70569ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70579ab56c27Smrg _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' 70589ab56c27Smrg ;; 70599ab56c27Smrg esac 70604cd6a3aeSmrg 70619ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70629ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70639ab56c27Smrg _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' 70649ab56c27Smrg ;; 70659ab56c27Smrg cxx*) 70669ab56c27Smrg # Compaq C++ 70679ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70689ab56c27Smrg _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' 70694cd6a3aeSmrg 70709ab56c27Smrg runpath_var=LD_RUN_PATH 70719ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70729ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70734cd6a3aeSmrg 70749ab56c27Smrg # Commands to make compiler produce verbose output that lists 70759ab56c27Smrg # what "hidden" libraries, object files and flags are used when 70769ab56c27Smrg # linking a shared library. 70779ab56c27Smrg # 70789ab56c27Smrg # There doesn't appear to be a way to prevent this compiler from 70799ab56c27Smrg # explicitly linking system object files so we need to strip them 70809ab56c27Smrg # from the output so that they don't get included in the library 70819ab56c27Smrg # dependencies. 70829ab56c27Smrg 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' 70839ab56c27Smrg ;; 70849ab56c27Smrg xl* | mpixl* | bgxl*) 70859ab56c27Smrg # IBM XL 8.0 on PPC, with GNU ld 70869ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70879ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70889ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70899ab56c27Smrg if test yes = "$supports_anon_versioning"; then 70909ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70919ab56c27Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70929ab56c27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70939ab56c27Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70949ab56c27Smrg fi 70959ab56c27Smrg ;; 70969ab56c27Smrg *) 70979ab56c27Smrg case `$CC -V 2>&1 | $SED 5q` in 70989ab56c27Smrg *Sun\ C*) 70999ab56c27Smrg # Sun C++ 5.9 71009ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 71019ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 71029ab56c27Smrg _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' 71039ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71049ab56c27Smrg _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' 71059ab56c27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 71064cd6a3aeSmrg 71079ab56c27Smrg # Not sure whether something based on 71089ab56c27Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 71099ab56c27Smrg # would be better. 71109ab56c27Smrg output_verbose_link_cmd='func_echo_all' 71114cd6a3aeSmrg 71129ab56c27Smrg # Archives containing C++ object files must be created using 71139ab56c27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 71149ab56c27Smrg # necessary to make sure instantiated templates are included 71159ab56c27Smrg # in the archive. 71169ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 71179ab56c27Smrg ;; 71189ab56c27Smrg esac 71199ab56c27Smrg ;; 71209ab56c27Smrg esac 71219ab56c27Smrg ;; 71224cd6a3aeSmrg 71239ab56c27Smrg lynxos*) 71249ab56c27Smrg # FIXME: insert proper C++ library support 71259ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71269ab56c27Smrg ;; 71274cd6a3aeSmrg 71289ab56c27Smrg m88k*) 71299ab56c27Smrg # FIXME: insert proper C++ library support 71309ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71319ab56c27Smrg ;; 71324cd6a3aeSmrg 71339ab56c27Smrg mvs*) 71349ab56c27Smrg case $cc_basename in 71359ab56c27Smrg cxx*) 71369ab56c27Smrg # FIXME: insert proper C++ library support 71379ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71389ab56c27Smrg ;; 71399ab56c27Smrg *) 71409ab56c27Smrg # FIXME: insert proper C++ library support 71419ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71429ab56c27Smrg ;; 714354cef2ddSmrg esac 71449ab56c27Smrg ;; 71454cd6a3aeSmrg 71469ab56c27Smrg netbsd*) 71479ab56c27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71489ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71499ab56c27Smrg wlarc= 71509ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71519ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71529ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71539ab56c27Smrg fi 71549ab56c27Smrg # Workaround some broken pre-1.5 toolchains 71559ab56c27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71569ab56c27Smrg ;; 715770728a38Smrg 71589ab56c27Smrg *nto* | *qnx*) 71599ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71609ab56c27Smrg ;; 716170728a38Smrg 71629ab56c27Smrg openbsd* | bitrig*) 71639ab56c27Smrg if test -f /usr/libexec/ld.so; then 71649ab56c27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71659ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71669ab56c27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71679ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71689ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71699ab56c27Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71709ab56c27Smrg _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' 71719ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71729ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71739ab56c27Smrg fi 71749ab56c27Smrg output_verbose_link_cmd=func_echo_all 71759ab56c27Smrg else 71769ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71779ab56c27Smrg fi 71789ab56c27Smrg ;; 717970728a38Smrg 71809ab56c27Smrg osf3* | osf4* | osf5*) 71819ab56c27Smrg case $cc_basename in 71829ab56c27Smrg KCC*) 71839ab56c27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 718470728a38Smrg 71859ab56c27Smrg # KCC will only create a shared library if the output file 71869ab56c27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71879ab56c27Smrg # to its proper name (with version) after linking. 71889ab56c27Smrg _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' 718970728a38Smrg 71909ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71919ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 719270728a38Smrg 71939ab56c27Smrg # Archives containing C++ object files must be created using 71949ab56c27Smrg # the KAI C++ compiler. 71959ab56c27Smrg case $host in 71969ab56c27Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71979ab56c27Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71989ab56c27Smrg esac 71999ab56c27Smrg ;; 72009ab56c27Smrg RCC*) 72019ab56c27Smrg # Rational C++ 2.4.1 72029ab56c27Smrg # FIXME: insert proper C++ library support 72039ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72049ab56c27Smrg ;; 72059ab56c27Smrg cxx*) 72069ab56c27Smrg case $host in 72079ab56c27Smrg osf3*) 72089ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72099ab56c27Smrg _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' 72109ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72119ab56c27Smrg ;; 72129ab56c27Smrg *) 72139ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 72149ab56c27Smrg _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' 72159ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 72169ab56c27Smrg echo "-hidden">> $lib.exp~ 72179ab56c27Smrg $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~ 72189ab56c27Smrg $RM $lib.exp' 72199ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 72209ab56c27Smrg ;; 72219ab56c27Smrg esac 722270728a38Smrg 72239ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 722470728a38Smrg 72259ab56c27Smrg # Commands to make compiler produce verbose output that lists 72269ab56c27Smrg # what "hidden" libraries, object files and flags are used when 72279ab56c27Smrg # linking a shared library. 72289ab56c27Smrg # 72299ab56c27Smrg # There doesn't appear to be a way to prevent this compiler from 72309ab56c27Smrg # explicitly linking system object files so we need to strip them 72319ab56c27Smrg # from the output so that they don't get included in the library 72329ab56c27Smrg # dependencies. 72339ab56c27Smrg 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"' 72349ab56c27Smrg ;; 72359ab56c27Smrg *) 72369ab56c27Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 72379ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72389ab56c27Smrg case $host in 72399ab56c27Smrg osf3*) 72409ab56c27Smrg _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' 72419ab56c27Smrg ;; 72429ab56c27Smrg *) 72439ab56c27Smrg _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' 72449ab56c27Smrg ;; 72459ab56c27Smrg esac 724670728a38Smrg 72479ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72489ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 724970728a38Smrg 72509ab56c27Smrg # Commands to make compiler produce verbose output that lists 72519ab56c27Smrg # what "hidden" libraries, object files and flags are used when 72529ab56c27Smrg # linking a shared library. 72539ab56c27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 725470728a38Smrg 72559ab56c27Smrg else 72569ab56c27Smrg # FIXME: insert proper C++ library support 72579ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72589ab56c27Smrg fi 72599ab56c27Smrg ;; 72609ab56c27Smrg esac 72619ab56c27Smrg ;; 726270728a38Smrg 72639ab56c27Smrg psos*) 72649ab56c27Smrg # FIXME: insert proper C++ library support 72659ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72669ab56c27Smrg ;; 726770728a38Smrg 72689ab56c27Smrg sunos4*) 72699ab56c27Smrg case $cc_basename in 72709ab56c27Smrg CC*) 72719ab56c27Smrg # Sun C++ 4.x 72729ab56c27Smrg # FIXME: insert proper C++ library support 72739ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72749ab56c27Smrg ;; 72759ab56c27Smrg lcc*) 72769ab56c27Smrg # Lucid 72779ab56c27Smrg # FIXME: insert proper C++ library support 72789ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72799ab56c27Smrg ;; 72809ab56c27Smrg *) 72819ab56c27Smrg # FIXME: insert proper C++ library support 72829ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72839ab56c27Smrg ;; 72849ab56c27Smrg esac 72859ab56c27Smrg ;; 72864cd6a3aeSmrg 72879ab56c27Smrg solaris*) 72889ab56c27Smrg case $cc_basename in 72899ab56c27Smrg CC* | sunCC*) 72909ab56c27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72919ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72929ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72939ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72949ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72959ab56c27Smrg $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' 72964cd6a3aeSmrg 72979ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72989ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72999ab56c27Smrg case $host_os in 73009ab56c27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73019ab56c27Smrg *) 73029ab56c27Smrg # The compiler driver will combine and reorder linker options, 73039ab56c27Smrg # but understands '-z linker_flag'. 73049ab56c27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 73059ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 73069ab56c27Smrg ;; 73079ab56c27Smrg esac 73089ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73094cd6a3aeSmrg 73109ab56c27Smrg output_verbose_link_cmd='func_echo_all' 73114cd6a3aeSmrg 73129ab56c27Smrg # Archives containing C++ object files must be created using 73139ab56c27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 73149ab56c27Smrg # necessary to make sure instantiated templates are included 73159ab56c27Smrg # in the archive. 73169ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 73179ab56c27Smrg ;; 73189ab56c27Smrg gcx*) 73199ab56c27Smrg # Green Hills C++ Compiler 73209ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73214cd6a3aeSmrg 73229ab56c27Smrg # The C++ compiler must be used to create the archive. 73239ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 73249ab56c27Smrg ;; 73259ab56c27Smrg *) 73269ab56c27Smrg # GNU C++ compiler with Solaris linker 73279ab56c27Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 73289ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73299ab56c27Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73309ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73319ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73329ab56c27Smrg $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' 73334cd6a3aeSmrg 73349ab56c27Smrg # Commands to make compiler produce verbose output that lists 73359ab56c27Smrg # what "hidden" libraries, object files and flags are used when 73369ab56c27Smrg # linking a shared library. 73379ab56c27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73389ab56c27Smrg else 73399ab56c27Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73409ab56c27Smrg # platform. 73419ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73429ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73439ab56c27Smrg $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' 73444cd6a3aeSmrg 73459ab56c27Smrg # Commands to make compiler produce verbose output that lists 73469ab56c27Smrg # what "hidden" libraries, object files and flags are used when 73479ab56c27Smrg # linking a shared library. 73489ab56c27Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73499ab56c27Smrg fi 73504cd6a3aeSmrg 73519ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73529ab56c27Smrg case $host_os in 73539ab56c27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73549ab56c27Smrg *) 73559ab56c27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73569ab56c27Smrg ;; 73579ab56c27Smrg esac 73589ab56c27Smrg fi 73599ab56c27Smrg ;; 73609ab56c27Smrg esac 73619ab56c27Smrg ;; 73624cd6a3aeSmrg 73639ab56c27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73649ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73659ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73669ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73679ab56c27Smrg runpath_var='LD_RUN_PATH' 73684cd6a3aeSmrg 73699ab56c27Smrg case $cc_basename in 73709ab56c27Smrg CC*) 73719ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73729ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73739ab56c27Smrg ;; 73749ab56c27Smrg *) 73759ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73769ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73779ab56c27Smrg ;; 73789ab56c27Smrg esac 73799ab56c27Smrg ;; 73804cd6a3aeSmrg 73819ab56c27Smrg sysv5* | sco3.2v5* | sco5v6*) 73829ab56c27Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73839ab56c27Smrg # link with -lc, and that would cause any symbols used from libc to 73849ab56c27Smrg # always be unresolved, which means just about no library would 73859ab56c27Smrg # ever link correctly. If we're not using GNU ld we use -z text 73869ab56c27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73879ab56c27Smrg # as -z defs. 73889ab56c27Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73899ab56c27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73909ab56c27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73919ab56c27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73929ab56c27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73939ab56c27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73949ab56c27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73959ab56c27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73969ab56c27Smrg runpath_var='LD_RUN_PATH' 73974cd6a3aeSmrg 73989ab56c27Smrg case $cc_basename in 73999ab56c27Smrg CC*) 74009ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74019ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74029ab56c27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 74039ab56c27Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 74049ab56c27Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 74059ab56c27Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 74069ab56c27Smrg ;; 74079ab56c27Smrg *) 74089ab56c27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74099ab56c27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74109ab56c27Smrg ;; 74119ab56c27Smrg esac 74129ab56c27Smrg ;; 74134cd6a3aeSmrg 74149ab56c27Smrg tandem*) 74159ab56c27Smrg case $cc_basename in 74169ab56c27Smrg NCC*) 74179ab56c27Smrg # NonStop-UX NCC 3.20 74189ab56c27Smrg # FIXME: insert proper C++ library support 74199ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74209ab56c27Smrg ;; 74219ab56c27Smrg *) 74229ab56c27Smrg # FIXME: insert proper C++ library support 74239ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74249ab56c27Smrg ;; 74259ab56c27Smrg esac 74269ab56c27Smrg ;; 74274cd6a3aeSmrg 74289ab56c27Smrg vxworks*) 74299ab56c27Smrg # FIXME: insert proper C++ library support 74309ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74319ab56c27Smrg ;; 743270728a38Smrg 74339ab56c27Smrg *) 74349ab56c27Smrg # FIXME: insert proper C++ library support 74359ab56c27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74369ab56c27Smrg ;; 74379ab56c27Smrg esac 743870728a38Smrg 74399ab56c27Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74409ab56c27Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74414cd6a3aeSmrg 74429ab56c27Smrg _LT_TAGVAR(GCC, $1)=$GXX 74439ab56c27Smrg _LT_TAGVAR(LD, $1)=$LD 74444cd6a3aeSmrg 74459ab56c27Smrg ## CAVEAT EMPTOR: 74469ab56c27Smrg ## There is no encapsulation within the following macros, do not change 74479ab56c27Smrg ## the running order or otherwise move them around unless you know exactly 74489ab56c27Smrg ## what you are doing... 74499ab56c27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74509ab56c27Smrg _LT_COMPILER_PIC($1) 74519ab56c27Smrg _LT_COMPILER_C_O($1) 74529ab56c27Smrg _LT_COMPILER_FILE_LOCKS($1) 74539ab56c27Smrg _LT_LINKER_SHLIBS($1) 74549ab56c27Smrg _LT_SYS_DYNAMIC_LINKER($1) 74559ab56c27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74564cd6a3aeSmrg 74579ab56c27Smrg _LT_CONFIG($1) 74589ab56c27Smrg fi # test -n "$compiler" 74594cd6a3aeSmrg 74609ab56c27Smrg CC=$lt_save_CC 74619ab56c27Smrg CFLAGS=$lt_save_CFLAGS 74629ab56c27Smrg LDCXX=$LD 74639ab56c27Smrg LD=$lt_save_LD 74649ab56c27Smrg GCC=$lt_save_GCC 74659ab56c27Smrg with_gnu_ld=$lt_save_with_gnu_ld 74669ab56c27Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74679ab56c27Smrg lt_cv_path_LD=$lt_save_path_LD 74689ab56c27Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74699ab56c27Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74709ab56c27Smrgfi # test yes != "$_lt_caught_CXX_error" 74714cd6a3aeSmrg 74729ab56c27SmrgAC_LANG_POP 74739ab56c27Smrg])# _LT_LANG_CXX_CONFIG 74744cd6a3aeSmrg 74754cd6a3aeSmrg 74769ab56c27Smrg# _LT_FUNC_STRIPNAME_CNF 74779ab56c27Smrg# ---------------------- 74789ab56c27Smrg# func_stripname_cnf prefix suffix name 74799ab56c27Smrg# strip PREFIX and SUFFIX off of NAME. 74809ab56c27Smrg# PREFIX and SUFFIX must not contain globbing or regex special 74819ab56c27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74829ab56c27Smrg# dot (in which case that matches only a dot). 74839ab56c27Smrg# 74849ab56c27Smrg# This function is identical to the (non-XSI) version of func_stripname, 74859ab56c27Smrg# except this one can be used by m4 code that may be executed by configure, 74869ab56c27Smrg# rather than the libtool script. 74879ab56c27Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74889ab56c27SmrgAC_REQUIRE([_LT_DECL_SED]) 74899ab56c27SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74909ab56c27Smrgfunc_stripname_cnf () 749154cef2ddSmrg{ 74929ab56c27Smrg case @S|@2 in 74939ab56c27Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74949ab56c27Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74959ab56c27Smrg esac 74969ab56c27Smrg} # func_stripname_cnf 74979ab56c27Smrg])# _LT_FUNC_STRIPNAME_CNF 74984cd6a3aeSmrg 74994cd6a3aeSmrg 75009ab56c27Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 75019ab56c27Smrg# --------------------------------- 75029ab56c27Smrg# Figure out "hidden" library dependencies from verbose 75039ab56c27Smrg# compiler output when linking a shared library. 75049ab56c27Smrg# Parse the compiler output and extract the necessary 75059ab56c27Smrg# objects, libraries and library flags. 75069ab56c27Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 75079ab56c27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 75089ab56c27SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 75099ab56c27Smrg# Dependencies to place before and after the object being linked: 75109ab56c27Smrg_LT_TAGVAR(predep_objects, $1)= 75119ab56c27Smrg_LT_TAGVAR(postdep_objects, $1)= 75129ab56c27Smrg_LT_TAGVAR(predeps, $1)= 75139ab56c27Smrg_LT_TAGVAR(postdeps, $1)= 75149ab56c27Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 75159ab56c27Smrg 75169ab56c27Smrgdnl we can't use the lt_simple_compile_test_code here, 75179ab56c27Smrgdnl because it contains code intended for an executable, 75189ab56c27Smrgdnl not a library. It's possible we should let each 75199ab56c27Smrgdnl tag define a new lt_????_link_test_code variable, 75209ab56c27Smrgdnl but it's only used here... 75219ab56c27Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 75229ab56c27Smrgint a; 75239ab56c27Smrgvoid foo (void) { a = 0; } 75249ab56c27Smrg_LT_EOF 75259ab56c27Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 75269ab56c27Smrgclass Foo 75279ab56c27Smrg{ 75289ab56c27Smrgpublic: 75299ab56c27Smrg Foo (void) { a = 0; } 75309ab56c27Smrgprivate: 75319ab56c27Smrg int a; 75329ab56c27Smrg}; 75339ab56c27Smrg_LT_EOF 75349ab56c27Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75359ab56c27Smrg subroutine foo 75369ab56c27Smrg implicit none 75379ab56c27Smrg integer*4 a 75389ab56c27Smrg a=0 75399ab56c27Smrg return 75409ab56c27Smrg end 75419ab56c27Smrg_LT_EOF 75429ab56c27Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75439ab56c27Smrg subroutine foo 75449ab56c27Smrg implicit none 75459ab56c27Smrg integer a 75469ab56c27Smrg a=0 75479ab56c27Smrg return 75489ab56c27Smrg end 75499ab56c27Smrg_LT_EOF 75509ab56c27Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75519ab56c27Smrgpublic class foo { 75529ab56c27Smrg private int a; 75539ab56c27Smrg public void bar (void) { 75549ab56c27Smrg a = 0; 75559ab56c27Smrg } 75569ab56c27Smrg}; 75579ab56c27Smrg_LT_EOF 75589ab56c27Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75599ab56c27Smrgpackage foo 75609ab56c27Smrgfunc foo() { 756154cef2ddSmrg} 756254cef2ddSmrg_LT_EOF 75634cd6a3aeSmrg]) 75649ab56c27Smrg 75659ab56c27Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75669ab56c27Smrgcase "$CC $CFLAGS " in #( 75679ab56c27Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75689ab56c27Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75699ab56c27Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75709ab56c27Smrgesac 75719ab56c27Smrg 75729ab56c27Smrgdnl Parse the compiler output and extract the necessary 75739ab56c27Smrgdnl objects, libraries and library flags. 75749ab56c27Smrgif AC_TRY_EVAL(ac_compile); then 75759ab56c27Smrg # Parse the compiler output and extract the necessary 75769ab56c27Smrg # objects, libraries and library flags. 75779ab56c27Smrg 75789ab56c27Smrg # Sentinel used to keep track of whether or not we are before 75799ab56c27Smrg # the conftest object file. 75809ab56c27Smrg pre_test_object_deps_done=no 75819ab56c27Smrg 75829ab56c27Smrg for p in `eval "$output_verbose_link_cmd"`; do 75839ab56c27Smrg case $prev$p in 75849ab56c27Smrg 75859ab56c27Smrg -L* | -R* | -l*) 75869ab56c27Smrg # Some compilers place space between "-{L,R}" and the path. 75879ab56c27Smrg # Remove the space. 75889ab56c27Smrg if test x-L = "$p" || 75899ab56c27Smrg test x-R = "$p"; then 75909ab56c27Smrg prev=$p 75919ab56c27Smrg continue 75929ab56c27Smrg fi 75939ab56c27Smrg 75949ab56c27Smrg # Expand the sysroot to ease extracting the directories later. 75959ab56c27Smrg if test -z "$prev"; then 75969ab56c27Smrg case $p in 75979ab56c27Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75989ab56c27Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75999ab56c27Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 76009ab56c27Smrg esac 76019ab56c27Smrg fi 76029ab56c27Smrg case $p in 76039ab56c27Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 76049ab56c27Smrg esac 76059ab56c27Smrg if test no = "$pre_test_object_deps_done"; then 76069ab56c27Smrg case $prev in 76079ab56c27Smrg -L | -R) 76089ab56c27Smrg # Internal compiler library paths should come after those 76099ab56c27Smrg # provided the user. The postdeps already come after the 76109ab56c27Smrg # user supplied libs so there is no need to process them. 76119ab56c27Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 76129ab56c27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 76139ab56c27Smrg else 76149ab56c27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 76159ab56c27Smrg fi 76169ab56c27Smrg ;; 76179ab56c27Smrg # The "-l" case would never come before the object being 76189ab56c27Smrg # linked, so don't bother handling this case. 76199ab56c27Smrg esac 76209ab56c27Smrg else 76219ab56c27Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 76229ab56c27Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 76239ab56c27Smrg else 76249ab56c27Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 76259ab56c27Smrg fi 76269ab56c27Smrg fi 76279ab56c27Smrg prev= 76289ab56c27Smrg ;; 76299ab56c27Smrg 76309ab56c27Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 76319ab56c27Smrg *.$objext) 76329ab56c27Smrg # This assumes that the test object file only shows up 76339ab56c27Smrg # once in the compiler output. 76349ab56c27Smrg if test "$p" = "conftest.$objext"; then 76359ab56c27Smrg pre_test_object_deps_done=yes 76369ab56c27Smrg continue 76379ab56c27Smrg fi 76389ab56c27Smrg 76399ab56c27Smrg if test no = "$pre_test_object_deps_done"; then 76409ab56c27Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76419ab56c27Smrg _LT_TAGVAR(predep_objects, $1)=$p 76429ab56c27Smrg else 76439ab56c27Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76449ab56c27Smrg fi 76459ab56c27Smrg else 76469ab56c27Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76479ab56c27Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76489ab56c27Smrg else 76499ab56c27Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76509ab56c27Smrg fi 76519ab56c27Smrg fi 76529ab56c27Smrg ;; 76539ab56c27Smrg 76549ab56c27Smrg *) ;; # Ignore the rest. 76559ab56c27Smrg 76569ab56c27Smrg esac 76579ab56c27Smrg done 76589ab56c27Smrg 76599ab56c27Smrg # Clean up. 76609ab56c27Smrg rm -f a.out a.exe 766154cef2ddSmrgelse 76629ab56c27Smrg echo "libtool.m4: error: problem compiling $1 test program" 766354cef2ddSmrgfi 76644cd6a3aeSmrg 76659ab56c27Smrg$RM -f confest.$objext 76669ab56c27SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76674cd6a3aeSmrg 76689ab56c27Smrg# PORTME: override above test on systems where it is broken 76699ab56c27Smrgm4_if([$1], [CXX], 76709ab56c27Smrg[case $host_os in 76719ab56c27Smrginterix[[3-9]]*) 76729ab56c27Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76739ab56c27Smrg # hack all around it, let's just trust "g++" to DTRT. 76749ab56c27Smrg _LT_TAGVAR(predep_objects,$1)= 76759ab56c27Smrg _LT_TAGVAR(postdep_objects,$1)= 76769ab56c27Smrg _LT_TAGVAR(postdeps,$1)= 76779ab56c27Smrg ;; 76789ab56c27Smrgesac 76799ab56c27Smrg]) 76804cd6a3aeSmrg 76819ab56c27Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76829ab56c27Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76839ab56c27Smrgesac 76849ab56c27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76859ab56c27Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76869ab56c27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76879ab56c27Smrgfi 76889ab56c27Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76899ab56c27Smrg [The directories searched by this compiler when creating a shared library]) 76909ab56c27Smrg_LT_TAGDECL([], [predep_objects], [1], 76919ab56c27Smrg [Dependencies to place before and after the objects being linked to 76929ab56c27Smrg create a shared library]) 76939ab56c27Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76949ab56c27Smrg_LT_TAGDECL([], [predeps], [1]) 76959ab56c27Smrg_LT_TAGDECL([], [postdeps], [1]) 76969ab56c27Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76979ab56c27Smrg [The library search path used internally by the compiler when linking 76989ab56c27Smrg a shared library]) 76999ab56c27Smrg])# _LT_SYS_HIDDEN_LIBDEPS 77004cd6a3aeSmrg 770154cef2ddSmrg 77029ab56c27Smrg# _LT_LANG_F77_CONFIG([TAG]) 77039ab56c27Smrg# -------------------------- 77049ab56c27Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 77059ab56c27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 77069ab56c27Smrg# to write the compiler configuration to 'libtool'. 77079ab56c27Smrgm4_defun([_LT_LANG_F77_CONFIG], 77089ab56c27Smrg[AC_LANG_PUSH(Fortran 77) 77099ab56c27Smrgif test -z "$F77" || test no = "$F77"; then 77109ab56c27Smrg _lt_disable_F77=yes 77119ab56c27Smrgfi 77124cd6a3aeSmrg 77139ab56c27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 77149ab56c27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 77159ab56c27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 77169ab56c27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 77179ab56c27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 77189ab56c27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 77199ab56c27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 77209ab56c27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 77219ab56c27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 77229ab56c27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 77239ab56c27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 77249ab56c27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 77259ab56c27Smrg_LT_TAGVAR(module_cmds, $1)= 77269ab56c27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 77279ab56c27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77289ab56c27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77299ab56c27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77309ab56c27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77319ab56c27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 77329ab56c27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77339ab56c27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77344cd6a3aeSmrg 77359ab56c27Smrg# Source file extension for f77 test sources. 77369ab56c27Smrgac_ext=f 773754cef2ddSmrg 77389ab56c27Smrg# Object file extension for compiled f77 test sources. 77399ab56c27Smrgobjext=o 77409ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 77419ab56c27Smrg 77429ab56c27Smrg# No sense in running all these tests if we already determined that 77439ab56c27Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77449ab56c27Smrg# are currently assumed to apply to all compilers on this platform, 77459ab56c27Smrg# and will be corrupted by setting them based on a non-working compiler. 77469ab56c27Smrgif test yes != "$_lt_disable_F77"; then 77479ab56c27Smrg # Code to be used in simple compile tests 77489ab56c27Smrg lt_simple_compile_test_code="\ 77499ab56c27Smrg subroutine t 77509ab56c27Smrg return 77519ab56c27Smrg end 77529ab56c27Smrg" 77539ab56c27Smrg 77549ab56c27Smrg # Code to be used in simple link tests 77559ab56c27Smrg lt_simple_link_test_code="\ 77569ab56c27Smrg program t 77579ab56c27Smrg end 77589ab56c27Smrg" 77599ab56c27Smrg 77609ab56c27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77619ab56c27Smrg _LT_TAG_COMPILER 77629ab56c27Smrg 77639ab56c27Smrg # save warnings/boilerplate of simple test code 77649ab56c27Smrg _LT_COMPILER_BOILERPLATE 77659ab56c27Smrg _LT_LINKER_BOILERPLATE 77669ab56c27Smrg 77679ab56c27Smrg # Allow CC to be a program name with arguments. 77689ab56c27Smrg lt_save_CC=$CC 77699ab56c27Smrg lt_save_GCC=$GCC 77709ab56c27Smrg lt_save_CFLAGS=$CFLAGS 77719ab56c27Smrg CC=${F77-"f77"} 77729ab56c27Smrg CFLAGS=$FFLAGS 77739ab56c27Smrg compiler=$CC 77749ab56c27Smrg _LT_TAGVAR(compiler, $1)=$CC 77759ab56c27Smrg _LT_CC_BASENAME([$compiler]) 77769ab56c27Smrg GCC=$G77 77779ab56c27Smrg if test -n "$compiler"; then 77789ab56c27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77799ab56c27Smrg AC_MSG_RESULT([$can_build_shared]) 77809ab56c27Smrg 77819ab56c27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77829ab56c27Smrg test no = "$can_build_shared" && enable_shared=no 77839ab56c27Smrg 77849ab56c27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77859ab56c27Smrg # are all built from PIC. 778654cef2ddSmrg case $host_os in 77879ab56c27Smrg aix3*) 77889ab56c27Smrg test yes = "$enable_shared" && enable_static=no 77899ab56c27Smrg if test -n "$RANLIB"; then 77909ab56c27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77919ab56c27Smrg postinstall_cmds='$RANLIB $lib' 77929ab56c27Smrg fi 77939ab56c27Smrg ;; 779454cef2ddSmrg aix[[4-9]]*) 77959ab56c27Smrg if test ia64 != "$host_cpu"; then 77969ab56c27Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77979ab56c27Smrg yes,aix,yes) ;; # shared object as lib.so file only 77989ab56c27Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 77999ab56c27Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 78009ab56c27Smrg esac 780154cef2ddSmrg fi 78024cd6a3aeSmrg ;; 78034cd6a3aeSmrg esac 78049ab56c27Smrg AC_MSG_RESULT([$enable_shared]) 78059ab56c27Smrg 78069ab56c27Smrg AC_MSG_CHECKING([whether to build static libraries]) 78079ab56c27Smrg # Make sure either enable_shared or enable_static is yes. 78089ab56c27Smrg test yes = "$enable_shared" || enable_static=yes 78099ab56c27Smrg AC_MSG_RESULT([$enable_static]) 78109ab56c27Smrg 78119ab56c27Smrg _LT_TAGVAR(GCC, $1)=$G77 78129ab56c27Smrg _LT_TAGVAR(LD, $1)=$LD 78139ab56c27Smrg 78149ab56c27Smrg ## CAVEAT EMPTOR: 78159ab56c27Smrg ## There is no encapsulation within the following macros, do not change 78169ab56c27Smrg ## the running order or otherwise move them around unless you know exactly 78179ab56c27Smrg ## what you are doing... 78189ab56c27Smrg _LT_COMPILER_PIC($1) 78199ab56c27Smrg _LT_COMPILER_C_O($1) 78209ab56c27Smrg _LT_COMPILER_FILE_LOCKS($1) 78219ab56c27Smrg _LT_LINKER_SHLIBS($1) 78229ab56c27Smrg _LT_SYS_DYNAMIC_LINKER($1) 78239ab56c27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 78249ab56c27Smrg 78259ab56c27Smrg _LT_CONFIG($1) 78269ab56c27Smrg fi # test -n "$compiler" 78279ab56c27Smrg 78289ab56c27Smrg GCC=$lt_save_GCC 78299ab56c27Smrg CC=$lt_save_CC 78309ab56c27Smrg CFLAGS=$lt_save_CFLAGS 78319ab56c27Smrgfi # test yes != "$_lt_disable_F77" 78329ab56c27Smrg 78339ab56c27SmrgAC_LANG_POP 78349ab56c27Smrg])# _LT_LANG_F77_CONFIG 78359ab56c27Smrg 78369ab56c27Smrg 78379ab56c27Smrg# _LT_LANG_FC_CONFIG([TAG]) 78389ab56c27Smrg# ------------------------- 78399ab56c27Smrg# Ensure that the configuration variables for a Fortran compiler are 78409ab56c27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78419ab56c27Smrg# to write the compiler configuration to 'libtool'. 78429ab56c27Smrgm4_defun([_LT_LANG_FC_CONFIG], 78439ab56c27Smrg[AC_LANG_PUSH(Fortran) 78449ab56c27Smrg 78459ab56c27Smrgif test -z "$FC" || test no = "$FC"; then 78469ab56c27Smrg _lt_disable_FC=yes 78479ab56c27Smrgfi 78489ab56c27Smrg 78499ab56c27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78509ab56c27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78519ab56c27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78529ab56c27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78539ab56c27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78549ab56c27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78559ab56c27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78569ab56c27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78579ab56c27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78589ab56c27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78599ab56c27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78609ab56c27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78619ab56c27Smrg_LT_TAGVAR(module_cmds, $1)= 78629ab56c27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78639ab56c27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78649ab56c27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78659ab56c27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78669ab56c27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78679ab56c27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78689ab56c27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78699ab56c27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78709ab56c27Smrg 78719ab56c27Smrg# Source file extension for fc test sources. 78729ab56c27Smrgac_ext=${ac_fc_srcext-f} 78739ab56c27Smrg 78749ab56c27Smrg# Object file extension for compiled fc test sources. 78759ab56c27Smrgobjext=o 78769ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 78779ab56c27Smrg 78789ab56c27Smrg# No sense in running all these tests if we already determined that 78799ab56c27Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78809ab56c27Smrg# are currently assumed to apply to all compilers on this platform, 78819ab56c27Smrg# and will be corrupted by setting them based on a non-working compiler. 78829ab56c27Smrgif test yes != "$_lt_disable_FC"; then 78839ab56c27Smrg # Code to be used in simple compile tests 78849ab56c27Smrg lt_simple_compile_test_code="\ 78859ab56c27Smrg subroutine t 78869ab56c27Smrg return 78879ab56c27Smrg end 78889ab56c27Smrg" 78894cd6a3aeSmrg 78909ab56c27Smrg # Code to be used in simple link tests 78919ab56c27Smrg lt_simple_link_test_code="\ 78929ab56c27Smrg program t 78939ab56c27Smrg end 78949ab56c27Smrg" 789554cef2ddSmrg 78969ab56c27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78979ab56c27Smrg _LT_TAG_COMPILER 78989ab56c27Smrg 78999ab56c27Smrg # save warnings/boilerplate of simple test code 79009ab56c27Smrg _LT_COMPILER_BOILERPLATE 79019ab56c27Smrg _LT_LINKER_BOILERPLATE 79029ab56c27Smrg 79039ab56c27Smrg # Allow CC to be a program name with arguments. 79049ab56c27Smrg lt_save_CC=$CC 79059ab56c27Smrg lt_save_GCC=$GCC 79069ab56c27Smrg lt_save_CFLAGS=$CFLAGS 79079ab56c27Smrg CC=${FC-"f95"} 79089ab56c27Smrg CFLAGS=$FCFLAGS 79099ab56c27Smrg compiler=$CC 79109ab56c27Smrg GCC=$ac_cv_fc_compiler_gnu 79119ab56c27Smrg 79129ab56c27Smrg _LT_TAGVAR(compiler, $1)=$CC 79139ab56c27Smrg _LT_CC_BASENAME([$compiler]) 79149ab56c27Smrg 79159ab56c27Smrg if test -n "$compiler"; then 79169ab56c27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 79179ab56c27Smrg AC_MSG_RESULT([$can_build_shared]) 79189ab56c27Smrg 79199ab56c27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 79209ab56c27Smrg test no = "$can_build_shared" && enable_shared=no 79219ab56c27Smrg 79229ab56c27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 79239ab56c27Smrg # are all built from PIC. 79249ab56c27Smrg case $host_os in 79259ab56c27Smrg aix3*) 79269ab56c27Smrg test yes = "$enable_shared" && enable_static=no 79279ab56c27Smrg if test -n "$RANLIB"; then 79289ab56c27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79299ab56c27Smrg postinstall_cmds='$RANLIB $lib' 79309ab56c27Smrg fi 79314cd6a3aeSmrg ;; 79329ab56c27Smrg aix[[4-9]]*) 79339ab56c27Smrg if test ia64 != "$host_cpu"; then 79349ab56c27Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79359ab56c27Smrg yes,aix,yes) ;; # shared object as lib.so file only 79369ab56c27Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 79379ab56c27Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79389ab56c27Smrg esac 79399ab56c27Smrg fi 794054cef2ddSmrg ;; 79419ab56c27Smrg esac 79429ab56c27Smrg AC_MSG_RESULT([$enable_shared]) 79434cd6a3aeSmrg 79449ab56c27Smrg AC_MSG_CHECKING([whether to build static libraries]) 79459ab56c27Smrg # Make sure either enable_shared or enable_static is yes. 79469ab56c27Smrg test yes = "$enable_shared" || enable_static=yes 79479ab56c27Smrg AC_MSG_RESULT([$enable_static]) 79484cd6a3aeSmrg 79499ab56c27Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79509ab56c27Smrg _LT_TAGVAR(LD, $1)=$LD 79514cd6a3aeSmrg 79529ab56c27Smrg ## CAVEAT EMPTOR: 79539ab56c27Smrg ## There is no encapsulation within the following macros, do not change 79549ab56c27Smrg ## the running order or otherwise move them around unless you know exactly 79559ab56c27Smrg ## what you are doing... 79569ab56c27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79579ab56c27Smrg _LT_COMPILER_PIC($1) 79589ab56c27Smrg _LT_COMPILER_C_O($1) 79599ab56c27Smrg _LT_COMPILER_FILE_LOCKS($1) 79609ab56c27Smrg _LT_LINKER_SHLIBS($1) 79619ab56c27Smrg _LT_SYS_DYNAMIC_LINKER($1) 79629ab56c27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79634cd6a3aeSmrg 79649ab56c27Smrg _LT_CONFIG($1) 79659ab56c27Smrg fi # test -n "$compiler" 79668c9fbc29Smrg 79679ab56c27Smrg GCC=$lt_save_GCC 79689ab56c27Smrg CC=$lt_save_CC 79699ab56c27Smrg CFLAGS=$lt_save_CFLAGS 79709ab56c27Smrgfi # test yes != "$_lt_disable_FC" 79718c9fbc29Smrg 79729ab56c27SmrgAC_LANG_POP 79739ab56c27Smrg])# _LT_LANG_FC_CONFIG 79748c9fbc29Smrg 79758c9fbc29Smrg 79769ab56c27Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79779ab56c27Smrg# -------------------------- 79789ab56c27Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79799ab56c27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79809ab56c27Smrg# to write the compiler configuration to 'libtool'. 79819ab56c27Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79829ab56c27Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79839ab56c27SmrgAC_LANG_SAVE 79848c9fbc29Smrg 79859ab56c27Smrg# Source file extension for Java test sources. 79869ab56c27Smrgac_ext=java 79874cd6a3aeSmrg 79889ab56c27Smrg# Object file extension for compiled Java test sources. 79899ab56c27Smrgobjext=o 79909ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 79914cd6a3aeSmrg 79929ab56c27Smrg# Code to be used in simple compile tests 79939ab56c27Smrglt_simple_compile_test_code="class foo {}" 79948c9fbc29Smrg 79959ab56c27Smrg# Code to be used in simple link tests 79969ab56c27Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79978c9fbc29Smrg 79989ab56c27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79999ab56c27Smrg_LT_TAG_COMPILER 80004cd6a3aeSmrg 80019ab56c27Smrg# save warnings/boilerplate of simple test code 80029ab56c27Smrg_LT_COMPILER_BOILERPLATE 80039ab56c27Smrg_LT_LINKER_BOILERPLATE 80049ab56c27Smrg 80059ab56c27Smrg# Allow CC to be a program name with arguments. 80069ab56c27Smrglt_save_CC=$CC 80079ab56c27Smrglt_save_CFLAGS=$CFLAGS 80089ab56c27Smrglt_save_GCC=$GCC 80099ab56c27SmrgGCC=yes 80109ab56c27SmrgCC=${GCJ-"gcj"} 80119ab56c27SmrgCFLAGS=$GCJFLAGS 80129ab56c27Smrgcompiler=$CC 80139ab56c27Smrg_LT_TAGVAR(compiler, $1)=$CC 80149ab56c27Smrg_LT_TAGVAR(LD, $1)=$LD 80159ab56c27Smrg_LT_CC_BASENAME([$compiler]) 80169ab56c27Smrg 80179ab56c27Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 80189ab56c27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80199ab56c27Smrg 80209ab56c27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80219ab56c27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80229ab56c27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80234cd6a3aeSmrg 80249ab56c27Smrgif test -n "$compiler"; then 80259ab56c27Smrg _LT_COMPILER_NO_RTTI($1) 80269ab56c27Smrg _LT_COMPILER_PIC($1) 80279ab56c27Smrg _LT_COMPILER_C_O($1) 80289ab56c27Smrg _LT_COMPILER_FILE_LOCKS($1) 80299ab56c27Smrg _LT_LINKER_SHLIBS($1) 80309ab56c27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80314cd6a3aeSmrg 80329ab56c27Smrg _LT_CONFIG($1) 80339ab56c27Smrgfi 80344cd6a3aeSmrg 80359ab56c27SmrgAC_LANG_RESTORE 80364cd6a3aeSmrg 80379ab56c27SmrgGCC=$lt_save_GCC 80389ab56c27SmrgCC=$lt_save_CC 80399ab56c27SmrgCFLAGS=$lt_save_CFLAGS 80409ab56c27Smrg])# _LT_LANG_GCJ_CONFIG 80414cd6a3aeSmrg 80424cd6a3aeSmrg 80439ab56c27Smrg# _LT_LANG_GO_CONFIG([TAG]) 80449ab56c27Smrg# -------------------------- 80459ab56c27Smrg# Ensure that the configuration variables for the GNU Go compiler 80469ab56c27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80479ab56c27Smrg# to write the compiler configuration to 'libtool'. 80489ab56c27Smrgm4_defun([_LT_LANG_GO_CONFIG], 80499ab56c27Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80509ab56c27SmrgAC_LANG_SAVE 80514cd6a3aeSmrg 80529ab56c27Smrg# Source file extension for Go test sources. 80539ab56c27Smrgac_ext=go 80544cd6a3aeSmrg 80559ab56c27Smrg# Object file extension for compiled Go test sources. 80569ab56c27Smrgobjext=o 80579ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 80584cd6a3aeSmrg 80599ab56c27Smrg# Code to be used in simple compile tests 80609ab56c27Smrglt_simple_compile_test_code="package main; func main() { }" 80614cd6a3aeSmrg 80629ab56c27Smrg# Code to be used in simple link tests 80639ab56c27Smrglt_simple_link_test_code='package main; func main() { }' 80644cd6a3aeSmrg 80659ab56c27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80669ab56c27Smrg_LT_TAG_COMPILER 80674cd6a3aeSmrg 80689ab56c27Smrg# save warnings/boilerplate of simple test code 80699ab56c27Smrg_LT_COMPILER_BOILERPLATE 80709ab56c27Smrg_LT_LINKER_BOILERPLATE 80714cd6a3aeSmrg 80729ab56c27Smrg# Allow CC to be a program name with arguments. 80739ab56c27Smrglt_save_CC=$CC 80749ab56c27Smrglt_save_CFLAGS=$CFLAGS 80759ab56c27Smrglt_save_GCC=$GCC 80769ab56c27SmrgGCC=yes 80779ab56c27SmrgCC=${GOC-"gccgo"} 80789ab56c27SmrgCFLAGS=$GOFLAGS 80799ab56c27Smrgcompiler=$CC 80809ab56c27Smrg_LT_TAGVAR(compiler, $1)=$CC 80819ab56c27Smrg_LT_TAGVAR(LD, $1)=$LD 80829ab56c27Smrg_LT_CC_BASENAME([$compiler]) 80834cd6a3aeSmrg 80849ab56c27Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80859ab56c27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80864cd6a3aeSmrg 80879ab56c27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80889ab56c27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80899ab56c27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80904cd6a3aeSmrg 80919ab56c27Smrgif test -n "$compiler"; then 80929ab56c27Smrg _LT_COMPILER_NO_RTTI($1) 80939ab56c27Smrg _LT_COMPILER_PIC($1) 80949ab56c27Smrg _LT_COMPILER_C_O($1) 80959ab56c27Smrg _LT_COMPILER_FILE_LOCKS($1) 80969ab56c27Smrg _LT_LINKER_SHLIBS($1) 80979ab56c27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80984cd6a3aeSmrg 80999ab56c27Smrg _LT_CONFIG($1) 81009ab56c27Smrgfi 81014cd6a3aeSmrg 81029ab56c27SmrgAC_LANG_RESTORE 81034cd6a3aeSmrg 81049ab56c27SmrgGCC=$lt_save_GCC 81059ab56c27SmrgCC=$lt_save_CC 81069ab56c27SmrgCFLAGS=$lt_save_CFLAGS 81079ab56c27Smrg])# _LT_LANG_GO_CONFIG 81088c9fbc29Smrg 81098c9fbc29Smrg 81109ab56c27Smrg# _LT_LANG_RC_CONFIG([TAG]) 81119ab56c27Smrg# ------------------------- 81129ab56c27Smrg# Ensure that the configuration variables for the Windows resource compiler 81139ab56c27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 81149ab56c27Smrg# to write the compiler configuration to 'libtool'. 81159ab56c27Smrgm4_defun([_LT_LANG_RC_CONFIG], 81169ab56c27Smrg[AC_REQUIRE([LT_PROG_RC])dnl 81179ab56c27SmrgAC_LANG_SAVE 81184cd6a3aeSmrg 81199ab56c27Smrg# Source file extension for RC test sources. 81209ab56c27Smrgac_ext=rc 81214cd6a3aeSmrg 81229ab56c27Smrg# Object file extension for compiled RC test sources. 81239ab56c27Smrgobjext=o 81249ab56c27Smrg_LT_TAGVAR(objext, $1)=$objext 81254cd6a3aeSmrg 81269ab56c27Smrg# Code to be used in simple compile tests 81279ab56c27Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81284cd6a3aeSmrg 81299ab56c27Smrg# Code to be used in simple link tests 81309ab56c27Smrglt_simple_link_test_code=$lt_simple_compile_test_code 81318c9fbc29Smrg 81329ab56c27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81339ab56c27Smrg_LT_TAG_COMPILER 81344cd6a3aeSmrg 81359ab56c27Smrg# save warnings/boilerplate of simple test code 81369ab56c27Smrg_LT_COMPILER_BOILERPLATE 81379ab56c27Smrg_LT_LINKER_BOILERPLATE 81384cd6a3aeSmrg 81399ab56c27Smrg# Allow CC to be a program name with arguments. 81409ab56c27Smrglt_save_CC=$CC 81419ab56c27Smrglt_save_CFLAGS=$CFLAGS 81429ab56c27Smrglt_save_GCC=$GCC 81439ab56c27SmrgGCC= 81449ab56c27SmrgCC=${RC-"windres"} 81459ab56c27SmrgCFLAGS= 81469ab56c27Smrgcompiler=$CC 81479ab56c27Smrg_LT_TAGVAR(compiler, $1)=$CC 81489ab56c27Smrg_LT_CC_BASENAME([$compiler]) 81499ab56c27Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81508c9fbc29Smrg 81519ab56c27Smrgif test -n "$compiler"; then 81529ab56c27Smrg : 81539ab56c27Smrg _LT_CONFIG($1) 81549ab56c27Smrgfi 81559ab56c27Smrg 81569ab56c27SmrgGCC=$lt_save_GCC 81579ab56c27SmrgAC_LANG_RESTORE 81589ab56c27SmrgCC=$lt_save_CC 81599ab56c27SmrgCFLAGS=$lt_save_CFLAGS 81609ab56c27Smrg])# _LT_LANG_RC_CONFIG 81619ab56c27Smrg 81629ab56c27Smrg 81639ab56c27Smrg# LT_PROG_GCJ 81649ab56c27Smrg# ----------- 81659ab56c27SmrgAC_DEFUN([LT_PROG_GCJ], 81669ab56c27Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81679ab56c27Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81689ab56c27Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81699ab56c27Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81709ab56c27Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81719ab56c27Smrg]) 81728c9fbc29Smrg 81739ab56c27Smrg# Old name: 81749ab56c27SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81759ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 81769ab56c27Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81778c9fbc29Smrg 81788c9fbc29Smrg 81799ab56c27Smrg# LT_PROG_GO 81809ab56c27Smrg# ---------- 81819ab56c27SmrgAC_DEFUN([LT_PROG_GO], 81829ab56c27Smrg[AC_CHECK_TOOL(GOC, gccgo,) 81839ab56c27Smrg]) 81848c9fbc29Smrg 81858c9fbc29Smrg 81869ab56c27Smrg# LT_PROG_RC 81879ab56c27Smrg# ---------- 81889ab56c27SmrgAC_DEFUN([LT_PROG_RC], 81899ab56c27Smrg[AC_CHECK_TOOL(RC, windres,) 81909ab56c27Smrg]) 819154cef2ddSmrg 81929ab56c27Smrg# Old name: 81939ab56c27SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81949ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 81959ab56c27Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81968c9fbc29Smrg 81974e411241Smrg 81989ab56c27Smrg# _LT_DECL_EGREP 81999ab56c27Smrg# -------------- 82009ab56c27Smrg# If we don't have a new enough Autoconf to choose the best grep 82019ab56c27Smrg# available, choose the one first in the user's PATH. 82029ab56c27Smrgm4_defun([_LT_DECL_EGREP], 82039ab56c27Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 82049ab56c27SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 82059ab56c27Smrgtest -z "$GREP" && GREP=grep 82069ab56c27Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 82079ab56c27Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 82089ab56c27Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 82099ab56c27Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 82109ab56c27SmrgAC_SUBST([GREP]) 82119ab56c27Smrg]) 82128c9fbc29Smrg 82138c9fbc29Smrg 82149ab56c27Smrg# _LT_DECL_OBJDUMP 82159ab56c27Smrg# -------------- 82169ab56c27Smrg# If we don't have a new enough Autoconf to choose the best objdump 82179ab56c27Smrg# available, choose the one first in the user's PATH. 82189ab56c27Smrgm4_defun([_LT_DECL_OBJDUMP], 82199ab56c27Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 82209ab56c27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 82219ab56c27Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 82229ab56c27SmrgAC_SUBST([OBJDUMP]) 82239ab56c27Smrg]) 82244cd6a3aeSmrg 82259ab56c27Smrg# _LT_DECL_DLLTOOL 82269ab56c27Smrg# ---------------- 82279ab56c27Smrg# Ensure DLLTOOL variable is set. 82289ab56c27Smrgm4_defun([_LT_DECL_DLLTOOL], 82299ab56c27Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82309ab56c27Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82319ab56c27Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82329ab56c27SmrgAC_SUBST([DLLTOOL]) 82339ab56c27Smrg]) 82344cd6a3aeSmrg 82359ab56c27Smrg# _LT_DECL_FILECMD 82369ab56c27Smrg# ---------------- 82379ab56c27Smrg# Check for a file(cmd) program that can be used to detect file type and magic 82389ab56c27Smrgm4_defun([_LT_DECL_FILECMD], 82399ab56c27Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 82409ab56c27Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 82419ab56c27Smrg])# _LD_DECL_FILECMD 82429ab56c27Smrg 82439ab56c27Smrg# _LT_DECL_SED 82449ab56c27Smrg# ------------ 82459ab56c27Smrg# Check for a fully-functional sed program, that truncates 82469ab56c27Smrg# as few characters as possible. Prefer GNU sed if found. 82479ab56c27Smrgm4_defun([_LT_DECL_SED], 82489ab56c27Smrg[AC_PROG_SED 82499ab56c27Smrgtest -z "$SED" && SED=sed 82509ab56c27SmrgXsed="$SED -e 1s/^X//" 82519ab56c27Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82529ab56c27Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82539ab56c27Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82549ab56c27Smrg])# _LT_DECL_SED 82559ab56c27Smrg 82569ab56c27Smrgm4_ifndef([AC_PROG_SED], [ 82579ab56c27Smrg# NOTE: This macro has been submitted for inclusion into # 82589ab56c27Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82599ab56c27Smrg# a released version of Autoconf we should remove this # 82609ab56c27Smrg# macro and use it instead. # 82619ab56c27Smrg 82629ab56c27Smrgm4_defun([AC_PROG_SED], 82639ab56c27Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82649ab56c27SmrgAC_CACHE_VAL(lt_cv_path_SED, 82659ab56c27Smrg[# Loop through the user's path and test for sed and gsed. 82669ab56c27Smrg# Then use that list of sed's as ones to test for truncation. 82679ab56c27Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82689ab56c27Smrgfor as_dir in $PATH 82699ab56c27Smrgdo 82709ab56c27Smrg IFS=$as_save_IFS 82719ab56c27Smrg test -z "$as_dir" && as_dir=. 82729ab56c27Smrg for lt_ac_prog in sed gsed; do 82739ab56c27Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82749ab56c27Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82759ab56c27Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 827654cef2ddSmrg fi 82779ab56c27Smrg done 82789ab56c27Smrg done 82799ab56c27Smrgdone 82809ab56c27SmrgIFS=$as_save_IFS 82819ab56c27Smrglt_ac_max=0 82829ab56c27Smrglt_ac_count=0 82839ab56c27Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82849ab56c27Smrg# along with /bin/sed that truncates output. 82859ab56c27Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82869ab56c27Smrg test ! -f "$lt_ac_sed" && continue 82879ab56c27Smrg cat /dev/null > conftest.in 82889ab56c27Smrg lt_ac_count=0 82899ab56c27Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82909ab56c27Smrg # Check for GNU sed and select it if it is found. 82919ab56c27Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82929ab56c27Smrg lt_cv_path_SED=$lt_ac_sed 82939ab56c27Smrg break 82949ab56c27Smrg fi 82959ab56c27Smrg while true; do 82969ab56c27Smrg cat conftest.in conftest.in >conftest.tmp 82979ab56c27Smrg mv conftest.tmp conftest.in 82989ab56c27Smrg cp conftest.in conftest.nl 82999ab56c27Smrg echo >>conftest.nl 83009ab56c27Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 83019ab56c27Smrg cmp -s conftest.out conftest.nl || break 83029ab56c27Smrg # 10000 chars as input seems more than enough 83039ab56c27Smrg test 10 -lt "$lt_ac_count" && break 83049ab56c27Smrg lt_ac_count=`expr $lt_ac_count + 1` 83059ab56c27Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 83069ab56c27Smrg lt_ac_max=$lt_ac_count 83079ab56c27Smrg lt_cv_path_SED=$lt_ac_sed 83089ab56c27Smrg fi 83099ab56c27Smrg done 83109ab56c27Smrgdone 83119ab56c27Smrg]) 83129ab56c27SmrgSED=$lt_cv_path_SED 83139ab56c27SmrgAC_SUBST([SED]) 83149ab56c27SmrgAC_MSG_RESULT([$SED]) 83159ab56c27Smrg])#AC_PROG_SED 83169ab56c27Smrg])#m4_ifndef 83174cd6a3aeSmrg 83189ab56c27Smrg# Old name: 83199ab56c27SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 83209ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 83219ab56c27Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83224cd6a3aeSmrg 83234cd6a3aeSmrg 83249ab56c27Smrg# _LT_CHECK_SHELL_FEATURES 83259ab56c27Smrg# ------------------------ 83269ab56c27Smrg# Find out whether the shell is Bourne or XSI compatible, 83279ab56c27Smrg# or has some other useful features. 83289ab56c27Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 83299ab56c27Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 83309ab56c27Smrg lt_unset=unset 83319ab56c27Smrgelse 83329ab56c27Smrg lt_unset=false 83339ab56c27Smrgfi 83349ab56c27Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 833554cef2ddSmrg 83369ab56c27Smrg# test EBCDIC or ASCII 83379ab56c27Smrgcase `echo X|tr X '\101'` in 83389ab56c27Smrg A) # ASCII based system 83399ab56c27Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83409ab56c27Smrg lt_SP2NL='tr \040 \012' 83419ab56c27Smrg lt_NL2SP='tr \015\012 \040\040' 83429ab56c27Smrg ;; 83439ab56c27Smrg *) # EBCDIC based system 83449ab56c27Smrg lt_SP2NL='tr \100 \n' 83459ab56c27Smrg lt_NL2SP='tr \r\n \100\100' 83469ab56c27Smrg ;; 83479ab56c27Smrgesac 83489ab56c27Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83499ab56c27Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83509ab56c27Smrg])# _LT_CHECK_SHELL_FEATURES 835154044362Smrg 83524cd6a3aeSmrg 83539ab56c27Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83549ab56c27Smrg# ----------------------------- 83559ab56c27Smrg# Determine what file name conversion functions should be used by 83569ab56c27Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83579ab56c27Smrg# for certain cross-compile configurations and native mingw. 83589ab56c27Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83599ab56c27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83609ab56c27SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83619ab56c27SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83629ab56c27SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83639ab56c27Smrg[case $host in 83649ab56c27Smrg *-*-mingw* ) 83659ab56c27Smrg case $build in 83669ab56c27Smrg *-*-mingw* ) # actually msys 83679ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83689ab56c27Smrg ;; 83699ab56c27Smrg *-*-cygwin* ) 83709ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83719ab56c27Smrg ;; 83729ab56c27Smrg * ) # otherwise, assume *nix 83739ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83749ab56c27Smrg ;; 83759ab56c27Smrg esac 83769ab56c27Smrg ;; 83779ab56c27Smrg *-*-cygwin* ) 83789ab56c27Smrg case $build in 83799ab56c27Smrg *-*-mingw* ) # actually msys 83809ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83819ab56c27Smrg ;; 83829ab56c27Smrg *-*-cygwin* ) 83839ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83849ab56c27Smrg ;; 83859ab56c27Smrg * ) # otherwise, assume *nix 83869ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83879ab56c27Smrg ;; 83889ab56c27Smrg esac 83899ab56c27Smrg ;; 83909ab56c27Smrg * ) # unhandled hosts (and "normal" native builds) 83919ab56c27Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83929ab56c27Smrg ;; 83939ab56c27Smrgesac 83949ab56c27Smrg]) 83959ab56c27Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83969ab56c27SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83979ab56c27Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83989ab56c27Smrg [0], [convert $build file names to $host format])dnl 83994cd6a3aeSmrg 84009ab56c27SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 84019ab56c27SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 84029ab56c27Smrg[#assume ordinary cross tools, or native build. 84039ab56c27Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 84049ab56c27Smrgcase $host in 84059ab56c27Smrg *-*-mingw* ) 84069ab56c27Smrg case $build in 84079ab56c27Smrg *-*-mingw* ) # actually msys 84089ab56c27Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 84099ab56c27Smrg ;; 84109ab56c27Smrg esac 84119ab56c27Smrg ;; 84129ab56c27Smrgesac 84139ab56c27Smrg]) 84149ab56c27Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 84159ab56c27SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 84169ab56c27Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 84179ab56c27Smrg [0], [convert $build files to toolchain format])dnl 84189ab56c27Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 84194cd6a3aeSmrg 84209ab56c27Smrg# Helper functions for option handling. -*- Autoconf -*- 84219ab56c27Smrg# 84229ab56c27Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 84239ab56c27Smrg# Software Foundation, Inc. 84249ab56c27Smrg# Written by Gary V. Vaughan, 2004 84259ab56c27Smrg# 84269ab56c27Smrg# This file is free software; the Free Software Foundation gives 84279ab56c27Smrg# unlimited permission to copy and/or distribute it, with or without 84289ab56c27Smrg# modifications, as long as this notice is preserved. 84294cd6a3aeSmrg 84309ab56c27Smrg# serial 8 ltoptions.m4 84314cd6a3aeSmrg 84329ab56c27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 84339ab56c27SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 84344cd6a3aeSmrg 84354cd6a3aeSmrg 84369ab56c27Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 84379ab56c27Smrg# ------------------------------------------ 84389ab56c27Smrgm4_define([_LT_MANGLE_OPTION], 84399ab56c27Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 84404cd6a3aeSmrg 84414cd6a3aeSmrg 84429ab56c27Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 84439ab56c27Smrg# --------------------------------------- 84449ab56c27Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 84459ab56c27Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84469ab56c27Smrg# saved as a flag. 84479ab56c27Smrgm4_define([_LT_SET_OPTION], 84489ab56c27Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84499ab56c27Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84509ab56c27Smrg _LT_MANGLE_DEFUN([$1], [$2]), 84519ab56c27Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84529ab56c27Smrg]) 845354cef2ddSmrg 84544cd6a3aeSmrg 84559ab56c27Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84569ab56c27Smrg# ------------------------------------------------------------ 84579ab56c27Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84589ab56c27Smrgm4_define([_LT_IF_OPTION], 84599ab56c27Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 84609ab56c27Smrg 84619ab56c27Smrg 84629ab56c27Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84639ab56c27Smrg# ------------------------------------------------------- 84649ab56c27Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84659ab56c27Smrg# are set. 84669ab56c27Smrgm4_define([_LT_UNLESS_OPTIONS], 84679ab56c27Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84689ab56c27Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84699ab56c27Smrg [m4_define([$0_found])])])[]dnl 84709ab56c27Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84719ab56c27Smrg])[]dnl 84729ab56c27Smrg]) 84739ab56c27Smrg 84744cd6a3aeSmrg 84759ab56c27Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84769ab56c27Smrg# ---------------------------------------- 84779ab56c27Smrg# OPTION-LIST is a space-separated list of Libtool options associated 84789ab56c27Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84799ab56c27Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84809ab56c27Smrg# the unknown option and exit. 84819ab56c27Smrgm4_defun([_LT_SET_OPTIONS], 84829ab56c27Smrg[# Set options 84839ab56c27Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84849ab56c27Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 84854cd6a3aeSmrg 84869ab56c27Smrgm4_if([$1],[LT_INIT],[ 84879ab56c27Smrg dnl 84889ab56c27Smrg dnl Simply set some default values (i.e off) if boolean options were not 84899ab56c27Smrg dnl specified: 84909ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84919ab56c27Smrg ]) 84929ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84939ab56c27Smrg ]) 84949ab56c27Smrg dnl 84959ab56c27Smrg dnl If no reference was made to various pairs of opposing options, then 84969ab56c27Smrg dnl we run the default mode handler for the pair. For example, if neither 84979ab56c27Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84989ab56c27Smrg dnl archives by default: 84999ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 85009ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 85019ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 85029ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 85039ab56c27Smrg [_LT_ENABLE_FAST_INSTALL]) 85049ab56c27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 85059ab56c27Smrg [_LT_WITH_AIX_SONAME([aix])]) 85069ab56c27Smrg ]) 85079ab56c27Smrg])# _LT_SET_OPTIONS 85084cd6a3aeSmrg 85094cd6a3aeSmrg 85104cd6a3aeSmrg 85119ab56c27Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 85129ab56c27Smrg# ----------------------------------------- 85139ab56c27Smrgm4_define([_LT_MANGLE_DEFUN], 85149ab56c27Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 85154cd6a3aeSmrg 85164cd6a3aeSmrg 85179ab56c27Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 85189ab56c27Smrg# ----------------------------------------------- 85199ab56c27Smrgm4_define([LT_OPTION_DEFINE], 85209ab56c27Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 85219ab56c27Smrg])# LT_OPTION_DEFINE 85224cd6a3aeSmrg 85234cd6a3aeSmrg 85249ab56c27Smrg# dlopen 85259ab56c27Smrg# ------ 85269ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 85279ab56c27Smrg]) 85284cd6a3aeSmrg 85299ab56c27SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 85309ab56c27Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 85319ab56c27SmrgAC_DIAGNOSE([obsolete], 85329ab56c27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85339ab56c27Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 85349ab56c27Smrg]) 85358c9fbc29Smrg 85369ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 85379ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 85388c9fbc29Smrg 85398c9fbc29Smrg 85409ab56c27Smrg# win32-dll 85419ab56c27Smrg# --------- 85429ab56c27Smrg# Declare package support for building win32 dll's. 85439ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 85449ab56c27Smrg[enable_win32_dll=yes 85459ab56c27Smrg 85469ab56c27Smrgcase $host in 85479ab56c27Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85489ab56c27Smrg AC_CHECK_TOOL(AS, as, false) 85499ab56c27Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85509ab56c27Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85519ab56c27Smrg ;; 85529ab56c27Smrgesac 85539ab56c27Smrg 85549ab56c27Smrgtest -z "$AS" && AS=as 85559ab56c27Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 85569ab56c27Smrg 85579ab56c27Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85589ab56c27Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 85599ab56c27Smrg 85609ab56c27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85619ab56c27Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85629ab56c27Smrg])# win32-dll 85639ab56c27Smrg 85649ab56c27SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85659ab56c27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85669ab56c27Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85679ab56c27SmrgAC_DIAGNOSE([obsolete], 85689ab56c27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85699ab56c27Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85709ab56c27Smrg]) 85718c9fbc29Smrg 85729ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 85739ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 85748c9fbc29Smrg 85754cd6a3aeSmrg 85769ab56c27Smrg# _LT_ENABLE_SHARED([DEFAULT]) 85779ab56c27Smrg# ---------------------------- 85789ab56c27Smrg# implement the --enable-shared flag, and supports the 'shared' and 85799ab56c27Smrg# 'disable-shared' LT_INIT options. 85809ab56c27Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85819ab56c27Smrgm4_define([_LT_ENABLE_SHARED], 85829ab56c27Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85839ab56c27SmrgAC_ARG_ENABLE([shared], 85849ab56c27Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85859ab56c27Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85869ab56c27Smrg [p=${PACKAGE-default} 85879ab56c27Smrg case $enableval in 85889ab56c27Smrg yes) enable_shared=yes ;; 85899ab56c27Smrg no) enable_shared=no ;; 85909ab56c27Smrg *) 85919ab56c27Smrg enable_shared=no 85929ab56c27Smrg # Look at the argument we got. We use all the common list separators. 85939ab56c27Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85949ab56c27Smrg for pkg in $enableval; do 85959ab56c27Smrg IFS=$lt_save_ifs 85969ab56c27Smrg if test "X$pkg" = "X$p"; then 85979ab56c27Smrg enable_shared=yes 859854cef2ddSmrg fi 85999ab56c27Smrg done 86009ab56c27Smrg IFS=$lt_save_ifs 860154cef2ddSmrg ;; 86029ab56c27Smrg esac], 86039ab56c27Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 86044cd6a3aeSmrg 86059ab56c27Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 86069ab56c27Smrg [Whether or not to build shared libraries]) 86079ab56c27Smrg])# _LT_ENABLE_SHARED 86084cd6a3aeSmrg 86099ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 86109ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 86118c9fbc29Smrg 86129ab56c27Smrg# Old names: 86139ab56c27SmrgAC_DEFUN([AC_ENABLE_SHARED], 86149ab56c27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 86159ab56c27Smrg]) 86168c9fbc29Smrg 86179ab56c27SmrgAC_DEFUN([AC_DISABLE_SHARED], 86189ab56c27Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 86199ab56c27Smrg]) 86208c9fbc29Smrg 86219ab56c27SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 86229ab56c27SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 86238c9fbc29Smrg 86249ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 86259ab56c27Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 86269ab56c27Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 86278c9fbc29Smrg 86288c9fbc29Smrg 86298c9fbc29Smrg 86309ab56c27Smrg# _LT_ENABLE_STATIC([DEFAULT]) 86319ab56c27Smrg# ---------------------------- 86329ab56c27Smrg# implement the --enable-static flag, and support the 'static' and 86339ab56c27Smrg# 'disable-static' LT_INIT options. 86349ab56c27Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86359ab56c27Smrgm4_define([_LT_ENABLE_STATIC], 86369ab56c27Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 86379ab56c27SmrgAC_ARG_ENABLE([static], 86389ab56c27Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 86399ab56c27Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 86409ab56c27Smrg [p=${PACKAGE-default} 86419ab56c27Smrg case $enableval in 86429ab56c27Smrg yes) enable_static=yes ;; 86439ab56c27Smrg no) enable_static=no ;; 86449ab56c27Smrg *) 86459ab56c27Smrg enable_static=no 86469ab56c27Smrg # Look at the argument we got. We use all the common list separators. 86479ab56c27Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86489ab56c27Smrg for pkg in $enableval; do 86499ab56c27Smrg IFS=$lt_save_ifs 86509ab56c27Smrg if test "X$pkg" = "X$p"; then 86519ab56c27Smrg enable_static=yes 86529ab56c27Smrg fi 86539ab56c27Smrg done 86549ab56c27Smrg IFS=$lt_save_ifs 865554cef2ddSmrg ;; 86569ab56c27Smrg esac], 86579ab56c27Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 86588c9fbc29Smrg 86599ab56c27Smrg _LT_DECL([build_old_libs], [enable_static], [0], 86609ab56c27Smrg [Whether or not to build static libraries]) 86619ab56c27Smrg])# _LT_ENABLE_STATIC 86629ab56c27Smrg 86639ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86649ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 86659ab56c27Smrg 86669ab56c27Smrg# Old names: 86679ab56c27SmrgAC_DEFUN([AC_ENABLE_STATIC], 86689ab56c27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86699ab56c27Smrg]) 86704cd6a3aeSmrg 86719ab56c27SmrgAC_DEFUN([AC_DISABLE_STATIC], 86729ab56c27Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86739ab56c27Smrg]) 86744cd6a3aeSmrg 86759ab56c27SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86769ab56c27SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 86779ab56c27Smrg 86789ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 86799ab56c27Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86809ab56c27Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 86818c9fbc29Smrg 868254044362Smrg 868354044362Smrg 86849ab56c27Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86859ab56c27Smrg# ---------------------------------- 86869ab56c27Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 86879ab56c27Smrg# and 'disable-fast-install' LT_INIT options. 86889ab56c27Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86899ab56c27Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 86909ab56c27Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86919ab56c27SmrgAC_ARG_ENABLE([fast-install], 86929ab56c27Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86939ab56c27Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86949ab56c27Smrg [p=${PACKAGE-default} 86959ab56c27Smrg case $enableval in 86969ab56c27Smrg yes) enable_fast_install=yes ;; 86979ab56c27Smrg no) enable_fast_install=no ;; 869854cef2ddSmrg *) 86999ab56c27Smrg enable_fast_install=no 87009ab56c27Smrg # Look at the argument we got. We use all the common list separators. 87019ab56c27Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 87029ab56c27Smrg for pkg in $enableval; do 87039ab56c27Smrg IFS=$lt_save_ifs 87049ab56c27Smrg if test "X$pkg" = "X$p"; then 87059ab56c27Smrg enable_fast_install=yes 87069ab56c27Smrg fi 87079ab56c27Smrg done 87089ab56c27Smrg IFS=$lt_save_ifs 870954cef2ddSmrg ;; 87109ab56c27Smrg esac], 87119ab56c27Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 871254044362Smrg 87139ab56c27Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 87149ab56c27Smrg [Whether or not to optimize for fast installation])dnl 87159ab56c27Smrg])# _LT_ENABLE_FAST_INSTALL 871654cef2ddSmrg 87179ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 87189ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 871954cef2ddSmrg 87209ab56c27Smrg# Old names: 87219ab56c27SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 87229ab56c27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 87239ab56c27SmrgAC_DIAGNOSE([obsolete], 87249ab56c27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 87259ab56c27Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 87269ab56c27Smrg]) 872754cef2ddSmrg 87289ab56c27SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 87299ab56c27Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 87309ab56c27SmrgAC_DIAGNOSE([obsolete], 87319ab56c27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 87329ab56c27Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 87339ab56c27Smrg]) 873454cef2ddSmrg 87359ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 87369ab56c27Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 87379ab56c27Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 873854cef2ddSmrg 873954cef2ddSmrg 87409ab56c27Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 87419ab56c27Smrg# ---------------------------------- 87429ab56c27Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 87439ab56c27Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 87449ab56c27Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 87459ab56c27Smrgm4_define([_LT_WITH_AIX_SONAME], 87469ab56c27Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 87479ab56c27Smrgshared_archive_member_spec= 87489ab56c27Smrgcase $host,$enable_shared in 87499ab56c27Smrgpower*-*-aix[[5-9]]*,yes) 87509ab56c27Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 87519ab56c27Smrg AC_ARG_WITH([aix-soname], 87529ab56c27Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 87539ab56c27Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 87549ab56c27Smrg [case $withval in 87559ab56c27Smrg aix|svr4|both) 87569ab56c27Smrg ;; 87579ab56c27Smrg *) 87589ab56c27Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 87599ab56c27Smrg ;; 87609ab56c27Smrg esac 87619ab56c27Smrg lt_cv_with_aix_soname=$with_aix_soname], 87629ab56c27Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 87639ab56c27Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 87649ab56c27Smrg with_aix_soname=$lt_cv_with_aix_soname]) 87659ab56c27Smrg AC_MSG_RESULT([$with_aix_soname]) 87669ab56c27Smrg if test aix != "$with_aix_soname"; then 87679ab56c27Smrg # For the AIX way of multilib, we name the shared archive member 87689ab56c27Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 87699ab56c27Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 87709ab56c27Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 87719ab56c27Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 87729ab56c27Smrg if test 64 = "${OBJECT_MODE-32}"; then 87739ab56c27Smrg shared_archive_member_spec=shr_64 87749ab56c27Smrg else 87759ab56c27Smrg shared_archive_member_spec=shr 87769ab56c27Smrg fi 87779ab56c27Smrg fi 87789ab56c27Smrg ;; 87799ab56c27Smrg*) 87809ab56c27Smrg with_aix_soname=aix 87819ab56c27Smrg ;; 87829ab56c27Smrgesac 878354cef2ddSmrg 87849ab56c27Smrg_LT_DECL([], [shared_archive_member_spec], [0], 87859ab56c27Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 87869ab56c27Smrg])# _LT_WITH_AIX_SONAME 878754cef2ddSmrg 87889ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 87899ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 87909ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 879170728a38Smrg 879270728a38Smrg 87939ab56c27Smrg# _LT_WITH_PIC([MODE]) 87949ab56c27Smrg# -------------------- 87959ab56c27Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87969ab56c27Smrg# LT_INIT options. 87979ab56c27Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87989ab56c27Smrgm4_define([_LT_WITH_PIC], 87999ab56c27Smrg[AC_ARG_WITH([pic], 88009ab56c27Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 88019ab56c27Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 88029ab56c27Smrg [lt_p=${PACKAGE-default} 88039ab56c27Smrg case $withval in 88049ab56c27Smrg yes|no) pic_mode=$withval ;; 88059ab56c27Smrg *) 88069ab56c27Smrg pic_mode=default 88079ab56c27Smrg # Look at the argument we got. We use all the common list separators. 88089ab56c27Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 88099ab56c27Smrg for lt_pkg in $withval; do 88109ab56c27Smrg IFS=$lt_save_ifs 88119ab56c27Smrg if test "X$lt_pkg" = "X$lt_p"; then 88129ab56c27Smrg pic_mode=yes 88139ab56c27Smrg fi 88149ab56c27Smrg done 88159ab56c27Smrg IFS=$lt_save_ifs 88169ab56c27Smrg ;; 88179ab56c27Smrg esac], 88189ab56c27Smrg [pic_mode=m4_default([$1], [default])]) 881970728a38Smrg 88209ab56c27Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 88219ab56c27Smrg])# _LT_WITH_PIC 882270728a38Smrg 88239ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 88249ab56c27SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 882570728a38Smrg 88269ab56c27Smrg# Old name: 88279ab56c27SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 88289ab56c27Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 88299ab56c27SmrgAC_DIAGNOSE([obsolete], 88309ab56c27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 88319ab56c27Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 88329ab56c27Smrg]) 883370728a38Smrg 88349ab56c27Smrgdnl aclocal-1.4 backwards compatibility: 88359ab56c27Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 883670728a38Smrg 883770728a38Smrg 88389ab56c27Smrgm4_define([_LTDL_MODE], []) 88399ab56c27SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 88409ab56c27Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 88419ab56c27SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 88429ab56c27Smrg [m4_define([_LTDL_MODE], [recursive])]) 88439ab56c27SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 88449ab56c27Smrg [m4_define([_LTDL_MODE], [subproject])]) 884570728a38Smrg 88469ab56c27Smrgm4_define([_LTDL_TYPE], []) 88479ab56c27SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88489ab56c27Smrg [m4_define([_LTDL_TYPE], [installable])]) 88499ab56c27SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88509ab56c27Smrg [m4_define([_LTDL_TYPE], [convenience])]) 885170728a38Smrg 88529ab56c27Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 88539ab56c27Smrg# 88549ab56c27Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 88559ab56c27Smrg# Foundation, Inc. 88569ab56c27Smrg# Written by Gary V. Vaughan, 2004 88579ab56c27Smrg# 88589ab56c27Smrg# This file is free software; the Free Software Foundation gives 88599ab56c27Smrg# unlimited permission to copy and/or distribute it, with or without 88609ab56c27Smrg# modifications, as long as this notice is preserved. 886170728a38Smrg 88629ab56c27Smrg# serial 6 ltsugar.m4 886370728a38Smrg 88649ab56c27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 88659ab56c27SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 886670728a38Smrg 886770728a38Smrg 88689ab56c27Smrg# lt_join(SEP, ARG1, [ARG2...]) 88699ab56c27Smrg# ----------------------------- 88709ab56c27Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88719ab56c27Smrg# associated separator. 88729ab56c27Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88739ab56c27Smrg# versions in m4sugar had bugs. 88749ab56c27Smrgm4_define([lt_join], 88759ab56c27Smrg[m4_if([$#], [1], [], 88769ab56c27Smrg [$#], [2], [[$2]], 88779ab56c27Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88789ab56c27Smrgm4_define([_lt_join], 88799ab56c27Smrg[m4_if([$#$2], [2], [], 88809ab56c27Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 888170728a38Smrg 888254cef2ddSmrg 88839ab56c27Smrg# lt_car(LIST) 88849ab56c27Smrg# lt_cdr(LIST) 88859ab56c27Smrg# ------------ 88869ab56c27Smrg# Manipulate m4 lists. 88879ab56c27Smrg# These macros are necessary as long as will still need to support 88889ab56c27Smrg# Autoconf-2.59, which quotes differently. 88899ab56c27Smrgm4_define([lt_car], [[$1]]) 88909ab56c27Smrgm4_define([lt_cdr], 88919ab56c27Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88929ab56c27Smrg [$#], 1, [], 88939ab56c27Smrg [m4_dquote(m4_shift($@))])]) 88949ab56c27Smrgm4_define([lt_unquote], $1) 88959ab56c27Smrg 88969ab56c27Smrg 88979ab56c27Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88989ab56c27Smrg# ------------------------------------------ 88999ab56c27Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 89009ab56c27Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 89019ab56c27Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 89029ab56c27Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 89039ab56c27Smrg# than defined and empty). 89049ab56c27Smrg# 89059ab56c27Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 89069ab56c27Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 89079ab56c27Smrgm4_define([lt_append], 89089ab56c27Smrg[m4_define([$1], 89099ab56c27Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 89109ab56c27Smrg 89119ab56c27Smrg 89129ab56c27Smrg 89139ab56c27Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 89149ab56c27Smrg# ---------------------------------------------------------- 89159ab56c27Smrg# Produce a SEP delimited list of all paired combinations of elements of 89169ab56c27Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 89179ab56c27Smrg# has the form PREFIXmINFIXSUFFIXn. 89189ab56c27Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 89199ab56c27Smrgm4_define([lt_combine], 89209ab56c27Smrg[m4_if(m4_eval([$# > 3]), [1], 89219ab56c27Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 89229ab56c27Smrg[[m4_foreach([_Lt_prefix], [$2], 89239ab56c27Smrg [m4_foreach([_Lt_suffix], 89249ab56c27Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 89259ab56c27Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 892654044362Smrg 892754044362Smrg 89289ab56c27Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 89299ab56c27Smrg# ----------------------------------------------------------------------- 89309ab56c27Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 89319ab56c27Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 89329ab56c27Smrgm4_define([lt_if_append_uniq], 89339ab56c27Smrg[m4_ifdef([$1], 89349ab56c27Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 89359ab56c27Smrg [lt_append([$1], [$2], [$3])$4], 89369ab56c27Smrg [$5])], 89379ab56c27Smrg [lt_append([$1], [$2], [$3])$4])]) 893854cef2ddSmrg 893954cef2ddSmrg 89409ab56c27Smrg# lt_dict_add(DICT, KEY, VALUE) 89419ab56c27Smrg# ----------------------------- 89429ab56c27Smrgm4_define([lt_dict_add], 89439ab56c27Smrg[m4_define([$1($2)], [$3])]) 894454cef2ddSmrg 894554cef2ddSmrg 89469ab56c27Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89479ab56c27Smrg# -------------------------------------------- 89489ab56c27Smrgm4_define([lt_dict_add_subkey], 89499ab56c27Smrg[m4_define([$1($2:$3)], [$4])]) 895054044362Smrg 895154044362Smrg 89529ab56c27Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89539ab56c27Smrg# ---------------------------------- 89549ab56c27Smrgm4_define([lt_dict_fetch], 89559ab56c27Smrg[m4_ifval([$3], 89569ab56c27Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89579ab56c27Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 895854044362Smrg 895954044362Smrg 89609ab56c27Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89619ab56c27Smrg# ----------------------------------------------------------------- 89629ab56c27Smrgm4_define([lt_if_dict_fetch], 89639ab56c27Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89649ab56c27Smrg [$5], 89659ab56c27Smrg [$6])]) 896654044362Smrg 896754044362Smrg 89689ab56c27Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89699ab56c27Smrg# -------------------------------------------------------------- 89709ab56c27Smrgm4_define([lt_dict_filter], 89719ab56c27Smrg[m4_if([$5], [], [], 89729ab56c27Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89739ab56c27Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89749ab56c27Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 89759ab56c27Smrg]) 897654044362Smrg 89779ab56c27Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89789ab56c27Smrg# 89799ab56c27Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 89809ab56c27Smrg# Inc. 89819ab56c27Smrg# Written by Scott James Remnant, 2004 89829ab56c27Smrg# 89839ab56c27Smrg# This file is free software; the Free Software Foundation gives 89849ab56c27Smrg# unlimited permission to copy and/or distribute it, with or without 89859ab56c27Smrg# modifications, as long as this notice is preserved. 898654044362Smrg 89879ab56c27Smrg# @configure_input@ 898870728a38Smrg 89899ab56c27Smrg# serial 4245 ltversion.m4 89909ab56c27Smrg# This file is part of GNU Libtool 89918c9fbc29Smrg 89929ab56c27Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 89939ab56c27Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 89948c9fbc29Smrg 89959ab56c27SmrgAC_DEFUN([LTVERSION_VERSION], 89969ab56c27Smrg[macro_version='2.4.7' 89979ab56c27Smrgmacro_revision='2.4.7' 89989ab56c27Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89999ab56c27Smrg_LT_DECL(, macro_revision, 0) 90009ab56c27Smrg]) 90018c9fbc29Smrg 90029ab56c27Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 90039ab56c27Smrg# 90049ab56c27Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 90059ab56c27Smrg# Software Foundation, Inc. 90069ab56c27Smrg# Written by Scott James Remnant, 2004. 90079ab56c27Smrg# 90089ab56c27Smrg# This file is free software; the Free Software Foundation gives 90099ab56c27Smrg# unlimited permission to copy and/or distribute it, with or without 90109ab56c27Smrg# modifications, as long as this notice is preserved. 90118c9fbc29Smrg 90129ab56c27Smrg# serial 5 lt~obsolete.m4 90138c9fbc29Smrg 90149ab56c27Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 90159ab56c27Smrg# 90169ab56c27Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 90179ab56c27Smrg# which have later been changed to m4_define as they aren't part of the 90189ab56c27Smrg# exported API, or moved to Autoconf or Automake where they belong. 90199ab56c27Smrg# 90209ab56c27Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 90219ab56c27Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 90229ab56c27Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 90239ab56c27Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 90249ab56c27Smrg# and doesn't know about Autoconf macros at all.) 90259ab56c27Smrg# 90269ab56c27Smrg# So we provide this file, which has a silly filename so it's always 90279ab56c27Smrg# included after everything else. This provides aclocal with the 90289ab56c27Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 90299ab56c27Smrg# because those macros already exist, or will be overwritten later. 90309ab56c27Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 90319ab56c27Smrg# 90329ab56c27Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 90339ab56c27Smrg# Yes, that means every name once taken will need to remain here until 90349ab56c27Smrg# we give up compatibility with versions before 1.7, at which point 90359ab56c27Smrg# we need to keep only those names which we still refer to. 90368c9fbc29Smrg 90379ab56c27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 90389ab56c27SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 90399ab56c27Smrg 90409ab56c27Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 90419ab56c27Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 90429ab56c27Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 90439ab56c27Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 90449ab56c27Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 90459ab56c27Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 90469ab56c27Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90479ab56c27Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90489ab56c27Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90499ab56c27Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90509ab56c27Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90519ab56c27Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90529ab56c27Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90539ab56c27Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90549ab56c27Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90559ab56c27Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90569ab56c27Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90579ab56c27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90589ab56c27Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90599ab56c27Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90609ab56c27Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90619ab56c27Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90629ab56c27Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90639ab56c27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90649ab56c27Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90659ab56c27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90669ab56c27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90679ab56c27Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90689ab56c27Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90699ab56c27Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90709ab56c27Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90719ab56c27Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90729ab56c27Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90739ab56c27Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90749ab56c27Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90759ab56c27Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90769ab56c27Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90779ab56c27Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90789ab56c27Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90799ab56c27Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90809ab56c27Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90819ab56c27Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90829ab56c27Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90839ab56c27Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90849ab56c27Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90859ab56c27Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90869ab56c27Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90879ab56c27Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90889ab56c27Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90899ab56c27Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90909ab56c27Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90919ab56c27Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90929ab56c27Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90939ab56c27Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90949ab56c27Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90959ab56c27Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90969ab56c27Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90979ab56c27Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90989ab56c27Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90999ab56c27Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 91009ab56c27Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 91018c9fbc29Smrg 91029ab56c27Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 91039ab56c27Smrg# serial 11 (pkg-config-0.29.1) 91048c9fbc29Smrg 91059ab56c27Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 91069ab56c27Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 91079ab56c27Smrgdnl 91089ab56c27Smrgdnl This program is free software; you can redistribute it and/or modify 91099ab56c27Smrgdnl it under the terms of the GNU General Public License as published by 91109ab56c27Smrgdnl the Free Software Foundation; either version 2 of the License, or 91119ab56c27Smrgdnl (at your option) any later version. 91129ab56c27Smrgdnl 91139ab56c27Smrgdnl This program is distributed in the hope that it will be useful, but 91149ab56c27Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 91159ab56c27Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 91169ab56c27Smrgdnl General Public License for more details. 91179ab56c27Smrgdnl 91189ab56c27Smrgdnl You should have received a copy of the GNU General Public License 91199ab56c27Smrgdnl along with this program; if not, write to the Free Software 91209ab56c27Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 91219ab56c27Smrgdnl 02111-1307, USA. 91229ab56c27Smrgdnl 91239ab56c27Smrgdnl As a special exception to the GNU General Public License, if you 91249ab56c27Smrgdnl distribute this file as part of a program that contains a 91259ab56c27Smrgdnl configuration script generated by Autoconf, you may include it under 91269ab56c27Smrgdnl the same distribution terms that you use for the rest of that 91279ab56c27Smrgdnl program. 91288c9fbc29Smrg 91299ab56c27Smrgdnl PKG_PREREQ(MIN-VERSION) 91309ab56c27Smrgdnl ----------------------- 91319ab56c27Smrgdnl Since: 0.29 91329ab56c27Smrgdnl 91339ab56c27Smrgdnl Verify that the version of the pkg-config macros are at least 91349ab56c27Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 91359ab56c27Smrgdnl installed version of pkg-config, this checks the developer's version 91369ab56c27Smrgdnl of pkg.m4 when generating configure. 91379ab56c27Smrgdnl 91389ab56c27Smrgdnl To ensure that this macro is defined, also add: 91399ab56c27Smrgdnl m4_ifndef([PKG_PREREQ], 91409ab56c27Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 91419ab56c27Smrgdnl 91429ab56c27Smrgdnl See the "Since" comment for each macro you use to see what version 91439ab56c27Smrgdnl of the macros you require. 91449ab56c27Smrgm4_defun([PKG_PREREQ], 91459ab56c27Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 91469ab56c27Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 91479ab56c27Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 91489ab56c27Smrg])dnl PKG_PREREQ 91498c9fbc29Smrg 91509ab56c27Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 91519ab56c27Smrgdnl ---------------------------------- 91529ab56c27Smrgdnl Since: 0.16 91539ab56c27Smrgdnl 91549ab56c27Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 91559ab56c27Smrgdnl first found in the path. Checks that the version of pkg-config found 91569ab56c27Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 91579ab56c27Smrgdnl used since that's the first version where most current features of 91589ab56c27Smrgdnl pkg-config existed. 91599ab56c27SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 91609ab56c27Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 91619ab56c27Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 91629ab56c27Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 91639ab56c27SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 91649ab56c27SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 91659ab56c27SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 91668c9fbc29Smrg 91679ab56c27Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 91689ab56c27Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 91699ab56c27Smrgfi 91709ab56c27Smrgif test -n "$PKG_CONFIG"; then 91719ab56c27Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 91729ab56c27Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 91739ab56c27Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 91749ab56c27Smrg AC_MSG_RESULT([yes]) 917554cef2ddSmrg else 91769ab56c27Smrg AC_MSG_RESULT([no]) 91779ab56c27Smrg PKG_CONFIG="" 917854cef2ddSmrg fi 91799ab56c27Smrgfi[]dnl 91809ab56c27Smrg])dnl PKG_PROG_PKG_CONFIG 91819ab56c27Smrg 91829ab56c27Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 91839ab56c27Smrgdnl ------------------------------------------------------------------- 91849ab56c27Smrgdnl Since: 0.18 91859ab56c27Smrgdnl 91869ab56c27Smrgdnl Check to see whether a particular set of modules exists. Similar to 91879ab56c27Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 91889ab56c27Smrgdnl 91899ab56c27Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91909ab56c27Smrgdnl only at the first occurence in configure.ac, so if the first place 91919ab56c27Smrgdnl it's called might be skipped (such as if it is within an "if", you 91929ab56c27Smrgdnl have to call PKG_CHECK_EXISTS manually 91939ab56c27SmrgAC_DEFUN([PKG_CHECK_EXISTS], 91949ab56c27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 91959ab56c27Smrgif test -n "$PKG_CONFIG" && \ 91969ab56c27Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 91979ab56c27Smrg m4_default([$2], [:]) 91989ab56c27Smrgm4_ifvaln([$3], [else 91999ab56c27Smrg $3])dnl 92009ab56c27Smrgfi]) 92018c9fbc29Smrg 92029ab56c27Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 92039ab56c27Smrgdnl --------------------------------------------- 92049ab56c27Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 92059ab56c27Smrgdnl pkg_failed based on the result. 92069ab56c27Smrgm4_define([_PKG_CONFIG], 92079ab56c27Smrg[if test -n "$$1"; then 92089ab56c27Smrg pkg_cv_[]$1="$$1" 92099ab56c27Smrg elif test -n "$PKG_CONFIG"; then 92109ab56c27Smrg PKG_CHECK_EXISTS([$3], 92119ab56c27Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 92129ab56c27Smrg test "x$?" != "x0" && pkg_failed=yes ], 92139ab56c27Smrg [pkg_failed=yes]) 92149ab56c27Smrg else 92159ab56c27Smrg pkg_failed=untried 92169ab56c27Smrgfi[]dnl 92179ab56c27Smrg])dnl _PKG_CONFIG 921854cef2ddSmrg 92199ab56c27Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 92209ab56c27Smrgdnl --------------------------- 92219ab56c27Smrgdnl Internal check to see if pkg-config supports short errors. 92229ab56c27SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 92239ab56c27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 92249ab56c27Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 92259ab56c27Smrg _pkg_short_errors_supported=yes 92269ab56c27Smrgelse 92279ab56c27Smrg _pkg_short_errors_supported=no 92289ab56c27Smrgfi[]dnl 92299ab56c27Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 923054cef2ddSmrg 92318c9fbc29Smrg 92329ab56c27Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 92339ab56c27Smrgdnl [ACTION-IF-NOT-FOUND]) 92349ab56c27Smrgdnl -------------------------------------------------------------- 92359ab56c27Smrgdnl Since: 0.4.0 92369ab56c27Smrgdnl 92379ab56c27Smrgdnl Note that if there is a possibility the first call to 92389ab56c27Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 92399ab56c27Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 92409ab56c27SmrgAC_DEFUN([PKG_CHECK_MODULES], 92419ab56c27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92429ab56c27SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 92439ab56c27SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 92448c9fbc29Smrg 92459ab56c27Smrgpkg_failed=no 92469ab56c27SmrgAC_MSG_CHECKING([for $1]) 92478c9fbc29Smrg 92489ab56c27Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 92499ab56c27Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 92508c9fbc29Smrg 92519ab56c27Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 92529ab56c27Smrgand $1[]_LIBS to avoid the need to call pkg-config. 92539ab56c27SmrgSee the pkg-config man page for more details.]) 92548c9fbc29Smrg 92559ab56c27Smrgif test $pkg_failed = yes; then 92569ab56c27Smrg AC_MSG_RESULT([no]) 92579ab56c27Smrg _PKG_SHORT_ERRORS_SUPPORTED 92589ab56c27Smrg if test $_pkg_short_errors_supported = yes; then 92599ab56c27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 92609ab56c27Smrg else 92619ab56c27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 92629ab56c27Smrg fi 92639ab56c27Smrg # Put the nasty error message in config.log where it belongs 92649ab56c27Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 92658c9fbc29Smrg 92669ab56c27Smrg m4_default([$4], [AC_MSG_ERROR( 92679ab56c27Smrg[Package requirements ($2) were not met: 92688c9fbc29Smrg 92699ab56c27Smrg$$1_PKG_ERRORS 92708c9fbc29Smrg 92719ab56c27SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 92729ab56c27Smrginstalled software in a non-standard prefix. 92738c9fbc29Smrg 92749ab56c27Smrg_PKG_TEXT])[]dnl 92759ab56c27Smrg ]) 92769ab56c27Smrgelif test $pkg_failed = untried; then 92779ab56c27Smrg AC_MSG_RESULT([no]) 92789ab56c27Smrg m4_default([$4], [AC_MSG_FAILURE( 92799ab56c27Smrg[The pkg-config script could not be found or is too old. Make sure it 92809ab56c27Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 92819ab56c27Smrgpath to pkg-config. 92828c9fbc29Smrg 92839ab56c27Smrg_PKG_TEXT 92848c9fbc29Smrg 92859ab56c27SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 92869ab56c27Smrg ]) 92879ab56c27Smrgelse 92889ab56c27Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 92899ab56c27Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 92909ab56c27Smrg AC_MSG_RESULT([yes]) 92919ab56c27Smrg $3 92929ab56c27Smrgfi[]dnl 92939ab56c27Smrg])dnl PKG_CHECK_MODULES 92948c9fbc29Smrg 92958c9fbc29Smrg 92969ab56c27Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 92979ab56c27Smrgdnl [ACTION-IF-NOT-FOUND]) 92989ab56c27Smrgdnl --------------------------------------------------------------------- 92999ab56c27Smrgdnl Since: 0.29 93009ab56c27Smrgdnl 93019ab56c27Smrgdnl Checks for existence of MODULES and gathers its build flags with 93029ab56c27Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 93039ab56c27Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 93049ab56c27Smrgdnl 93059ab56c27Smrgdnl Note that if there is a possibility the first call to 93069ab56c27Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 93079ab56c27Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 93089ab56c27Smrgdnl configure.ac. 93099ab56c27SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 93109ab56c27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 93119ab56c27Smrg_save_PKG_CONFIG=$PKG_CONFIG 93129ab56c27SmrgPKG_CONFIG="$PKG_CONFIG --static" 93139ab56c27SmrgPKG_CHECK_MODULES($@) 93149ab56c27SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 93159ab56c27Smrg])dnl PKG_CHECK_MODULES_STATIC 93168c9fbc29Smrg 93178c9fbc29Smrg 93189ab56c27Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 93199ab56c27Smrgdnl ------------------------- 93209ab56c27Smrgdnl Since: 0.27 93219ab56c27Smrgdnl 93229ab56c27Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 93239ab56c27Smrgdnl should install pkg-config .pc files. By default the directory is 93249ab56c27Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 93259ab56c27Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 93269ab56c27Smrgdnl parameter. 93279ab56c27SmrgAC_DEFUN([PKG_INSTALLDIR], 93289ab56c27Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 93299ab56c27Smrgm4_pushdef([pkg_description], 93309ab56c27Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 93319ab56c27SmrgAC_ARG_WITH([pkgconfigdir], 93329ab56c27Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 93339ab56c27Smrg [with_pkgconfigdir=]pkg_default) 93349ab56c27SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 93359ab56c27Smrgm4_popdef([pkg_default]) 93369ab56c27Smrgm4_popdef([pkg_description]) 93379ab56c27Smrg])dnl PKG_INSTALLDIR 93388c9fbc29Smrg 93398c9fbc29Smrg 93409ab56c27Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 93419ab56c27Smrgdnl -------------------------------- 93429ab56c27Smrgdnl Since: 0.27 93439ab56c27Smrgdnl 93449ab56c27Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 93459ab56c27Smrgdnl module should install arch-independent pkg-config .pc files. By 93469ab56c27Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 93479ab56c27Smrgdnl changed by passing DIRECTORY. The user can override through the 93489ab56c27Smrgdnl --with-noarch-pkgconfigdir parameter. 93499ab56c27SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 93509ab56c27Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 93519ab56c27Smrgm4_pushdef([pkg_description], 93529ab56c27Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 93539ab56c27SmrgAC_ARG_WITH([noarch-pkgconfigdir], 93549ab56c27Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 93559ab56c27Smrg [with_noarch_pkgconfigdir=]pkg_default) 93569ab56c27SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 93579ab56c27Smrgm4_popdef([pkg_default]) 93589ab56c27Smrgm4_popdef([pkg_description]) 93599ab56c27Smrg])dnl PKG_NOARCH_INSTALLDIR 93604cd6a3aeSmrg 93614cd6a3aeSmrg 93629ab56c27Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 93639ab56c27Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 93649ab56c27Smrgdnl ------------------------------------------- 93659ab56c27Smrgdnl Since: 0.28 93669ab56c27Smrgdnl 93679ab56c27Smrgdnl Retrieves the value of the pkg-config variable for the given module. 93689ab56c27SmrgAC_DEFUN([PKG_CHECK_VAR], 93699ab56c27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 93709ab56c27SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 93714cd6a3aeSmrg 93729ab56c27Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 93739ab56c27SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 93748c9fbc29Smrg 93759ab56c27SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 93769ab56c27Smrg])dnl PKG_CHECK_VAR 93778c9fbc29Smrg 93789ab56c27Smrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 93799ab56c27Smrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 93809ab56c27Smrgdnl [DESCRIPTION], [DEFAULT]) 93819ab56c27Smrgdnl ------------------------------------------ 93829ab56c27Smrgdnl 93839ab56c27Smrgdnl Prepare a "--with-" configure option using the lowercase 93849ab56c27Smrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 93859ab56c27Smrgdnl PKG_CHECK_MODULES in a single macro. 93869ab56c27SmrgAC_DEFUN([PKG_WITH_MODULES], 93879ab56c27Smrg[ 93889ab56c27Smrgm4_pushdef([with_arg], m4_tolower([$1])) 93898c9fbc29Smrg 93909ab56c27Smrgm4_pushdef([description], 93919ab56c27Smrg [m4_default([$5], [build with ]with_arg[ support])]) 93928c9fbc29Smrg 93939ab56c27Smrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 93949ab56c27Smrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 93959ab56c27Smrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 93968c9fbc29Smrg 93979ab56c27Smrgm4_case(def_arg, 93989ab56c27Smrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 93999ab56c27Smrg [m4_pushdef([with_without],[--with-]with_arg)]) 94008c9fbc29Smrg 94019ab56c27SmrgAC_ARG_WITH(with_arg, 94029ab56c27Smrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 94039ab56c27Smrg [AS_TR_SH([with_]with_arg)=def_arg]) 94048c9fbc29Smrg 94059ab56c27SmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 94069ab56c27Smrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 94079ab56c27Smrg [auto],[PKG_CHECK_MODULES([$1],[$2], 94089ab56c27Smrg [m4_n([def_action_if_found]) $3], 94099ab56c27Smrg [m4_n([def_action_if_not_found]) $4])]) 94108c9fbc29Smrg 94119ab56c27Smrgm4_popdef([with_arg]) 94129ab56c27Smrgm4_popdef([description]) 94139ab56c27Smrgm4_popdef([def_arg]) 94149ab56c27Smrg 94159ab56c27Smrg])dnl PKG_WITH_MODULES 94169ab56c27Smrg 94179ab56c27Smrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 94189ab56c27Smrgdnl [DESCRIPTION], [DEFAULT]) 94199ab56c27Smrgdnl ----------------------------------------------- 94209ab56c27Smrgdnl 94219ab56c27Smrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 94229ab56c27Smrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 94239ab56c27SmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 94249ab56c27Smrg[ 94259ab56c27SmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 94269ab56c27Smrg 94279ab56c27SmrgAM_CONDITIONAL([HAVE_][$1], 94289ab56c27Smrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 94299ab56c27Smrg])dnl PKG_HAVE_WITH_MODULES 94309ab56c27Smrg 94319ab56c27Smrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 94329ab56c27Smrgdnl [DESCRIPTION], [DEFAULT]) 94339ab56c27Smrgdnl ------------------------------------------------------ 94349ab56c27Smrgdnl 94359ab56c27Smrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 94369ab56c27Smrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 94379ab56c27Smrgdnl and preprocessor variable. 94389ab56c27SmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 94399ab56c27Smrg[ 94409ab56c27SmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 94419ab56c27Smrg 94429ab56c27SmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 94439ab56c27Smrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 94449ab56c27Smrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 94459ab56c27Smrg 94469ab56c27Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 94479ab56c27Smrgdnl 94489ab56c27Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 94499ab56c27Smrgdnl 94509ab56c27Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 94519ab56c27Smrgdnl copy of this software and associated documentation files (the "Software"), 94529ab56c27Smrgdnl to deal in the Software without restriction, including without limitation 94539ab56c27Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 94549ab56c27Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 94559ab56c27Smrgdnl Software is furnished to do so, subject to the following conditions: 94569ab56c27Smrgdnl 94579ab56c27Smrgdnl The above copyright notice and this permission notice (including the next 94589ab56c27Smrgdnl paragraph) shall be included in all copies or substantial portions of the 94599ab56c27Smrgdnl Software. 94609ab56c27Smrgdnl 94619ab56c27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 94629ab56c27Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 94639ab56c27Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 94649ab56c27Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 94659ab56c27Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 94669ab56c27Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 94679ab56c27Smrgdnl DEALINGS IN THE SOFTWARE. 94689ab56c27Smrg 94699ab56c27Smrg# XORG_MACROS_VERSION(required-version) 94709ab56c27Smrg# ------------------------------------- 94719ab56c27Smrg# Minimum version: 1.1.0 94729ab56c27Smrg# 94739ab56c27Smrg# If you're using a macro added in Version 1.1 or newer, include this in 94749ab56c27Smrg# your configure.ac with the minimum required version, such as: 94759ab56c27Smrg# XORG_MACROS_VERSION(1.1) 94769ab56c27Smrg# 94779ab56c27Smrg# To ensure that this macro is defined, also add: 94789ab56c27Smrg# m4_ifndef([XORG_MACROS_VERSION], 94799ab56c27Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 94809ab56c27Smrg# 94819ab56c27Smrg# 94829ab56c27Smrg# See the "minimum version" comment for each macro you use to see what 94839ab56c27Smrg# version you require. 94849ab56c27Smrgm4_defun([XORG_MACROS_VERSION],[ 94859ab56c27Smrgm4_define([vers_have], [1.19.3]) 94869ab56c27Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 94879ab56c27Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 94889ab56c27Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 94899ab56c27Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 94909ab56c27Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 94919ab56c27Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 94929ab56c27Smrgm4_undefine([vers_have]) 94939ab56c27Smrgm4_undefine([maj_have]) 94949ab56c27Smrgm4_undefine([maj_needed]) 94959ab56c27Smrg]) # XORG_MACROS_VERSION 94969ab56c27Smrg 94979ab56c27Smrg# XORG_PROG_RAWCPP() 94989ab56c27Smrg# ------------------ 94999ab56c27Smrg# Minimum version: 1.0.0 95009ab56c27Smrg# 95019ab56c27Smrg# Find cpp program and necessary flags for use in pre-processing text files 95029ab56c27Smrg# such as man pages and config files 95039ab56c27SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 95049ab56c27SmrgAC_REQUIRE([AC_PROG_CPP]) 95059ab56c27SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 95069ab56c27Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 95079ab56c27Smrg 95089ab56c27Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 95099ab56c27Smrg# which is not the best choice for supporting other OS'es, but covers most 95109ab56c27Smrg# of the ones we need for now. 95119ab56c27SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 95129ab56c27SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 95139ab56c27Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 95149ab56c27Smrg AC_MSG_RESULT([no]) 95159ab56c27Smrgelse 95169ab56c27Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 95179ab56c27Smrg RAWCPPFLAGS=-undef 95189ab56c27Smrg AC_MSG_RESULT([yes]) 95199ab56c27Smrg # under Cygwin unix is still defined even with -undef 95209ab56c27Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 95219ab56c27Smrg RAWCPPFLAGS="-undef -ansi" 95229ab56c27Smrg AC_MSG_RESULT([yes, with -ansi]) 952354cef2ddSmrg else 95249ab56c27Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 952554cef2ddSmrg fi 95269ab56c27Smrgfi 95279ab56c27Smrgrm -f conftest.$ac_ext 95289ab56c27Smrg 95299ab56c27SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 95309ab56c27SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 95319ab56c27Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 95329ab56c27Smrg AC_MSG_RESULT([no]) 95339ab56c27Smrgelse 95349ab56c27Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 95359ab56c27Smrg TRADITIONALCPPFLAGS="-traditional" 95369ab56c27Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 95379ab56c27Smrg AC_MSG_RESULT([yes]) 95389ab56c27Smrg else 95399ab56c27Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 95409ab56c27Smrg fi 95419ab56c27Smrgfi 95429ab56c27Smrgrm -f conftest.$ac_ext 95439ab56c27SmrgAC_SUBST(RAWCPPFLAGS) 95449ab56c27SmrgAC_SUBST(TRADITIONALCPPFLAGS) 95459ab56c27Smrg]) # XORG_PROG_RAWCPP 95469ab56c27Smrg 95479ab56c27Smrg# XORG_MANPAGE_SECTIONS() 95489ab56c27Smrg# ----------------------- 95499ab56c27Smrg# Minimum version: 1.0.0 95509ab56c27Smrg# 95519ab56c27Smrg# Determine which sections man pages go in for the different man page types 95529ab56c27Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 95539ab56c27Smrg# Not sure if there's any better way than just hardcoding by OS name. 95549ab56c27Smrg# Override default settings by setting environment variables 95559ab56c27Smrg# Added MAN_SUBSTS in version 1.8 95569ab56c27Smrg# Added AC_PROG_SED in version 1.8 95579ab56c27Smrg 95589ab56c27SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 95599ab56c27SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 95609ab56c27SmrgAC_REQUIRE([AC_PROG_SED]) 95619ab56c27Smrg 95629ab56c27Smrgcase $host_os in 95639ab56c27Smrg solaris*) 95649ab56c27Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 95659ab56c27Smrg # check for a man page file found in later versions that use 95669ab56c27Smrg # traditional section numbers instead 95679ab56c27Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 95689ab56c27Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 95699ab56c27Smrg ;; 95709ab56c27Smrg *) SYSV_MAN_SECTIONS=false ;; 95719ab56c27Smrgesac 95728c9fbc29Smrg 95739ab56c27Smrgif test x$APP_MAN_SUFFIX = x ; then 95749ab56c27Smrg APP_MAN_SUFFIX=1 95759ab56c27Smrgfi 95769ab56c27Smrgif test x$APP_MAN_DIR = x ; then 95779ab56c27Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 95789ab56c27Smrgfi 95794cd6a3aeSmrg 95809ab56c27Smrgif test x$LIB_MAN_SUFFIX = x ; then 95819ab56c27Smrg LIB_MAN_SUFFIX=3 95829ab56c27Smrgfi 95839ab56c27Smrgif test x$LIB_MAN_DIR = x ; then 95849ab56c27Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 95859ab56c27Smrgfi 95868c9fbc29Smrg 95879ab56c27Smrgif test x$FILE_MAN_SUFFIX = x ; then 95889ab56c27Smrg case $SYSV_MAN_SECTIONS in 95899ab56c27Smrg true) FILE_MAN_SUFFIX=4 ;; 95909ab56c27Smrg *) FILE_MAN_SUFFIX=5 ;; 95919ab56c27Smrg esac 95929ab56c27Smrgfi 95939ab56c27Smrgif test x$FILE_MAN_DIR = x ; then 95949ab56c27Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 95959ab56c27Smrgfi 95968c9fbc29Smrg 95979ab56c27Smrgif test x$MISC_MAN_SUFFIX = x ; then 95989ab56c27Smrg case $SYSV_MAN_SECTIONS in 95999ab56c27Smrg true) MISC_MAN_SUFFIX=5 ;; 96009ab56c27Smrg *) MISC_MAN_SUFFIX=7 ;; 96019ab56c27Smrg esac 96029ab56c27Smrgfi 96039ab56c27Smrgif test x$MISC_MAN_DIR = x ; then 96049ab56c27Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 96059ab56c27Smrgfi 96064cd6a3aeSmrg 96079ab56c27Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 96089ab56c27Smrg case $SYSV_MAN_SECTIONS in 96099ab56c27Smrg true) DRIVER_MAN_SUFFIX=7 ;; 96109ab56c27Smrg *) DRIVER_MAN_SUFFIX=4 ;; 96119ab56c27Smrg esac 96129ab56c27Smrgfi 96139ab56c27Smrgif test x$DRIVER_MAN_DIR = x ; then 96149ab56c27Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 96159ab56c27Smrgfi 96164cd6a3aeSmrg 96179ab56c27Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 96189ab56c27Smrg case $SYSV_MAN_SECTIONS in 96199ab56c27Smrg true) ADMIN_MAN_SUFFIX=1m ;; 96209ab56c27Smrg *) ADMIN_MAN_SUFFIX=8 ;; 96219ab56c27Smrg esac 96229ab56c27Smrgfi 96239ab56c27Smrgif test x$ADMIN_MAN_DIR = x ; then 96249ab56c27Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 96259ab56c27Smrgfi 96268c9fbc29Smrg 96278c9fbc29Smrg 96289ab56c27SmrgAC_SUBST([APP_MAN_SUFFIX]) 96299ab56c27SmrgAC_SUBST([LIB_MAN_SUFFIX]) 96309ab56c27SmrgAC_SUBST([FILE_MAN_SUFFIX]) 96319ab56c27SmrgAC_SUBST([MISC_MAN_SUFFIX]) 96329ab56c27SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 96339ab56c27SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 96349ab56c27SmrgAC_SUBST([APP_MAN_DIR]) 96359ab56c27SmrgAC_SUBST([LIB_MAN_DIR]) 96369ab56c27SmrgAC_SUBST([FILE_MAN_DIR]) 96379ab56c27SmrgAC_SUBST([MISC_MAN_DIR]) 96389ab56c27SmrgAC_SUBST([DRIVER_MAN_DIR]) 96399ab56c27SmrgAC_SUBST([ADMIN_MAN_DIR]) 96404cd6a3aeSmrg 96419ab56c27SmrgXORG_MAN_PAGE="X Version 11" 96429ab56c27SmrgAC_SUBST([XORG_MAN_PAGE]) 96439ab56c27SmrgMAN_SUBSTS="\ 96449ab56c27Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 96459ab56c27Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 96469ab56c27Smrg -e 's|__xservername__|Xorg|g' \ 96479ab56c27Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 96489ab56c27Smrg -e 's|__projectroot__|\$(prefix)|g' \ 96499ab56c27Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 96509ab56c27Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 96519ab56c27Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 96529ab56c27Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 96539ab56c27Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 96549ab56c27Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 96559ab56c27Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 96569ab56c27SmrgAC_SUBST([MAN_SUBSTS]) 96578c9fbc29Smrg 96589ab56c27Smrg]) # XORG_MANPAGE_SECTIONS 96598c9fbc29Smrg 96609ab56c27Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 96619ab56c27Smrg# ------------------------ 96629ab56c27Smrg# Minimum version: 1.7.0 96639ab56c27Smrg# 96649ab56c27Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 96659ab56c27Smrg# provided by xorg-sgml-doctools, if installed. 96669ab56c27SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 96679ab56c27SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 96689ab56c27SmrgXORG_SGML_PATH= 96699ab56c27SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 96709ab56c27Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 96719ab56c27Smrg [m4_ifval([$1],[:], 96729ab56c27Smrg [if test x"$cross_compiling" != x"yes" ; then 96739ab56c27Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 96749ab56c27Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 96759ab56c27Smrg fi]) 96769ab56c27Smrg ]) 96774cd6a3aeSmrg 96789ab56c27Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 96799ab56c27Smrg# the path and the name of the doc stylesheet 96809ab56c27Smrgif test "x$XORG_SGML_PATH" != "x" ; then 96819ab56c27Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 96829ab56c27Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 96839ab56c27Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 96849ab56c27Smrgelse 96859ab56c27Smrg AC_MSG_RESULT([no]) 96869ab56c27Smrgfi 96878c9fbc29Smrg 96889ab56c27SmrgAC_SUBST(XORG_SGML_PATH) 96899ab56c27SmrgAC_SUBST(STYLESHEET_SRCDIR) 96909ab56c27SmrgAC_SUBST(XSL_STYLESHEET) 96919ab56c27SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 96929ab56c27Smrg]) # XORG_CHECK_SGML_DOCTOOLS 96934cd6a3aeSmrg 96949ab56c27Smrg# XORG_CHECK_LINUXDOC 96959ab56c27Smrg# ------------------- 96969ab56c27Smrg# Minimum version: 1.0.0 96979ab56c27Smrg# 96989ab56c27Smrg# Defines the variable MAKE_TEXT if the necessary tools and 96999ab56c27Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 97009ab56c27Smrg# Whether or not the necessary tools and files are found can be checked 97019ab56c27Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 97029ab56c27SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 97039ab56c27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 97049ab56c27SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 970554cef2ddSmrg 97069ab56c27SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 97079ab56c27Smrg 97089ab56c27SmrgAC_MSG_CHECKING([whether to build documentation]) 97099ab56c27Smrg 97109ab56c27Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 97119ab56c27Smrg BUILDDOC=yes 97129ab56c27Smrgelse 97139ab56c27Smrg BUILDDOC=no 97149ab56c27Smrgfi 971570728a38Smrg 97169ab56c27SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 971770728a38Smrg 97189ab56c27SmrgAC_MSG_RESULT([$BUILDDOC]) 97198c9fbc29Smrg 97209ab56c27SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 97214cd6a3aeSmrg 97229ab56c27Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 97239ab56c27Smrg BUILDPDFDOC=yes 97249ab56c27Smrgelse 97259ab56c27Smrg BUILDPDFDOC=no 97269ab56c27Smrgfi 97278c9fbc29Smrg 97289ab56c27SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 97298c9fbc29Smrg 97309ab56c27SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 97318c9fbc29Smrg 97329ab56c27SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 97339ab56c27SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 97349ab56c27SmrgMAKE_PDF="$PS2PDF" 97359ab56c27SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 97364cd6a3aeSmrg 97379ab56c27SmrgAC_SUBST(MAKE_TEXT) 97389ab56c27SmrgAC_SUBST(MAKE_PS) 97399ab56c27SmrgAC_SUBST(MAKE_PDF) 97409ab56c27SmrgAC_SUBST(MAKE_HTML) 97419ab56c27Smrg]) # XORG_CHECK_LINUXDOC 974254cef2ddSmrg 97439ab56c27Smrg# XORG_CHECK_DOCBOOK 97449ab56c27Smrg# ------------------- 97459ab56c27Smrg# Minimum version: 1.0.0 97469ab56c27Smrg# 97479ab56c27Smrg# Checks for the ability to build output formats from SGML DocBook source. 97489ab56c27Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 97499ab56c27Smrg# indicates whether the necessary tools and files are found and, if set, 97509ab56c27Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 97519ab56c27SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 97529ab56c27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 975354cef2ddSmrg 97549ab56c27SmrgBUILDTXTDOC=no 97559ab56c27SmrgBUILDPDFDOC=no 97569ab56c27SmrgBUILDPSDOC=no 97579ab56c27SmrgBUILDHTMLDOC=no 975854cef2ddSmrg 97599ab56c27SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 97609ab56c27SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 97619ab56c27SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 97629ab56c27SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 97634cd6a3aeSmrg 97649ab56c27SmrgAC_MSG_CHECKING([whether to build text documentation]) 97659ab56c27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 97669ab56c27Smrg test x$BUILD_TXTDOC != xno; then 97679ab56c27Smrg BUILDTXTDOC=yes 97689ab56c27Smrgfi 97699ab56c27SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 97709ab56c27SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 97718c9fbc29Smrg 97729ab56c27SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 97739ab56c27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 97749ab56c27Smrg test x$BUILD_PDFDOC != xno; then 97759ab56c27Smrg BUILDPDFDOC=yes 97769ab56c27Smrgfi 97779ab56c27SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 97789ab56c27SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 97798c9fbc29Smrg 97809ab56c27SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 97819ab56c27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 97829ab56c27Smrg test x$BUILD_PSDOC != xno; then 97839ab56c27Smrg BUILDPSDOC=yes 97849ab56c27Smrgfi 97859ab56c27SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 97869ab56c27SmrgAC_MSG_RESULT([$BUILDPSDOC]) 978770728a38Smrg 97889ab56c27SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 97899ab56c27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 97909ab56c27Smrg test x$BUILD_HTMLDOC != xno; then 97919ab56c27Smrg BUILDHTMLDOC=yes 97929ab56c27Smrgfi 97939ab56c27SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 97949ab56c27SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 979570728a38Smrg 97969ab56c27SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 97979ab56c27SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 97989ab56c27SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 97999ab56c27SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 98004cd6a3aeSmrg 98019ab56c27SmrgAC_SUBST(MAKE_TEXT) 98029ab56c27SmrgAC_SUBST(MAKE_PS) 98039ab56c27SmrgAC_SUBST(MAKE_PDF) 98049ab56c27SmrgAC_SUBST(MAKE_HTML) 98059ab56c27Smrg]) # XORG_CHECK_DOCBOOK 98069ab56c27Smrg 98079ab56c27Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 98089ab56c27Smrg# ---------------- 98099ab56c27Smrg# Minimum version: 1.5.0 98109ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.11.0 98119ab56c27Smrg# 98129ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 98139ab56c27Smrg# not at the appropriate level. This macro enables a module to test for the 98149ab56c27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 98159ab56c27Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 98169ab56c27Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 98179ab56c27Smrg# --with-xmlto assumes 'auto'. 98189ab56c27Smrg# 98199ab56c27Smrg# Interface to module: 98209ab56c27Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 98219ab56c27Smrg# XMLTO: returns the path of the xmlto program found 98229ab56c27Smrg# returns the path set by the user in the environment 98239ab56c27Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 98249ab56c27Smrg# 'no' user instructs the module not to use xmlto 98259ab56c27Smrg# 98269ab56c27Smrg# Added in version 1.10.0 98279ab56c27Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 98289ab56c27Smrg# xmlto for text output requires either lynx, links, or w3m browsers 98299ab56c27Smrg# 98309ab56c27Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 98319ab56c27Smrg# 98329ab56c27SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 98339ab56c27SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 98349ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 98359ab56c27SmrgAC_ARG_WITH(xmlto, 98369ab56c27Smrg AS_HELP_STRING([--with-xmlto], 98379ab56c27Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 98389ab56c27Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 98399ab56c27Smrgm4_undefine([_defopt]) 98409ab56c27Smrg 98419ab56c27Smrgif test "x$use_xmlto" = x"auto"; then 98429ab56c27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 98439ab56c27Smrg if test "x$XMLTO" = "x"; then 98449ab56c27Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 98459ab56c27Smrg have_xmlto=no 98469ab56c27Smrg else 98479ab56c27Smrg have_xmlto=yes 98489ab56c27Smrg fi 98499ab56c27Smrgelif test "x$use_xmlto" = x"yes" ; then 98509ab56c27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 98519ab56c27Smrg if test "x$XMLTO" = "x"; then 98529ab56c27Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 98539ab56c27Smrg fi 98549ab56c27Smrg have_xmlto=yes 98559ab56c27Smrgelif test "x$use_xmlto" = x"no" ; then 98569ab56c27Smrg if test "x$XMLTO" != "x"; then 98579ab56c27Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 98589ab56c27Smrg fi 98599ab56c27Smrg have_xmlto=no 98609ab56c27Smrgelse 98619ab56c27Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 98629ab56c27Smrgfi 98638c9fbc29Smrg 98649ab56c27Smrg# Test for a minimum version of xmlto, if provided. 98659ab56c27Smrgm4_ifval([$1], 98669ab56c27Smrg[if test "$have_xmlto" = yes; then 98679ab56c27Smrg # scrape the xmlto version 98689ab56c27Smrg AC_MSG_CHECKING([the xmlto version]) 98699ab56c27Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 98709ab56c27Smrg AC_MSG_RESULT([$xmlto_version]) 98719ab56c27Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 98729ab56c27Smrg [if test "x$use_xmlto" = xauto; then 98739ab56c27Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 98749ab56c27Smrg have_xmlto=no 98759ab56c27Smrg else 98769ab56c27Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 98779ab56c27Smrg fi]) 98789ab56c27Smrgfi]) 987954cef2ddSmrg 98809ab56c27Smrg# Test for the ability of xmlto to generate a text target 98814cd6a3aeSmrg# 98829ab56c27Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 98839ab56c27Smrg# following test for empty XML docbook files. 98849ab56c27Smrg# For compatibility reasons use the following empty XML docbook file and if 98859ab56c27Smrg# it fails try it again with a non-empty XML file. 98869ab56c27Smrghave_xmlto_text=no 98879ab56c27Smrgcat > conftest.xml << "EOF" 98889ab56c27SmrgEOF 98899ab56c27SmrgAS_IF([test "$have_xmlto" = yes], 98909ab56c27Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 98919ab56c27Smrg [have_xmlto_text=yes], 98929ab56c27Smrg [# Try it again with a non-empty XML file. 98939ab56c27Smrg cat > conftest.xml << "EOF" 98949ab56c27Smrg<x></x> 98959ab56c27SmrgEOF 98969ab56c27Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 98979ab56c27Smrg [have_xmlto_text=yes], 98989ab56c27Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 98999ab56c27Smrgrm -f conftest.xml 99009ab56c27SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 99019ab56c27SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 99029ab56c27Smrg]) # XORG_WITH_XMLTO 990354cef2ddSmrg 99049ab56c27Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 99059ab56c27Smrg# -------------------------------------------- 99069ab56c27Smrg# Minimum version: 1.12.0 99079ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.12.0 99089ab56c27Smrg# 99099ab56c27Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 99109ab56c27Smrg# XML-based language used for the transformation of XML documents. 99119ab56c27Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 99129ab56c27Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 99139ab56c27Smrg# The XSLT processor is often used as a standalone tool for transformations. 99149ab56c27Smrg# It should not be assumed that this tool is used only to work with documnetation. 99159ab56c27Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 99169ab56c27Smrg# 99179ab56c27Smrg# Interface to module: 99189ab56c27Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 99199ab56c27Smrg# XSLTPROC: returns the path of the xsltproc program found 99209ab56c27Smrg# returns the path set by the user in the environment 99219ab56c27Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 99229ab56c27Smrg# 'no' user instructs the module not to use xsltproc 99239ab56c27Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 99249ab56c27Smrg# 99259ab56c27Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 99269ab56c27Smrg# 99279ab56c27SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 99289ab56c27SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 99299ab56c27Smrg# Preserves the interface, should it be implemented later 99309ab56c27Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 99319ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 99329ab56c27SmrgAC_ARG_WITH(xsltproc, 99339ab56c27Smrg AS_HELP_STRING([--with-xsltproc], 99349ab56c27Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 99359ab56c27Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 99369ab56c27Smrgm4_undefine([_defopt]) 993754cef2ddSmrg 99389ab56c27Smrgif test "x$use_xsltproc" = x"auto"; then 99399ab56c27Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 99409ab56c27Smrg if test "x$XSLTPROC" = "x"; then 99419ab56c27Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 99429ab56c27Smrg have_xsltproc=no 99439ab56c27Smrg else 99449ab56c27Smrg have_xsltproc=yes 99459ab56c27Smrg fi 99469ab56c27Smrgelif test "x$use_xsltproc" = x"yes" ; then 99479ab56c27Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 99489ab56c27Smrg if test "x$XSLTPROC" = "x"; then 99499ab56c27Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 99509ab56c27Smrg fi 99519ab56c27Smrg have_xsltproc=yes 99529ab56c27Smrgelif test "x$use_xsltproc" = x"no" ; then 99539ab56c27Smrg if test "x$XSLTPROC" != "x"; then 99549ab56c27Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 99559ab56c27Smrg fi 99569ab56c27Smrg have_xsltproc=no 99579ab56c27Smrgelse 99589ab56c27Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 99599ab56c27Smrgfi 996054cef2ddSmrg 99619ab56c27SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 99629ab56c27Smrg]) # XORG_WITH_XSLTPROC 99634cd6a3aeSmrg 99649ab56c27Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 99659ab56c27Smrg# ---------------------------------------- 99669ab56c27Smrg# Minimum version: 1.15.0 99679ab56c27Smrg# 99689ab56c27Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 99699ab56c27Smrg# scanning arbitrary text files, extracting information from those text files, 99709ab56c27Smrg# and printing reports based on that information. 99719ab56c27Smrg# 99729ab56c27Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 99739ab56c27Smrg# 99749ab56c27Smrg# Interface to module: 99759ab56c27Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 99769ab56c27Smrg# PERL: returns the path of the perl program found 99779ab56c27Smrg# returns the path set by the user in the environment 99789ab56c27Smrg# --with-perl: 'yes' user instructs the module to use perl 99799ab56c27Smrg# 'no' user instructs the module not to use perl 99809ab56c27Smrg# have_perl: returns yes if perl found in PATH or no 99819ab56c27Smrg# 99829ab56c27Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 99839ab56c27Smrg# 99849ab56c27SmrgAC_DEFUN([XORG_WITH_PERL],[ 99859ab56c27SmrgAC_ARG_VAR([PERL], [Path to perl command]) 99869ab56c27Smrg# Preserves the interface, should it be implemented later 99879ab56c27Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 99889ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 99899ab56c27SmrgAC_ARG_WITH(perl, 99909ab56c27Smrg AS_HELP_STRING([--with-perl], 99919ab56c27Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 99929ab56c27Smrg [use_perl=$withval], [use_perl=]_defopt) 99939ab56c27Smrgm4_undefine([_defopt]) 99944cd6a3aeSmrg 99959ab56c27Smrgif test "x$use_perl" = x"auto"; then 99969ab56c27Smrg AC_PATH_PROG([PERL], [perl]) 99979ab56c27Smrg if test "x$PERL" = "x"; then 99989ab56c27Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 99999ab56c27Smrg have_perl=no 100009ab56c27Smrg else 100019ab56c27Smrg have_perl=yes 100029ab56c27Smrg fi 100039ab56c27Smrgelif test "x$use_perl" = x"yes" ; then 100049ab56c27Smrg AC_PATH_PROG([PERL], [perl]) 100059ab56c27Smrg if test "x$PERL" = "x"; then 100069ab56c27Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 100079ab56c27Smrg fi 100089ab56c27Smrg have_perl=yes 100099ab56c27Smrgelif test "x$use_perl" = x"no" ; then 100109ab56c27Smrg if test "x$PERL" != "x"; then 100119ab56c27Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 100129ab56c27Smrg fi 100139ab56c27Smrg have_perl=no 100149ab56c27Smrgelse 100159ab56c27Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 100169ab56c27Smrgfi 100174cd6a3aeSmrg 100189ab56c27SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 100199ab56c27Smrg]) # XORG_WITH_PERL 100204cd6a3aeSmrg 100219ab56c27Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 100229ab56c27Smrg# ---------------- 100239ab56c27Smrg# Minimum version: 1.5.0 100249ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.11.0 100259ab56c27Smrg# 100269ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 100279ab56c27Smrg# not at the appropriate level. This macro enables a module to test for the 100289ab56c27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 100299ab56c27Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 100309ab56c27Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 100319ab56c27Smrg# --with-asciidoc assumes 'auto'. 100329ab56c27Smrg# 100339ab56c27Smrg# Interface to module: 100349ab56c27Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 100359ab56c27Smrg# ASCIIDOC: returns the path of the asciidoc program found 100369ab56c27Smrg# returns the path set by the user in the environment 100379ab56c27Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 100389ab56c27Smrg# 'no' user instructs the module not to use asciidoc 100399ab56c27Smrg# 100409ab56c27Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 100419ab56c27Smrg# 100429ab56c27SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 100439ab56c27SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 100449ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 100459ab56c27SmrgAC_ARG_WITH(asciidoc, 100469ab56c27Smrg AS_HELP_STRING([--with-asciidoc], 100479ab56c27Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 100489ab56c27Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 100499ab56c27Smrgm4_undefine([_defopt]) 1005070728a38Smrg 100519ab56c27Smrgif test "x$use_asciidoc" = x"auto"; then 100529ab56c27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 100539ab56c27Smrg if test "x$ASCIIDOC" = "x"; then 100549ab56c27Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 100559ab56c27Smrg have_asciidoc=no 100569ab56c27Smrg else 100579ab56c27Smrg have_asciidoc=yes 100589ab56c27Smrg fi 100599ab56c27Smrgelif test "x$use_asciidoc" = x"yes" ; then 100609ab56c27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 100619ab56c27Smrg if test "x$ASCIIDOC" = "x"; then 100629ab56c27Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 100639ab56c27Smrg fi 100649ab56c27Smrg have_asciidoc=yes 100659ab56c27Smrgelif test "x$use_asciidoc" = x"no" ; then 100669ab56c27Smrg if test "x$ASCIIDOC" != "x"; then 100679ab56c27Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 100689ab56c27Smrg fi 100699ab56c27Smrg have_asciidoc=no 100709ab56c27Smrgelse 100719ab56c27Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 100729ab56c27Smrgfi 100739ab56c27Smrgm4_ifval([$1], 100749ab56c27Smrg[if test "$have_asciidoc" = yes; then 100759ab56c27Smrg # scrape the asciidoc version 100769ab56c27Smrg AC_MSG_CHECKING([the asciidoc version]) 100779ab56c27Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 100789ab56c27Smrg AC_MSG_RESULT([$asciidoc_version]) 100799ab56c27Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 100809ab56c27Smrg [if test "x$use_asciidoc" = xauto; then 100819ab56c27Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 100829ab56c27Smrg have_asciidoc=no 100839ab56c27Smrg else 100849ab56c27Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 100859ab56c27Smrg fi]) 100869ab56c27Smrgfi]) 100879ab56c27SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 100889ab56c27Smrg]) # XORG_WITH_ASCIIDOC 100894cd6a3aeSmrg 100909ab56c27Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 100919ab56c27Smrg# ------------------------------------------- 100929ab56c27Smrg# Minimum version: 1.5.0 100939ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.11.0 100949ab56c27Smrg# Minimum version for optional DOT checking: 1.18.0 100959ab56c27Smrg# 100969ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 100979ab56c27Smrg# not at the appropriate level. This macro enables a module to test for the 100989ab56c27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 100999ab56c27Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 101009ab56c27Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 101019ab56c27Smrg# --with-doxygen assumes 'auto'. 101029ab56c27Smrg# 101039ab56c27Smrg# Interface to module: 101049ab56c27Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 101059ab56c27Smrg# DOXYGEN: returns the path of the doxygen program found 101069ab56c27Smrg# returns the path set by the user in the environment 101079ab56c27Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 101089ab56c27Smrg# 'no' user instructs the module not to use doxygen 101099ab56c27Smrg# 101109ab56c27Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 101119ab56c27Smrg# 101129ab56c27SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 101139ab56c27SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 101149ab56c27SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 101159ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 101169ab56c27SmrgAC_ARG_WITH(doxygen, 101179ab56c27Smrg AS_HELP_STRING([--with-doxygen], 101189ab56c27Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 101199ab56c27Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 101209ab56c27Smrgm4_undefine([_defopt]) 1012154cef2ddSmrg 101229ab56c27Smrgif test "x$use_doxygen" = x"auto"; then 101239ab56c27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 101249ab56c27Smrg if test "x$DOXYGEN" = "x"; then 101259ab56c27Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 101269ab56c27Smrg have_doxygen=no 101279ab56c27Smrg else 101289ab56c27Smrg have_doxygen=yes 101299ab56c27Smrg fi 101309ab56c27Smrgelif test "x$use_doxygen" = x"yes" ; then 101319ab56c27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 101329ab56c27Smrg if test "x$DOXYGEN" = "x"; then 101339ab56c27Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 101349ab56c27Smrg fi 101359ab56c27Smrg have_doxygen=yes 101369ab56c27Smrgelif test "x$use_doxygen" = x"no" ; then 101379ab56c27Smrg if test "x$DOXYGEN" != "x"; then 101389ab56c27Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 101399ab56c27Smrg fi 101409ab56c27Smrg have_doxygen=no 101419ab56c27Smrgelse 101429ab56c27Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 101439ab56c27Smrgfi 101449ab56c27Smrgm4_ifval([$1], 101459ab56c27Smrg[if test "$have_doxygen" = yes; then 101469ab56c27Smrg # scrape the doxygen version 101479ab56c27Smrg AC_MSG_CHECKING([the doxygen version]) 101489ab56c27Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 101499ab56c27Smrg AC_MSG_RESULT([$doxygen_version]) 101509ab56c27Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 101519ab56c27Smrg [if test "x$use_doxygen" = xauto; then 101529ab56c27Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 101539ab56c27Smrg have_doxygen=no 101549ab56c27Smrg else 101559ab56c27Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 101569ab56c27Smrg fi]) 101579ab56c27Smrgfi]) 1015854cef2ddSmrg 101599ab56c27Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 101609ab56c27Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 101619ab56c27Smrgdnl HAVE_DOT = @HAVE_DOT@ 101629ab56c27SmrgHAVE_DOT=no 101639ab56c27Smrgif test "x$have_doxygen" = "xyes"; then 101649ab56c27Smrg AC_PATH_PROG([DOT], [dot]) 101659ab56c27Smrg if test "x$DOT" != "x"; then 101669ab56c27Smrg HAVE_DOT=yes 101679ab56c27Smrg fi 101689ab56c27Smrgfi 101698c9fbc29Smrg 101709ab56c27SmrgAC_SUBST([HAVE_DOT]) 101719ab56c27SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 101729ab56c27SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 101739ab56c27Smrg]) # XORG_WITH_DOXYGEN 101748c9fbc29Smrg 101759ab56c27Smrg# XORG_WITH_GROFF([DEFAULT]) 101769ab56c27Smrg# ---------------- 101779ab56c27Smrg# Minimum version: 1.6.0 101789ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101799ab56c27Smrg# 101809ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 101819ab56c27Smrg# not at the appropriate level. This macro enables a module to test for the 101829ab56c27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101839ab56c27Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 101849ab56c27Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 101859ab56c27Smrg# --with-groff assumes 'auto'. 101869ab56c27Smrg# 101879ab56c27Smrg# Interface to module: 101889ab56c27Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 101899ab56c27Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 101909ab56c27Smrg# HAVE_GROFF_MS: the -ms macros package 101919ab56c27Smrg# GROFF: returns the path of the groff program found 101929ab56c27Smrg# returns the path set by the user in the environment 101939ab56c27Smrg# --with-groff: 'yes' user instructs the module to use groff 101949ab56c27Smrg# 'no' user instructs the module not to use groff 101959ab56c27Smrg# 101969ab56c27Smrg# Added in version 1.9.0: 101979ab56c27Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 101989ab56c27Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 101999ab56c27Smrg# psselect from the psutils package. 102009ab56c27Smrg# the ghostcript package. Refer to the grohtml man pages 102019ab56c27Smrg# 102029ab56c27Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 102039ab56c27Smrg# 102049ab56c27Smrg# OS and distros often splits groff in a basic and full package, the former 102059ab56c27Smrg# having the groff program and the later having devices, fonts and macros 102069ab56c27Smrg# Checking for the groff executable is not enough. 102079ab56c27Smrg# 102089ab56c27Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 102099ab56c27Smrg# unset HAVE_GROFF or GROFF env variables. 102109ab56c27Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 102119ab56c27Smrg# 102129ab56c27SmrgAC_DEFUN([XORG_WITH_GROFF],[ 102139ab56c27SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 102149ab56c27Smrgm4_define([_defopt], m4_default([$1], [auto])) 102159ab56c27SmrgAC_ARG_WITH(groff, 102169ab56c27Smrg AS_HELP_STRING([--with-groff], 102179ab56c27Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 102189ab56c27Smrg [use_groff=$withval], [use_groff=]_defopt) 102199ab56c27Smrgm4_undefine([_defopt]) 102208c9fbc29Smrg 102219ab56c27Smrgif test "x$use_groff" = x"auto"; then 102229ab56c27Smrg AC_PATH_PROG([GROFF], [groff]) 102239ab56c27Smrg if test "x$GROFF" = "x"; then 102249ab56c27Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 102259ab56c27Smrg have_groff=no 102269ab56c27Smrg else 102279ab56c27Smrg have_groff=yes 102289ab56c27Smrg fi 102299ab56c27Smrgelif test "x$use_groff" = x"yes" ; then 102309ab56c27Smrg AC_PATH_PROG([GROFF], [groff]) 102319ab56c27Smrg if test "x$GROFF" = "x"; then 102329ab56c27Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 102339ab56c27Smrg fi 102349ab56c27Smrg have_groff=yes 102359ab56c27Smrgelif test "x$use_groff" = x"no" ; then 102369ab56c27Smrg if test "x$GROFF" != "x"; then 102379ab56c27Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 102389ab56c27Smrg fi 102399ab56c27Smrg have_groff=no 1024054cef2ddSmrgelse 102419ab56c27Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1024254044362Smrgfi 1024354044362Smrg 102449ab56c27Smrg# We have groff, test for the presence of the macro packages 102459ab56c27Smrgif test "x$have_groff" = x"yes"; then 102469ab56c27Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 102479ab56c27Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 102489ab56c27Smrg groff_ms_works=yes 102499ab56c27Smrg else 102509ab56c27Smrg groff_ms_works=no 102519ab56c27Smrg fi 102529ab56c27Smrg AC_MSG_RESULT([$groff_ms_works]) 102539ab56c27Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 102549ab56c27Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 102559ab56c27Smrg groff_mm_works=yes 102569ab56c27Smrg else 102579ab56c27Smrg groff_mm_works=no 102589ab56c27Smrg fi 102599ab56c27Smrg AC_MSG_RESULT([$groff_mm_works]) 1026054044362Smrgfi 1026154044362Smrg 102629ab56c27Smrg# We have groff, test for HTML dependencies, one command per package 102639ab56c27Smrgif test "x$have_groff" = x"yes"; then 102649ab56c27Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 102659ab56c27Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 102669ab56c27Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 102679ab56c27Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 102689ab56c27Smrg have_groff_html=yes 102699ab56c27Smrg else 102709ab56c27Smrg have_groff_html=no 102719ab56c27Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 102729ab56c27Smrg fi 1027354044362Smrgfi 1027454044362Smrg 102759ab56c27Smrg# Set Automake conditionals for Makefiles 102769ab56c27SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 102779ab56c27SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 102789ab56c27SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 102799ab56c27SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 102809ab56c27Smrg]) # XORG_WITH_GROFF 1028154cef2ddSmrg 102829ab56c27Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 102839ab56c27Smrg# --------------------------------------- 102849ab56c27Smrg# Minimum version: 1.6.0 102859ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.11.0 102869ab56c27Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 102879ab56c27Smrg# 102889ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 102899ab56c27Smrg# not at the appropriate level. This macro enables a module to test for the 102909ab56c27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102919ab56c27Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 102929ab56c27Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 102939ab56c27Smrg# --with-fop assumes 'auto'. 102949ab56c27Smrg# 102959ab56c27Smrg# Interface to module: 102969ab56c27Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 102979ab56c27Smrg# FOP: returns the path of the fop program found 102989ab56c27Smrg# returns the path set by the user in the environment 102999ab56c27Smrg# --with-fop: 'yes' user instructs the module to use fop 103009ab56c27Smrg# 'no' user instructs the module not to use fop 103019ab56c27Smrg# 103029ab56c27Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 103039ab56c27Smrg# 103049ab56c27SmrgAC_DEFUN([XORG_WITH_FOP],[ 103059ab56c27SmrgAC_ARG_VAR([FOP], [Path to fop command]) 103069ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 103079ab56c27SmrgAC_ARG_WITH(fop, 103089ab56c27Smrg AS_HELP_STRING([--with-fop], 103099ab56c27Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 103109ab56c27Smrg [use_fop=$withval], [use_fop=]_defopt) 103119ab56c27Smrgm4_undefine([_defopt]) 1031254cef2ddSmrg 103139ab56c27Smrgif test "x$use_fop" = x"auto"; then 103149ab56c27Smrg AC_PATH_PROG([FOP], [fop]) 103159ab56c27Smrg if test "x$FOP" = "x"; then 103169ab56c27Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 103179ab56c27Smrg have_fop=no 103189ab56c27Smrg else 103199ab56c27Smrg have_fop=yes 103209ab56c27Smrg fi 103219ab56c27Smrgelif test "x$use_fop" = x"yes" ; then 103229ab56c27Smrg AC_PATH_PROG([FOP], [fop]) 103239ab56c27Smrg if test "x$FOP" = "x"; then 103249ab56c27Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 103259ab56c27Smrg fi 103269ab56c27Smrg have_fop=yes 103279ab56c27Smrgelif test "x$use_fop" = x"no" ; then 103289ab56c27Smrg if test "x$FOP" != "x"; then 103299ab56c27Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 103309ab56c27Smrg fi 103319ab56c27Smrg have_fop=no 103329ab56c27Smrgelse 103339ab56c27Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 103349ab56c27Smrgfi 1033554cef2ddSmrg 103369ab56c27Smrg# Test for a minimum version of fop, if provided. 103379ab56c27Smrgm4_ifval([$1], 103389ab56c27Smrg[if test "$have_fop" = yes; then 103399ab56c27Smrg # scrape the fop version 103409ab56c27Smrg AC_MSG_CHECKING([for fop minimum version]) 103419ab56c27Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 103429ab56c27Smrg AC_MSG_RESULT([$fop_version]) 103439ab56c27Smrg AS_VERSION_COMPARE([$fop_version], [$1], 103449ab56c27Smrg [if test "x$use_fop" = xauto; then 103459ab56c27Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 103469ab56c27Smrg have_fop=no 103479ab56c27Smrg else 103489ab56c27Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 103499ab56c27Smrg fi]) 103509ab56c27Smrgfi]) 103519ab56c27SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 103529ab56c27Smrg]) # XORG_WITH_FOP 1035354044362Smrg 103549ab56c27Smrg# XORG_WITH_M4([MIN-VERSION]) 103559ab56c27Smrg# --------------------------- 103569ab56c27Smrg# Minimum version: 1.19.0 103579ab56c27Smrg# 103589ab56c27Smrg# This macro attempts to locate an m4 macro processor which supports 103599ab56c27Smrg# -I option and is only useful for modules relying on M4 in order to 103609ab56c27Smrg# expand macros in source code files. 103619ab56c27Smrg# 103629ab56c27Smrg# Interface to module: 103639ab56c27Smrg# M4: returns the path of the m4 program found 103649ab56c27Smrg# returns the path set by the user in the environment 103659ab56c27Smrg# 103669ab56c27SmrgAC_DEFUN([XORG_WITH_M4], [ 103679ab56c27SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 103689ab56c27Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 103699ab56c27Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 103709ab56c27Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 103719ab56c27Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 103729ab56c27Smrg [$PATH:/usr/gnu/bin])]) 1037354044362Smrg 103749ab56c27SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 103759ab56c27Smrg]) # XORG_WITH_M4 1037654044362Smrg 103779ab56c27Smrg# XORG_WITH_PS2PDF([DEFAULT]) 103789ab56c27Smrg# ---------------- 103799ab56c27Smrg# Minimum version: 1.6.0 103809ab56c27Smrg# Minimum version for optional DEFAULT argument: 1.11.0 103819ab56c27Smrg# 103829ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 103839ab56c27Smrg# not at the appropriate level. This macro enables a module to test for the 103849ab56c27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 103859ab56c27Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 103869ab56c27Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 103879ab56c27Smrg# --with-ps2pdf assumes 'auto'. 103889ab56c27Smrg# 103899ab56c27Smrg# Interface to module: 103909ab56c27Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 103919ab56c27Smrg# PS2PDF: returns the path of the ps2pdf program found 103929ab56c27Smrg# returns the path set by the user in the environment 103939ab56c27Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 103949ab56c27Smrg# 'no' user instructs the module not to use ps2pdf 103959ab56c27Smrg# 103969ab56c27Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 103979ab56c27Smrg# 103989ab56c27SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 103999ab56c27SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 104009ab56c27Smrgm4_define([_defopt], m4_default([$1], [auto])) 104019ab56c27SmrgAC_ARG_WITH(ps2pdf, 104029ab56c27Smrg AS_HELP_STRING([--with-ps2pdf], 104039ab56c27Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 104049ab56c27Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 104059ab56c27Smrgm4_undefine([_defopt]) 1040654044362Smrg 104079ab56c27Smrgif test "x$use_ps2pdf" = x"auto"; then 104089ab56c27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 104099ab56c27Smrg if test "x$PS2PDF" = "x"; then 104109ab56c27Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 104119ab56c27Smrg have_ps2pdf=no 104129ab56c27Smrg else 104139ab56c27Smrg have_ps2pdf=yes 104149ab56c27Smrg fi 104159ab56c27Smrgelif test "x$use_ps2pdf" = x"yes" ; then 104169ab56c27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 104179ab56c27Smrg if test "x$PS2PDF" = "x"; then 104189ab56c27Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 104199ab56c27Smrg fi 104209ab56c27Smrg have_ps2pdf=yes 104219ab56c27Smrgelif test "x$use_ps2pdf" = x"no" ; then 104229ab56c27Smrg if test "x$PS2PDF" != "x"; then 104239ab56c27Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 104249ab56c27Smrg fi 104259ab56c27Smrg have_ps2pdf=no 104269ab56c27Smrgelse 104279ab56c27Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 104289ab56c27Smrgfi 104299ab56c27SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 104309ab56c27Smrg]) # XORG_WITH_PS2PDF 1043154044362Smrg 104329ab56c27Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 104339ab56c27Smrg# ---------------- 104349ab56c27Smrg# Minimum version: 1.6.0 104359ab56c27Smrg# 104369ab56c27Smrg# Documentation tools are not always available on all platforms and sometimes 104379ab56c27Smrg# not at the appropriate level. This macro enables a builder to skip all 104389ab56c27Smrg# documentation targets except traditional man pages. 104399ab56c27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 104409ab56c27Smrg# maximum flexibilty in controlling documentation building. 104419ab56c27Smrg# Refer to: 104429ab56c27Smrg# XORG_WITH_XMLTO --with-xmlto 104439ab56c27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 104449ab56c27Smrg# XORG_WITH_DOXYGEN --with-doxygen 104459ab56c27Smrg# XORG_WITH_FOP --with-fop 104469ab56c27Smrg# XORG_WITH_GROFF --with-groff 104479ab56c27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 104489ab56c27Smrg# 104499ab56c27Smrg# Interface to module: 104509ab56c27Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 104519ab56c27Smrg# --enable-docs: 'yes' user instructs the module to generate docs 104529ab56c27Smrg# 'no' user instructs the module not to generate docs 104539ab56c27Smrg# parm1: specify the default value, yes or no. 104549ab56c27Smrg# 104559ab56c27SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 104569ab56c27Smrgm4_define([docs_default], m4_default([$1], [yes])) 104579ab56c27SmrgAC_ARG_ENABLE(docs, 104589ab56c27Smrg AS_HELP_STRING([--enable-docs], 104599ab56c27Smrg [Enable building the documentation (default: ]docs_default[)]), 104609ab56c27Smrg [build_docs=$enableval], [build_docs=]docs_default) 104619ab56c27Smrgm4_undefine([docs_default]) 104629ab56c27SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 104639ab56c27SmrgAC_MSG_CHECKING([whether to build documentation]) 104649ab56c27SmrgAC_MSG_RESULT([$build_docs]) 104659ab56c27Smrg]) # XORG_ENABLE_DOCS 1046654044362Smrg 104679ab56c27Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 104689ab56c27Smrg# ---------------- 104699ab56c27Smrg# Minimum version: 1.6.0 104709ab56c27Smrg# 104719ab56c27Smrg# This macro enables a builder to skip all developer documentation. 104729ab56c27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 104739ab56c27Smrg# maximum flexibilty in controlling documentation building. 104749ab56c27Smrg# Refer to: 104759ab56c27Smrg# XORG_WITH_XMLTO --with-xmlto 104769ab56c27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 104779ab56c27Smrg# XORG_WITH_DOXYGEN --with-doxygen 104789ab56c27Smrg# XORG_WITH_FOP --with-fop 104799ab56c27Smrg# XORG_WITH_GROFF --with-groff 104809ab56c27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 104819ab56c27Smrg# 104829ab56c27Smrg# Interface to module: 104839ab56c27Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 104849ab56c27Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 104859ab56c27Smrg# 'no' user instructs the module not to generate developer docs 104869ab56c27Smrg# parm1: specify the default value, yes or no. 104879ab56c27Smrg# 104889ab56c27SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 104899ab56c27Smrgm4_define([devel_default], m4_default([$1], [yes])) 104909ab56c27SmrgAC_ARG_ENABLE(devel-docs, 104919ab56c27Smrg AS_HELP_STRING([--enable-devel-docs], 104929ab56c27Smrg [Enable building the developer documentation (default: ]devel_default[)]), 104939ab56c27Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 104949ab56c27Smrgm4_undefine([devel_default]) 104959ab56c27SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 104969ab56c27SmrgAC_MSG_CHECKING([whether to build developer documentation]) 104979ab56c27SmrgAC_MSG_RESULT([$build_devel_docs]) 104989ab56c27Smrg]) # XORG_ENABLE_DEVEL_DOCS 1049954044362Smrg 105009ab56c27Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 105019ab56c27Smrg# ---------------- 105029ab56c27Smrg# Minimum version: 1.6.0 105039ab56c27Smrg# 105049ab56c27Smrg# This macro enables a builder to skip all functional specification targets. 105059ab56c27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 105069ab56c27Smrg# maximum flexibilty in controlling documentation building. 105079ab56c27Smrg# Refer to: 105089ab56c27Smrg# XORG_WITH_XMLTO --with-xmlto 105099ab56c27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 105109ab56c27Smrg# XORG_WITH_DOXYGEN --with-doxygen 105119ab56c27Smrg# XORG_WITH_FOP --with-fop 105129ab56c27Smrg# XORG_WITH_GROFF --with-groff 105139ab56c27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 105149ab56c27Smrg# 105159ab56c27Smrg# Interface to module: 105169ab56c27Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 105179ab56c27Smrg# --enable-specs: 'yes' user instructs the module to generate specs 105189ab56c27Smrg# 'no' user instructs the module not to generate specs 105199ab56c27Smrg# parm1: specify the default value, yes or no. 105209ab56c27Smrg# 105219ab56c27SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 105229ab56c27Smrgm4_define([spec_default], m4_default([$1], [yes])) 105239ab56c27SmrgAC_ARG_ENABLE(specs, 105249ab56c27Smrg AS_HELP_STRING([--enable-specs], 105259ab56c27Smrg [Enable building the specs (default: ]spec_default[)]), 105269ab56c27Smrg [build_specs=$enableval], [build_specs=]spec_default) 105279ab56c27Smrgm4_undefine([spec_default]) 105289ab56c27SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 105299ab56c27SmrgAC_MSG_CHECKING([whether to build functional specifications]) 105309ab56c27SmrgAC_MSG_RESULT([$build_specs]) 105319ab56c27Smrg]) # XORG_ENABLE_SPECS 1053254cef2ddSmrg 105339ab56c27Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 105349ab56c27Smrg# ---------------------------------------------- 105359ab56c27Smrg# Minimum version: 1.13.0 105369ab56c27Smrg# 105379ab56c27Smrg# This macro enables a builder to enable/disable unit testing 105389ab56c27Smrg# It makes no assumption about the test cases implementation 105399ab56c27Smrg# Test cases may or may not use Automake "Support for test suites" 105409ab56c27Smrg# They may or may not use the software utility library GLib 105419ab56c27Smrg# 105429ab56c27Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 105439ab56c27Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 105449ab56c27Smrg# The variable enable_unit_tests is used by other macros in this file. 105459ab56c27Smrg# 105469ab56c27Smrg# Interface to module: 105479ab56c27Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 105489ab56c27Smrg# enable_unit_tests: used in configure.ac for additional configuration 105499ab56c27Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 105509ab56c27Smrg# 'no' user instructs the module not to build tests 105519ab56c27Smrg# parm1: specify the default value, yes or no. 105529ab56c27Smrg# 105539ab56c27SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 105549ab56c27SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 105559ab56c27SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 105569ab56c27SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 105579ab56c27Smrgm4_define([_defopt], m4_default([$1], [auto])) 105589ab56c27SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 105599ab56c27Smrg [Enable building unit test cases (default: ]_defopt[)]), 105609ab56c27Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 105619ab56c27Smrgm4_undefine([_defopt]) 105629ab56c27SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 105639ab56c27SmrgAC_MSG_CHECKING([whether to build unit test cases]) 105649ab56c27SmrgAC_MSG_RESULT([$enable_unit_tests]) 105659ab56c27Smrg]) # XORG_ENABLE_UNIT_TESTS 1056654cef2ddSmrg 105679ab56c27Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 105689ab56c27Smrg# ------------------------------------------------------ 105699ab56c27Smrg# Minimum version: 1.17.0 105709ab56c27Smrg# 105719ab56c27Smrg# This macro enables a builder to enable/disable integration testing 105729ab56c27Smrg# It makes no assumption about the test cases' implementation 105739ab56c27Smrg# Test cases may or may not use Automake "Support for test suites" 105749ab56c27Smrg# 105759ab56c27Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 105769ab56c27Smrg# usually requires less dependencies and may be built and run under less 105779ab56c27Smrg# stringent environments than integration tests. 105789ab56c27Smrg# 105799ab56c27Smrg# Interface to module: 105809ab56c27Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 105819ab56c27Smrg# enable_integration_tests: used in configure.ac for additional configuration 105829ab56c27Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 105839ab56c27Smrg# 'no' user instructs the module not to build tests 105849ab56c27Smrg# parm1: specify the default value, yes or no. 105859ab56c27Smrg# 105869ab56c27SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 105879ab56c27SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 105889ab56c27Smrgm4_define([_defopt], m4_default([$1], [auto])) 105899ab56c27SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 105909ab56c27Smrg [Enable building integration test cases (default: ]_defopt[)]), 105919ab56c27Smrg [enable_integration_tests=$enableval], 105929ab56c27Smrg [enable_integration_tests=]_defopt) 105939ab56c27Smrgm4_undefine([_defopt]) 105949ab56c27SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 105959ab56c27Smrg [test "x$enable_integration_tests" != xno]) 105969ab56c27SmrgAC_MSG_CHECKING([whether to build unit test cases]) 105979ab56c27SmrgAC_MSG_RESULT([$enable_integration_tests]) 105989ab56c27Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1059954cef2ddSmrg 106009ab56c27Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 106019ab56c27Smrg# ---------------------------------------- 106029ab56c27Smrg# Minimum version: 1.13.0 106039ab56c27Smrg# 106049ab56c27Smrg# GLib is a library which provides advanced data structures and functions. 106059ab56c27Smrg# This macro enables a module to test for the presence of Glib. 106069ab56c27Smrg# 106079ab56c27Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 106089ab56c27Smrg# Otherwise the value of $enable_unit_tests is blank. 106099ab56c27Smrg# 106109ab56c27Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 106119ab56c27Smrg# test support usually requires less dependencies and may be built and run under 106129ab56c27Smrg# less stringent environments than integration tests. 106139ab56c27Smrg# 106149ab56c27Smrg# Interface to module: 106159ab56c27Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 106169ab56c27Smrg# with_glib: used in configure.ac to know if GLib has been found 106179ab56c27Smrg# --with-glib: 'yes' user instructs the module to use glib 106189ab56c27Smrg# 'no' user instructs the module not to use glib 106199ab56c27Smrg# 106209ab56c27SmrgAC_DEFUN([XORG_WITH_GLIB],[ 106219ab56c27SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106229ab56c27Smrgm4_define([_defopt], m4_default([$2], [auto])) 106239ab56c27SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 106249ab56c27Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 106259ab56c27Smrg [with_glib=$withval], [with_glib=]_defopt) 106269ab56c27Smrgm4_undefine([_defopt]) 1062754cef2ddSmrg 106289ab56c27Smrghave_glib=no 106299ab56c27Smrg# Do not probe GLib if user explicitly disabled unit testing 106309ab56c27Smrgif test "x$enable_unit_tests" != x"no"; then 106319ab56c27Smrg # Do not probe GLib if user explicitly disabled it 106329ab56c27Smrg if test "x$with_glib" != x"no"; then 106339ab56c27Smrg m4_ifval( 106349ab56c27Smrg [$1], 106359ab56c27Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 106369ab56c27Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 106379ab56c27Smrg ) 106389ab56c27Smrg fi 1063954044362Smrgfi 1064054044362Smrg 106419ab56c27Smrg# Not having GLib when unit testing has been explicitly requested is an error 106429ab56c27Smrgif test "x$enable_unit_tests" = x"yes"; then 106439ab56c27Smrg if test "x$have_glib" = x"no"; then 106449ab56c27Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 106459ab56c27Smrg fi 106469ab56c27Smrgfi 1064754044362Smrg 106489ab56c27Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 106499ab56c27Smrgif test "x$enable_unit_tests" = x"no"; then 106509ab56c27Smrg if test "x$with_glib" = x"yes"; then 106519ab56c27Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 106529ab56c27Smrg fi 106539ab56c27Smrgfi 1065454044362Smrg 106559ab56c27Smrg# Not having GLib when it has been explicitly requested is an error 106569ab56c27Smrgif test "x$with_glib" = x"yes"; then 106579ab56c27Smrg if test "x$have_glib" = x"no"; then 106589ab56c27Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 106599ab56c27Smrg fi 106609ab56c27Smrgfi 1066154044362Smrg 106629ab56c27SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 106639ab56c27Smrg]) # XORG_WITH_GLIB 1066454044362Smrg 106659ab56c27Smrg# XORG_LD_WRAP([required|optional]) 106669ab56c27Smrg# --------------------------------- 106679ab56c27Smrg# Minimum version: 1.13.0 106689ab56c27Smrg# 106699ab56c27Smrg# Check if linker supports -wrap, passed via compiler flags 106709ab56c27Smrg# 106719ab56c27Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 106729ab56c27Smrg# Otherwise the value of $enable_unit_tests is blank. 106739ab56c27Smrg# 106749ab56c27Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 106759ab56c27Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 106769ab56c27Smrg# available, an argument of "optional" allows use when some unit tests require 106779ab56c27Smrg# ld -wrap and others do not. 106789ab56c27Smrg# 106799ab56c27SmrgAC_DEFUN([XORG_LD_WRAP],[ 106809ab56c27SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 106819ab56c27Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 106829ab56c27Smrg void __wrap_exit(int status) { return; }], 106839ab56c27Smrg [exit(0);])]) 106849ab56c27Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 106859ab56c27Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 106869ab56c27Smrg if test "x$have_ld_wrap" = x"no"; then 106879ab56c27Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 106889ab56c27Smrg fi 106899ab56c27Smrgfi 106909ab56c27SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 106919ab56c27Smrg# 106929ab56c27Smrg]) # XORG_LD_WRAP 1069354044362Smrg 106949ab56c27Smrg# XORG_CHECK_LINKER_FLAGS 106959ab56c27Smrg# ----------------------- 106969ab56c27Smrg# SYNOPSIS 106979ab56c27Smrg# 106989ab56c27Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 106999ab56c27Smrg# 107009ab56c27Smrg# DESCRIPTION 107019ab56c27Smrg# 107029ab56c27Smrg# Check whether the given linker FLAGS work with the current language's 107039ab56c27Smrg# linker, or whether they give an error. 107049ab56c27Smrg# 107059ab56c27Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 107069ab56c27Smrg# success/failure. 107079ab56c27Smrg# 107089ab56c27Smrg# PROGRAM-SOURCE is the program source to link with, if needed 107099ab56c27Smrg# 107109ab56c27Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 107119ab56c27Smrg# 107129ab56c27Smrg# LICENSE 107139ab56c27Smrg# 107149ab56c27Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 107159ab56c27Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 107169ab56c27Smrg# Copyright (c) 2009 Matteo Frigo 107179ab56c27Smrg# 107189ab56c27Smrg# This program is free software: you can redistribute it and/or modify it 107199ab56c27Smrg# under the terms of the GNU General Public License as published by the 107209ab56c27Smrg# Free Software Foundation, either version 3 of the License, or (at your 107219ab56c27Smrg# option) any later version. 107229ab56c27Smrg# 107239ab56c27Smrg# This program is distributed in the hope that it will be useful, but 107249ab56c27Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 107259ab56c27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 107269ab56c27Smrg# Public License for more details. 107279ab56c27Smrg# 107289ab56c27Smrg# You should have received a copy of the GNU General Public License along 107299ab56c27Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 107309ab56c27Smrg# 107319ab56c27Smrg# As a special exception, the respective Autoconf Macro's copyright owner 107329ab56c27Smrg# gives unlimited permission to copy, distribute and modify the configure 107339ab56c27Smrg# scripts that are the output of Autoconf when processing the Macro. You 107349ab56c27Smrg# need not follow the terms of the GNU General Public License when using 107359ab56c27Smrg# or distributing such scripts, even though portions of the text of the 107369ab56c27Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 107379ab56c27Smrg# all other use of the material that constitutes the Autoconf Macro. 107389ab56c27Smrg# 107399ab56c27Smrg# This special exception to the GPL applies to versions of the Autoconf 107409ab56c27Smrg# Macro released by the Autoconf Archive. When you make and distribute a 107419ab56c27Smrg# modified version of the Autoconf Macro, you may extend this special 107429ab56c27Smrg# exception to the GPL to apply to your modified version as well.# 107439ab56c27SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 107449ab56c27Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 107459ab56c27Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 107469ab56c27SmrgAS_LITERAL_IF([$1], 107479ab56c27Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 107489ab56c27Smrg ax_save_FLAGS=$LDFLAGS 107499ab56c27Smrg LDFLAGS="$1" 107509ab56c27Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 107519ab56c27Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 107529ab56c27Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 107539ab56c27Smrg LDFLAGS=$ax_save_FLAGS])], 107549ab56c27Smrg [ax_save_FLAGS=$LDFLAGS 107559ab56c27Smrg LDFLAGS="$1" 107569ab56c27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 107579ab56c27Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 107589ab56c27Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 107599ab56c27Smrg LDFLAGS=$ax_save_FLAGS]) 107609ab56c27Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 107619ab56c27SmrgAC_MSG_RESULT($xorg_check_linker_flags) 107629ab56c27Smrgif test "x$xorg_check_linker_flags" = xyes; then 107639ab56c27Smrg m4_default([$2], :) 107649ab56c27Smrgelse 107659ab56c27Smrg m4_default([$3], :) 107669ab56c27Smrgfi 107679ab56c27Smrg]) # XORG_CHECK_LINKER_FLAGS 1076854044362Smrg 107699ab56c27Smrg# XORG_MEMORY_CHECK_FLAGS 107709ab56c27Smrg# ----------------------- 107719ab56c27Smrg# Minimum version: 1.16.0 107729ab56c27Smrg# 107739ab56c27Smrg# This macro attempts to find appropriate memory checking functionality 107749ab56c27Smrg# for various platforms which unit testing code may use to catch various 107759ab56c27Smrg# forms of memory allocation and access errors in testing. 107769ab56c27Smrg# 107779ab56c27Smrg# Interface to module: 107789ab56c27Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 107799ab56c27Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 107809ab56c27Smrg# 107819ab56c27Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 107829ab56c27Smrg# 107839ab56c27SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1078454044362Smrg 107859ab56c27SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 107869ab56c27SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 107879ab56c27Smrg [Environment variables to enable memory checking in tests]) 1078854044362Smrg 107899ab56c27Smrg# Check for different types of support on different platforms 107909ab56c27Smrgcase $host_os in 107919ab56c27Smrg solaris*) 107929ab56c27Smrg AC_CHECK_LIB([umem], [umem_alloc], 107939ab56c27Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1079454cef2ddSmrg ;; 107959ab56c27Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 107969ab56c27Smrg # both directly and inverted, so should not be 0 or 255. 107979ab56c27Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1079854cef2ddSmrg ;; 107999ab56c27Smrg darwin*) 108009ab56c27Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 108019ab56c27Smrg ;; 108029ab56c27Smrg *bsd*) 108039ab56c27Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 108049ab56c27Smrg ;; 108059ab56c27Smrgesac 1080654044362Smrg 108079ab56c27Smrg# User supplied flags override default flags 108089ab56c27Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 108099ab56c27Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 108109ab56c27Smrgfi 1081154044362Smrg 108129ab56c27SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 108139ab56c27Smrg]) # XORG_WITH_LINT 1081454044362Smrg 108159ab56c27Smrg# XORG_CHECK_MALLOC_ZERO 108169ab56c27Smrg# ---------------------- 108179ab56c27Smrg# Minimum version: 1.0.0 108189ab56c27Smrg# 108199ab56c27Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 108209ab56c27Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 108219ab56c27Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 108229ab56c27SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 108239ab56c27SmrgAC_ARG_ENABLE(malloc0returnsnull, 108249ab56c27Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 108259ab56c27Smrg [malloc(0) returns NULL (default: auto)]), 108269ab56c27Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 108279ab56c27Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1082854044362Smrg 108299ab56c27SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 108309ab56c27Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 108319ab56c27SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 108329ab56c27Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 108339ab56c27Smrg#include <stdlib.h> 108349ab56c27Smrg],[ 108359ab56c27Smrg char *m0, *r0, *c0, *p; 108369ab56c27Smrg m0 = malloc(0); 108379ab56c27Smrg p = malloc(10); 108389ab56c27Smrg r0 = realloc(p,0); 108399ab56c27Smrg c0 = calloc(0,10); 108409ab56c27Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 108419ab56c27Smrg])], 108429ab56c27Smrg [xorg_cv_malloc0_returns_null=yes], 108439ab56c27Smrg [xorg_cv_malloc0_returns_null=no])]) 108449ab56c27SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 108459ab56c27Smrgfi 108469ab56c27SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1084754044362Smrg 108489ab56c27Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 108499ab56c27Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 108509ab56c27Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 108519ab56c27Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 108529ab56c27Smrgelse 108539ab56c27Smrg MALLOC_ZERO_CFLAGS="" 108549ab56c27Smrg XMALLOC_ZERO_CFLAGS="" 108559ab56c27Smrg XTMALLOC_ZERO_CFLAGS="" 108569ab56c27Smrgfi 1085754044362Smrg 108589ab56c27SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 108599ab56c27SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 108609ab56c27SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 108619ab56c27Smrg]) # XORG_CHECK_MALLOC_ZERO 1086254044362Smrg 108639ab56c27Smrg# XORG_WITH_LINT() 108649ab56c27Smrg# ---------------- 108659ab56c27Smrg# Minimum version: 1.1.0 108669ab56c27Smrg# 108679ab56c27Smrg# This macro enables the use of a tool that flags some suspicious and 108689ab56c27Smrg# non-portable constructs (likely to be bugs) in C language source code. 108699ab56c27Smrg# It will attempt to locate the tool and use appropriate options. 108709ab56c27Smrg# There are various lint type tools on different platforms. 108719ab56c27Smrg# 108729ab56c27Smrg# Interface to module: 108739ab56c27Smrg# LINT: returns the path to the tool found on the platform 108749ab56c27Smrg# or the value set to LINT on the configure cmd line 108759ab56c27Smrg# also an Automake conditional 108769ab56c27Smrg# LINT_FLAGS: an Automake variable with appropriate flags 108779ab56c27Smrg# 108789ab56c27Smrg# --with-lint: 'yes' user instructs the module to use lint 108799ab56c27Smrg# 'no' user instructs the module not to use lint (default) 108809ab56c27Smrg# 108819ab56c27Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 108829ab56c27Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 108839ab56c27Smrg# 108849ab56c27SmrgAC_DEFUN([XORG_WITH_LINT],[ 1088554044362Smrg 108869ab56c27SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 108879ab56c27SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 108889ab56c27SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 108899ab56c27Smrg [Use a lint-style source code checker (default: disabled)])], 108909ab56c27Smrg [use_lint=$withval], [use_lint=no]) 1089154cef2ddSmrg 108929ab56c27Smrg# Obtain platform specific info like program name and options 108939ab56c27Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 108949ab56c27Smrgcase $host_os in 108959ab56c27Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 108969ab56c27Smrg lint_name=splint 108979ab56c27Smrg lint_options="-badflag" 108989ab56c27Smrg ;; 108999ab56c27Smrg *freebsd* | *netbsd*) 109009ab56c27Smrg lint_name=lint 109019ab56c27Smrg lint_options="-u -b" 109029ab56c27Smrg ;; 109039ab56c27Smrg *solaris*) 109049ab56c27Smrg lint_name=lint 109059ab56c27Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 109069ab56c27Smrg ;; 109079ab56c27Smrgesac 1090854cef2ddSmrg 109099ab56c27Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 109109ab56c27Smrgif test "x$use_lint" = x"yes" ; then 109119ab56c27Smrg AC_PATH_PROG([LINT], [$lint_name]) 109129ab56c27Smrg if test "x$LINT" = "x"; then 109139ab56c27Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 109149ab56c27Smrg fi 109159ab56c27Smrgelif test "x$use_lint" = x"no" ; then 109169ab56c27Smrg if test "x$LINT" != "x"; then 109179ab56c27Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 109189ab56c27Smrg fi 109199ab56c27Smrgelse 109209ab56c27Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1092154044362Smrgfi 1092254044362Smrg 109239ab56c27Smrg# User supplied flags override default flags 109249ab56c27Smrgif test "x$LINT_FLAGS" != "x"; then 109259ab56c27Smrg lint_options=$LINT_FLAGS 109269ab56c27Smrgfi 1092754044362Smrg 109289ab56c27SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 109299ab56c27SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1093054044362Smrg 109319ab56c27Smrg]) # XORG_WITH_LINT 1093254044362Smrg 109339ab56c27Smrg# XORG_LINT_LIBRARY(LIBNAME) 109349ab56c27Smrg# -------------------------- 109359ab56c27Smrg# Minimum version: 1.1.0 109369ab56c27Smrg# 109379ab56c27Smrg# Sets up flags for building lint libraries for checking programs that call 109389ab56c27Smrg# functions in the library. 109399ab56c27Smrg# 109409ab56c27Smrg# Interface to module: 109419ab56c27Smrg# LINTLIB - Automake variable with the name of lint library file to make 109429ab56c27Smrg# MAKE_LINT_LIB - Automake conditional 109439ab56c27Smrg# 109449ab56c27Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 109459ab56c27Smrg# - 'no' user instructs the module not to create a lint library (default) 1094654044362Smrg 109479ab56c27SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 109489ab56c27SmrgAC_REQUIRE([XORG_WITH_LINT]) 109499ab56c27SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 109509ab56c27Smrg [Create lint library (default: disabled)])], 109519ab56c27Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1095254044362Smrg 109539ab56c27Smrgif test "x$make_lint_lib" = x"yes" ; then 109549ab56c27Smrg LINTLIB=llib-l$1.ln 109559ab56c27Smrg if test "x$LINT" = "x"; then 109569ab56c27Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 109579ab56c27Smrg fi 109589ab56c27Smrgelif test "x$make_lint_lib" != x"no" ; then 109599ab56c27Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 109609ab56c27Smrgfi 1096154044362Smrg 109629ab56c27SmrgAC_SUBST(LINTLIB) 109639ab56c27SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1096454044362Smrg 109659ab56c27Smrg]) # XORG_LINT_LIBRARY 1096654044362Smrg 109679ab56c27Smrg# XORG_COMPILER_BRAND 109689ab56c27Smrg# ------------------- 109699ab56c27Smrg# Minimum version: 1.14.0 109709ab56c27Smrg# 109719ab56c27Smrg# Checks for various brands of compilers and sets flags as appropriate: 109729ab56c27Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 109739ab56c27Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 109749ab56c27Smrg# clang compiler - sets CLANGCC to "yes" 109759ab56c27Smrg# Intel compiler - sets INTELCC to "yes" 109769ab56c27Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 109779ab56c27Smrg# 109789ab56c27SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 109799ab56c27SmrgAC_LANG_CASE( 109809ab56c27Smrg [C], [ 109819ab56c27Smrg AC_REQUIRE([AC_PROG_CC_C99]) 109829ab56c27Smrg ], 109839ab56c27Smrg [C++], [ 109849ab56c27Smrg AC_REQUIRE([AC_PROG_CXX]) 109859ab56c27Smrg ] 109869ab56c27Smrg) 109879ab56c27SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 109889ab56c27SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 109899ab56c27SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 109909ab56c27Smrg]) # XORG_COMPILER_BRAND 1099154044362Smrg 109929ab56c27Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 109939ab56c27Smrg# --------------- 109949ab56c27Smrg# Minimum version: 1.16.0 109959ab56c27Smrg# 109969ab56c27Smrg# Test if the compiler works when passed the given flag as a command line argument. 109979ab56c27Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 109989ab56c27Smrg# next flag in the list until there are no more options. 109999ab56c27Smrg# 110009ab56c27Smrg# Note that this does not guarantee that the compiler supports the flag as some 110019ab56c27Smrg# compilers will simply ignore arguments that they do not understand, but we do 110029ab56c27Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 110039ab56c27Smrg# -Werror=unused-command-line-argument 110049ab56c27Smrg# 110059ab56c27SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 110069ab56c27Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 110079ab56c27Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1100854044362Smrg 110099ab56c27SmrgAC_LANG_COMPILER_REQUIRE 1101054044362Smrg 110119ab56c27SmrgAC_LANG_CASE( 110129ab56c27Smrg [C], [ 110139ab56c27Smrg AC_REQUIRE([AC_PROG_CC_C99]) 110149ab56c27Smrg define([PREFIX], [C]) 110159ab56c27Smrg define([CACHE_PREFIX], [cc]) 110169ab56c27Smrg define([COMPILER], [$CC]) 110179ab56c27Smrg ], 110189ab56c27Smrg [C++], [ 110199ab56c27Smrg define([PREFIX], [CXX]) 110209ab56c27Smrg define([CACHE_PREFIX], [cxx]) 110219ab56c27Smrg define([COMPILER], [$CXX]) 110229ab56c27Smrg ] 110239ab56c27Smrg) 1102454044362Smrg 110259ab56c27Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1102654044362Smrg 110279ab56c27Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 110289ab56c27Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 110299ab56c27Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 110309ab56c27Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 110319ab56c27Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 110329ab56c27Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 110339ab56c27Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 110349ab56c27Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 110359ab56c27Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 110369ab56c27Smrgfi 1103754cef2ddSmrg 110389ab56c27Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 110399ab56c27Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 110409ab56c27Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 110419ab56c27Smrg fi 110429ab56c27Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 110439ab56c27Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 110449ab56c27Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 110459ab56c27Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 110469ab56c27Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 110479ab56c27Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 110489ab56c27Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 110499ab56c27Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 110509ab56c27Smrgfi 1105154cef2ddSmrg 110529ab56c27Smrgfound="no" 110539ab56c27Smrgm4_foreach([flag], m4_cdr($@), [ 110549ab56c27Smrg if test $found = "no" ; then 110559ab56c27Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 110569ab56c27Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 110579ab56c27Smrg fi 1105854cef2ddSmrg 110599ab56c27Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 110609ab56c27Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 110619ab56c27Smrg fi 1106254cef2ddSmrg 110639ab56c27Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1106454cef2ddSmrg 110659ab56c27Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 110669ab56c27Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 110679ab56c27Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 110689ab56c27Smrg AC_CACHE_VAL($cacheid, 110699ab56c27Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 110709ab56c27Smrg [eval $cacheid=yes], 110719ab56c27Smrg [eval $cacheid=no])]) 1107254044362Smrg 110739ab56c27Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1107454044362Smrg 110759ab56c27Smrg eval supported=\$$cacheid 110769ab56c27Smrg AC_MSG_RESULT([$supported]) 110779ab56c27Smrg if test "$supported" = "yes" ; then 110789ab56c27Smrg $1="$$1 ]flag[" 110799ab56c27Smrg found="yes" 110809ab56c27Smrg fi 110819ab56c27Smrg fi 110829ab56c27Smrg]) 110839ab56c27Smrg]) # XORG_TESTSET_CFLAG 1108454044362Smrg 110859ab56c27Smrg# XORG_COMPILER_FLAGS 110869ab56c27Smrg# --------------- 110879ab56c27Smrg# Minimum version: 1.16.0 110889ab56c27Smrg# 110899ab56c27Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 110909ab56c27Smrg# arguments supported by the selected compiler which do NOT alter the generated 110919ab56c27Smrg# code. These arguments will cause the compiler to print various warnings 110929ab56c27Smrg# during compilation AND turn a conservative set of warnings into errors. 110939ab56c27Smrg# 110949ab56c27Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 110959ab56c27Smrg# future versions of util-macros as options are added to new compilers. 110969ab56c27Smrg# 110979ab56c27SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 110989ab56c27SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1109954044362Smrg 111009ab56c27SmrgAC_ARG_ENABLE(selective-werror, 111019ab56c27Smrg AS_HELP_STRING([--disable-selective-werror], 111029ab56c27Smrg [Turn off selective compiler errors. (default: enabled)]), 111039ab56c27Smrg [SELECTIVE_WERROR=$enableval], 111049ab56c27Smrg [SELECTIVE_WERROR=yes]) 1110554044362Smrg 111069ab56c27SmrgAC_LANG_CASE( 111079ab56c27Smrg [C], [ 111089ab56c27Smrg define([PREFIX], [C]) 111099ab56c27Smrg ], 111109ab56c27Smrg [C++], [ 111119ab56c27Smrg define([PREFIX], [CXX]) 111129ab56c27Smrg ] 111139ab56c27Smrg) 111149ab56c27Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 111159ab56c27Smrgif test "x$SUNCC" = "xyes"; then 111169ab56c27Smrg [BASE_]PREFIX[FLAGS]="-v" 111179ab56c27Smrgelse 111189ab56c27Smrg [BASE_]PREFIX[FLAGS]="" 1111954cef2ddSmrgfi 1112054044362Smrg 111219ab56c27Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 111229ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 111239ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 111249ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 111259ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 111269ab56c27Smrg 111279ab56c27SmrgAC_LANG_CASE( 111289ab56c27Smrg [C], [ 111299ab56c27Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 111309ab56c27Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 111319ab56c27Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 111329ab56c27Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 111339ab56c27Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 111349ab56c27Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 111359ab56c27Smrg ] 111369ab56c27Smrg) 1113754044362Smrg 111389ab56c27Smrg# This chunk adds additional warnings that could catch undesired effects. 111399ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 111409ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 111419ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 111429ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 111439ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 111449ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 111459ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1114654044362Smrg 111479ab56c27Smrg# These are currently disabled because they are noisy. They will be enabled 111489ab56c27Smrg# in the future once the codebase is sufficiently modernized to silence 111499ab56c27Smrg# them. For now, I don't want them to drown out the other warnings. 111509ab56c27Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 111519ab56c27Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 111529ab56c27Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1115354044362Smrg 111549ab56c27Smrg# Turn some warnings into errors, so we don't accidently get successful builds 111559ab56c27Smrg# when there are problems that should be fixed. 1115654044362Smrg 111579ab56c27Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 111589ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 111599ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 111609ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 111619ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 111629ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 111639ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 111649ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 111659ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 111669ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 111679ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 111689ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 111699ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 111709ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 111719ab56c27Smrgelse 111729ab56c27SmrgAC_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]) 111739ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 111749ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 111759ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 111769ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 111779ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 111789ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 111799ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 111809ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 111819ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 111829ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 111839ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 111849ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 111859ab56c27SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 111869ab56c27Smrgfi 1118754044362Smrg 111889ab56c27SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 111899ab56c27Smrg]) # XORG_COMPILER_FLAGS 1119054044362Smrg 111919ab56c27Smrg# XORG_CWARNFLAGS 111929ab56c27Smrg# --------------- 111939ab56c27Smrg# Minimum version: 1.2.0 111949ab56c27Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 111959ab56c27Smrg# 111969ab56c27Smrg# Defines CWARNFLAGS to enable C compiler warnings. 111979ab56c27Smrg# 111989ab56c27Smrg# This function is deprecated because it defines -fno-strict-aliasing 111999ab56c27Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 112009ab56c27Smrg# is needed, then it should be added explicitly in the module when 112019ab56c27Smrg# it is updated to use BASE_CFLAGS. 112029ab56c27Smrg# 112039ab56c27SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 112049ab56c27SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 112059ab56c27SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 112069ab56c27SmrgAC_LANG_CASE( 112079ab56c27Smrg [C], [ 112089ab56c27Smrg CWARNFLAGS="$BASE_CFLAGS" 112099ab56c27Smrg if test "x$GCC" = xyes ; then 112109ab56c27Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 112119ab56c27Smrg fi 112129ab56c27Smrg AC_SUBST(CWARNFLAGS) 112139ab56c27Smrg ] 112149ab56c27Smrg) 112159ab56c27Smrg]) # XORG_CWARNFLAGS 1121654044362Smrg 112179ab56c27Smrg# XORG_STRICT_OPTION 112189ab56c27Smrg# ----------------------- 112199ab56c27Smrg# Minimum version: 1.3.0 112209ab56c27Smrg# 112219ab56c27Smrg# Add configure option to enable strict compilation flags, such as treating 112229ab56c27Smrg# warnings as fatal errors. 112239ab56c27Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 112249ab56c27Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 112259ab56c27Smrg# 112269ab56c27Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 112279ab56c27Smrg# when strict compilation is unconditionally desired. 112289ab56c27SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 112299ab56c27SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 112309ab56c27SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1123154044362Smrg 112329ab56c27SmrgAC_ARG_ENABLE(strict-compilation, 112339ab56c27Smrg AS_HELP_STRING([--enable-strict-compilation], 112349ab56c27Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 112359ab56c27Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1123654044362Smrg 112379ab56c27SmrgAC_LANG_CASE( 112389ab56c27Smrg [C], [ 112399ab56c27Smrg define([PREFIX], [C]) 112409ab56c27Smrg ], 112419ab56c27Smrg [C++], [ 112429ab56c27Smrg define([PREFIX], [CXX]) 112439ab56c27Smrg ] 112449ab56c27Smrg) 1124554044362Smrg 112469ab56c27Smrg[STRICT_]PREFIX[FLAGS]="" 112479ab56c27SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 112489ab56c27SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1124954044362Smrg 112509ab56c27Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 112519ab56c27Smrg# activate it with -Werror, so we add it here explicitly. 112529ab56c27SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1125354044362Smrg 112549ab56c27Smrgif test "x$STRICT_COMPILE" = "xyes"; then 112559ab56c27Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 112569ab56c27Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 112579ab56c27Smrgfi 112589ab56c27SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 112599ab56c27SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 112609ab56c27SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 112619ab56c27Smrg]) # XORG_STRICT_OPTION 1126254044362Smrg 112639ab56c27Smrg# XORG_DEFAULT_OPTIONS 112649ab56c27Smrg# -------------------- 112659ab56c27Smrg# Minimum version: 1.3.0 112669ab56c27Smrg# 112679ab56c27Smrg# Defines default options for X.Org modules. 112689ab56c27Smrg# 112699ab56c27SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 112709ab56c27SmrgAC_REQUIRE([AC_PROG_INSTALL]) 112719ab56c27SmrgXORG_COMPILER_FLAGS 112729ab56c27SmrgXORG_CWARNFLAGS 112739ab56c27SmrgXORG_STRICT_OPTION 112749ab56c27SmrgXORG_RELEASE_VERSION 112759ab56c27SmrgXORG_CHANGELOG 112769ab56c27SmrgXORG_INSTALL 112779ab56c27SmrgXORG_MANPAGE_SECTIONS 112789ab56c27Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 112799ab56c27Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 112809ab56c27Smrg]) # XORG_DEFAULT_OPTIONS 1128154044362Smrg 112829ab56c27Smrg# XORG_INSTALL() 1128354cef2ddSmrg# ---------------- 112849ab56c27Smrg# Minimum version: 1.4.0 112859ab56c27Smrg# 112869ab56c27Smrg# Defines the variable INSTALL_CMD as the command to copy 112879ab56c27Smrg# INSTALL from $prefix/share/util-macros. 112889ab56c27Smrg# 112899ab56c27SmrgAC_DEFUN([XORG_INSTALL], [ 112909ab56c27SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 112919ab56c27Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 112929ab56c27SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 112939ab56c27Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 112949ab56c27Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 112959ab56c27Smrgtouch \$(top_srcdir)/INSTALL; \ 112969ab56c27Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 112979ab56c27SmrgAC_SUBST([INSTALL_CMD]) 112989ab56c27Smrg]) # XORG_INSTALL 112999ab56c27Smrgdnl Copyright 2005 Red Hat, Inc 113009ab56c27Smrgdnl 113019ab56c27Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 113029ab56c27Smrgdnl documentation for any purpose is hereby granted without fee, provided that 113039ab56c27Smrgdnl the above copyright notice appear in all copies and that both that 113049ab56c27Smrgdnl copyright notice and this permission notice appear in supporting 113059ab56c27Smrgdnl documentation. 113069ab56c27Smrgdnl 113079ab56c27Smrgdnl The above copyright notice and this permission notice shall be included 113089ab56c27Smrgdnl in all copies or substantial portions of the Software. 113099ab56c27Smrgdnl 113109ab56c27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 113119ab56c27Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 113129ab56c27Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 113139ab56c27Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 113149ab56c27Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 113159ab56c27Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 113169ab56c27Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 113179ab56c27Smrgdnl 113189ab56c27Smrgdnl Except as contained in this notice, the name of the copyright holders shall 113199ab56c27Smrgdnl not be used in advertising or otherwise to promote the sale, use or 113209ab56c27Smrgdnl other dealings in this Software without prior written authorization 113219ab56c27Smrgdnl from the copyright holders. 113229ab56c27Smrgdnl 1132354044362Smrg 113249ab56c27Smrg# XORG_RELEASE_VERSION 113259ab56c27Smrg# -------------------- 113269ab56c27Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1132754044362Smrg 113289ab56c27SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 113299ab56c27Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 113309ab56c27Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 113319ab56c27Smrg [Major version of this package]) 113329ab56c27Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 113339ab56c27Smrg if test "x$PVM" = "x"; then 113349ab56c27Smrg PVM="0" 113359ab56c27Smrg fi 113369ab56c27Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 113379ab56c27Smrg [$PVM], 113389ab56c27Smrg [Minor version of this package]) 113399ab56c27Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 113409ab56c27Smrg if test "x$PVP" = "x"; then 113419ab56c27Smrg PVP="0" 113429ab56c27Smrg fi 113439ab56c27Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 113449ab56c27Smrg [$PVP], 113459ab56c27Smrg [Patch version of this package]) 1134654cef2ddSmrg]) 1134754044362Smrg 113489ab56c27Smrg# XORG_CHANGELOG() 113499ab56c27Smrg# ---------------- 113509ab56c27Smrg# Minimum version: 1.2.0 113519ab56c27Smrg# 113529ab56c27Smrg# Defines the variable CHANGELOG_CMD as the command to generate 113539ab56c27Smrg# ChangeLog from git. 113549ab56c27Smrg# 113559ab56c27Smrg# 113569ab56c27SmrgAC_DEFUN([XORG_CHANGELOG], [ 113579ab56c27SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 113589ab56c27Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 113599ab56c27Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 113609ab56c27Smrgtouch \$(top_srcdir)/ChangeLog; \ 113619ab56c27Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 113629ab56c27SmrgAC_SUBST([CHANGELOG_CMD]) 113639ab56c27Smrg]) # XORG_CHANGELOG 1136454cef2ddSmrg 113659ab56c27Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 113669ab56c27Smrg# 113679ab56c27Smrg# This file is free software; the Free Software Foundation 113689ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 113699ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1137054cef2ddSmrg 113719ab56c27Smrg# AM_AUTOMAKE_VERSION(VERSION) 113729ab56c27Smrg# ---------------------------- 113739ab56c27Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 113749ab56c27Smrg# generated from the m4 files accompanying Automake X.Y. 113759ab56c27Smrg# (This private macro should not be called outside this file.) 113769ab56c27SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 113779ab56c27Smrg[am__api_version='1.16' 113789ab56c27Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 113799ab56c27Smrgdnl require some minimum version. Point them to the right macro. 113809ab56c27Smrgm4_if([$1], [1.16.5], [], 113819ab56c27Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 113829ab56c27Smrg]) 1138354cef2ddSmrg 113849ab56c27Smrg# _AM_AUTOCONF_VERSION(VERSION) 113859ab56c27Smrg# ----------------------------- 113869ab56c27Smrg# aclocal traces this macro to find the Autoconf version. 113879ab56c27Smrg# This is a private macro too. Using m4_define simplifies 113889ab56c27Smrg# the logic in aclocal, which can simply ignore this definition. 113899ab56c27Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1139054cef2ddSmrg 113919ab56c27Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 113929ab56c27Smrg# ------------------------------- 113939ab56c27Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 113949ab56c27Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 113959ab56c27SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 113969ab56c27Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 113979ab56c27Smrgm4_ifndef([AC_AUTOCONF_VERSION], 113989ab56c27Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 113999ab56c27Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1140054cef2ddSmrg 114019ab56c27Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1140254cef2ddSmrg 114039ab56c27Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 114049ab56c27Smrg# 114059ab56c27Smrg# This file is free software; the Free Software Foundation 114069ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 114079ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1140854044362Smrg 114099ab56c27Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 114109ab56c27Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 114119ab56c27Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1141254cef2ddSmrg# 114139ab56c27Smrg# Of course, Automake must honor this variable whenever it calls a 114149ab56c27Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 114159ab56c27Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 114169ab56c27Smrg# depending on how configure is run. This is pretty annoying, since 114179ab56c27Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 114189ab56c27Smrg# source directory, any form will work fine, but in subdirectories a 114199ab56c27Smrg# relative path needs to be adjusted first. 114209ab56c27Smrg# 114219ab56c27Smrg# $ac_aux_dir/missing 114229ab56c27Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 114239ab56c27Smrg# $top_srcdir/$ac_aux_dir/missing 114249ab56c27Smrg# fails if $ac_aux_dir is absolute, 114259ab56c27Smrg# fails when called from a subdirectory in a VPATH build with 114269ab56c27Smrg# a relative $ac_aux_dir 114279ab56c27Smrg# 114289ab56c27Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 114299ab56c27Smrg# are both prefixed by $srcdir. In an in-source build this is usually 114309ab56c27Smrg# harmless because $srcdir is '.', but things will broke when you 114319ab56c27Smrg# start a VPATH build or use an absolute $srcdir. 1143254cef2ddSmrg# 114339ab56c27Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 114349ab56c27Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 114359ab56c27Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 114369ab56c27Smrg# and then we would define $MISSING as 114379ab56c27Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 114389ab56c27Smrg# This will work as long as MISSING is not called from configure, because 114399ab56c27Smrg# unfortunately $(top_srcdir) has no meaning in configure. 114409ab56c27Smrg# However there are other variables, like CC, which are often used in 114419ab56c27Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 114429ab56c27Smrg# 114439ab56c27Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 114449ab56c27Smrg# absolute PATH. The drawback is that using absolute paths prevent a 114459ab56c27Smrg# configured tree to be moved without reconfiguration. 1144654cef2ddSmrg 114479ab56c27SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 114489ab56c27Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 114499ab56c27Smrg# Expand $ac_aux_dir to an absolute path. 114509ab56c27Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1145154044362Smrg]) 1145254044362Smrg 114539ab56c27Smrg# AM_CONDITIONAL -*- Autoconf -*- 1145454044362Smrg 114559ab56c27Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114569ab56c27Smrg# 114579ab56c27Smrg# This file is free software; the Free Software Foundation 114589ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 114599ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1146054cef2ddSmrg 114619ab56c27Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 114629ab56c27Smrg# ------------------------------------- 114639ab56c27Smrg# Define a conditional. 114649ab56c27SmrgAC_DEFUN([AM_CONDITIONAL], 114659ab56c27Smrg[AC_PREREQ([2.52])dnl 114669ab56c27Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 114679ab56c27Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 114689ab56c27SmrgAC_SUBST([$1_TRUE])dnl 114699ab56c27SmrgAC_SUBST([$1_FALSE])dnl 114709ab56c27Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 114719ab56c27Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 114729ab56c27Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 114739ab56c27Smrgif $2; then 114749ab56c27Smrg $1_TRUE= 114759ab56c27Smrg $1_FALSE='#' 114769ab56c27Smrgelse 114779ab56c27Smrg $1_TRUE='#' 114789ab56c27Smrg $1_FALSE= 114799ab56c27Smrgfi 114809ab56c27SmrgAC_CONFIG_COMMANDS_PRE( 114819ab56c27Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 114829ab56c27Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 114839ab56c27SmrgUsually this means the macro was only invoked conditionally.]]) 114849ab56c27Smrgfi])]) 1148554cef2ddSmrg 114869ab56c27Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 114879ab56c27Smrg# 114889ab56c27Smrg# This file is free software; the Free Software Foundation 114899ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 114909ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1149154044362Smrg 1149254044362Smrg 114939ab56c27Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 114949ab56c27Smrg# written in clear, in which case automake, when reading aclocal.m4, 114959ab56c27Smrg# will think it sees a *use*, and therefore will trigger all it's 114969ab56c27Smrg# C support machinery. Also note that it means that autoscan, seeing 114979ab56c27Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1149854cef2ddSmrg 1149954044362Smrg 115009ab56c27Smrg# _AM_DEPENDENCIES(NAME) 115019ab56c27Smrg# ---------------------- 115029ab56c27Smrg# See how the compiler implements dependency checking. 115039ab56c27Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 115049ab56c27Smrg# We try a few techniques and use that to set a single cache variable. 115059ab56c27Smrg# 115069ab56c27Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 115079ab56c27Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 115089ab56c27Smrg# dependency, and given that the user is not expected to run this macro, 115099ab56c27Smrg# just rely on AC_PROG_CC. 115109ab56c27SmrgAC_DEFUN([_AM_DEPENDENCIES], 115119ab56c27Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 115129ab56c27SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 115139ab56c27SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 115149ab56c27SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1151554044362Smrg 115169ab56c27Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 115179ab56c27Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 115189ab56c27Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 115199ab56c27Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 115209ab56c27Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 115219ab56c27Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 115229ab56c27Smrg [depcc="$$1" am_compiler_list=]) 1152354044362Smrg 115249ab56c27SmrgAC_CACHE_CHECK([dependency style of $depcc], 115259ab56c27Smrg [am_cv_$1_dependencies_compiler_type], 115269ab56c27Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 115279ab56c27Smrg # We make a subdir and do the tests there. Otherwise we can end up 115289ab56c27Smrg # making bogus files that we don't know about and never remove. For 115299ab56c27Smrg # instance it was reported that on HP-UX the gcc test will end up 115309ab56c27Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 115319ab56c27Smrg # in D". 115329ab56c27Smrg rm -rf conftest.dir 115339ab56c27Smrg mkdir conftest.dir 115349ab56c27Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 115359ab56c27Smrg # using a relative directory. 115369ab56c27Smrg cp "$am_depcomp" conftest.dir 115379ab56c27Smrg cd conftest.dir 115389ab56c27Smrg # We will build objects and dependencies in a subdirectory because 115399ab56c27Smrg # it helps to detect inapplicable dependency modes. For instance 115409ab56c27Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 115419ab56c27Smrg # side effect of compilation, but ICC will put the dependencies in 115429ab56c27Smrg # the current directory while Tru64 will put them in the object 115439ab56c27Smrg # directory. 115449ab56c27Smrg mkdir sub 1154554044362Smrg 115469ab56c27Smrg am_cv_$1_dependencies_compiler_type=none 115479ab56c27Smrg if test "$am_compiler_list" = ""; then 115489ab56c27Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 115499ab56c27Smrg fi 115509ab56c27Smrg am__universal=false 115519ab56c27Smrg m4_case([$1], [CC], 115529ab56c27Smrg [case " $depcc " in #( 115539ab56c27Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 115549ab56c27Smrg esac], 115559ab56c27Smrg [CXX], 115569ab56c27Smrg [case " $depcc " in #( 115579ab56c27Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 115589ab56c27Smrg esac]) 1155954cef2ddSmrg 115609ab56c27Smrg for depmode in $am_compiler_list; do 115619ab56c27Smrg # Setup a source with many dependencies, because some compilers 115629ab56c27Smrg # like to wrap large dependency lists on column 80 (with \), and 115639ab56c27Smrg # we should not choose a depcomp mode which is confused by this. 115649ab56c27Smrg # 115659ab56c27Smrg # We need to recreate these files for each test, as the compiler may 115669ab56c27Smrg # overwrite some of them when testing with obscure command lines. 115679ab56c27Smrg # This happens at least with the AIX C compiler. 115689ab56c27Smrg : > sub/conftest.c 115699ab56c27Smrg for i in 1 2 3 4 5 6; do 115709ab56c27Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 115719ab56c27Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 115729ab56c27Smrg # Solaris 10 /bin/sh. 115739ab56c27Smrg echo '/* dummy */' > sub/conftst$i.h 115749ab56c27Smrg done 115759ab56c27Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1157654cef2ddSmrg 115779ab56c27Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 115789ab56c27Smrg # mode. It turns out that the SunPro C++ compiler does not properly 115799ab56c27Smrg # handle '-M -o', and we need to detect this. Also, some Intel 115809ab56c27Smrg # versions had trouble with output in subdirs. 115819ab56c27Smrg am__obj=sub/conftest.${OBJEXT-o} 115829ab56c27Smrg am__minus_obj="-o $am__obj" 115839ab56c27Smrg case $depmode in 115849ab56c27Smrg gcc) 115859ab56c27Smrg # This depmode causes a compiler race in universal mode. 115869ab56c27Smrg test "$am__universal" = false || continue 115879ab56c27Smrg ;; 115889ab56c27Smrg nosideeffect) 115899ab56c27Smrg # After this tag, mechanisms are not by side-effect, so they'll 115909ab56c27Smrg # only be used when explicitly requested. 115919ab56c27Smrg if test "x$enable_dependency_tracking" = xyes; then 115929ab56c27Smrg continue 115939ab56c27Smrg else 115949ab56c27Smrg break 115959ab56c27Smrg fi 115969ab56c27Smrg ;; 115979ab56c27Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 115989ab56c27Smrg # This compiler won't grok '-c -o', but also, the minuso test has 115999ab56c27Smrg # not run yet. These depmodes are late enough in the game, and 116009ab56c27Smrg # so weak that their functioning should not be impacted. 116019ab56c27Smrg am__obj=conftest.${OBJEXT-o} 116029ab56c27Smrg am__minus_obj= 116039ab56c27Smrg ;; 116049ab56c27Smrg none) break ;; 116059ab56c27Smrg esac 116069ab56c27Smrg if depmode=$depmode \ 116079ab56c27Smrg source=sub/conftest.c object=$am__obj \ 116089ab56c27Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 116099ab56c27Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 116109ab56c27Smrg >/dev/null 2>conftest.err && 116119ab56c27Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 116129ab56c27Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 116139ab56c27Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 116149ab56c27Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 116159ab56c27Smrg # icc doesn't choke on unknown options, it will just issue warnings 116169ab56c27Smrg # or remarks (even with -Werror). So we grep stderr for any message 116179ab56c27Smrg # that says an option was ignored or not supported. 116189ab56c27Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 116199ab56c27Smrg # icc: Command line warning: ignoring option '-M'; no argument required 116209ab56c27Smrg # The diagnosis changed in icc 8.0: 116219ab56c27Smrg # icc: Command line remark: option '-MP' not supported 116229ab56c27Smrg if (grep 'ignoring option' conftest.err || 116239ab56c27Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 116249ab56c27Smrg am_cv_$1_dependencies_compiler_type=$depmode 116259ab56c27Smrg break 116269ab56c27Smrg fi 116279ab56c27Smrg fi 116289ab56c27Smrg done 1162954cef2ddSmrg 116309ab56c27Smrg cd .. 116319ab56c27Smrg rm -rf conftest.dir 116329ab56c27Smrgelse 116339ab56c27Smrg am_cv_$1_dependencies_compiler_type=none 116349ab56c27Smrgfi 1163554044362Smrg]) 116369ab56c27SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 116379ab56c27SmrgAM_CONDITIONAL([am__fastdep$1], [ 116389ab56c27Smrg test "x$enable_dependency_tracking" != xno \ 116399ab56c27Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1164054cef2ddSmrg]) 1164154044362Smrg 1164254cef2ddSmrg 116439ab56c27Smrg# AM_SET_DEPDIR 116449ab56c27Smrg# ------------- 116459ab56c27Smrg# Choose a directory name for dependency files. 116469ab56c27Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 116479ab56c27SmrgAC_DEFUN([AM_SET_DEPDIR], 116489ab56c27Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 116499ab56c27SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1165054044362Smrg]) 1165154044362Smrg 1165254cef2ddSmrg 116539ab56c27Smrg# AM_DEP_TRACK 116549ab56c27Smrg# ------------ 116559ab56c27SmrgAC_DEFUN([AM_DEP_TRACK], 116569ab56c27Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 116579ab56c27SmrgAS_HELP_STRING( 116589ab56c27Smrg [--enable-dependency-tracking], 116599ab56c27Smrg [do not reject slow dependency extractors]) 116609ab56c27SmrgAS_HELP_STRING( 116619ab56c27Smrg [--disable-dependency-tracking], 116629ab56c27Smrg [speeds up one-time build])]) 116639ab56c27Smrgif test "x$enable_dependency_tracking" != xno; then 116649ab56c27Smrg am_depcomp="$ac_aux_dir/depcomp" 116659ab56c27Smrg AMDEPBACKSLASH='\' 116669ab56c27Smrg am__nodep='_no' 116679ab56c27Smrgfi 116689ab56c27SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 116699ab56c27SmrgAC_SUBST([AMDEPBACKSLASH])dnl 116709ab56c27Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 116719ab56c27SmrgAC_SUBST([am__nodep])dnl 116729ab56c27Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 116739ab56c27Smrg]) 1167454cef2ddSmrg 116759ab56c27Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1167654044362Smrg 116779ab56c27Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 116789ab56c27Smrg# 116799ab56c27Smrg# This file is free software; the Free Software Foundation 116809ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 116819ab56c27Smrg# with or without modifications, as long as this notice is preserved. 116828c9fbc29Smrg 116839ab56c27Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 116849ab56c27Smrg# ------------------------------ 116859ab56c27SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 116869ab56c27Smrg[{ 116879ab56c27Smrg # Older Autoconf quotes --file arguments for eval, but not when files 116889ab56c27Smrg # are listed without --file. Let's play safe and only enable the eval 116899ab56c27Smrg # if we detect the quoting. 116909ab56c27Smrg # TODO: see whether this extra hack can be removed once we start 116919ab56c27Smrg # requiring Autoconf 2.70 or later. 116929ab56c27Smrg AS_CASE([$CONFIG_FILES], 116939ab56c27Smrg [*\'*], [eval set x "$CONFIG_FILES"], 116949ab56c27Smrg [*], [set x $CONFIG_FILES]) 116959ab56c27Smrg shift 116969ab56c27Smrg # Used to flag and report bootstrapping failures. 116979ab56c27Smrg am_rc=0 116989ab56c27Smrg for am_mf 116999ab56c27Smrg do 117009ab56c27Smrg # Strip MF so we end up with the name of the file. 117019ab56c27Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 117029ab56c27Smrg # Check whether this is an Automake generated Makefile which includes 117039ab56c27Smrg # dependency-tracking related rules and includes. 117049ab56c27Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 117059ab56c27Smrg # limit of 2048, but all sed's we know have understand at least 4000. 117069ab56c27Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 117079ab56c27Smrg || continue 117089ab56c27Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 117099ab56c27Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 117109ab56c27Smrg AM_RUN_LOG([cd "$am_dirpart" \ 117119ab56c27Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 117129ab56c27Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 117139ab56c27Smrg done 117149ab56c27Smrg if test $am_rc -ne 0; then 117159ab56c27Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 117169ab56c27Smrg for automatic dependency tracking. If GNU make was not used, consider 117179ab56c27Smrg re-running the configure script with MAKE="gmake" (or whatever is 117189ab56c27Smrg necessary). You can also try re-running configure with the 117199ab56c27Smrg '--disable-dependency-tracking' option to at least be able to build 117209ab56c27Smrg the package (albeit without support for automatic dependency tracking).]) 117219ab56c27Smrg fi 117229ab56c27Smrg AS_UNSET([am_dirpart]) 117239ab56c27Smrg AS_UNSET([am_filepart]) 117249ab56c27Smrg AS_UNSET([am_mf]) 117259ab56c27Smrg AS_UNSET([am_rc]) 117269ab56c27Smrg rm -f conftest-deps.mk 117279ab56c27Smrg} 117289ab56c27Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 117294cd6a3aeSmrg 117308c9fbc29Smrg 117319ab56c27Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 117329ab56c27Smrg# ----------------------------- 117339ab56c27Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 117349ab56c27Smrg# 117359ab56c27Smrg# This code is only required when automatic dependency tracking is enabled. 117369ab56c27Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 117379ab56c27Smrg# order to bootstrap the dependency handling code. 117389ab56c27SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 117399ab56c27Smrg[AC_CONFIG_COMMANDS([depfiles], 117409ab56c27Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 117419ab56c27Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 117428c9fbc29Smrg 117439ab56c27Smrg# Do all the work for Automake. -*- Autoconf -*- 117448c9fbc29Smrg 117459ab56c27Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 117469ab56c27Smrg# 117479ab56c27Smrg# This file is free software; the Free Software Foundation 117489ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 117499ab56c27Smrg# with or without modifications, as long as this notice is preserved. 117508c9fbc29Smrg 117519ab56c27Smrg# This macro actually does too much. Some checks are only needed if 117529ab56c27Smrg# your package does certain things. But this isn't really a big deal. 117538c9fbc29Smrg 117549ab56c27Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 117559ab56c27Smrgm4_define([AC_PROG_CC], 117569ab56c27Smrgm4_defn([AC_PROG_CC]) 117579ab56c27Smrg[_AM_PROG_CC_C_O 117589ab56c27Smrg]) 117598c9fbc29Smrg 117609ab56c27Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 117619ab56c27Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 117629ab56c27Smrg# ----------------------------------------------- 117639ab56c27Smrg# The call with PACKAGE and VERSION arguments is the old style 117649ab56c27Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 117659ab56c27Smrg# and VERSION should now be passed to AC_INIT and removed from 117669ab56c27Smrg# the call to AM_INIT_AUTOMAKE. 117679ab56c27Smrg# We support both call styles for the transition. After 117689ab56c27Smrg# the next Automake release, Autoconf can make the AC_INIT 117699ab56c27Smrg# arguments mandatory, and then we can depend on a new Autoconf 117709ab56c27Smrg# release and drop the old call support. 117719ab56c27SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 117729ab56c27Smrg[AC_PREREQ([2.65])dnl 117739ab56c27Smrgm4_ifdef([_$0_ALREADY_INIT], 117749ab56c27Smrg [m4_fatal([$0 expanded multiple times 117759ab56c27Smrg]m4_defn([_$0_ALREADY_INIT]))], 117769ab56c27Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 117779ab56c27Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 117789ab56c27Smrgdnl the ones we care about. 117799ab56c27Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 117809ab56c27SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 117819ab56c27SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 117829ab56c27Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 117839ab56c27Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 117849ab56c27Smrg # is not polluted with repeated "-I." 117859ab56c27Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 117869ab56c27Smrg # test to see if srcdir already configured 117879ab56c27Smrg if test -f $srcdir/config.status; then 117889ab56c27Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 117899ab56c27Smrg fi 117909ab56c27Smrgfi 117918c9fbc29Smrg 117929ab56c27Smrg# test whether we have cygpath 117939ab56c27Smrgif test -z "$CYGPATH_W"; then 117949ab56c27Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 117959ab56c27Smrg CYGPATH_W='cygpath -w' 117969ab56c27Smrg else 117979ab56c27Smrg CYGPATH_W=echo 117989ab56c27Smrg fi 117999ab56c27Smrgfi 118009ab56c27SmrgAC_SUBST([CYGPATH_W]) 118014cd6a3aeSmrg 118029ab56c27Smrg# Define the identity of the package. 118039ab56c27Smrgdnl Distinguish between old-style and new-style calls. 118049ab56c27Smrgm4_ifval([$2], 118059ab56c27Smrg[AC_DIAGNOSE([obsolete], 118069ab56c27Smrg [$0: two- and three-arguments forms are deprecated.]) 118079ab56c27Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 118089ab56c27Smrg AC_SUBST([PACKAGE], [$1])dnl 118099ab56c27Smrg AC_SUBST([VERSION], [$2])], 118109ab56c27Smrg[_AM_SET_OPTIONS([$1])dnl 118119ab56c27Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 118129ab56c27Smrgm4_if( 118139ab56c27Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 118149ab56c27Smrg [ok:ok],, 118159ab56c27Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 118169ab56c27Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 118179ab56c27Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 118188c9fbc29Smrg 118199ab56c27Smrg_AM_IF_OPTION([no-define],, 118209ab56c27Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 118219ab56c27Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 118224e411241Smrg 118239ab56c27Smrg# Some tools Automake needs. 118249ab56c27SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 118259ab56c27SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 118269ab56c27SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 118279ab56c27SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 118289ab56c27SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 118299ab56c27SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 118309ab56c27SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 118319ab56c27SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 118329ab56c27SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 118339ab56c27SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 118349ab56c27Smrg# For better backward compatibility. To be removed once Automake 1.9.x 118359ab56c27Smrg# dies out for good. For more background, see: 118369ab56c27Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 118379ab56c27Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 118389ab56c27SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 118399ab56c27Smrg# We need awk for the "check" target (and possibly the TAP driver). The 118409ab56c27Smrg# system "awk" is bad on some platforms. 118419ab56c27SmrgAC_REQUIRE([AC_PROG_AWK])dnl 118429ab56c27SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 118439ab56c27SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 118449ab56c27Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 118459ab56c27Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 118469ab56c27Smrg [_AM_PROG_TAR([v7])])]) 118479ab56c27Smrg_AM_IF_OPTION([no-dependencies],, 118489ab56c27Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 118499ab56c27Smrg [_AM_DEPENDENCIES([CC])], 118509ab56c27Smrg [m4_define([AC_PROG_CC], 118519ab56c27Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 118529ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 118539ab56c27Smrg [_AM_DEPENDENCIES([CXX])], 118549ab56c27Smrg [m4_define([AC_PROG_CXX], 118559ab56c27Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 118569ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 118579ab56c27Smrg [_AM_DEPENDENCIES([OBJC])], 118589ab56c27Smrg [m4_define([AC_PROG_OBJC], 118599ab56c27Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 118609ab56c27SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 118619ab56c27Smrg [_AM_DEPENDENCIES([OBJCXX])], 118629ab56c27Smrg [m4_define([AC_PROG_OBJCXX], 118639ab56c27Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1186454cef2ddSmrg]) 118659ab56c27Smrg# Variables for tags utilities; see am/tags.am 118669ab56c27Smrgif test -z "$CTAGS"; then 118679ab56c27Smrg CTAGS=ctags 118689ab56c27Smrgfi 118699ab56c27SmrgAC_SUBST([CTAGS]) 118709ab56c27Smrgif test -z "$ETAGS"; then 118719ab56c27Smrg ETAGS=etags 118729ab56c27Smrgfi 118739ab56c27SmrgAC_SUBST([ETAGS]) 118749ab56c27Smrgif test -z "$CSCOPE"; then 118759ab56c27Smrg CSCOPE=cscope 118769ab56c27Smrgfi 118779ab56c27SmrgAC_SUBST([CSCOPE]) 118784e411241Smrg 118799ab56c27SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 118809ab56c27Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 118819ab56c27Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 118829ab56c27Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 118839ab56c27SmrgAC_CONFIG_COMMANDS_PRE(dnl 118849ab56c27Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 118859ab56c27Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 118864cd6a3aeSmrg 118879ab56c27Smrg# POSIX will say in a future version that running "rm -f" with no argument 118889ab56c27Smrg# is OK; and we want to be able to make that assumption in our Makefile 118899ab56c27Smrg# recipes. So use an aggressive probe to check that the usage we want is 118909ab56c27Smrg# actually supported "in the wild" to an acceptable degree. 118919ab56c27Smrg# See automake bug#10828. 118929ab56c27Smrg# To make any issue more visible, cause the running configure to be aborted 118939ab56c27Smrg# by default if the 'rm' program in use doesn't match our expectations; the 118949ab56c27Smrg# user can still override this though. 118959ab56c27Smrgif rm -f && rm -fr && rm -rf; then : OK; else 118969ab56c27Smrg cat >&2 <<'END' 118979ab56c27SmrgOops! 118984cd6a3aeSmrg 118999ab56c27SmrgYour 'rm' program seems unable to run without file operands specified 119009ab56c27Smrgon the command line, even when the '-f' option is present. This is contrary 119019ab56c27Smrgto the behaviour of most rm programs out there, and not conforming with 119029ab56c27Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 119034cd6a3aeSmrg 119049ab56c27SmrgPlease tell bug-automake@gnu.org about your system, including the value 119059ab56c27Smrgof your $PATH and any error possibly output before this message. This 119069ab56c27Smrgcan help us improve future automake versions. 119074e411241Smrg 119089ab56c27SmrgEND 119099ab56c27Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 119109ab56c27Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 119119ab56c27Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 119129ab56c27Smrg echo >&2 119139ab56c27Smrg else 119149ab56c27Smrg cat >&2 <<'END' 119159ab56c27SmrgAborting the configuration process, to ensure you take notice of the issue. 119164cd6a3aeSmrg 119179ab56c27SmrgYou can download and install GNU coreutils to get an 'rm' implementation 119189ab56c27Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 119194cd6a3aeSmrg 119209ab56c27SmrgIf you want to complete the configuration process using your problematic 119219ab56c27Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 119229ab56c27Smrgto "yes", and re-run configure. 119234cd6a3aeSmrg 119249ab56c27SmrgEND 119259ab56c27Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 119269ab56c27Smrg fi 119279ab56c27Smrgfi 119289ab56c27Smrgdnl The trailing newline in this macro's definition is deliberate, for 119299ab56c27Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 119309ab56c27Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1193154cef2ddSmrg]) 119324cd6a3aeSmrg 119339ab56c27Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 119349ab56c27Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 119359ab56c27Smrgdnl mangled by Autoconf and run in a shell conditional statement. 119369ab56c27Smrgm4_define([_AC_COMPILER_EXEEXT], 119379ab56c27Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 119388c9fbc29Smrg 119399ab56c27Smrg# When config.status generates a header, we must update the stamp-h file. 119409ab56c27Smrg# This file resides in the same directory as the config header 119419ab56c27Smrg# that is generated. The stamp files are numbered to have different names. 119424cd6a3aeSmrg 119439ab56c27Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 119449ab56c27Smrg# loop where config.status creates the headers, so we can generate 119459ab56c27Smrg# our stamp files there. 119469ab56c27SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 119479ab56c27Smrg[# Compute $1's index in $config_headers. 119489ab56c27Smrg_am_arg=$1 119499ab56c27Smrg_am_stamp_count=1 119509ab56c27Smrgfor _am_header in $config_headers :; do 119519ab56c27Smrg case $_am_header in 119529ab56c27Smrg $_am_arg | $_am_arg:* ) 119539ab56c27Smrg break ;; 119549ab56c27Smrg * ) 119559ab56c27Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 119569ab56c27Smrg esac 119579ab56c27Smrgdone 119589ab56c27Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 119598c9fbc29Smrg 119609ab56c27Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 119619ab56c27Smrg# 119629ab56c27Smrg# This file is free software; the Free Software Foundation 119639ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 119649ab56c27Smrg# with or without modifications, as long as this notice is preserved. 119654cd6a3aeSmrg 119669ab56c27Smrg# AM_PROG_INSTALL_SH 119679ab56c27Smrg# ------------------ 119689ab56c27Smrg# Define $install_sh. 119699ab56c27SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 119709ab56c27Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 119719ab56c27Smrgif test x"${install_sh+set}" != xset; then 119729ab56c27Smrg case $am_aux_dir in 119739ab56c27Smrg *\ * | *\ *) 119749ab56c27Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 119759ab56c27Smrg *) 119769ab56c27Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 119779ab56c27Smrg esac 119789ab56c27Smrgfi 119799ab56c27SmrgAC_SUBST([install_sh])]) 119804cd6a3aeSmrg 119819ab56c27Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 119829ab56c27Smrg# 119839ab56c27Smrg# This file is free software; the Free Software Foundation 119849ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 119859ab56c27Smrg# with or without modifications, as long as this notice is preserved. 119864cd6a3aeSmrg 119879ab56c27Smrg# Check whether the underlying file-system supports filenames 119889ab56c27Smrg# with a leading dot. For instance MS-DOS doesn't. 119899ab56c27SmrgAC_DEFUN([AM_SET_LEADING_DOT], 119909ab56c27Smrg[rm -rf .tst 2>/dev/null 119919ab56c27Smrgmkdir .tst 2>/dev/null 119929ab56c27Smrgif test -d .tst; then 119939ab56c27Smrg am__leading_dot=. 119949ab56c27Smrgelse 119959ab56c27Smrg am__leading_dot=_ 119969ab56c27Smrgfi 119979ab56c27Smrgrmdir .tst 2>/dev/null 119989ab56c27SmrgAC_SUBST([am__leading_dot])]) 119994cd6a3aeSmrg 120009ab56c27Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 120014cd6a3aeSmrg 120029ab56c27Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 120039ab56c27Smrg# 120049ab56c27Smrg# This file is free software; the Free Software Foundation 120059ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 120069ab56c27Smrg# with or without modifications, as long as this notice is preserved. 120074cd6a3aeSmrg 120089ab56c27Smrg# AM_MAKE_INCLUDE() 120099ab56c27Smrg# ----------------- 120109ab56c27Smrg# Check whether make has an 'include' directive that can support all 120119ab56c27Smrg# the idioms we need for our automatic dependency tracking code. 120129ab56c27SmrgAC_DEFUN([AM_MAKE_INCLUDE], 120139ab56c27Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 120149ab56c27Smrgcat > confinc.mk << 'END' 120159ab56c27Smrgam__doit: 120169ab56c27Smrg @echo this is the am__doit target >confinc.out 120179ab56c27Smrg.PHONY: am__doit 120189ab56c27SmrgEND 120199ab56c27Smrgam__include="#" 120209ab56c27Smrgam__quote= 120219ab56c27Smrg# BSD make does it like this. 120229ab56c27Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 120239ab56c27Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 120249ab56c27Smrgecho 'include confinc.mk # ignored' > confmf.GNU 120259ab56c27Smrg_am_result=no 120269ab56c27Smrgfor s in GNU BSD; do 120279ab56c27Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 120289ab56c27Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 120299ab56c27Smrg ['0:this is the am__doit target'], 120309ab56c27Smrg [AS_CASE([$s], 120319ab56c27Smrg [BSD], [am__include='.include' am__quote='"'], 120329ab56c27Smrg [am__include='include' am__quote=''])]) 120339ab56c27Smrg if test "$am__include" != "#"; then 120349ab56c27Smrg _am_result="yes ($s style)" 120359ab56c27Smrg break 120369ab56c27Smrg fi 120379ab56c27Smrgdone 120389ab56c27Smrgrm -f confinc.* confmf.* 120399ab56c27SmrgAC_MSG_RESULT([${_am_result}]) 120409ab56c27SmrgAC_SUBST([am__include])]) 120419ab56c27SmrgAC_SUBST([am__quote])]) 120424cd6a3aeSmrg 120439ab56c27Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 120448c9fbc29Smrg 120459ab56c27Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 120469ab56c27Smrg# 120479ab56c27Smrg# This file is free software; the Free Software Foundation 120489ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 120499ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1205054044362Smrg 120519ab56c27Smrg# AM_MISSING_PROG(NAME, PROGRAM) 120529ab56c27Smrg# ------------------------------ 120539ab56c27SmrgAC_DEFUN([AM_MISSING_PROG], 120549ab56c27Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 120559ab56c27Smrg$1=${$1-"${am_missing_run}$2"} 120569ab56c27SmrgAC_SUBST($1)]) 1205754cef2ddSmrg 120589ab56c27Smrg# AM_MISSING_HAS_RUN 120599ab56c27Smrg# ------------------ 120609ab56c27Smrg# Define MISSING if not defined so far and test if it is modern enough. 120619ab56c27Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 120629ab56c27SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 120639ab56c27Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 120649ab56c27SmrgAC_REQUIRE_AUX_FILE([missing])dnl 120659ab56c27Smrgif test x"${MISSING+set}" != xset; then 120669ab56c27Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 120679ab56c27Smrgfi 120689ab56c27Smrg# Use eval to expand $SHELL 120699ab56c27Smrgif eval "$MISSING --is-lightweight"; then 120709ab56c27Smrg am_missing_run="$MISSING " 120719ab56c27Smrgelse 120729ab56c27Smrg am_missing_run= 120739ab56c27Smrg AC_MSG_WARN(['missing' script is too old or missing]) 120749ab56c27Smrgfi 120759ab56c27Smrg]) 1207654cef2ddSmrg 120779ab56c27Smrg# Helper functions for option handling. -*- Autoconf -*- 120789ab56c27Smrg 120799ab56c27Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 1208054cef2ddSmrg# 120819ab56c27Smrg# This file is free software; the Free Software Foundation 120829ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 120839ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1208454044362Smrg 120859ab56c27Smrg# _AM_MANGLE_OPTION(NAME) 120869ab56c27Smrg# ----------------------- 120879ab56c27SmrgAC_DEFUN([_AM_MANGLE_OPTION], 120889ab56c27Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 120894cd6a3aeSmrg 120909ab56c27Smrg# _AM_SET_OPTION(NAME) 120919ab56c27Smrg# -------------------- 120929ab56c27Smrg# Set option NAME. Presently that only means defining a flag for this option. 120939ab56c27SmrgAC_DEFUN([_AM_SET_OPTION], 120949ab56c27Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 120958c9fbc29Smrg 120969ab56c27Smrg# _AM_SET_OPTIONS(OPTIONS) 120979ab56c27Smrg# ------------------------ 120989ab56c27Smrg# OPTIONS is a space-separated list of Automake options. 120999ab56c27SmrgAC_DEFUN([_AM_SET_OPTIONS], 121009ab56c27Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 121014cd6a3aeSmrg 121029ab56c27Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 121039ab56c27Smrg# ------------------------------------------- 121049ab56c27Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 121059ab56c27SmrgAC_DEFUN([_AM_IF_OPTION], 121069ab56c27Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 121074cd6a3aeSmrg 121089ab56c27Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 121099ab56c27Smrg# 121109ab56c27Smrg# This file is free software; the Free Software Foundation 121119ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 121129ab56c27Smrg# with or without modifications, as long as this notice is preserved. 121134cd6a3aeSmrg 121149ab56c27Smrg# _AM_PROG_CC_C_O 121159ab56c27Smrg# --------------- 121169ab56c27Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 121179ab56c27Smrg# to automatically call this. 121189ab56c27SmrgAC_DEFUN([_AM_PROG_CC_C_O], 121199ab56c27Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 121209ab56c27SmrgAC_REQUIRE_AUX_FILE([compile])dnl 121219ab56c27SmrgAC_LANG_PUSH([C])dnl 121229ab56c27SmrgAC_CACHE_CHECK( 121239ab56c27Smrg [whether $CC understands -c and -o together], 121249ab56c27Smrg [am_cv_prog_cc_c_o], 121259ab56c27Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 121269ab56c27Smrg # Make sure it works both with $CC and with simple cc. 121279ab56c27Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 121289ab56c27Smrg # compilers refuse to overwrite an existing .o file with -o, 121299ab56c27Smrg # though they will create one. 121309ab56c27Smrg am_cv_prog_cc_c_o=yes 121319ab56c27Smrg for am_i in 1 2; do 121329ab56c27Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 121339ab56c27Smrg && test -f conftest2.$ac_objext; then 121349ab56c27Smrg : OK 121359ab56c27Smrg else 121369ab56c27Smrg am_cv_prog_cc_c_o=no 121379ab56c27Smrg break 121389ab56c27Smrg fi 121399ab56c27Smrg done 121409ab56c27Smrg rm -f core conftest* 121419ab56c27Smrg unset am_i]) 121429ab56c27Smrgif test "$am_cv_prog_cc_c_o" != yes; then 121439ab56c27Smrg # Losing compiler, so override with the script. 121449ab56c27Smrg # FIXME: It is wrong to rewrite CC. 121459ab56c27Smrg # But if we don't then we get into trouble of one sort or another. 121469ab56c27Smrg # A longer-term fix would be to have automake use am__CC in this case, 121479ab56c27Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 121489ab56c27Smrg CC="$am_aux_dir/compile $CC" 121499ab56c27Smrgfi 121509ab56c27SmrgAC_LANG_POP([C])]) 1215154cef2ddSmrg 121529ab56c27Smrg# For backward compatibility. 121539ab56c27SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 121544e411241Smrg 121559ab56c27Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 121568c9fbc29Smrg# 121579ab56c27Smrg# This file is free software; the Free Software Foundation 121589ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 121599ab56c27Smrg# with or without modifications, as long as this notice is preserved. 121608c9fbc29Smrg 121619ab56c27Smrg# AM_RUN_LOG(COMMAND) 121629ab56c27Smrg# ------------------- 121639ab56c27Smrg# Run COMMAND, save the exit status in ac_status, and log it. 121649ab56c27Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 121659ab56c27SmrgAC_DEFUN([AM_RUN_LOG], 121669ab56c27Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 121679ab56c27Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 121689ab56c27Smrg ac_status=$? 121699ab56c27Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 121709ab56c27Smrg (exit $ac_status); }]) 1217154044362Smrg 121729ab56c27Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1217354044362Smrg 121749ab56c27Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 121759ab56c27Smrg# 121769ab56c27Smrg# This file is free software; the Free Software Foundation 121779ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 121789ab56c27Smrg# with or without modifications, as long as this notice is preserved. 1217954cef2ddSmrg 121809ab56c27Smrg# AM_SANITY_CHECK 121819ab56c27Smrg# --------------- 121829ab56c27SmrgAC_DEFUN([AM_SANITY_CHECK], 121839ab56c27Smrg[AC_MSG_CHECKING([whether build environment is sane]) 121849ab56c27Smrg# Reject unsafe characters in $srcdir or the absolute working directory 121859ab56c27Smrg# name. Accept space and tab only in the latter. 121869ab56c27Smrgam_lf=' 121879ab56c27Smrg' 121889ab56c27Smrgcase `pwd` in 121899ab56c27Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 121909ab56c27Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 121919ab56c27Smrgesac 121929ab56c27Smrgcase $srcdir in 121939ab56c27Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 121949ab56c27Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 121959ab56c27Smrgesac 1219654cef2ddSmrg 121979ab56c27Smrg# Do 'set' in a subshell so we don't clobber the current shell's 121989ab56c27Smrg# arguments. Must try -L first in case configure is actually a 121999ab56c27Smrg# symlink; some systems play weird games with the mod time of symlinks 122009ab56c27Smrg# (eg FreeBSD returns the mod time of the symlink's containing 122019ab56c27Smrg# directory). 122029ab56c27Smrgif ( 122039ab56c27Smrg am_has_slept=no 122049ab56c27Smrg for am_try in 1 2; do 122059ab56c27Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 122069ab56c27Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 122079ab56c27Smrg if test "$[*]" = "X"; then 122089ab56c27Smrg # -L didn't work. 122099ab56c27Smrg set X `ls -t "$srcdir/configure" conftest.file` 122109ab56c27Smrg fi 122119ab56c27Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 122129ab56c27Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1221354cef2ddSmrg 122149ab56c27Smrg # If neither matched, then we have a broken ls. This can happen 122159ab56c27Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 122169ab56c27Smrg # broken ls alias from the environment. This has actually 122179ab56c27Smrg # happened. Such a system could not be considered "sane". 122189ab56c27Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 122199ab56c27Smrg alias in your environment]) 122209ab56c27Smrg fi 122219ab56c27Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 122229ab56c27Smrg break 122239ab56c27Smrg fi 122249ab56c27Smrg # Just in case. 122259ab56c27Smrg sleep 1 122269ab56c27Smrg am_has_slept=yes 122279ab56c27Smrg done 122289ab56c27Smrg test "$[2]" = conftest.file 122299ab56c27Smrg ) 122309ab56c27Smrgthen 122319ab56c27Smrg # Ok. 122329ab56c27Smrg : 122339ab56c27Smrgelse 122349ab56c27Smrg AC_MSG_ERROR([newly created file is older than distributed files! 122359ab56c27SmrgCheck your system clock]) 122369ab56c27Smrgfi 122379ab56c27SmrgAC_MSG_RESULT([yes]) 122389ab56c27Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 122399ab56c27Smrg# generated files are strictly newer. 122409ab56c27Smrgam_sleep_pid= 122419ab56c27Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 122429ab56c27Smrg ( sleep 1 ) & 122439ab56c27Smrg am_sleep_pid=$! 122449ab56c27Smrgfi 122459ab56c27SmrgAC_CONFIG_COMMANDS_PRE( 122469ab56c27Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 122479ab56c27Smrg if test -n "$am_sleep_pid"; then 122489ab56c27Smrg # Hide warnings about reused PIDs. 122499ab56c27Smrg wait $am_sleep_pid 2>/dev/null 122509ab56c27Smrg fi 122519ab56c27Smrg AC_MSG_RESULT([done])]) 122529ab56c27Smrgrm -f conftest.file 122539ab56c27Smrg]) 1225454cef2ddSmrg 122559ab56c27Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 122569ab56c27Smrg# 122579ab56c27Smrg# This file is free software; the Free Software Foundation 122589ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 122599ab56c27Smrg# with or without modifications, as long as this notice is preserved. 122608c9fbc29Smrg 122619ab56c27Smrg# AM_SILENT_RULES([DEFAULT]) 122629ab56c27Smrg# -------------------------- 122639ab56c27Smrg# Enable less verbose build rules; with the default set to DEFAULT 122649ab56c27Smrg# ("yes" being less verbose, "no" or empty being verbose). 122659ab56c27SmrgAC_DEFUN([AM_SILENT_RULES], 122669ab56c27Smrg[AC_ARG_ENABLE([silent-rules], [dnl 122679ab56c27SmrgAS_HELP_STRING( 122689ab56c27Smrg [--enable-silent-rules], 122699ab56c27Smrg [less verbose build output (undo: "make V=1")]) 122709ab56c27SmrgAS_HELP_STRING( 122719ab56c27Smrg [--disable-silent-rules], 122729ab56c27Smrg [verbose build output (undo: "make V=0")])dnl 122739ab56c27Smrg]) 122749ab56c27Smrgcase $enable_silent_rules in @%:@ ((( 122759ab56c27Smrg yes) AM_DEFAULT_VERBOSITY=0;; 122769ab56c27Smrg no) AM_DEFAULT_VERBOSITY=1;; 122779ab56c27Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 122789ab56c27Smrgesac 122799ab56c27Smrgdnl 122809ab56c27Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 122819ab56c27Smrgdnl do not support nested variable expansions. 122829ab56c27Smrgdnl See automake bug#9928 and bug#10237. 122839ab56c27Smrgam_make=${MAKE-make} 122849ab56c27SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 122859ab56c27Smrg [am_cv_make_support_nested_variables], 122869ab56c27Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 122879ab56c27SmrgBAR0=false 122889ab56c27SmrgBAR1=true 122899ab56c27SmrgV=1 122909ab56c27Smrgam__doit: 122919ab56c27Smrg @$(TRUE) 122929ab56c27Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 122939ab56c27Smrg am_cv_make_support_nested_variables=yes 122949ab56c27Smrgelse 122959ab56c27Smrg am_cv_make_support_nested_variables=no 122969ab56c27Smrgfi]) 122979ab56c27Smrgif test $am_cv_make_support_nested_variables = yes; then 122989ab56c27Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 122999ab56c27Smrg AM_V='$(V)' 123009ab56c27Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 123019ab56c27Smrgelse 123029ab56c27Smrg AM_V=$AM_DEFAULT_VERBOSITY 123039ab56c27Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 123049ab56c27Smrgfi 123059ab56c27SmrgAC_SUBST([AM_V])dnl 123069ab56c27SmrgAM_SUBST_NOTMAKE([AM_V])dnl 123079ab56c27SmrgAC_SUBST([AM_DEFAULT_V])dnl 123089ab56c27SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 123099ab56c27SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 123109ab56c27SmrgAM_BACKSLASH='\' 123119ab56c27SmrgAC_SUBST([AM_BACKSLASH])dnl 123129ab56c27Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 123139ab56c27Smrg]) 123148c9fbc29Smrg 123159ab56c27Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 123169ab56c27Smrg# 123179ab56c27Smrg# This file is free software; the Free Software Foundation 123189ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 123199ab56c27Smrg# with or without modifications, as long as this notice is preserved. 123204e411241Smrg 123219ab56c27Smrg# AM_PROG_INSTALL_STRIP 123229ab56c27Smrg# --------------------- 123239ab56c27Smrg# One issue with vendor 'install' (even GNU) is that you can't 123249ab56c27Smrg# specify the program used to strip binaries. This is especially 123259ab56c27Smrg# annoying in cross-compiling environments, where the build's strip 123269ab56c27Smrg# is unlikely to handle the host's binaries. 123279ab56c27Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 123289ab56c27Smrg# always use install-sh in "make install-strip", and initialize 123299ab56c27Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 123309ab56c27SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 123319ab56c27Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 123329ab56c27Smrg# Installed binaries are usually stripped using 'strip' when the user 123339ab56c27Smrg# run "make install-strip". However 'strip' might not be the right 123349ab56c27Smrg# tool to use in cross-compilation environments, therefore Automake 123359ab56c27Smrg# will honor the 'STRIP' environment variable to overrule this program. 123369ab56c27Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 123379ab56c27Smrgif test "$cross_compiling" != no; then 123389ab56c27Smrg AC_CHECK_TOOL([STRIP], [strip], :) 123399ab56c27Smrgfi 123409ab56c27SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 123419ab56c27SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 123428c9fbc29Smrg 123439ab56c27Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 123449ab56c27Smrg# 123459ab56c27Smrg# This file is free software; the Free Software Foundation 123469ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 123479ab56c27Smrg# with or without modifications, as long as this notice is preserved. 123484e411241Smrg 123499ab56c27Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 123509ab56c27Smrg# --------------------------- 123519ab56c27Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 123529ab56c27Smrg# This macro is traced by Automake. 123539ab56c27SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 123544e411241Smrg 123559ab56c27Smrg# AM_SUBST_NOTMAKE(VARIABLE) 123569ab56c27Smrg# -------------------------- 123579ab56c27Smrg# Public sister of _AM_SUBST_NOTMAKE. 123589ab56c27SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 123598c9fbc29Smrg 123609ab56c27Smrg# Check how to create a tarball. -*- Autoconf -*- 1236170728a38Smrg 123629ab56c27Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 123639ab56c27Smrg# 123649ab56c27Smrg# This file is free software; the Free Software Foundation 123659ab56c27Smrg# gives unlimited permission to copy and/or distribute it, 123669ab56c27Smrg# with or without modifications, as long as this notice is preserved. 123678c9fbc29Smrg 123689ab56c27Smrg# _AM_PROG_TAR(FORMAT) 123699ab56c27Smrg# -------------------- 123709ab56c27Smrg# Check how to create a tarball in format FORMAT. 123719ab56c27Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1237254cef2ddSmrg# 123739ab56c27Smrg# Substitute a variable $(am__tar) that is a command 123749ab56c27Smrg# writing to stdout a FORMAT-tarball containing the directory 123759ab56c27Smrg# $tardir. 123769ab56c27Smrg# tardir=directory && $(am__tar) > result.tar 1237754cef2ddSmrg# 123789ab56c27Smrg# Substitute a variable $(am__untar) that extract such 123799ab56c27Smrg# a tarball read from stdin. 123809ab56c27Smrg# $(am__untar) < result.tar 123819ab56c27Smrg# 123829ab56c27SmrgAC_DEFUN([_AM_PROG_TAR], 123839ab56c27Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 123849ab56c27Smrg# in the wild :-( We should find a proper way to deprecate it ... 123859ab56c27SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1238654044362Smrg 123879ab56c27Smrg# We'll loop over all known methods to create a tar archive until one works. 123889ab56c27Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1238954044362Smrg 123909ab56c27Smrgm4_if([$1], [v7], 123919ab56c27Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1239254044362Smrg 123939ab56c27Smrg [m4_case([$1], 123949ab56c27Smrg [ustar], 123959ab56c27Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 123969ab56c27Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 123979ab56c27Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 123989ab56c27Smrg # and bug#13588). 123999ab56c27Smrg am_max_uid=2097151 # 2^21 - 1 124009ab56c27Smrg am_max_gid=$am_max_uid 124019ab56c27Smrg # The $UID and $GID variables are not portable, so we need to resort 124029ab56c27Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 124039ab56c27Smrg # below are definitely unexpected, so allow the users to see them 124049ab56c27Smrg # (that is, avoid stderr redirection). 124059ab56c27Smrg am_uid=`id -u || echo unknown` 124069ab56c27Smrg am_gid=`id -g || echo unknown` 124079ab56c27Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 124089ab56c27Smrg if test $am_uid -le $am_max_uid; then 124099ab56c27Smrg AC_MSG_RESULT([yes]) 124109ab56c27Smrg else 124119ab56c27Smrg AC_MSG_RESULT([no]) 124129ab56c27Smrg _am_tools=none 124139ab56c27Smrg fi 124149ab56c27Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 124159ab56c27Smrg if test $am_gid -le $am_max_gid; then 124169ab56c27Smrg AC_MSG_RESULT([yes]) 124179ab56c27Smrg else 124189ab56c27Smrg AC_MSG_RESULT([no]) 124199ab56c27Smrg _am_tools=none 124209ab56c27Smrg fi], 1242154044362Smrg 124229ab56c27Smrg [pax], 124239ab56c27Smrg [], 1242454044362Smrg 124259ab56c27Smrg [m4_fatal([Unknown tar format])]) 1242654044362Smrg 124279ab56c27Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1242854044362Smrg 124299ab56c27Smrg # Go ahead even if we have the value already cached. We do so because we 124309ab56c27Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 124319ab56c27Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1243254044362Smrg 124339ab56c27Smrg for _am_tool in $_am_tools; do 124349ab56c27Smrg case $_am_tool in 124359ab56c27Smrg gnutar) 124369ab56c27Smrg for _am_tar in tar gnutar gtar; do 124379ab56c27Smrg AM_RUN_LOG([$_am_tar --version]) && break 124389ab56c27Smrg done 124399ab56c27Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 124409ab56c27Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 124419ab56c27Smrg am__untar="$_am_tar -xf -" 124429ab56c27Smrg ;; 124439ab56c27Smrg plaintar) 124449ab56c27Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 124459ab56c27Smrg # ustar tarball either. 124469ab56c27Smrg (tar --version) >/dev/null 2>&1 && continue 124479ab56c27Smrg am__tar='tar chf - "$$tardir"' 124489ab56c27Smrg am__tar_='tar chf - "$tardir"' 124499ab56c27Smrg am__untar='tar xf -' 124509ab56c27Smrg ;; 124519ab56c27Smrg pax) 124529ab56c27Smrg am__tar='pax -L -x $1 -w "$$tardir"' 124539ab56c27Smrg am__tar_='pax -L -x $1 -w "$tardir"' 124549ab56c27Smrg am__untar='pax -r' 124559ab56c27Smrg ;; 124569ab56c27Smrg cpio) 124579ab56c27Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 124589ab56c27Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 124599ab56c27Smrg am__untar='cpio -i -H $1 -d' 124609ab56c27Smrg ;; 124619ab56c27Smrg none) 124629ab56c27Smrg am__tar=false 124639ab56c27Smrg am__tar_=false 124649ab56c27Smrg am__untar=false 124659ab56c27Smrg ;; 124669ab56c27Smrg esac 1246754044362Smrg 124689ab56c27Smrg # If the value was cached, stop now. We just wanted to have am__tar 124699ab56c27Smrg # and am__untar set. 124709ab56c27Smrg test -n "${am_cv_prog_tar_$1}" && break 124719ab56c27Smrg 124729ab56c27Smrg # tar/untar a dummy directory, and stop if the command works. 124739ab56c27Smrg rm -rf conftest.dir 124749ab56c27Smrg mkdir conftest.dir 124759ab56c27Smrg echo GrepMe > conftest.dir/file 124769ab56c27Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 124779ab56c27Smrg rm -rf conftest.dir 124789ab56c27Smrg if test -s conftest.tar; then 124799ab56c27Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 124809ab56c27Smrg AM_RUN_LOG([cat conftest.dir/file]) 124819ab56c27Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 124829ab56c27Smrg fi 124839ab56c27Smrg done 124849ab56c27Smrg rm -rf conftest.dir 124859ab56c27Smrg 124869ab56c27Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 124879ab56c27Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 124889ab56c27Smrg 124899ab56c27SmrgAC_SUBST([am__tar]) 124909ab56c27SmrgAC_SUBST([am__untar]) 124919ab56c27Smrg]) # _AM_PROG_TAR 124928c9fbc29Smrg 12493