aclocal.m4 revision f2408745
1f2408745Smrg# generated automatically by aclocal 1.15.1 -*- Autoconf -*- 2c97b1c41Smrg 3f2408745Smrg# Copyright (C) 1996-2017 Free Software Foundation, Inc. 445bc899bSmrg 545bc899bSmrg# This file is free software; the Free Software Foundation 645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 745bc899bSmrg# with or without modifications, as long as this notice is preserved. 845bc899bSmrg 945bc899bSmrg# This program is distributed in the hope that it will be useful, 1045bc899bSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1145bc899bSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1245bc899bSmrg# PARTICULAR PURPOSE. 1345bc899bSmrg 14c97b1c41Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1550f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1650f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17c97b1c41Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18c97b1c41Smrg[m4_warning([this file was generated for autoconf 2.69. 1950f2e948SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2050f2e948SmrgIf you have problems, you may need to regenerate the build system entirely. 21c97b1c41SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 2250f2e948Smrg 2345bc899bSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 245592a31fSmrg# 25f2408745Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 265592a31fSmrg# Written by Gordon Matzigkeit, 1996 275592a31fSmrg# 285592a31fSmrg# This file is free software; the Free Software Foundation gives 295592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 305592a31fSmrg# modifications, as long as this notice is preserved. 315592a31fSmrg 325592a31fSmrgm4_define([_LT_COPYING], [dnl 33f2408745Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 34f2408745Smrg# This is free software; see the source for copying conditions. There is NO 35f2408745Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36f2408745Smrg 37f2408745Smrg# GNU Libtool is free software; you can redistribute it and/or modify 38f2408745Smrg# it under the terms of the GNU General Public License as published by 39f2408745Smrg# the Free Software Foundation; either version 2 of of the License, or 40f2408745Smrg# (at your option) any later version. 415592a31fSmrg# 42f2408745Smrg# As a special exception to the GNU General Public License, if you 43f2408745Smrg# distribute this file as part of a program or library that is built 44f2408745Smrg# using GNU Libtool, you may include this file under the same 45f2408745Smrg# distribution terms that you use for the rest of that program. 465592a31fSmrg# 47f2408745Smrg# GNU Libtool is distributed in the hope that it will be useful, but 48f2408745Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 495592a31fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 505592a31fSmrg# GNU General Public License for more details. 515592a31fSmrg# 525592a31fSmrg# You should have received a copy of the GNU General Public License 53f2408745Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 545592a31fSmrg]) 5545bc899bSmrg 56f2408745Smrg# serial 58 LT_INIT 571ac89addSmrg 581ac89addSmrg 595592a31fSmrg# LT_PREREQ(VERSION) 605592a31fSmrg# ------------------ 615592a31fSmrg# Complain and exit if this libtool version is less that VERSION. 625592a31fSmrgm4_defun([LT_PREREQ], 635592a31fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 645592a31fSmrg [m4_default([$3], 655592a31fSmrg [m4_fatal([Libtool version $1 or higher is required], 665592a31fSmrg 63)])], 675592a31fSmrg [$2])]) 6850f2e948Smrg 6950f2e948Smrg 705592a31fSmrg# _LT_CHECK_BUILDDIR 715592a31fSmrg# ------------------ 725592a31fSmrg# Complain if the absolute build directory name contains unusual characters 735592a31fSmrgm4_defun([_LT_CHECK_BUILDDIR], 745592a31fSmrg[case `pwd` in 755592a31fSmrg *\ * | *\ *) 765592a31fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 775592a31fSmrgesac 785592a31fSmrg]) 795592a31fSmrg 805592a31fSmrg 815592a31fSmrg# LT_INIT([OPTIONS]) 825592a31fSmrg# ------------------ 835592a31fSmrgAC_DEFUN([LT_INIT], 84f2408745Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85b40a6198SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 865592a31fSmrgAC_BEFORE([$0], [LT_LANG])dnl 875592a31fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 885592a31fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 895592a31fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 905592a31fSmrg 915592a31fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 925592a31fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 935592a31fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 945592a31fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 955592a31fSmrgdnl unless we require an AC_DEFUNed macro: 965592a31fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 975592a31fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 985592a31fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 995592a31fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1005592a31fSmrgm4_require([_LT_PROG_LTMAIN])dnl 1015592a31fSmrg 102b40a6198Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103b40a6198Smrg 1045592a31fSmrgdnl Parse OPTIONS 1055592a31fSmrg_LT_SET_OPTIONS([$0], [$1]) 10645bc899bSmrg 10745bc899bSmrg# This can be used to rebuild libtool when needed 108f2408745SmrgLIBTOOL_DEPS=$ltmain 10945bc899bSmrg 11045bc899bSmrg# Always use our own libtool. 11145bc899bSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11245bc899bSmrgAC_SUBST(LIBTOOL)dnl 11345bc899bSmrg 1145592a31fSmrg_LT_SETUP 11550f2e948Smrg 1165592a31fSmrg# Only expand once: 1175592a31fSmrgm4_define([LT_INIT]) 1185592a31fSmrg])# LT_INIT 11950f2e948Smrg 1205592a31fSmrg# Old names: 1215592a31fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1225592a31fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1235592a31fSmrgdnl aclocal-1.4 backwards compatibility: 1245592a31fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1255592a31fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1265592a31fSmrg 1275592a31fSmrg 128f2408745Smrg# _LT_PREPARE_CC_BASENAME 129f2408745Smrg# ----------------------- 130f2408745Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131f2408745Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132f2408745Smrgfunc_cc_basename () 133f2408745Smrg{ 134f2408745Smrg for cc_temp in @S|@*""; do 135f2408745Smrg case $cc_temp in 136f2408745Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137f2408745Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138f2408745Smrg \-*) ;; 139f2408745Smrg *) break;; 140f2408745Smrg esac 141f2408745Smrg done 142f2408745Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143f2408745Smrg} 144f2408745Smrg])# _LT_PREPARE_CC_BASENAME 145f2408745Smrg 146f2408745Smrg 1475592a31fSmrg# _LT_CC_BASENAME(CC) 1485592a31fSmrg# ------------------- 149f2408745Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150f2408745Smrg# but that macro is also expanded into generated libtool script, which 151f2408745Smrg# arranges for $SED and $ECHO to be set by different means. 1525592a31fSmrgm4_defun([_LT_CC_BASENAME], 153f2408745Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154f2408745SmrgAC_REQUIRE([_LT_DECL_SED])dnl 155f2408745SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156f2408745Smrgfunc_cc_basename $1 157f2408745Smrgcc_basename=$func_cc_basename_result 1585592a31fSmrg]) 1595592a31fSmrg 1605592a31fSmrg 1615592a31fSmrg# _LT_FILEUTILS_DEFAULTS 1625592a31fSmrg# ---------------------- 1635592a31fSmrg# It is okay to use these file commands and assume they have been set 164f2408745Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1655592a31fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1665592a31fSmrg[: ${CP="cp -f"} 1675592a31fSmrg: ${MV="mv -f"} 1685592a31fSmrg: ${RM="rm -f"} 1695592a31fSmrg])# _LT_FILEUTILS_DEFAULTS 1705592a31fSmrg 1715592a31fSmrg 1725592a31fSmrg# _LT_SETUP 1735592a31fSmrg# --------- 1745592a31fSmrgm4_defun([_LT_SETUP], 1755592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 17645bc899bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177b40a6198SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178b40a6198SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179b40a6198Smrg 180b40a6198Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181b40a6198Smrgdnl 1825592a31fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1835592a31fSmrg_LT_DECL([], [host], [0])dnl 1845592a31fSmrg_LT_DECL([], [host_os], [0])dnl 1855592a31fSmrgdnl 1865592a31fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1875592a31fSmrg_LT_DECL([], [build], [0])dnl 1885592a31fSmrg_LT_DECL([], [build_os], [0])dnl 1895592a31fSmrgdnl 19045bc899bSmrgAC_REQUIRE([AC_PROG_CC])dnl 1915592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 1925592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 1935592a31fSmrgdnl 19445bc899bSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1955592a31fSmrgtest -z "$LN_S" && LN_S="ln -s" 1965592a31fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 19745bc899bSmrgdnl 1985592a31fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1995592a31fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2005592a31fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2015592a31fSmrgdnl 2025592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2035592a31fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204b40a6198Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2055592a31fSmrgm4_require([_LT_CMD_RELOAD])dnl 2065592a31fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207b40a6198Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2085592a31fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2095592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210b40a6198Smrgm4_require([_LT_WITH_SYSROOT])dnl 211f2408745Smrgm4_require([_LT_CMD_TRUNCATE])dnl 2125592a31fSmrg 2135592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([ 214f2408745Smrg# See if we are running on zsh, and set the options that allow our 2155592a31fSmrg# commands through without removal of \ escapes INIT. 216f2408745Smrgif test -n "\${ZSH_VERSION+set}"; then 2175592a31fSmrg setopt NO_GLOB_SUBST 2185592a31fSmrgfi 2195592a31fSmrg]) 220f2408745Smrgif test -n "${ZSH_VERSION+set}"; then 2215592a31fSmrg setopt NO_GLOB_SUBST 2225592a31fSmrgfi 22345bc899bSmrg 2245592a31fSmrg_LT_CHECK_OBJDIR 2255592a31fSmrg 2265592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 22745bc899bSmrg 22845bc899bSmrgcase $host_os in 22945bc899bSmrgaix3*) 23045bc899bSmrg # AIX sometimes has problems with the GCC collect2 program. For some 23145bc899bSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 23245bc899bSmrg # vanish in a puff of smoke. 233f2408745Smrg if test set != "${COLLECT_NAMES+set}"; then 23445bc899bSmrg COLLECT_NAMES= 23545bc899bSmrg export COLLECT_NAMES 23645bc899bSmrg fi 23745bc899bSmrg ;; 23845bc899bSmrgesac 23945bc899bSmrg 24045bc899bSmrg# Global variables: 2415592a31fSmrgofile=libtool 24245bc899bSmrgcan_build_shared=yes 24345bc899bSmrg 244f2408745Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 24545bc899bSmrg# which needs '.lib'). 24645bc899bSmrglibext=a 247226fade8Smrg 248f2408745Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2493a925b30Smrg 250f2408745Smrgold_CC=$CC 251f2408745Smrgold_CFLAGS=$CFLAGS 25245bc899bSmrg 25345bc899bSmrg# Set sane defaults for various variables 25445bc899bSmrgtest -z "$CC" && CC=cc 25545bc899bSmrgtest -z "$LTCC" && LTCC=$CC 25645bc899bSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 25745bc899bSmrgtest -z "$LD" && LD=ld 25845bc899bSmrgtest -z "$ac_objext" && ac_objext=o 25945bc899bSmrg 26045bc899bSmrg_LT_CC_BASENAME([$compiler]) 26145bc899bSmrg 26245bc899bSmrg# Only perform the check for file, if the check method requires it 2635592a31fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 26445bc899bSmrgcase $deplibs_check_method in 26545bc899bSmrgfile_magic*) 26645bc899bSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2675592a31fSmrg _LT_PATH_MAGIC 26845bc899bSmrg fi 26945bc899bSmrg ;; 27045bc899bSmrgesac 27145bc899bSmrg 2725592a31fSmrg# Use C for the default configuration in the libtool script 2735592a31fSmrgLT_SUPPORTED_TAG([CC]) 2745592a31fSmrg_LT_LANG_C_CONFIG 2755592a31fSmrg_LT_LANG_DEFAULT_CONFIG 2765592a31fSmrg_LT_CONFIG_COMMANDS 2775592a31fSmrg])# _LT_SETUP 27850f2e948Smrg 27950f2e948Smrg 280b40a6198Smrg# _LT_PREPARE_SED_QUOTE_VARS 281b40a6198Smrg# -------------------------- 282b40a6198Smrg# Define a few sed substitution that help us do robust quoting. 283b40a6198Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284b40a6198Smrg[# Backslashify metacharacters that are still active within 285b40a6198Smrg# double-quoted strings. 286b40a6198Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287b40a6198Smrg 288b40a6198Smrg# Same as above, but do not quote variable references. 289b40a6198Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290b40a6198Smrg 291b40a6198Smrg# Sed substitution to delay expansion of an escaped shell variable in a 292b40a6198Smrg# double_quote_subst'ed string. 293b40a6198Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294b40a6198Smrg 295b40a6198Smrg# Sed substitution to delay expansion of an escaped single quote. 296b40a6198Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297b40a6198Smrg 298b40a6198Smrg# Sed substitution to avoid accidental globbing in evaled expressions 299b40a6198Smrgno_glob_subst='s/\*/\\\*/g' 300b40a6198Smrg]) 301b40a6198Smrg 3025592a31fSmrg# _LT_PROG_LTMAIN 3035592a31fSmrg# --------------- 304f2408745Smrg# Note that this code is called both from 'configure', and 'config.status' 3055592a31fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306f2408745Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3075592a31fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 3085592a31fSmrgm4_defun([_LT_PROG_LTMAIN], 3095592a31fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3105592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311f2408745Smrgltmain=$ac_aux_dir/ltmain.sh 3125592a31fSmrg])# _LT_PROG_LTMAIN 31350f2e948Smrg 31450f2e948Smrg 3155592a31fSmrg 3165592a31fSmrg# So that we can recreate a full libtool script including additional 3175592a31fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318f2408745Smrg# in macros and then make a single call at the end using the 'libtool' 3195592a31fSmrg# label. 3205592a31fSmrg 3215592a31fSmrg 3225592a31fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3235592a31fSmrg# ---------------------------------------- 3245592a31fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3255592a31fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3265592a31fSmrg[m4_ifval([$1], 3275592a31fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3285592a31fSmrg [$1 3295592a31fSmrg])])]) 3305592a31fSmrg 3315592a31fSmrg# Initialize. 3325592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3335592a31fSmrg 3345592a31fSmrg 3355592a31fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3365592a31fSmrg# ------------------------------ 3375592a31fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3385592a31fSmrgm4_define([_LT_CONFIG_LIBTOOL], 3395592a31fSmrg[m4_ifval([$1], 3405592a31fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3415592a31fSmrg [$1 3425592a31fSmrg])])]) 3435592a31fSmrg 3445592a31fSmrg# Initialize. 3455592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3465592a31fSmrg 3475592a31fSmrg 3485592a31fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3495592a31fSmrg# ----------------------------------------------------- 3505592a31fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3515592a31fSmrg[_LT_CONFIG_LIBTOOL([$1]) 3525592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3535592a31fSmrg]) 3545592a31fSmrg 3555592a31fSmrg 3565592a31fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3575592a31fSmrg# ----------------------------- 3585592a31fSmrg# Add leading comment marks to the start of each line, and a trailing 3595592a31fSmrg# full-stop to the whole comment if one is not present already. 3605592a31fSmrgm4_define([_LT_FORMAT_COMMENT], 3615592a31fSmrg[m4_ifval([$1], [ 3625592a31fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3635592a31fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3645592a31fSmrg)]) 3655592a31fSmrg 3665592a31fSmrg 3675592a31fSmrg 3685592a31fSmrg 3695592a31fSmrg 3705592a31fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3715592a31fSmrg# ------------------------------------------------------------------- 3725592a31fSmrg# CONFIGNAME is the name given to the value in the libtool script. 3735592a31fSmrg# VARNAME is the (base) name used in the configure script. 3745592a31fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3755592a31fSmrg# VARNAME. Any other value will be used directly. 3765592a31fSmrgm4_define([_LT_DECL], 3775592a31fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3785592a31fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3795592a31fSmrg [m4_ifval([$1], [$1], [$2])]) 3805592a31fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3815592a31fSmrg m4_ifval([$4], 3825592a31fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3835592a31fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3845592a31fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3855592a31fSmrg]) 3865592a31fSmrg 3875592a31fSmrg 3885592a31fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3895592a31fSmrg# -------------------------------------------------------- 3905592a31fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3915592a31fSmrg 3925592a31fSmrg 3935592a31fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3945592a31fSmrg# ------------------------------------------------ 3955592a31fSmrgm4_define([lt_decl_tag_varnames], 3965592a31fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3975592a31fSmrg 3985592a31fSmrg 3995592a31fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4005592a31fSmrg# --------------------------------------------------------- 4015592a31fSmrgm4_define([_lt_decl_filter], 4025592a31fSmrg[m4_case([$#], 4035592a31fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 4045592a31fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4055592a31fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4065592a31fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4075592a31fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4085592a31fSmrg]) 4095592a31fSmrg 4105592a31fSmrg 4115592a31fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4125592a31fSmrg# -------------------------------------------------- 4135592a31fSmrgm4_define([lt_decl_quote_varnames], 4145592a31fSmrg[_lt_decl_filter([value], [1], $@)]) 4155592a31fSmrg 4165592a31fSmrg 4175592a31fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4185592a31fSmrg# --------------------------------------------------- 4195592a31fSmrgm4_define([lt_decl_dquote_varnames], 4205592a31fSmrg[_lt_decl_filter([value], [2], $@)]) 4215592a31fSmrg 4225592a31fSmrg 4235592a31fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4245592a31fSmrg# --------------------------------------------------- 4255592a31fSmrgm4_define([lt_decl_varnames_tagged], 4265592a31fSmrg[m4_assert([$# <= 2])dnl 4275592a31fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4285592a31fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4295592a31fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4305592a31fSmrgm4_define([_lt_decl_varnames_tagged], 4315592a31fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4325592a31fSmrg 4335592a31fSmrg 4345592a31fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4355592a31fSmrg# ------------------------------------------------ 4365592a31fSmrgm4_define([lt_decl_all_varnames], 4375592a31fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4385592a31fSmrg m4_if([$2], [], 4395592a31fSmrg m4_quote(lt_decl_varnames), 4405592a31fSmrg m4_quote(m4_shift($@))))[]dnl 4415592a31fSmrg]) 4425592a31fSmrgm4_define([_lt_decl_all_varnames], 4435592a31fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4445592a31fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4455592a31fSmrg]) 4465592a31fSmrg 4475592a31fSmrg 4485592a31fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4495592a31fSmrg# ------------------------------------ 450f2408745Smrg# Quote a variable value, and forward it to 'config.status' so that its 451f2408745Smrg# declaration there will have the same value as in 'configure'. VARNAME 4525592a31fSmrg# must have a single quote delimited value for this to work. 4535592a31fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454b40a6198Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4555592a31fSmrg 4565592a31fSmrg 4575592a31fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4585592a31fSmrg# ------------------------------ 4595592a31fSmrg# We delimit libtool config variables with single quotes, so when 4605592a31fSmrg# we write them to config.status, we have to be sure to quote all 4615592a31fSmrg# embedded single quotes properly. In configure, this macro expands 4625592a31fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4635592a31fSmrg# 464b40a6198Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4655592a31fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4665592a31fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4675592a31fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4685592a31fSmrg 4695592a31fSmrg 4705592a31fSmrg# _LT_LIBTOOL_TAGS 4715592a31fSmrg# ---------------- 4725592a31fSmrg# Output comment and list of tags supported by the script 4735592a31fSmrgm4_defun([_LT_LIBTOOL_TAGS], 4745592a31fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475f2408745Smrgavailable_tags='_LT_TAGS'dnl 4765592a31fSmrg]) 4775592a31fSmrg 4785592a31fSmrg 4795592a31fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4805592a31fSmrg# ----------------------------------- 4815592a31fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4825592a31fSmrg# expand to a commented shell variable setting: 4835592a31fSmrg# 4845592a31fSmrg# # Some comment about what VAR is for. 4855592a31fSmrg# visible_name=$lt_internal_name 4865592a31fSmrgm4_define([_LT_LIBTOOL_DECLARE], 4875592a31fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4885592a31fSmrg [description])))[]dnl 4895592a31fSmrgm4_pushdef([_libtool_name], 4905592a31fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4915592a31fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4925592a31fSmrg [0], [_libtool_name=[$]$1], 4935592a31fSmrg [1], [_libtool_name=$lt_[]$1], 4945592a31fSmrg [2], [_libtool_name=$lt_[]$1], 4955592a31fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4965592a31fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4975592a31fSmrg]) 4985592a31fSmrg 4995592a31fSmrg 5005592a31fSmrg# _LT_LIBTOOL_CONFIG_VARS 5015592a31fSmrg# ----------------------- 5025592a31fSmrg# Produce commented declarations of non-tagged libtool config variables 503f2408745Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5045592a31fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5055592a31fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5065592a31fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5075592a31fSmrg[m4_foreach([_lt_var], 5085592a31fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5095592a31fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5105592a31fSmrg 5115592a31fSmrg 5125592a31fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 5135592a31fSmrg# ------------------------- 5145592a31fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 5155592a31fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5165592a31fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51750f2e948Smrg 51850f2e948Smrg 5195592a31fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5205592a31fSmrg# ------------------------------ 5215592a31fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5225592a31fSmrg 5235592a31fSmrg 5245592a31fSmrg# _LT_CONFIG_COMMANDS 52550f2e948Smrg# ------------------- 5265592a31fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5275592a31fSmrg# variables for single and double quote escaping we saved from calls 5285592a31fSmrg# to _LT_DECL, we can put quote escaped variables declarations 529f2408745Smrg# into 'config.status', and then the shell code to quote escape them in 530f2408745Smrg# for loops in 'config.status'. Finally, any additional code accumulated 5315592a31fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5325592a31fSmrgm4_defun([_LT_CONFIG_COMMANDS], 5335592a31fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5345592a31fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5355592a31fSmrg dnl instead of duplicating it all over again into config.status, 5365592a31fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5375592a31fSmrg dnl needs to know what name is stored there: 5385592a31fSmrg [AC_CONFIG_COMMANDS([libtool], 5395592a31fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5405592a31fSmrg dnl If the libtool generation code is destined for config.status, 5415592a31fSmrg dnl expand the accumulated commands and init code now: 5425592a31fSmrg [AC_CONFIG_COMMANDS([libtool], 5435592a31fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5445592a31fSmrg])#_LT_CONFIG_COMMANDS 5455592a31fSmrg 5465592a31fSmrg 5475592a31fSmrg# Initialize. 5485592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5495592a31fSmrg[ 5505592a31fSmrg 5515592a31fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5525592a31fSmrg# if CDPATH is set. 5535592a31fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5545592a31fSmrg 5555592a31fSmrgsed_quote_subst='$sed_quote_subst' 5565592a31fSmrgdouble_quote_subst='$double_quote_subst' 5575592a31fSmrgdelay_variable_subst='$delay_variable_subst' 5585592a31fSmrg_LT_CONFIG_STATUS_DECLARATIONS 5595592a31fSmrgLTCC='$LTCC' 5605592a31fSmrgLTCFLAGS='$LTCFLAGS' 5615592a31fSmrgcompiler='$compiler_DEFAULT' 5625592a31fSmrg 563b40a6198Smrg# A function that is used when there is no print builtin or printf. 564b40a6198Smrgfunc_fallback_echo () 565b40a6198Smrg{ 566b40a6198Smrg eval 'cat <<_LTECHO_EOF 567b40a6198Smrg\$[]1 568b40a6198Smrg_LTECHO_EOF' 569b40a6198Smrg} 570b40a6198Smrg 5715592a31fSmrg# Quote evaled strings. 5725592a31fSmrgfor var in lt_decl_all_varnames([[ \ 5735592a31fSmrg]], lt_decl_quote_varnames); do 574b40a6198Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5755592a31fSmrg *[[\\\\\\\`\\"\\\$]]*) 576f2408745Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5775592a31fSmrg ;; 5785592a31fSmrg *) 5795592a31fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5805592a31fSmrg ;; 5815592a31fSmrg esac 5825592a31fSmrgdone 5835592a31fSmrg 5845592a31fSmrg# Double-quote double-evaled strings. 5855592a31fSmrgfor var in lt_decl_all_varnames([[ \ 5865592a31fSmrg]], lt_decl_dquote_varnames); do 587b40a6198Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5885592a31fSmrg *[[\\\\\\\`\\"\\\$]]*) 589f2408745Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5905592a31fSmrg ;; 5915592a31fSmrg *) 5925592a31fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5935592a31fSmrg ;; 5945592a31fSmrg esac 5955592a31fSmrgdone 5965592a31fSmrg 5975592a31fSmrg_LT_OUTPUT_LIBTOOL_INIT 5985592a31fSmrg]) 5995592a31fSmrg 600b40a6198Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601b40a6198Smrg# ------------------------------------ 602b40a6198Smrg# Generate a child script FILE with all initialization necessary to 603b40a6198Smrg# reuse the environment learned by the parent script, and make the 604b40a6198Smrg# file executable. If COMMENT is supplied, it is inserted after the 605f2408745Smrg# '#!' sequence but before initialization text begins. After this 606b40a6198Smrg# macro, additional text can be appended to FILE to form the body of 607b40a6198Smrg# the child script. The macro ends with non-zero status if the 608b40a6198Smrg# file could not be fully written (such as if the disk is full). 609b40a6198Smrgm4_ifdef([AS_INIT_GENERATED], 610b40a6198Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611b40a6198Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 612b40a6198Smrg[m4_require([AS_PREPARE])]dnl 613b40a6198Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614b40a6198Smrg[lt_write_fail=0 615b40a6198Smrgcat >$1 <<_ASEOF || lt_write_fail=1 616b40a6198Smrg#! $SHELL 617b40a6198Smrg# Generated by $as_me. 618b40a6198Smrg$2 619b40a6198SmrgSHELL=\${CONFIG_SHELL-$SHELL} 620b40a6198Smrgexport SHELL 621b40a6198Smrg_ASEOF 622b40a6198Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623b40a6198SmrgAS_SHELL_SANITIZE 624b40a6198Smrg_AS_PREPARE 625b40a6198Smrgexec AS_MESSAGE_FD>&1 626b40a6198Smrg_ASEOF 627f2408745Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628b40a6198Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6295592a31fSmrg 6305592a31fSmrg# LT_OUTPUT 6315592a31fSmrg# --------- 6325592a31fSmrg# This macro allows early generation of the libtool script (before 6335592a31fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 6345592a31fSmrg# tests. 6355592a31fSmrgAC_DEFUN([LT_OUTPUT], 6365592a31fSmrg[: ${CONFIG_LT=./config.lt} 6375592a31fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638b40a6198Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639b40a6198Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6405592a31fSmrg 6415592a31fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 642b40a6198Smrglt_cl_silent=false 6435592a31fSmrgexec AS_MESSAGE_LOG_FD>>config.log 6445592a31fSmrg{ 6455592a31fSmrg echo 6465592a31fSmrg AS_BOX([Running $as_me.]) 6475592a31fSmrg} >&AS_MESSAGE_LOG_FD 6485592a31fSmrg 6495592a31fSmrglt_cl_help="\ 650f2408745Smrg'$as_me' creates a local libtool stub from the current configuration, 6515592a31fSmrgfor use in further configure time tests before the real libtool is 6525592a31fSmrggenerated. 6535592a31fSmrg 6545592a31fSmrgUsage: $[0] [[OPTIONS]] 6555592a31fSmrg 6565592a31fSmrg -h, --help print this help, then exit 6575592a31fSmrg -V, --version print version number, then exit 6585592a31fSmrg -q, --quiet do not print progress messages 6595592a31fSmrg -d, --debug don't remove temporary files 6605592a31fSmrg 6615592a31fSmrgReport bugs to <bug-libtool@gnu.org>." 6625592a31fSmrg 6635592a31fSmrglt_cl_version="\ 6645592a31fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6655592a31fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6665592a31fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6675592a31fSmrg 668b40a6198SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6695592a31fSmrgThis config.lt script is free software; the Free Software Foundation 6705592a31fSmrggives unlimited permision to copy, distribute and modify it." 6715592a31fSmrg 672f2408745Smrgwhile test 0 != $[#] 6735592a31fSmrgdo 6745592a31fSmrg case $[1] in 6755592a31fSmrg --version | --v* | -V ) 6765592a31fSmrg echo "$lt_cl_version"; exit 0 ;; 6775592a31fSmrg --help | --h* | -h ) 6785592a31fSmrg echo "$lt_cl_help"; exit 0 ;; 6795592a31fSmrg --debug | --d* | -d ) 6805592a31fSmrg debug=: ;; 6815592a31fSmrg --quiet | --q* | --silent | --s* | -q ) 6825592a31fSmrg lt_cl_silent=: ;; 6835592a31fSmrg 6845592a31fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685f2408745SmrgTry '$[0] --help' for more information.]) ;; 6865592a31fSmrg 6875592a31fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688f2408745SmrgTry '$[0] --help' for more information.]) ;; 6895592a31fSmrg esac 6905592a31fSmrg shift 6915592a31fSmrgdone 6925592a31fSmrg 6935592a31fSmrgif $lt_cl_silent; then 6945592a31fSmrg exec AS_MESSAGE_FD>/dev/null 6955592a31fSmrgfi 6965592a31fSmrg_LTEOF 6975592a31fSmrg 6985592a31fSmrgcat >>"$CONFIG_LT" <<_LTEOF 6995592a31fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7005592a31fSmrg_LTEOF 7015592a31fSmrg 7025592a31fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 7035592a31fSmrgAC_MSG_NOTICE([creating $ofile]) 7045592a31fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 7055592a31fSmrgAS_EXIT(0) 7065592a31fSmrg_LTEOF 7075592a31fSmrgchmod +x "$CONFIG_LT" 7085592a31fSmrg 7095592a31fSmrg# configure is writing to config.log, but config.lt does its own redirection, 7105592a31fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 7115592a31fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7125592a31fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713b40a6198Smrglt_cl_success=: 714f2408745Smrgtest yes = "$silent" && 715b40a6198Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 716b40a6198Smrgexec AS_MESSAGE_LOG_FD>/dev/null 717b40a6198Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718b40a6198Smrgexec AS_MESSAGE_LOG_FD>>config.log 719b40a6198Smrg$lt_cl_success || AS_EXIT(1) 7205592a31fSmrg])# LT_OUTPUT 7215592a31fSmrg 7225592a31fSmrg 7235592a31fSmrg# _LT_CONFIG(TAG) 7245592a31fSmrg# --------------- 7255592a31fSmrg# If TAG is the built-in tag, create an initial libtool script with a 7265592a31fSmrg# default configuration from the untagged config vars. Otherwise add code 7275592a31fSmrg# to config.status for appending the configuration named by TAG from the 7285592a31fSmrg# matching tagged config vars. 7295592a31fSmrgm4_defun([_LT_CONFIG], 7305592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7315592a31fSmrg_LT_CONFIG_SAVE_COMMANDS([ 7325592a31fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7335592a31fSmrg m4_if(_LT_TAG, [C], [ 734f2408745Smrg # See if we are running on zsh, and set the options that allow our 7355592a31fSmrg # commands through without removal of \ escapes. 736f2408745Smrg if test -n "${ZSH_VERSION+set}"; then 7375592a31fSmrg setopt NO_GLOB_SUBST 7385592a31fSmrg fi 7395592a31fSmrg 740f2408745Smrg cfgfile=${ofile}T 7415592a31fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7425592a31fSmrg $RM "$cfgfile" 7435592a31fSmrg 7445592a31fSmrg cat <<_LT_EOF >> "$cfgfile" 7455592a31fSmrg#! $SHELL 746f2408745Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7475592a31fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7485592a31fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749f2408745Smrg 750f2408745Smrg# Provide generalized library-building support services. 751f2408745Smrg# Written by Gordon Matzigkeit, 1996 752f2408745Smrg 7535592a31fSmrg_LT_COPYING 7545592a31fSmrg_LT_LIBTOOL_TAGS 7555592a31fSmrg 756f2408745Smrg# Configured defaults for sys_lib_dlsearch_path munging. 757f2408745Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758f2408745Smrg 7595592a31fSmrg# ### BEGIN LIBTOOL CONFIG 7605592a31fSmrg_LT_LIBTOOL_CONFIG_VARS 7615592a31fSmrg_LT_LIBTOOL_TAG_VARS 7625592a31fSmrg# ### END LIBTOOL CONFIG 7635592a31fSmrg 764f2408745Smrg_LT_EOF 765f2408745Smrg 766f2408745Smrg cat <<'_LT_EOF' >> "$cfgfile" 767f2408745Smrg 768f2408745Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769f2408745Smrg 770f2408745Smrg_LT_PREPARE_MUNGE_PATH_LIST 771f2408745Smrg_LT_PREPARE_CC_BASENAME 772f2408745Smrg 773f2408745Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774f2408745Smrg 7755592a31fSmrg_LT_EOF 7765592a31fSmrg 7775592a31fSmrg case $host_os in 7785592a31fSmrg aix3*) 7795592a31fSmrg cat <<\_LT_EOF >> "$cfgfile" 7805592a31fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7815592a31fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7825592a31fSmrg# vanish in a puff of smoke. 783f2408745Smrgif test set != "${COLLECT_NAMES+set}"; then 7845592a31fSmrg COLLECT_NAMES= 7855592a31fSmrg export COLLECT_NAMES 7865592a31fSmrgfi 7875592a31fSmrg_LT_EOF 7885592a31fSmrg ;; 7895592a31fSmrg esac 7905592a31fSmrg 7915592a31fSmrg _LT_PROG_LTMAIN 7925592a31fSmrg 7935592a31fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7945592a31fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7955592a31fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7965592a31fSmrg # is reportedly fixed, but why not run on old versions too? 797b40a6198Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 798b40a6198Smrg || (rm -f "$cfgfile"; exit 1) 7995592a31fSmrg 800b40a6198Smrg mv -f "$cfgfile" "$ofile" || 8015592a31fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8025592a31fSmrg chmod +x "$ofile" 8035592a31fSmrg], 8045592a31fSmrg[cat <<_LT_EOF >> "$ofile" 8055592a31fSmrg 8065592a31fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8075592a31fSmrgdnl in a comment (ie after a #). 8085592a31fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8095592a31fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8105592a31fSmrg# ### END LIBTOOL TAG CONFIG: $1 8115592a31fSmrg_LT_EOF 8125592a31fSmrg])dnl /m4_if 8135592a31fSmrg], 8145592a31fSmrg[m4_if([$1], [], [ 8155592a31fSmrg PACKAGE='$PACKAGE' 8165592a31fSmrg VERSION='$VERSION' 8175592a31fSmrg RM='$RM' 8185592a31fSmrg ofile='$ofile'], []) 8195592a31fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8205592a31fSmrg])# _LT_CONFIG 8215592a31fSmrg 8225592a31fSmrg 8235592a31fSmrg# LT_SUPPORTED_TAG(TAG) 8245592a31fSmrg# --------------------- 8255592a31fSmrg# Trace this macro to discover what tags are supported by the libtool 8265592a31fSmrg# --tag option, using: 8275592a31fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8285592a31fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8295592a31fSmrg 8305592a31fSmrg 8315592a31fSmrg# C support is built-in for now 8325592a31fSmrgm4_define([_LT_LANG_C_enabled], []) 8335592a31fSmrgm4_define([_LT_TAGS], []) 8345592a31fSmrg 8355592a31fSmrg 8365592a31fSmrg# LT_LANG(LANG) 8375592a31fSmrg# ------------- 8385592a31fSmrg# Enable libtool support for the given language if not already enabled. 8395592a31fSmrgAC_DEFUN([LT_LANG], 8405592a31fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8415592a31fSmrgm4_case([$1], 8425592a31fSmrg [C], [_LT_LANG(C)], 8435592a31fSmrg [C++], [_LT_LANG(CXX)], 844b40a6198Smrg [Go], [_LT_LANG(GO)], 8455592a31fSmrg [Java], [_LT_LANG(GCJ)], 8465592a31fSmrg [Fortran 77], [_LT_LANG(F77)], 8475592a31fSmrg [Fortran], [_LT_LANG(FC)], 8485592a31fSmrg [Windows Resource], [_LT_LANG(RC)], 8495592a31fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8505592a31fSmrg [_LT_LANG($1)], 8515592a31fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8525592a31fSmrg])# LT_LANG 8535592a31fSmrg 8545592a31fSmrg 8555592a31fSmrg# _LT_LANG(LANGNAME) 8565592a31fSmrg# ------------------ 8575592a31fSmrgm4_defun([_LT_LANG], 8585592a31fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8595592a31fSmrg [LT_SUPPORTED_TAG([$1])dnl 8605592a31fSmrg m4_append([_LT_TAGS], [$1 ])dnl 8615592a31fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8625592a31fSmrg _LT_LANG_$1_CONFIG($1)])dnl 8635592a31fSmrg])# _LT_LANG 8645592a31fSmrg 8655592a31fSmrg 866b40a6198Smrgm4_ifndef([AC_PROG_GO], [ 867b40a6198Smrg# NOTE: This macro has been submitted for inclusion into # 868b40a6198Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869b40a6198Smrg# a released version of Autoconf we should remove this # 870b40a6198Smrg# macro and use it instead. # 871b40a6198Smrgm4_defun([AC_PROG_GO], 872b40a6198Smrg[AC_LANG_PUSH(Go)dnl 873b40a6198SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874b40a6198SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875b40a6198Smrg_AC_ARG_VAR_LDFLAGS()dnl 876b40a6198SmrgAC_CHECK_TOOL(GOC, gccgo) 877b40a6198Smrgif test -z "$GOC"; then 878b40a6198Smrg if test -n "$ac_tool_prefix"; then 879b40a6198Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880b40a6198Smrg fi 881b40a6198Smrgfi 882b40a6198Smrgif test -z "$GOC"; then 883b40a6198Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884b40a6198Smrgfi 885b40a6198Smrg])#m4_defun 886b40a6198Smrg])#m4_ifndef 887b40a6198Smrg 888b40a6198Smrg 8895592a31fSmrg# _LT_LANG_DEFAULT_CONFIG 8905592a31fSmrg# ----------------------- 8915592a31fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8925592a31fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8935592a31fSmrg [LT_LANG(CXX)], 8945592a31fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8955592a31fSmrg 8965592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8975592a31fSmrg [LT_LANG(F77)], 8985592a31fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8995592a31fSmrg 9005592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9015592a31fSmrg [LT_LANG(FC)], 9025592a31fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 9035592a31fSmrg 9045592a31fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9055592a31fSmrgdnl pulling things in needlessly. 9065592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9075592a31fSmrg [LT_LANG(GCJ)], 9085592a31fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9095592a31fSmrg [LT_LANG(GCJ)], 9105592a31fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9115592a31fSmrg [LT_LANG(GCJ)], 9125592a31fSmrg [m4_ifdef([AC_PROG_GCJ], 9135592a31fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9145592a31fSmrg m4_ifdef([A][M_PROG_GCJ], 9155592a31fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9165592a31fSmrg m4_ifdef([LT_PROG_GCJ], 9175592a31fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9185592a31fSmrg 919b40a6198SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920b40a6198Smrg [LT_LANG(GO)], 921b40a6198Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922b40a6198Smrg 9235592a31fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9245592a31fSmrg [LT_LANG(RC)], 9255592a31fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9265592a31fSmrg])# _LT_LANG_DEFAULT_CONFIG 9275592a31fSmrg 9285592a31fSmrg# Obsolete macros: 9295592a31fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9305592a31fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9315592a31fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9325592a31fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933b40a6198SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9345592a31fSmrgdnl aclocal-1.4 backwards compatibility: 9355592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9365592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9375592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9385592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939b40a6198Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9405592a31fSmrg 9415592a31fSmrg 9425592a31fSmrg# _LT_TAG_COMPILER 9435592a31fSmrg# ---------------- 9445592a31fSmrgm4_defun([_LT_TAG_COMPILER], 94550f2e948Smrg[AC_REQUIRE([AC_PROG_CC])dnl 94645bc899bSmrg 9475592a31fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9485592a31fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9495592a31fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9505592a31fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9515592a31fSmrg 95250f2e948Smrg# If no C compiler was specified, use CC. 95350f2e948SmrgLTCC=${LTCC-"$CC"} 954226fade8Smrg 95550f2e948Smrg# If no C compiler flags were specified, use CFLAGS. 95650f2e948SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957226fade8Smrg 95850f2e948Smrg# Allow CC to be a program name with arguments. 95950f2e948Smrgcompiler=$CC 9605592a31fSmrg])# _LT_TAG_COMPILER 961226fade8Smrg 96245bc899bSmrg 96350f2e948Smrg# _LT_COMPILER_BOILERPLATE 96450f2e948Smrg# ------------------------ 96550f2e948Smrg# Check for compiler boilerplate output or warnings with 96650f2e948Smrg# the simple compiler test code. 9675592a31fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 9685592a31fSmrg[m4_require([_LT_DECL_SED])dnl 96950f2e948Smrgac_outfile=conftest.$ac_objext 97050f2e948Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 97150f2e948Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97250f2e948Smrg_lt_compiler_boilerplate=`cat conftest.err` 9735592a31fSmrg$RM conftest* 97450f2e948Smrg])# _LT_COMPILER_BOILERPLATE 97545bc899bSmrg 97645bc899bSmrg 97750f2e948Smrg# _LT_LINKER_BOILERPLATE 97850f2e948Smrg# ---------------------- 97950f2e948Smrg# Check for linker boilerplate output or warnings with 98050f2e948Smrg# the simple link test code. 9815592a31fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 9825592a31fSmrg[m4_require([_LT_DECL_SED])dnl 98350f2e948Smrgac_outfile=conftest.$ac_objext 98450f2e948Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 98550f2e948Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 98650f2e948Smrg_lt_linker_boilerplate=`cat conftest.err` 9875592a31fSmrg$RM -r conftest* 98850f2e948Smrg])# _LT_LINKER_BOILERPLATE 98945bc899bSmrg 99050f2e948Smrg# _LT_REQUIRED_DARWIN_CHECKS 9915592a31fSmrg# ------------------------- 9925592a31fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 99350f2e948Smrg case $host_os in 99450f2e948Smrg rhapsody* | darwin*) 99550f2e948Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 99650f2e948Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9975592a31fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9985592a31fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9995592a31fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10005592a31fSmrg _LT_DECL([], [DSYMUTIL], [1], 10015592a31fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10025592a31fSmrg _LT_DECL([], [NMEDIT], [1], 10035592a31fSmrg [Tool to change global to local symbols on Mac OS X]) 10045592a31fSmrg _LT_DECL([], [LIPO], [1], 10055592a31fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 10065592a31fSmrg _LT_DECL([], [OTOOL], [1], 10075592a31fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10085592a31fSmrg _LT_DECL([], [OTOOL64], [1], 10095592a31fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 101050f2e948Smrg 101150f2e948Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 101250f2e948Smrg [lt_cv_apple_cc_single_mod=no 1013f2408745Smrg if test -z "$LT_MULTI_MODULE"; then 10145592a31fSmrg # By default we will add the -single_module flag. You can override 10155592a31fSmrg # by either setting the environment variable LT_MULTI_MODULE 10165592a31fSmrg # non-empty at configure time, or by adding -multi_module to the 10175592a31fSmrg # link flags. 10185592a31fSmrg rm -rf libconftest.dylib* 10195592a31fSmrg echo "int foo(void){return 1;}" > conftest.c 10205592a31fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10215592a31fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10225592a31fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10235592a31fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10245592a31fSmrg _lt_result=$? 1025b40a6198Smrg # If there is a non-empty error log, and "single_module" 1026b40a6198Smrg # appears in it, assume the flag caused a linker warning 1027b40a6198Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1028b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029b40a6198Smrg # Otherwise, if the output was created with a 0 exit code from 1030b40a6198Smrg # the compiler, it worked. 1031f2408745Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10325592a31fSmrg lt_cv_apple_cc_single_mod=yes 10335592a31fSmrg else 10345592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10355592a31fSmrg fi 10365592a31fSmrg rm -rf libconftest.dylib* 10375592a31fSmrg rm -f conftest.* 103850f2e948Smrg fi]) 1039b40a6198Smrg 104050f2e948Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 104150f2e948Smrg [lt_cv_ld_exported_symbols_list], 104250f2e948Smrg [lt_cv_ld_exported_symbols_list=no 104350f2e948Smrg save_LDFLAGS=$LDFLAGS 104450f2e948Smrg echo "_main" > conftest.sym 104550f2e948Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 104650f2e948Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10475592a31fSmrg [lt_cv_ld_exported_symbols_list=yes], 10485592a31fSmrg [lt_cv_ld_exported_symbols_list=no]) 1049f2408745Smrg LDFLAGS=$save_LDFLAGS 1050226fade8Smrg ]) 1051b40a6198Smrg 1052b40a6198Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053b40a6198Smrg [lt_cv_ld_force_load=no 1054b40a6198Smrg cat > conftest.c << _LT_EOF 1055b40a6198Smrgint forced_loaded() { return 2;} 1056b40a6198Smrg_LT_EOF 1057b40a6198Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058b40a6198Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059b40a6198Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060b40a6198Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061b40a6198Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062b40a6198Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063b40a6198Smrg cat > conftest.c << _LT_EOF 1064b40a6198Smrgint main() { return 0;} 1065b40a6198Smrg_LT_EOF 1066b40a6198Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067b40a6198Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068b40a6198Smrg _lt_result=$? 1069b40a6198Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1070b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071f2408745Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072b40a6198Smrg lt_cv_ld_force_load=yes 1073b40a6198Smrg else 1074b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075b40a6198Smrg fi 1076b40a6198Smrg rm -f conftest.err libconftest.a conftest conftest.c 1077b40a6198Smrg rm -rf conftest.dSYM 1078b40a6198Smrg ]) 107950f2e948Smrg case $host_os in 10805592a31fSmrg rhapsody* | darwin1.[[012]]) 1081f2408745Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 108250f2e948Smrg darwin1.*) 1083f2408745Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10845592a31fSmrg darwin*) # darwin 5.x on 108550f2e948Smrg # if running on 10.5 or later, the deployment target defaults 108650f2e948Smrg # to the OS version, if on x86, and 10.4, the deployment 108750f2e948Smrg # target defaults to 10.4. Don't you love it? 108850f2e948Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10895592a31fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090f2408745Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091f2408745Smrg 10.[[012]][[,.]]*) 1092f2408745Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10935592a31fSmrg 10.*) 1094f2408745Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109550f2e948Smrg esac 109650f2e948Smrg ;; 109750f2e948Smrg esac 1098f2408745Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 109950f2e948Smrg _lt_dar_single_mod='$single_module' 110050f2e948Smrg fi 1101f2408745Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102f2408745Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 110350f2e948Smrg else 1104f2408745Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 110550f2e948Smrg fi 1106f2408745Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11075592a31fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 110850f2e948Smrg else 110950f2e948Smrg _lt_dsymutil= 1110226fade8Smrg fi 1111226fade8Smrg ;; 1112226fade8Smrg esac 111350f2e948Smrg]) 11141ac89addSmrg 11155592a31fSmrg 1116b40a6198Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117b40a6198Smrg# --------------------------------- 11185592a31fSmrg# Checks for linker and compiler features on darwin 11195592a31fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11205592a31fSmrg[ 11215592a31fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11225592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11235592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 11245592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11255592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126f2408745Smrg if test yes = "$lt_cv_ld_force_load"; then 1127f2408745Smrg _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\"`' 1128b40a6198Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129b40a6198Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130b40a6198Smrg else 1131b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132b40a6198Smrg fi 11335592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11355592a31fSmrg case $cc_basename in 1136f2408745Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11375592a31fSmrg *) _lt_dar_can_shared=$GCC ;; 11385592a31fSmrg esac 1139f2408745Smrg if test yes = "$_lt_dar_can_shared"; then 1140b40a6198Smrg output_verbose_link_cmd=func_echo_all 1141f2408745Smrg _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" 1142f2408745Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143f2408745Smrg _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" 1144f2408745Smrg _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" 11455592a31fSmrg m4_if([$1], [CXX], 1146f2408745Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147f2408745Smrg _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" 1148f2408745Smrg _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" 11495592a31fSmrg fi 11505592a31fSmrg],[]) 11515592a31fSmrg else 11525592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 11535592a31fSmrg fi 11545592a31fSmrg]) 11555592a31fSmrg 1156b40a6198Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157b40a6198Smrg# ---------------------------------- 115850f2e948Smrg# Links a minimal program and checks the executable 115950f2e948Smrg# for the system default hardcoded library path. In most cases, 116050f2e948Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 116150f2e948Smrg# the location of the communication and MPI libs are included too. 116250f2e948Smrg# If we don't find anything, use the default library path according 116350f2e948Smrg# to the aix ld manual. 1164b40a6198Smrg# Store the results from the different compilers for each TAGNAME. 1165b40a6198Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11665592a31fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11675592a31fSmrg[m4_require([_LT_DECL_SED])dnl 1168f2408745Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1169b40a6198Smrg aix_libpath=$lt_cv_aix_libpath 1170b40a6198Smrgelse 1171b40a6198Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172b40a6198Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173b40a6198Smrg lt_aix_libpath_sed='[ 1174b40a6198Smrg /Import File Strings/,/^$/ { 1175b40a6198Smrg /^0/ { 1176b40a6198Smrg s/^0 *\([^ ]*\) *$/\1/ 1177b40a6198Smrg p 1178b40a6198Smrg } 1179b40a6198Smrg }]' 1180b40a6198Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181b40a6198Smrg # Check for a 64-bit object if we didn't find anything. 1182b40a6198Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183b40a6198Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184b40a6198Smrg fi],[]) 1185b40a6198Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186f2408745Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187b40a6198Smrg fi 1188b40a6198Smrg ]) 1189b40a6198Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190b40a6198Smrgfi 11915592a31fSmrg])# _LT_SYS_MODULE_PATH_AIX 119245bc899bSmrg 119345bc899bSmrg 11945592a31fSmrg# _LT_SHELL_INIT(ARG) 11955592a31fSmrg# ------------------- 11965592a31fSmrgm4_define([_LT_SHELL_INIT], 1197b40a6198Smrg[m4_divert_text([M4SH-INIT], [$1 1198b40a6198Smrg])])# _LT_SHELL_INIT 1199b40a6198Smrg 120045bc899bSmrg 1201226fade8Smrg 12025592a31fSmrg# _LT_PROG_ECHO_BACKSLASH 12035592a31fSmrg# ----------------------- 1204b40a6198Smrg# Find how we can fake an echo command that does not interpret backslash. 1205b40a6198Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206f2408745Smrg# of the generated configure script that will find a shell with a builtin 1207f2408745Smrg# printf (that we can use as an echo command). 12085592a31fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209b40a6198Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210b40a6198SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211b40a6198SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212b40a6198Smrg 1213b40a6198SmrgAC_MSG_CHECKING([how to print strings]) 1214b40a6198Smrg# Test print first, because it will be a builtin if present. 1215b40a6198Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216b40a6198Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217b40a6198Smrg ECHO='print -r --' 1218b40a6198Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219b40a6198Smrg ECHO='printf %s\n' 12201ac89addSmrgelse 1221b40a6198Smrg # Use this function as a fallback that always works. 1222b40a6198Smrg func_fallback_echo () 1223b40a6198Smrg { 1224b40a6198Smrg eval 'cat <<_LTECHO_EOF 1225b40a6198Smrg$[]1 1226b40a6198Smrg_LTECHO_EOF' 1227b40a6198Smrg } 1228b40a6198Smrg ECHO='func_fallback_echo' 1229226fade8Smrgfi 12301ac89addSmrg 1231b40a6198Smrg# func_echo_all arg... 1232b40a6198Smrg# Invoke $ECHO with all args, space-separated. 1233b40a6198Smrgfunc_echo_all () 1234b40a6198Smrg{ 1235f2408745Smrg $ECHO "$*" 1236b40a6198Smrg} 12373a925b30Smrg 1238f2408745Smrgcase $ECHO in 1239b40a6198Smrg printf*) AC_MSG_RESULT([printf]) ;; 1240b40a6198Smrg print*) AC_MSG_RESULT([print -r]) ;; 1241b40a6198Smrg *) AC_MSG_RESULT([cat]) ;; 1242b40a6198Smrgesac 12431ac89addSmrg 1244b40a6198Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245b40a6198Smrg[_AS_DETECT_SUGGESTED([ 1246b40a6198Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247b40a6198Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248b40a6198Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249b40a6198Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250b40a6198Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1251b40a6198Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252b40a6198Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 125345bc899bSmrg 12545592a31fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255b40a6198Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12565592a31fSmrg])# _LT_PROG_ECHO_BACKSLASH 125745bc899bSmrg 12581ac89addSmrg 1259b40a6198Smrg# _LT_WITH_SYSROOT 1260b40a6198Smrg# ---------------- 1261b40a6198SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262b40a6198Smrg[AC_MSG_CHECKING([for sysroot]) 1263b40a6198SmrgAC_ARG_WITH([sysroot], 1264f2408745Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265f2408745Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266f2408745Smrg if not specified).])], 1267b40a6198Smrg[], [with_sysroot=no]) 1268b40a6198Smrg 1269b40a6198Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270b40a6198Smrgdnl in case the user passed a directory name. 1271b40a6198Smrglt_sysroot= 1272f2408745Smrgcase $with_sysroot in #( 1273b40a6198Smrg yes) 1274f2408745Smrg if test yes = "$GCC"; then 1275b40a6198Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276b40a6198Smrg fi 1277b40a6198Smrg ;; #( 1278b40a6198Smrg /*) 1279b40a6198Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280b40a6198Smrg ;; #( 1281b40a6198Smrg no|'') 1282b40a6198Smrg ;; #( 1283b40a6198Smrg *) 1284f2408745Smrg AC_MSG_RESULT([$with_sysroot]) 1285b40a6198Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286b40a6198Smrg ;; 1287b40a6198Smrgesac 1288b40a6198Smrg 1289b40a6198Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290b40a6198Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291f2408745Smrg[dependent libraries, and where our libraries should be installed.])]) 1292b40a6198Smrg 12935592a31fSmrg# _LT_ENABLE_LOCK 12945592a31fSmrg# --------------- 12955592a31fSmrgm4_defun([_LT_ENABLE_LOCK], 129650f2e948Smrg[AC_ARG_ENABLE([libtool-lock], 12975592a31fSmrg [AS_HELP_STRING([--disable-libtool-lock], 12985592a31fSmrg [avoid locking (might break parallel builds)])]) 1299f2408745Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 130050f2e948Smrg 130150f2e948Smrg# Some flags need to be propagated to the compiler or linker for good 130250f2e948Smrg# libtool support. 130350f2e948Smrgcase $host in 130450f2e948Smrgia64-*-hpux*) 1305f2408745Smrg # Find out what ABI is being produced by ac_compile, and set mode 1306f2408745Smrg # options accordingly. 130750f2e948Smrg echo 'int i;' > conftest.$ac_ext 130850f2e948Smrg if AC_TRY_EVAL(ac_compile); then 130950f2e948Smrg case `/usr/bin/file conftest.$ac_objext` in 13105592a31fSmrg *ELF-32*) 1311f2408745Smrg HPUX_IA64_MODE=32 13125592a31fSmrg ;; 13135592a31fSmrg *ELF-64*) 1314f2408745Smrg HPUX_IA64_MODE=64 13155592a31fSmrg ;; 1316226fade8Smrg esac 131750f2e948Smrg fi 131850f2e948Smrg rm -rf conftest* 131950f2e948Smrg ;; 132050f2e948Smrg*-*-irix6*) 1321f2408745Smrg # Find out what ABI is being produced by ac_compile, and set linker 1322f2408745Smrg # options accordingly. 1323b40a6198Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 132450f2e948Smrg if AC_TRY_EVAL(ac_compile); then 1325f2408745Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 13265592a31fSmrg case `/usr/bin/file conftest.$ac_objext` in 13275592a31fSmrg *32-bit*) 13285592a31fSmrg LD="${LD-ld} -melf32bsmip" 13295592a31fSmrg ;; 13305592a31fSmrg *N32*) 13315592a31fSmrg LD="${LD-ld} -melf32bmipn32" 13325592a31fSmrg ;; 13335592a31fSmrg *64-bit*) 13345592a31fSmrg LD="${LD-ld} -melf64bmip" 13355592a31fSmrg ;; 13365592a31fSmrg esac 13375592a31fSmrg else 13385592a31fSmrg case `/usr/bin/file conftest.$ac_objext` in 13395592a31fSmrg *32-bit*) 13405592a31fSmrg LD="${LD-ld} -32" 13415592a31fSmrg ;; 13425592a31fSmrg *N32*) 13435592a31fSmrg LD="${LD-ld} -n32" 13445592a31fSmrg ;; 13455592a31fSmrg *64-bit*) 13465592a31fSmrg LD="${LD-ld} -64" 13475592a31fSmrg ;; 13485592a31fSmrg esac 13495592a31fSmrg fi 1350226fade8Smrg fi 135150f2e948Smrg rm -rf conftest* 1352226fade8Smrg ;; 135345bc899bSmrg 1354f2408745Smrgmips64*-*linux*) 1355f2408745Smrg # Find out what ABI is being produced by ac_compile, and set linker 1356f2408745Smrg # options accordingly. 1357f2408745Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358f2408745Smrg if AC_TRY_EVAL(ac_compile); then 1359f2408745Smrg emul=elf 1360f2408745Smrg case `/usr/bin/file conftest.$ac_objext` in 1361f2408745Smrg *32-bit*) 1362f2408745Smrg emul="${emul}32" 1363f2408745Smrg ;; 1364f2408745Smrg *64-bit*) 1365f2408745Smrg emul="${emul}64" 1366f2408745Smrg ;; 1367f2408745Smrg esac 1368f2408745Smrg case `/usr/bin/file conftest.$ac_objext` in 1369f2408745Smrg *MSB*) 1370f2408745Smrg emul="${emul}btsmip" 1371f2408745Smrg ;; 1372f2408745Smrg *LSB*) 1373f2408745Smrg emul="${emul}ltsmip" 1374f2408745Smrg ;; 1375f2408745Smrg esac 1376f2408745Smrg case `/usr/bin/file conftest.$ac_objext` in 1377f2408745Smrg *N32*) 1378f2408745Smrg emul="${emul}n32" 1379f2408745Smrg ;; 1380f2408745Smrg esac 1381f2408745Smrg LD="${LD-ld} -m $emul" 1382f2408745Smrg fi 1383f2408745Smrg rm -rf conftest* 1384f2408745Smrg ;; 1385f2408745Smrg 138657ba8e8bSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13875592a31fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388f2408745Smrg # Find out what ABI is being produced by ac_compile, and set linker 1389f2408745Smrg # options accordingly. Note that the listed cases only cover the 1390f2408745Smrg # situations where additional linker options are needed (such as when 1391f2408745Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392f2408745Smrg # vice versa); the common cases where no linker options are needed do 1393f2408745Smrg # not appear in the list. 139450f2e948Smrg echo 'int i;' > conftest.$ac_ext 139550f2e948Smrg if AC_TRY_EVAL(ac_compile); then 139650f2e948Smrg case `/usr/bin/file conftest.o` in 13975592a31fSmrg *32-bit*) 13985592a31fSmrg case $host in 13995592a31fSmrg x86_64-*kfreebsd*-gnu) 14005592a31fSmrg LD="${LD-ld} -m elf_i386_fbsd" 14015592a31fSmrg ;; 14025592a31fSmrg x86_64-*linux*) 1403f2408745Smrg case `/usr/bin/file conftest.o` in 1404f2408745Smrg *x86-64*) 1405f2408745Smrg LD="${LD-ld} -m elf32_x86_64" 1406f2408745Smrg ;; 1407f2408745Smrg *) 1408f2408745Smrg LD="${LD-ld} -m elf_i386" 1409f2408745Smrg ;; 1410f2408745Smrg esac 141157ba8e8bSmrg ;; 141257ba8e8bSmrg powerpc64le-*linux*) 141357ba8e8bSmrg LD="${LD-ld} -m elf32lppclinux" 14145592a31fSmrg ;; 141557ba8e8bSmrg powerpc64-*linux*) 14165592a31fSmrg LD="${LD-ld} -m elf32ppclinux" 14175592a31fSmrg ;; 14185592a31fSmrg s390x-*linux*) 14195592a31fSmrg LD="${LD-ld} -m elf_s390" 14205592a31fSmrg ;; 14215592a31fSmrg sparc64-*linux*) 14225592a31fSmrg LD="${LD-ld} -m elf32_sparc" 14235592a31fSmrg ;; 14245592a31fSmrg esac 14255592a31fSmrg ;; 14265592a31fSmrg *64-bit*) 14275592a31fSmrg case $host in 14285592a31fSmrg x86_64-*kfreebsd*-gnu) 14295592a31fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 14305592a31fSmrg ;; 14315592a31fSmrg x86_64-*linux*) 14325592a31fSmrg LD="${LD-ld} -m elf_x86_64" 14335592a31fSmrg ;; 143457ba8e8bSmrg powerpcle-*linux*) 143557ba8e8bSmrg LD="${LD-ld} -m elf64lppc" 143657ba8e8bSmrg ;; 143757ba8e8bSmrg powerpc-*linux*) 14385592a31fSmrg LD="${LD-ld} -m elf64ppc" 14395592a31fSmrg ;; 14405592a31fSmrg s390*-*linux*|s390*-*tpf*) 14415592a31fSmrg LD="${LD-ld} -m elf64_s390" 14425592a31fSmrg ;; 14435592a31fSmrg sparc*-*linux*) 14445592a31fSmrg LD="${LD-ld} -m elf64_sparc" 14455592a31fSmrg ;; 14465592a31fSmrg esac 14475592a31fSmrg ;; 144850f2e948Smrg esac 144950f2e948Smrg fi 145050f2e948Smrg rm -rf conftest* 1451226fade8Smrg ;; 145245bc899bSmrg 145350f2e948Smrg*-*-sco3.2v5*) 145450f2e948Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455f2408745Smrg SAVE_CFLAGS=$CFLAGS 145650f2e948Smrg CFLAGS="$CFLAGS -belf" 145750f2e948Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 145850f2e948Smrg [AC_LANG_PUSH(C) 14595592a31fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 146050f2e948Smrg AC_LANG_POP]) 1461f2408745Smrg if test yes != "$lt_cv_cc_needs_belf"; then 146250f2e948Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463f2408745Smrg CFLAGS=$SAVE_CFLAGS 146450f2e948Smrg fi 1465226fade8Smrg ;; 1466b40a6198Smrg*-*solaris*) 1467f2408745Smrg # Find out what ABI is being produced by ac_compile, and set linker 1468f2408745Smrg # options accordingly. 146950f2e948Smrg echo 'int i;' > conftest.$ac_ext 147050f2e948Smrg if AC_TRY_EVAL(ac_compile); then 147150f2e948Smrg case `/usr/bin/file conftest.o` in 147250f2e948Smrg *64-bit*) 147350f2e948Smrg case $lt_cv_prog_gnu_ld in 1474b40a6198Smrg yes*) 1475b40a6198Smrg case $host in 1476f2408745Smrg i?86-*-solaris*|x86_64-*-solaris*) 1477b40a6198Smrg LD="${LD-ld} -m elf_x86_64" 1478b40a6198Smrg ;; 1479b40a6198Smrg sparc*-*-solaris*) 1480b40a6198Smrg LD="${LD-ld} -m elf64_sparc" 1481b40a6198Smrg ;; 1482b40a6198Smrg esac 1483b40a6198Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484b40a6198Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485f2408745Smrg LD=${LD-ld}_sol2 1486b40a6198Smrg fi 1487b40a6198Smrg ;; 148850f2e948Smrg *) 14895592a31fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 149050f2e948Smrg LD="${LD-ld} -64" 149150f2e948Smrg fi 149250f2e948Smrg ;; 149350f2e948Smrg esac 149450f2e948Smrg ;; 149550f2e948Smrg esac 149650f2e948Smrg fi 149750f2e948Smrg rm -rf conftest* 1498226fade8Smrg ;; 149950f2e948Smrgesac 150045bc899bSmrg 1501f2408745Smrgneed_locks=$enable_libtool_lock 15025592a31fSmrg])# _LT_ENABLE_LOCK 15035592a31fSmrg 15045592a31fSmrg 1505b40a6198Smrg# _LT_PROG_AR 1506b40a6198Smrg# ----------- 1507b40a6198Smrgm4_defun([_LT_PROG_AR], 1508b40a6198Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1509b40a6198Smrg: ${AR=ar} 1510b40a6198Smrg: ${AR_FLAGS=cru} 1511b40a6198Smrg_LT_DECL([], [AR], [1], [The archiver]) 1512b40a6198Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513b40a6198Smrg 1514b40a6198SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515b40a6198Smrg [lt_cv_ar_at_file=no 1516b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517b40a6198Smrg [echo conftest.$ac_objext > conftest.lst 1518b40a6198Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519b40a6198Smrg AC_TRY_EVAL([lt_ar_try]) 1520f2408745Smrg if test 0 -eq "$ac_status"; then 1521b40a6198Smrg # Ensure the archiver fails upon bogus file names. 1522b40a6198Smrg rm -f conftest.$ac_objext libconftest.a 1523b40a6198Smrg AC_TRY_EVAL([lt_ar_try]) 1524f2408745Smrg if test 0 -ne "$ac_status"; then 1525b40a6198Smrg lt_cv_ar_at_file=@ 1526b40a6198Smrg fi 1527b40a6198Smrg fi 1528b40a6198Smrg rm -f conftest.* libconftest.a 1529b40a6198Smrg ]) 1530b40a6198Smrg ]) 1531b40a6198Smrg 1532f2408745Smrgif test no = "$lt_cv_ar_at_file"; then 1533b40a6198Smrg archiver_list_spec= 1534b40a6198Smrgelse 1535b40a6198Smrg archiver_list_spec=$lt_cv_ar_at_file 1536b40a6198Smrgfi 1537b40a6198Smrg_LT_DECL([], [archiver_list_spec], [1], 1538b40a6198Smrg [How to feed a file listing to the archiver]) 1539b40a6198Smrg])# _LT_PROG_AR 1540b40a6198Smrg 1541b40a6198Smrg 15425592a31fSmrg# _LT_CMD_OLD_ARCHIVE 15435592a31fSmrg# ------------------- 15445592a31fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545b40a6198Smrg[_LT_PROG_AR 15465592a31fSmrg 15475592a31fSmrgAC_CHECK_TOOL(STRIP, strip, :) 15485592a31fSmrgtest -z "$STRIP" && STRIP=: 15495592a31fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 155050f2e948Smrg 15515592a31fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15525592a31fSmrgtest -z "$RANLIB" && RANLIB=: 15535592a31fSmrg_LT_DECL([], [RANLIB], [1], 15545592a31fSmrg [Commands used to install an old-style archive]) 15555592a31fSmrg 15565592a31fSmrg# Determine commands to create old-style static archives. 15575592a31fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15585592a31fSmrgold_postinstall_cmds='chmod 644 $oldlib' 15595592a31fSmrgold_postuninstall_cmds= 15605592a31fSmrg 15615592a31fSmrgif test -n "$RANLIB"; then 15625592a31fSmrg case $host_os in 1563f2408745Smrg bitrig* | openbsd*) 1564b40a6198Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15655592a31fSmrg ;; 15665592a31fSmrg *) 1567b40a6198Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15685592a31fSmrg ;; 15695592a31fSmrg esac 1570b40a6198Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15715592a31fSmrgfi 1572b40a6198Smrg 1573b40a6198Smrgcase $host_os in 1574b40a6198Smrg darwin*) 1575b40a6198Smrg lock_old_archive_extraction=yes ;; 1576b40a6198Smrg *) 1577b40a6198Smrg lock_old_archive_extraction=no ;; 1578b40a6198Smrgesac 15795592a31fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15805592a31fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15815592a31fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15825592a31fSmrg [Commands used to build an old-style archive]) 1583b40a6198Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584b40a6198Smrg [Whether to use a lock for old archive extraction]) 15855592a31fSmrg])# _LT_CMD_OLD_ARCHIVE 158645bc899bSmrg 158745bc899bSmrg 15885592a31fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158950f2e948Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 159050f2e948Smrg# ---------------------------------------------------------------- 159150f2e948Smrg# Check whether the given compiler option works 15925592a31fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15935592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15945592a31fSmrgm4_require([_LT_DECL_SED])dnl 159550f2e948SmrgAC_CACHE_CHECK([$1], [$2], 159650f2e948Smrg [$2=no 15975592a31fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 159850f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599f2408745Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 160050f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 160150f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 160250f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 160350f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 160450f2e948Smrg # The option is referenced via a variable to avoid confusing sed. 160550f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 160650f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 160750f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 160850f2e948Smrg -e 's:$: $lt_compiler_flag:'` 1609b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 161050f2e948Smrg (eval "$lt_compile" 2>conftest.err) 161150f2e948Smrg ac_status=$? 161250f2e948Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613b40a6198Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161450f2e948Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 161550f2e948Smrg # The compiler can only warn and ignore the option if not recognized 161650f2e948Smrg # So say no if there are warnings other than the usual output. 1617b40a6198Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161850f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161950f2e948Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 162050f2e948Smrg $2=yes 162150f2e948Smrg fi 162250f2e948Smrg fi 16235592a31fSmrg $RM conftest* 162450f2e948Smrg]) 162545bc899bSmrg 1626f2408745Smrgif test yes = "[$]$2"; then 16275592a31fSmrg m4_if([$5], , :, [$5]) 162850f2e948Smrgelse 16295592a31fSmrg m4_if([$6], , :, [$6]) 163050f2e948Smrgfi 16315592a31fSmrg])# _LT_COMPILER_OPTION 163245bc899bSmrg 16335592a31fSmrg# Old name: 16345592a31fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16355592a31fSmrgdnl aclocal-1.4 backwards compatibility: 16365592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 163750f2e948Smrg 16385592a31fSmrg 16395592a31fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16405592a31fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16415592a31fSmrg# ---------------------------------------------------- 16425592a31fSmrg# Check whether the given linker option works 16435592a31fSmrgAC_DEFUN([_LT_LINKER_OPTION], 16445592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16455592a31fSmrgm4_require([_LT_DECL_SED])dnl 164650f2e948SmrgAC_CACHE_CHECK([$1], [$2], 164750f2e948Smrg [$2=no 1648f2408745Smrg save_LDFLAGS=$LDFLAGS 164950f2e948Smrg LDFLAGS="$LDFLAGS $3" 165050f2e948Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 165150f2e948Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 165250f2e948Smrg # The linker can only warn and ignore the option if not recognized 165350f2e948Smrg # So say no if there are warnings 165450f2e948Smrg if test -s conftest.err; then 165550f2e948Smrg # Append any errors to the config.log. 165650f2e948Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657b40a6198Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165850f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165950f2e948Smrg if diff conftest.exp conftest.er2 >/dev/null; then 166050f2e948Smrg $2=yes 166150f2e948Smrg fi 166250f2e948Smrg else 166350f2e948Smrg $2=yes 166450f2e948Smrg fi 166550f2e948Smrg fi 16665592a31fSmrg $RM -r conftest* 1667f2408745Smrg LDFLAGS=$save_LDFLAGS 166850f2e948Smrg]) 166950f2e948Smrg 1670f2408745Smrgif test yes = "[$]$2"; then 16715592a31fSmrg m4_if([$4], , :, [$4]) 167250f2e948Smrgelse 16735592a31fSmrg m4_if([$5], , :, [$5]) 167450f2e948Smrgfi 16755592a31fSmrg])# _LT_LINKER_OPTION 167650f2e948Smrg 16775592a31fSmrg# Old name: 16785592a31fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16795592a31fSmrgdnl aclocal-1.4 backwards compatibility: 16805592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168150f2e948Smrg 16825592a31fSmrg 16835592a31fSmrg# LT_CMD_MAX_LEN 16845592a31fSmrg#--------------- 16855592a31fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16865592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16875592a31fSmrg# find the maximum length of command line arguments 168850f2e948SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168950f2e948SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 169050f2e948Smrg i=0 1691f2408745Smrg teststring=ABCD 169250f2e948Smrg 169350f2e948Smrg case $build_os in 169450f2e948Smrg msdosdjgpp*) 169550f2e948Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169650f2e948Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169750f2e948Smrg # during glob expansion). Even if it were fixed, the result of this 169850f2e948Smrg # check would be larger than it should be. 169950f2e948Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17001ac89addSmrg ;; 170150f2e948Smrg 170250f2e948Smrg gnu*) 170350f2e948Smrg # Under GNU Hurd, this test is not required because there is 170450f2e948Smrg # no limit to the length of command line arguments. 170550f2e948Smrg # Libtool will interpret -1 as no limit whatsoever 170650f2e948Smrg lt_cv_sys_max_cmd_len=-1; 17071ac89addSmrg ;; 170850f2e948Smrg 17095592a31fSmrg cygwin* | mingw* | cegcc*) 171050f2e948Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 171150f2e948Smrg # about 5 minutes as the teststring grows exponentially. 171250f2e948Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 171350f2e948Smrg # you end up with a "frozen" computer, even though with patience 171450f2e948Smrg # the test eventually succeeds (with a max line length of 256k). 171550f2e948Smrg # Instead, let's just punt: use the minimum linelength reported by 171650f2e948Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 171750f2e948Smrg lt_cv_sys_max_cmd_len=8192; 17181ac89addSmrg ;; 171950f2e948Smrg 1720b40a6198Smrg mint*) 1721b40a6198Smrg # On MiNT this can take a long time and run out of memory. 1722b40a6198Smrg lt_cv_sys_max_cmd_len=8192; 1723b40a6198Smrg ;; 1724b40a6198Smrg 172550f2e948Smrg amigaos*) 172650f2e948Smrg # On AmigaOS with pdksh, this test takes hours, literally. 172750f2e948Smrg # So we just punt and use a minimum line length of 8192. 172850f2e948Smrg lt_cv_sys_max_cmd_len=8192; 17291ac89addSmrg ;; 173045bc899bSmrg 1731f2408745Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 173250f2e948Smrg # This has been around since 386BSD, at least. Likely further. 173350f2e948Smrg if test -x /sbin/sysctl; then 173450f2e948Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173550f2e948Smrg elif test -x /usr/sbin/sysctl; then 173650f2e948Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 173750f2e948Smrg else 173850f2e948Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 173950f2e948Smrg fi 174050f2e948Smrg # And add a safety zone 174150f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 174250f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 174350f2e948Smrg ;; 174445bc899bSmrg 174550f2e948Smrg interix*) 174650f2e948Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174750f2e948Smrg lt_cv_sys_max_cmd_len=196608 174850f2e948Smrg ;; 174950f2e948Smrg 1750b40a6198Smrg os2*) 1751b40a6198Smrg # The test takes a long time on OS/2. 1752b40a6198Smrg lt_cv_sys_max_cmd_len=8192 1753b40a6198Smrg ;; 1754b40a6198Smrg 175550f2e948Smrg osf*) 175650f2e948Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175750f2e948Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175850f2e948Smrg # nice to cause kernel panics so lets avoid the loop below. 175950f2e948Smrg # First set a reasonable default. 176050f2e948Smrg lt_cv_sys_max_cmd_len=16384 176150f2e948Smrg # 176250f2e948Smrg if test -x /sbin/sysconfig; then 176350f2e948Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176450f2e948Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176550f2e948Smrg esac 176645bc899bSmrg fi 1767226fade8Smrg ;; 176850f2e948Smrg sco3.2v5*) 176950f2e948Smrg lt_cv_sys_max_cmd_len=102400 17701ac89addSmrg ;; 177150f2e948Smrg sysv5* | sco5v6* | sysv4.2uw2*) 177250f2e948Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177350f2e948Smrg if test -n "$kargmax"; then 17745592a31fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 177550f2e948Smrg else 177650f2e948Smrg lt_cv_sys_max_cmd_len=32768 177750f2e948Smrg fi 17781ac89addSmrg ;; 17791ac89addSmrg *) 178050f2e948Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781f2408745Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782f2408745Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 178350f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 178450f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 178550f2e948Smrg else 17865592a31fSmrg # Make teststring a little bigger before we do anything with it. 17875592a31fSmrg # a 1K string should be a reasonable start. 1788f2408745Smrg for i in 1 2 3 4 5 6 7 8; do 17895592a31fSmrg teststring=$teststring$teststring 17905592a31fSmrg done 179150f2e948Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17925592a31fSmrg # If test is not a shell built-in, we'll probably end up computing a 17935592a31fSmrg # maximum length that is only half of the actual maximum length, but 17945592a31fSmrg # we can't tell. 1795f2408745Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796b40a6198Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797f2408745Smrg test 17 != "$i" # 1/2 MB should be enough 179850f2e948Smrg do 179950f2e948Smrg i=`expr $i + 1` 180050f2e948Smrg teststring=$teststring$teststring 180150f2e948Smrg done 18025592a31fSmrg # Only check the string length outside the loop. 18035592a31fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 180450f2e948Smrg teststring= 18055592a31fSmrg # Add a significant safety factor because C++ compilers can tack on 18065592a31fSmrg # massive amounts of additional arguments before passing them to the 18075592a31fSmrg # linker. It appears as though 1/2 is a usable value. 180850f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 180950f2e948Smrg fi 18101ac89addSmrg ;; 18111ac89addSmrg esac 181250f2e948Smrg]) 1813f2408745Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 181450f2e948Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181550f2e948Smrgelse 181650f2e948Smrg AC_MSG_RESULT(none) 181750f2e948Smrgfi 18185592a31fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18195592a31fSmrg_LT_DECL([], [max_cmd_len], [0], 18205592a31fSmrg [What is the maximum length of a command?]) 18215592a31fSmrg])# LT_CMD_MAX_LEN 182245bc899bSmrg 18235592a31fSmrg# Old name: 18245592a31fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18255592a31fSmrgdnl aclocal-1.4 backwards compatibility: 18265592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 182745bc899bSmrg 18285592a31fSmrg 18295592a31fSmrg# _LT_HEADER_DLFCN 18305592a31fSmrg# ---------------- 18315592a31fSmrgm4_defun([_LT_HEADER_DLFCN], 18325592a31fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18335592a31fSmrg])# _LT_HEADER_DLFCN 183445bc899bSmrg 1835226fade8Smrg 18365592a31fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18375592a31fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18385592a31fSmrg# ---------------------------------------------------------------- 18395592a31fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 18405592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1841f2408745Smrgif test yes = "$cross_compiling"; then : 184250f2e948Smrg [$4] 184350f2e948Smrgelse 184450f2e948Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184550f2e948Smrg lt_status=$lt_dlunknown 18465592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 1847b40a6198Smrg[#line $LINENO "configure" 184850f2e948Smrg#include "confdefs.h" 184945bc899bSmrg 185050f2e948Smrg#if HAVE_DLFCN_H 185150f2e948Smrg#include <dlfcn.h> 185250f2e948Smrg#endif 185345bc899bSmrg 185450f2e948Smrg#include <stdio.h> 185545bc899bSmrg 185650f2e948Smrg#ifdef RTLD_GLOBAL 185750f2e948Smrg# define LT_DLGLOBAL RTLD_GLOBAL 185850f2e948Smrg#else 185950f2e948Smrg# ifdef DL_GLOBAL 186050f2e948Smrg# define LT_DLGLOBAL DL_GLOBAL 186150f2e948Smrg# else 186250f2e948Smrg# define LT_DLGLOBAL 0 186350f2e948Smrg# endif 186450f2e948Smrg#endif 186545bc899bSmrg 186650f2e948Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186750f2e948Smrg find out it does not work in some platform. */ 186850f2e948Smrg#ifndef LT_DLLAZY_OR_NOW 186950f2e948Smrg# ifdef RTLD_LAZY 187050f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 187150f2e948Smrg# else 187250f2e948Smrg# ifdef DL_LAZY 187350f2e948Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 187450f2e948Smrg# else 187550f2e948Smrg# ifdef RTLD_NOW 187650f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187750f2e948Smrg# else 187850f2e948Smrg# ifdef DL_NOW 187950f2e948Smrg# define LT_DLLAZY_OR_NOW DL_NOW 188050f2e948Smrg# else 188150f2e948Smrg# define LT_DLLAZY_OR_NOW 0 188250f2e948Smrg# endif 188350f2e948Smrg# endif 188450f2e948Smrg# endif 188550f2e948Smrg# endif 188650f2e948Smrg#endif 188745bc899bSmrg 1888f2408745Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889b40a6198Smrg correspondingly for the symbols needed. */ 1890f2408745Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891b40a6198Smrgint fnord () __attribute__((visibility("default"))); 1892b40a6198Smrg#endif 1893b40a6198Smrg 1894b40a6198Smrgint fnord () { return 42; } 189550f2e948Smrgint main () 189650f2e948Smrg{ 189750f2e948Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189850f2e948Smrg int status = $lt_dlunknown; 189950f2e948Smrg 190050f2e948Smrg if (self) 190150f2e948Smrg { 190250f2e948Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903b40a6198Smrg else 1904b40a6198Smrg { 1905b40a6198Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906b40a6198Smrg else puts (dlerror ()); 1907b40a6198Smrg } 190850f2e948Smrg /* dlclose (self); */ 190950f2e948Smrg } 191045bc899bSmrg else 191150f2e948Smrg puts (dlerror ()); 191245bc899bSmrg 19135592a31fSmrg return status; 191450f2e948Smrg}] 19155592a31fSmrg_LT_EOF 1916f2408745Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191750f2e948Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191850f2e948Smrg lt_status=$? 191950f2e948Smrg case x$lt_status in 192050f2e948Smrg x$lt_dlno_uscore) $1 ;; 192150f2e948Smrg x$lt_dlneed_uscore) $2 ;; 192250f2e948Smrg x$lt_dlunknown|x*) $3 ;; 19231ac89addSmrg esac 192450f2e948Smrg else : 192550f2e948Smrg # compilation failed 192650f2e948Smrg $3 192745bc899bSmrg fi 192845bc899bSmrgfi 192950f2e948Smrgrm -fr conftest* 19305592a31fSmrg])# _LT_TRY_DLOPEN_SELF 193145bc899bSmrg 1932226fade8Smrg 19335592a31fSmrg# LT_SYS_DLOPEN_SELF 19345592a31fSmrg# ------------------ 19355592a31fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19365592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1937f2408745Smrgif test yes != "$enable_dlopen"; then 193850f2e948Smrg enable_dlopen=unknown 193950f2e948Smrg enable_dlopen_self=unknown 194050f2e948Smrg enable_dlopen_self_static=unknown 194150f2e948Smrgelse 194250f2e948Smrg lt_cv_dlopen=no 194350f2e948Smrg lt_cv_dlopen_libs= 1944226fade8Smrg 194550f2e948Smrg case $host_os in 194650f2e948Smrg beos*) 1947f2408745Smrg lt_cv_dlopen=load_add_on 194850f2e948Smrg lt_cv_dlopen_libs= 194950f2e948Smrg lt_cv_dlopen_self=yes 195050f2e948Smrg ;; 1951226fade8Smrg 19525592a31fSmrg mingw* | pw32* | cegcc*) 1953f2408745Smrg lt_cv_dlopen=LoadLibrary 195450f2e948Smrg lt_cv_dlopen_libs= 19555592a31fSmrg ;; 1956226fade8Smrg 195750f2e948Smrg cygwin*) 1958f2408745Smrg lt_cv_dlopen=dlopen 195950f2e948Smrg lt_cv_dlopen_libs= 19605592a31fSmrg ;; 1961226fade8Smrg 196250f2e948Smrg darwin*) 1963f2408745Smrg # if libdl is installed we need to link against it 196450f2e948Smrg AC_CHECK_LIB([dl], [dlopen], 1965f2408745Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966f2408745Smrg lt_cv_dlopen=dyld 196750f2e948Smrg lt_cv_dlopen_libs= 196850f2e948Smrg lt_cv_dlopen_self=yes 196950f2e948Smrg ]) 19705592a31fSmrg ;; 1971226fade8Smrg 1972f2408745Smrg tpf*) 1973f2408745Smrg # Don't try to run any link tests for TPF. We know it's impossible 1974f2408745Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975f2408745Smrg lt_cv_dlopen=dlopen 1976f2408745Smrg lt_cv_dlopen_libs= 1977f2408745Smrg lt_cv_dlopen_self=no 1978f2408745Smrg ;; 1979f2408745Smrg 198050f2e948Smrg *) 198150f2e948Smrg AC_CHECK_FUNC([shl_load], 1982f2408745Smrg [lt_cv_dlopen=shl_load], 198350f2e948Smrg [AC_CHECK_LIB([dld], [shl_load], 1984f2408745Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198550f2e948Smrg [AC_CHECK_FUNC([dlopen], 1986f2408745Smrg [lt_cv_dlopen=dlopen], 198750f2e948Smrg [AC_CHECK_LIB([dl], [dlopen], 1988f2408745Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198950f2e948Smrg [AC_CHECK_LIB([svld], [dlopen], 1990f2408745Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 199150f2e948Smrg [AC_CHECK_LIB([dld], [dld_link], 1992f2408745Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199350f2e948Smrg ]) 199450f2e948Smrg ]) 199550f2e948Smrg ]) 199650f2e948Smrg ]) 199750f2e948Smrg ]) 199850f2e948Smrg ;; 199950f2e948Smrg esac 2000226fade8Smrg 2001f2408745Smrg if test no = "$lt_cv_dlopen"; then 200250f2e948Smrg enable_dlopen=no 2003f2408745Smrg else 2004f2408745Smrg enable_dlopen=yes 200550f2e948Smrg fi 2006226fade8Smrg 200750f2e948Smrg case $lt_cv_dlopen in 200850f2e948Smrg dlopen) 2009f2408745Smrg save_CPPFLAGS=$CPPFLAGS 2010f2408745Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011226fade8Smrg 2012f2408745Smrg save_LDFLAGS=$LDFLAGS 201350f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014226fade8Smrg 2015f2408745Smrg save_LIBS=$LIBS 201650f2e948Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017226fade8Smrg 201850f2e948Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 201950f2e948Smrg lt_cv_dlopen_self, [dnl 20205592a31fSmrg _LT_TRY_DLOPEN_SELF( 202150f2e948Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 202250f2e948Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202350f2e948Smrg ]) 2024226fade8Smrg 2025f2408745Smrg if test yes = "$lt_cv_dlopen_self"; then 202650f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202750f2e948Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20285592a31fSmrg lt_cv_dlopen_self_static, [dnl 20295592a31fSmrg _LT_TRY_DLOPEN_SELF( 203050f2e948Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 203150f2e948Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 203250f2e948Smrg ]) 2033226fade8Smrg fi 2034226fade8Smrg 2035f2408745Smrg CPPFLAGS=$save_CPPFLAGS 2036f2408745Smrg LDFLAGS=$save_LDFLAGS 2037f2408745Smrg LIBS=$save_LIBS 203850f2e948Smrg ;; 203950f2e948Smrg esac 2040226fade8Smrg 204150f2e948Smrg case $lt_cv_dlopen_self in 204250f2e948Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204350f2e948Smrg *) enable_dlopen_self=unknown ;; 204450f2e948Smrg esac 2045226fade8Smrg 204650f2e948Smrg case $lt_cv_dlopen_self_static in 204750f2e948Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204850f2e948Smrg *) enable_dlopen_self_static=unknown ;; 204950f2e948Smrg esac 205050f2e948Smrgfi 20515592a31fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20525592a31fSmrg [Whether dlopen is supported]) 20535592a31fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20545592a31fSmrg [Whether dlopen of programs is supported]) 20555592a31fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20565592a31fSmrg [Whether dlopen of statically linked programs is supported]) 20575592a31fSmrg])# LT_SYS_DLOPEN_SELF 2058226fade8Smrg 20595592a31fSmrg# Old name: 20605592a31fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20615592a31fSmrgdnl aclocal-1.4 backwards compatibility: 20625592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063226fade8Smrg 20645592a31fSmrg 20655592a31fSmrg# _LT_COMPILER_C_O([TAGNAME]) 20665592a31fSmrg# --------------------------- 20675592a31fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 20685592a31fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20695592a31fSmrgm4_defun([_LT_COMPILER_C_O], 20705592a31fSmrg[m4_require([_LT_DECL_SED])dnl 20715592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20725592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 207350f2e948SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20745592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20755592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20765592a31fSmrg $RM -r conftest 2>/dev/null 207750f2e948Smrg mkdir conftest 207850f2e948Smrg cd conftest 207950f2e948Smrg mkdir out 208050f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081226fade8Smrg 208250f2e948Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208350f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 208450f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 208550f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 208650f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208750f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 208850f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208950f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 209050f2e948Smrg -e 's:$: $lt_compiler_flag:'` 2091b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 209250f2e948Smrg (eval "$lt_compile" 2>out/conftest.err) 209350f2e948Smrg ac_status=$? 209450f2e948Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095b40a6198Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209650f2e948Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209750f2e948Smrg then 209850f2e948Smrg # The compiler can only warn and ignore the option if not recognized 209950f2e948Smrg # So say no if there are warnings 2100b40a6198Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 210150f2e948Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 210250f2e948Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21035592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210450f2e948Smrg fi 210550f2e948Smrg fi 210650f2e948Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21075592a31fSmrg $RM conftest* 210850f2e948Smrg # SGI C++ compiler will create directory out/ii_files/ for 210950f2e948Smrg # template instantiation 21105592a31fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21115592a31fSmrg $RM out/* && rmdir out 211250f2e948Smrg cd .. 21135592a31fSmrg $RM -r conftest 21145592a31fSmrg $RM conftest* 211550f2e948Smrg]) 21165592a31fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21175592a31fSmrg [Does compiler simultaneously support -c and -o options?]) 21185592a31fSmrg])# _LT_COMPILER_C_O 2119226fade8Smrg 2120226fade8Smrg 21215592a31fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21225592a31fSmrg# ---------------------------------- 212350f2e948Smrg# Check to see if we can do hard links to lock some files if needed 21245592a31fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21255592a31fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 21265592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21275592a31fSmrg_LT_COMPILER_C_O([$1]) 2128226fade8Smrg 2129f2408745Smrghard_links=nottested 2130f2408745Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 213150f2e948Smrg # do not overwrite the value of need_locks provided by the user 213250f2e948Smrg AC_MSG_CHECKING([if we can lock with hard links]) 213350f2e948Smrg hard_links=yes 21345592a31fSmrg $RM conftest* 213550f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213650f2e948Smrg touch conftest.a 213750f2e948Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 213850f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213950f2e948Smrg AC_MSG_RESULT([$hard_links]) 2140f2408745Smrg if test no = "$hard_links"; then 2141f2408745Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 214250f2e948Smrg need_locks=warn 214350f2e948Smrg fi 214450f2e948Smrgelse 214550f2e948Smrg need_locks=no 214650f2e948Smrgfi 21475592a31fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21485592a31fSmrg])# _LT_COMPILER_FILE_LOCKS 2149226fade8Smrg 2150226fade8Smrg 21515592a31fSmrg# _LT_CHECK_OBJDIR 21525592a31fSmrg# ---------------- 21535592a31fSmrgm4_defun([_LT_CHECK_OBJDIR], 215450f2e948Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215550f2e948Smrg[rm -f .libs 2>/dev/null 215650f2e948Smrgmkdir .libs 2>/dev/null 215750f2e948Smrgif test -d .libs; then 215850f2e948Smrg lt_cv_objdir=.libs 215950f2e948Smrgelse 216050f2e948Smrg # MS-DOS does not allow filenames that begin with a dot. 216150f2e948Smrg lt_cv_objdir=_libs 216250f2e948Smrgfi 216350f2e948Smrgrmdir .libs 2>/dev/null]) 216450f2e948Smrgobjdir=$lt_cv_objdir 21655592a31fSmrg_LT_DECL([], [objdir], [0], 21665592a31fSmrg [The name of the directory that contains temporary libtool files])dnl 21675592a31fSmrgm4_pattern_allow([LT_OBJDIR])dnl 2168f2408745SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169f2408745Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21705592a31fSmrg])# _LT_CHECK_OBJDIR 2171226fade8Smrg 2172226fade8Smrg 21735592a31fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21745592a31fSmrg# -------------------------------------- 217550f2e948Smrg# Check hardcoding attributes. 21765592a31fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217750f2e948Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21785592a31fSmrg_LT_TAGVAR(hardcode_action, $1)= 21795592a31fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21805592a31fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181f2408745Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 218245bc899bSmrg 21835592a31fSmrg # We can hardcode non-existent directories. 2184f2408745Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218550f2e948Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218650f2e948Smrg # have to relink, otherwise we might link with an installed library 218750f2e948Smrg # when we should be linking with a yet-to-be-installed one 2188f2408745Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189f2408745Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 219050f2e948Smrg # Linking always hardcodes the temporary library directory. 21915592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 219250f2e948Smrg else 219350f2e948Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21945592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 219550f2e948Smrg fi 219650f2e948Smrgelse 219750f2e948Smrg # We cannot hardcode anything, or else we can only hardcode existing 219850f2e948Smrg # directories. 21995592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 220050f2e948Smrgfi 22015592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202226fade8Smrg 2203f2408745Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204f2408745Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220550f2e948Smrg # Fast installation is not supported 220650f2e948Smrg enable_fast_install=no 2207f2408745Smrgelif test yes = "$shlibpath_overrides_runpath" || 2208f2408745Smrg test no = "$enable_shared"; then 220950f2e948Smrg # Fast installation is not necessary 221050f2e948Smrg enable_fast_install=needless 221150f2e948Smrgfi 22125592a31fSmrg_LT_TAGDECL([], [hardcode_action], [0], 22135592a31fSmrg [How to hardcode a shared library path into an executable]) 22145592a31fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2215226fade8Smrg 2216226fade8Smrg 22175592a31fSmrg# _LT_CMD_STRIPLIB 22185592a31fSmrg# ---------------- 22195592a31fSmrgm4_defun([_LT_CMD_STRIPLIB], 22205592a31fSmrg[m4_require([_LT_DECL_EGREP]) 22215592a31fSmrgstriplib= 222250f2e948Smrgold_striplib= 222350f2e948SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22245592a31fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222550f2e948Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 222650f2e948Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 222750f2e948Smrg AC_MSG_RESULT([yes]) 222850f2e948Smrgelse 222950f2e948Smrg# FIXME - insert some real tests, host_os isn't really good enough 223050f2e948Smrg case $host_os in 22315592a31fSmrg darwin*) 2232f2408745Smrg if test -n "$STRIP"; then 22335592a31fSmrg striplib="$STRIP -x" 22345592a31fSmrg old_striplib="$STRIP -S" 22355592a31fSmrg AC_MSG_RESULT([yes]) 22365592a31fSmrg else 22375592a31fSmrg AC_MSG_RESULT([no]) 22385592a31fSmrg fi 22395592a31fSmrg ;; 22405592a31fSmrg *) 22415592a31fSmrg AC_MSG_RESULT([no]) 224250f2e948Smrg ;; 224350f2e948Smrg esac 224450f2e948Smrgfi 22455592a31fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22465592a31fSmrg_LT_DECL([], [striplib], [1]) 22475592a31fSmrg])# _LT_CMD_STRIPLIB 224845bc899bSmrg 224945bc899bSmrg 2250f2408745Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2251f2408745Smrg# --------------------------- 2252f2408745Smrg# Make sure func_munge_path_list() is defined correctly. 2253f2408745Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254f2408745Smrg[[# func_munge_path_list VARIABLE PATH 2255f2408745Smrg# ----------------------------------- 2256f2408745Smrg# VARIABLE is name of variable containing _space_ separated list of 2257f2408745Smrg# directories to be munged by the contents of PATH, which is string 2258f2408745Smrg# having a format: 2259f2408745Smrg# "DIR[:DIR]:" 2260f2408745Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261f2408745Smrg# ":DIR[:DIR]" 2262f2408745Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2263f2408745Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264f2408745Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265f2408745Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266f2408745Smrg# "DIR[:DIR]" 2267f2408745Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2268f2408745Smrgfunc_munge_path_list () 2269f2408745Smrg{ 2270f2408745Smrg case x@S|@2 in 2271f2408745Smrg x) 2272f2408745Smrg ;; 2273f2408745Smrg *:) 2274f2408745Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275f2408745Smrg ;; 2276f2408745Smrg x:*) 2277f2408745Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278f2408745Smrg ;; 2279f2408745Smrg *::*) 2280f2408745Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281f2408745Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282f2408745Smrg ;; 2283f2408745Smrg *) 2284f2408745Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285f2408745Smrg ;; 2286f2408745Smrg esac 2287f2408745Smrg} 2288f2408745Smrg]])# _LT_PREPARE_PATH_LIST 2289f2408745Smrg 2290f2408745Smrg 22915592a31fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229250f2e948Smrg# ----------------------------- 229350f2e948Smrg# PORTME Fill in your ld.so characteristics 22945592a31fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 22955592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22965592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 22975592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22985592a31fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 22995592a31fSmrgm4_require([_LT_DECL_SED])dnl 2300b40a6198Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301f2408745Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 230250f2e948SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23035592a31fSmrgm4_if([$1], 23045592a31fSmrg [], [ 2305f2408745Smrgif test yes = "$GCC"; then 230650f2e948Smrg case $host_os in 2307f2408745Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308f2408745Smrg *) lt_awk_arg='/^libraries:/' ;; 230950f2e948Smrg esac 2310b40a6198Smrg case $host_os in 2311f2408745Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312f2408745Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313b40a6198Smrg esac 2314b40a6198Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315b40a6198Smrg case $lt_search_path_spec in 2316b40a6198Smrg *\;*) 231750f2e948Smrg # if the path contains ";" then we assume it to be the separator 231850f2e948Smrg # otherwise default to the standard path separator (i.e. ":") - it is 231950f2e948Smrg # assumed that no part of a normal pathname contains ";" but that should 232050f2e948Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2321b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322b40a6198Smrg ;; 2323b40a6198Smrg *) 2324b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325b40a6198Smrg ;; 2326b40a6198Smrg esac 232750f2e948Smrg # Ok, now we have the path, separated by spaces, we can step through it 2328f2408745Smrg # and add multilib dir if necessary... 232950f2e948Smrg lt_tmp_lt_search_path_spec= 2330f2408745Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331f2408745Smrg # ...but if some path component already ends with the multilib dir we assume 2332f2408745Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333f2408745Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334f2408745Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335f2408745Smrg lt_multi_os_dir= 2336f2408745Smrg ;; 2337f2408745Smrg esac 233850f2e948Smrg for lt_sys_path in $lt_search_path_spec; do 2339f2408745Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340f2408745Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341f2408745Smrg elif test -n "$lt_multi_os_dir"; then 234250f2e948Smrg test -d "$lt_sys_path" && \ 234350f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23441ac89addSmrg fi 23451ac89addSmrg done 2346b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347f2408745SmrgBEGIN {RS = " "; FS = "/|\n";} { 2348f2408745Smrg lt_foo = ""; 2349f2408745Smrg lt_count = 0; 235050f2e948Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 235150f2e948Smrg if ($lt_i != "" && $lt_i != ".") { 235250f2e948Smrg if ($lt_i == "..") { 235350f2e948Smrg lt_count++; 235450f2e948Smrg } else { 235550f2e948Smrg if (lt_count == 0) { 2356f2408745Smrg lt_foo = "/" $lt_i lt_foo; 235750f2e948Smrg } else { 235850f2e948Smrg lt_count--; 235950f2e948Smrg } 236050f2e948Smrg } 236150f2e948Smrg } 236250f2e948Smrg } 236350f2e948Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 236450f2e948Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 236550f2e948Smrg}'` 2366b40a6198Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367b40a6198Smrg # for these hosts. 2368b40a6198Smrg case $host_os in 2369b40a6198Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370f2408745Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371b40a6198Smrg esac 2372b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23731ac89addSmrgelse 237450f2e948Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 237550f2e948Smrgfi]) 23765592a31fSmrglibrary_names_spec= 23775592a31fSmrglibname_spec='lib$name' 23785592a31fSmrgsoname_spec= 2379f2408745Smrgshrext_cmds=.so 23805592a31fSmrgpostinstall_cmds= 23815592a31fSmrgpostuninstall_cmds= 23825592a31fSmrgfinish_cmds= 23835592a31fSmrgfinish_eval= 23845592a31fSmrgshlibpath_var= 23855592a31fSmrgshlibpath_overrides_runpath=unknown 23865592a31fSmrgversion_type=none 23875592a31fSmrgdynamic_linker="$host_os ld.so" 23885592a31fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 238950f2e948Smrgneed_lib_prefix=unknown 239050f2e948Smrghardcode_into_libs=no 239145bc899bSmrg 239250f2e948Smrg# when you set need_version to no, make sure it does not cause -set_version 239350f2e948Smrg# flags to be left without arguments 239450f2e948Smrgneed_version=unknown 239545bc899bSmrg 2396f2408745SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397f2408745Smrg[User-defined run-time library search path.]) 2398f2408745Smrg 239950f2e948Smrgcase $host_os in 240050f2e948Smrgaix3*) 2401b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 2402f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240350f2e948Smrg shlibpath_var=LIBPATH 240445bc899bSmrg 240550f2e948Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2406f2408745Smrg soname_spec='$libname$release$shared_ext$major' 240750f2e948Smrg ;; 240845bc899bSmrg 240950f2e948Smrgaix[[4-9]]*) 2410b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 241150f2e948Smrg need_lib_prefix=no 241250f2e948Smrg need_version=no 241350f2e948Smrg hardcode_into_libs=yes 2414f2408745Smrg if test ia64 = "$host_cpu"; then 241550f2e948Smrg # AIX 5 supports IA64 2416f2408745Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 241750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 241850f2e948Smrg else 241950f2e948Smrg # With GCC up to 2.95.x, collect2 would create an import file 242050f2e948Smrg # for dependence libraries. The import file would start with 2421f2408745Smrg # the line '#! .'. This would cause the generated library to 2422f2408745Smrg # depend on '.', always an invalid library. This was fixed in 242350f2e948Smrg # development snapshots of GCC prior to 3.0. 242450f2e948Smrg case $host_os in 242550f2e948Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 242650f2e948Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 242750f2e948Smrg echo ' yes ' 2428f2408745Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 242950f2e948Smrg : 243050f2e948Smrg else 243150f2e948Smrg can_build_shared=no 243250f2e948Smrg fi 24331ac89addSmrg ;; 243450f2e948Smrg esac 2435f2408745Smrg # Using Import Files as archive members, it is possible to support 2436f2408745Smrg # filename-based versioning of shared library archives on AIX. While 2437f2408745Smrg # this would work for both with and without runtime linking, it will 2438f2408745Smrg # prevent static linking of such archives. So we do filename-based 2439f2408745Smrg # shared library versioning with .so extension only, which is used 2440f2408745Smrg # when both runtime linking and shared linking is enabled. 2441f2408745Smrg # Unfortunately, runtime linking may impact performance, so we do 2442f2408745Smrg # not want this to be the default eventually. Also, we use the 2443f2408745Smrg # versioned .so libs for executables only if there is the -brtl 2444f2408745Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445f2408745Smrg # To allow for filename-based versioning support, we need to create 2446f2408745Smrg # libNAME.so.V as an archive file, containing: 2447f2408745Smrg # *) an Import File, referring to the versioned filename of the 2448f2408745Smrg # archive as well as the shared archive member, telling the 2449f2408745Smrg # bitwidth (32 or 64) of that shared object, and providing the 2450f2408745Smrg # list of exported symbols of that shared object, eventually 2451f2408745Smrg # decorated with the 'weak' keyword 2452f2408745Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453f2408745Smrg # it being seen by the linker. 2454f2408745Smrg # At run time we better use the real file rather than another symlink, 2455f2408745Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456f2408745Smrg 2457f2408745Smrg case $with_aix_soname,$aix_use_runtimelinking in 2458f2408745Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 245950f2e948Smrg # soname into executable. Probably we can add versioning support to 246050f2e948Smrg # collect2, so additional links can be useful in future. 2461f2408745Smrg aix,yes) # traditional libtool 2462f2408745Smrg dynamic_linker='AIX unversionable lib.so' 246350f2e948Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 246450f2e948Smrg # instead of lib<name>.a to let people know that these are not 246550f2e948Smrg # typical AIX shared libraries. 2466f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467f2408745Smrg ;; 2468f2408745Smrg aix,no) # traditional AIX only 2469f2408745Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 247050f2e948Smrg # We preserve .a as extension for shared libraries through AIX4.2 247150f2e948Smrg # and later when we are not doing run time linking. 2472f2408745Smrg library_names_spec='$libname$release.a $libname.a' 2473f2408745Smrg soname_spec='$libname$release$shared_ext$major' 2474f2408745Smrg ;; 2475f2408745Smrg svr4,*) # full svr4 only 2476f2408745Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477f2408745Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478f2408745Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2479f2408745Smrg shlibpath_overrides_runpath=yes 2480f2408745Smrg ;; 2481f2408745Smrg *,yes) # both, prefer svr4 2482f2408745Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483f2408745Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484f2408745Smrg # unpreferred sharedlib libNAME.a needs extra handling 2485f2408745Smrg 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"' 2486f2408745Smrg 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"' 2487f2408745Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2488f2408745Smrg shlibpath_overrides_runpath=yes 2489f2408745Smrg ;; 2490f2408745Smrg *,no) # both, prefer aix 2491f2408745Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492f2408745Smrg library_names_spec='$libname$release.a $libname.a' 2493f2408745Smrg soname_spec='$libname$release$shared_ext$major' 2494f2408745Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495f2408745Smrg 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)' 2496f2408745Smrg 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"' 2497f2408745Smrg ;; 2498f2408745Smrg esac 249950f2e948Smrg shlibpath_var=LIBPATH 250050f2e948Smrg fi 25011ac89addSmrg ;; 250245bc899bSmrg 250350f2e948Smrgamigaos*) 25045592a31fSmrg case $host_cpu in 25055592a31fSmrg powerpc) 25065592a31fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25075592a31fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25095592a31fSmrg ;; 25105592a31fSmrg m68k) 25115592a31fSmrg library_names_spec='$libname.ixlibrary $libname.a' 25125592a31fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513f2408745Smrg 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' 25145592a31fSmrg ;; 25155592a31fSmrg esac 25161ac89addSmrg ;; 251745bc899bSmrg 25181ac89addSmrgbeos*) 2519f2408745Smrg library_names_spec='$libname$shared_ext' 252050f2e948Smrg dynamic_linker="$host_os ld.so" 252150f2e948Smrg shlibpath_var=LIBRARY_PATH 25221ac89addSmrg ;; 252345bc899bSmrg 25241ac89addSmrgbsdi[[45]]*) 2525b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 252650f2e948Smrg need_version=no 2527f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528f2408745Smrg soname_spec='$libname$release$shared_ext$major' 252950f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 253050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 253150f2e948Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253250f2e948Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253350f2e948Smrg # the default ld.so.conf also contains /usr/contrib/lib and 253450f2e948Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 253550f2e948Smrg # libtool to hard-code these into programs 25361ac89addSmrg ;; 253745bc899bSmrg 25385592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 253950f2e948Smrg version_type=windows 2540f2408745Smrg shrext_cmds=.dll 254150f2e948Smrg need_version=no 254250f2e948Smrg need_lib_prefix=no 254345bc899bSmrg 2544b40a6198Smrg case $GCC,$cc_basename in 2545b40a6198Smrg yes,*) 2546b40a6198Smrg # gcc 254750f2e948Smrg library_names_spec='$libname.dll.a' 254850f2e948Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549f2408745Smrg postinstall_cmds='base_file=`basename \$file`~ 2550f2408745Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255150f2e948Smrg dldir=$destdir/`dirname \$dlpath`~ 255250f2e948Smrg test -d \$dldir || mkdir -p \$dldir~ 255350f2e948Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 25545592a31fSmrg chmod a+x \$dldir/$dlname~ 25555592a31fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25565592a31fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25575592a31fSmrg fi' 255850f2e948Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 255950f2e948Smrg dlpath=$dir/\$dldll~ 25605592a31fSmrg $RM \$dlpath' 256150f2e948Smrg shlibpath_overrides_runpath=yes 256245bc899bSmrg 256350f2e948Smrg case $host_os in 256450f2e948Smrg cygwin*) 256550f2e948Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566f2408745Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567b40a6198Smrgm4_if([$1], [],[ 2568b40a6198Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 256950f2e948Smrg ;; 25705592a31fSmrg mingw* | cegcc*) 257150f2e948Smrg # MinGW DLLs use traditional 'lib' prefix 2572f2408745Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257350f2e948Smrg ;; 257450f2e948Smrg pw32*) 257550f2e948Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576f2408745Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257745bc899bSmrg ;; 257845bc899bSmrg esac 2579b40a6198Smrg dynamic_linker='Win32 ld.exe' 2580b40a6198Smrg ;; 2581b40a6198Smrg 2582b40a6198Smrg *,cl*) 2583b40a6198Smrg # Native MSVC 2584b40a6198Smrg libname_spec='$name' 2585f2408745Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586f2408745Smrg library_names_spec='$libname.dll.lib' 2587b40a6198Smrg 2588b40a6198Smrg case $build_os in 2589b40a6198Smrg mingw*) 2590b40a6198Smrg sys_lib_search_path_spec= 2591b40a6198Smrg lt_save_ifs=$IFS 2592b40a6198Smrg IFS=';' 2593b40a6198Smrg for lt_path in $LIB 2594b40a6198Smrg do 2595b40a6198Smrg IFS=$lt_save_ifs 2596b40a6198Smrg # Let DOS variable expansion print the short 8.3 style file name. 2597b40a6198Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598b40a6198Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599b40a6198Smrg done 2600b40a6198Smrg IFS=$lt_save_ifs 2601b40a6198Smrg # Convert to MSYS style. 2602b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603b40a6198Smrg ;; 2604b40a6198Smrg cygwin*) 2605b40a6198Smrg # Convert to unix form, then to dos form, then back to unix form 2606b40a6198Smrg # but this time dos style (no spaces!) so that the unix form looks 2607b40a6198Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611b40a6198Smrg ;; 2612b40a6198Smrg *) 2613f2408745Smrg sys_lib_search_path_spec=$LIB 2614b40a6198Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615b40a6198Smrg # It is most probably a Windows format PATH. 2616b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617b40a6198Smrg else 2618b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619b40a6198Smrg fi 2620b40a6198Smrg # FIXME: find the short name or the path components, as spaces are 2621b40a6198Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622b40a6198Smrg ;; 2623b40a6198Smrg esac 2624b40a6198Smrg 2625b40a6198Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626f2408745Smrg postinstall_cmds='base_file=`basename \$file`~ 2627f2408745Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628b40a6198Smrg dldir=$destdir/`dirname \$dlpath`~ 2629b40a6198Smrg test -d \$dldir || mkdir -p \$dldir~ 2630b40a6198Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2631b40a6198Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632b40a6198Smrg dlpath=$dir/\$dldll~ 2633b40a6198Smrg $RM \$dlpath' 2634b40a6198Smrg shlibpath_overrides_runpath=yes 2635b40a6198Smrg dynamic_linker='Win32 link.exe' 263650f2e948Smrg ;; 263745bc899bSmrg 263850f2e948Smrg *) 2639b40a6198Smrg # Assume MSVC wrapper 2640f2408745Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641b40a6198Smrg dynamic_linker='Win32 ld.exe' 264250f2e948Smrg ;; 264350f2e948Smrg esac 264450f2e948Smrg # FIXME: first we should search . and the directory the executable is in 264550f2e948Smrg shlibpath_var=PATH 26461ac89addSmrg ;; 264745bc899bSmrg 264850f2e948Smrgdarwin* | rhapsody*) 264950f2e948Smrg dynamic_linker="$host_os dyld" 265050f2e948Smrg version_type=darwin 265150f2e948Smrg need_lib_prefix=no 265250f2e948Smrg need_version=no 2653f2408745Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654f2408745Smrg soname_spec='$libname$release$major$shared_ext' 265550f2e948Smrg shlibpath_overrides_runpath=yes 265650f2e948Smrg shlibpath_var=DYLD_LIBRARY_PATH 265750f2e948Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26585592a31fSmrgm4_if([$1], [],[ 26595592a31fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 266050f2e948Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 266150f2e948Smrg ;; 266250f2e948Smrg 266350f2e948Smrgdgux*) 2664b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 266550f2e948Smrg need_lib_prefix=no 266650f2e948Smrg need_version=no 2667f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668f2408745Smrg soname_spec='$libname$release$shared_ext$major' 266950f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 267050f2e948Smrg ;; 267150f2e948Smrg 267250f2e948Smrgfreebsd* | dragonfly*) 267350f2e948Smrg # DragonFly does not have aout. When/if they implement a new 267450f2e948Smrg # versioning mechanism, adjust this. 267550f2e948Smrg if test -x /usr/bin/objformat; then 267650f2e948Smrg objformat=`/usr/bin/objformat` 267750f2e948Smrg else 267850f2e948Smrg case $host_os in 2679b40a6198Smrg freebsd[[23]].*) objformat=aout ;; 268050f2e948Smrg *) objformat=elf ;; 268150f2e948Smrg esac 268250f2e948Smrg fi 268350f2e948Smrg version_type=freebsd-$objformat 268450f2e948Smrg case $version_type in 268550f2e948Smrg freebsd-elf*) 2686f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687f2408745Smrg soname_spec='$libname$release$shared_ext$major' 268850f2e948Smrg need_version=no 268950f2e948Smrg need_lib_prefix=no 269050f2e948Smrg ;; 269150f2e948Smrg freebsd-*) 2692f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 269350f2e948Smrg need_version=yes 269450f2e948Smrg ;; 269550f2e948Smrg esac 269650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 269750f2e948Smrg case $host_os in 2698b40a6198Smrg freebsd2.*) 269950f2e948Smrg shlibpath_overrides_runpath=yes 270050f2e948Smrg ;; 270150f2e948Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 270250f2e948Smrg shlibpath_overrides_runpath=yes 270350f2e948Smrg hardcode_into_libs=yes 270450f2e948Smrg ;; 270550f2e948Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 270650f2e948Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 270750f2e948Smrg shlibpath_overrides_runpath=no 270850f2e948Smrg hardcode_into_libs=yes 270950f2e948Smrg ;; 271050f2e948Smrg *) # from 4.6 on, and DragonFly 271150f2e948Smrg shlibpath_overrides_runpath=yes 271250f2e948Smrg hardcode_into_libs=yes 271350f2e948Smrg ;; 271450f2e948Smrg esac 271550f2e948Smrg ;; 271650f2e948Smrg 2717b40a6198Smrghaiku*) 2718b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 2719b40a6198Smrg need_lib_prefix=no 2720b40a6198Smrg need_version=no 2721b40a6198Smrg dynamic_linker="$host_os runtime_loader" 2722f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2723f2408745Smrg soname_spec='$libname$release$shared_ext$major' 2724b40a6198Smrg shlibpath_var=LIBRARY_PATH 2725f2408745Smrg shlibpath_overrides_runpath=no 2726b40a6198Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 272750f2e948Smrg hardcode_into_libs=yes 272850f2e948Smrg ;; 272950f2e948Smrg 273050f2e948Smrghpux9* | hpux10* | hpux11*) 273150f2e948Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 273250f2e948Smrg # link against other versions. 273350f2e948Smrg version_type=sunos 273450f2e948Smrg need_lib_prefix=no 273550f2e948Smrg need_version=no 273650f2e948Smrg case $host_cpu in 27371ac89addSmrg ia64*) 273850f2e948Smrg shrext_cmds='.so' 273950f2e948Smrg hardcode_into_libs=yes 274050f2e948Smrg dynamic_linker="$host_os dld.so" 274150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 274250f2e948Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2743f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2744f2408745Smrg soname_spec='$libname$release$shared_ext$major' 2745f2408745Smrg if test 32 = "$HPUX_IA64_MODE"; then 274650f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2747f2408745Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 274850f2e948Smrg else 274950f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2750f2408745Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 275150f2e948Smrg fi 275245bc899bSmrg ;; 27535592a31fSmrg hppa*64*) 27545592a31fSmrg shrext_cmds='.sl' 27555592a31fSmrg hardcode_into_libs=yes 27565592a31fSmrg dynamic_linker="$host_os dld.sl" 27575592a31fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27585592a31fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2759f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2760f2408745Smrg soname_spec='$libname$release$shared_ext$major' 27615592a31fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27625592a31fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27635592a31fSmrg ;; 27645592a31fSmrg *) 276550f2e948Smrg shrext_cmds='.sl' 276650f2e948Smrg dynamic_linker="$host_os dld.sl" 276750f2e948Smrg shlibpath_var=SHLIB_PATH 276850f2e948Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2769f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770f2408745Smrg soname_spec='$libname$release$shared_ext$major' 277145bc899bSmrg ;; 27721ac89addSmrg esac 2773b40a6198Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 277450f2e948Smrg postinstall_cmds='chmod 555 $lib' 2775b40a6198Smrg # or fails outright, so override atomically: 2776b40a6198Smrg install_override_mode=555 27771ac89addSmrg ;; 277845bc899bSmrg 277950f2e948Smrginterix[[3-9]]*) 2780b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 278150f2e948Smrg need_lib_prefix=no 278250f2e948Smrg need_version=no 2783f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2784f2408745Smrg soname_spec='$libname$release$shared_ext$major' 278550f2e948Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 278650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 278750f2e948Smrg shlibpath_overrides_runpath=no 278850f2e948Smrg hardcode_into_libs=yes 27891ac89addSmrg ;; 279045bc899bSmrg 27911ac89addSmrgirix5* | irix6* | nonstopux*) 279250f2e948Smrg case $host_os in 279350f2e948Smrg nonstopux*) version_type=nonstopux ;; 279450f2e948Smrg *) 2795f2408745Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2796b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 279750f2e948Smrg else 279850f2e948Smrg version_type=irix 279950f2e948Smrg fi ;; 28001ac89addSmrg esac 280150f2e948Smrg need_lib_prefix=no 280250f2e948Smrg need_version=no 2803f2408745Smrg soname_spec='$libname$release$shared_ext$major' 2804f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 280550f2e948Smrg case $host_os in 280650f2e948Smrg irix5* | nonstopux*) 280750f2e948Smrg libsuff= shlibsuff= 280850f2e948Smrg ;; 280950f2e948Smrg *) 281050f2e948Smrg case $LD in # libtool.m4 will add one of these switches to LD 281150f2e948Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 281250f2e948Smrg libsuff= shlibsuff= libmagic=32-bit;; 281350f2e948Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 281450f2e948Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 281550f2e948Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 281650f2e948Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 281750f2e948Smrg *) libsuff= shlibsuff= libmagic=never-match;; 281850f2e948Smrg esac 281950f2e948Smrg ;; 282050f2e948Smrg esac 282150f2e948Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 282250f2e948Smrg shlibpath_overrides_runpath=no 2823f2408745Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2824f2408745Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 282550f2e948Smrg hardcode_into_libs=yes 282650f2e948Smrg ;; 282750f2e948Smrg 282850f2e948Smrg# No shared lib support for Linux oldld, aout, or coff. 282950f2e948Smrglinux*oldld* | linux*aout* | linux*coff*) 283050f2e948Smrg dynamic_linker=no 28311ac89addSmrg ;; 283245bc899bSmrg 2833f2408745Smrglinux*android*) 2834f2408745Smrg version_type=none # Android doesn't support versioned libraries. 2835f2408745Smrg need_lib_prefix=no 2836f2408745Smrg need_version=no 2837f2408745Smrg library_names_spec='$libname$release$shared_ext' 2838f2408745Smrg soname_spec='$libname$release$shared_ext' 2839f2408745Smrg finish_cmds= 2840f2408745Smrg shlibpath_var=LD_LIBRARY_PATH 2841f2408745Smrg shlibpath_overrides_runpath=yes 2842f2408745Smrg 2843f2408745Smrg # This implies no fast_install, which is unacceptable. 2844f2408745Smrg # Some rework will be needed to allow for fast_install 2845f2408745Smrg # before this can be enabled. 2846f2408745Smrg hardcode_into_libs=yes 2847f2408745Smrg 2848f2408745Smrg dynamic_linker='Android linker' 2849f2408745Smrg # Don't embed -rpath directories since the linker doesn't support them. 2850f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2851f2408745Smrg ;; 2852f2408745Smrg 2853b40a6198Smrg# This must be glibc/ELF. 2854f2408745Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2855b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 285650f2e948Smrg need_lib_prefix=no 285750f2e948Smrg need_version=no 2858f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2859f2408745Smrg soname_spec='$libname$release$shared_ext$major' 286050f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 286150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 286250f2e948Smrg shlibpath_overrides_runpath=no 2863b40a6198Smrg 28645592a31fSmrg # Some binutils ld are patched to set DT_RUNPATH 2865b40a6198Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2866b40a6198Smrg [lt_cv_shlibpath_overrides_runpath=no 2867b40a6198Smrg save_LDFLAGS=$LDFLAGS 2868b40a6198Smrg save_libdir=$libdir 2869b40a6198Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2870b40a6198Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2871b40a6198Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2872b40a6198Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2873b40a6198Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2874b40a6198Smrg LDFLAGS=$save_LDFLAGS 2875b40a6198Smrg libdir=$save_libdir 2876b40a6198Smrg ]) 2877b40a6198Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28785592a31fSmrg 287950f2e948Smrg # This implies no fast_install, which is unacceptable. 288050f2e948Smrg # Some rework will be needed to allow for fast_install 288150f2e948Smrg # before this can be enabled. 288250f2e948Smrg hardcode_into_libs=yes 28835592a31fSmrg 288457ba8e8bSmrg # Add ABI-specific directories to the system library path. 288557ba8e8bSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 288657ba8e8bSmrg 2887f2408745Smrg # Ideally, we could use ldconfig to report *all* directores which are 2888f2408745Smrg # searched for libraries, however this is still not possible. Aside from not 2889f2408745Smrg # being certain /sbin/ldconfig is available, command 2890f2408745Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2891f2408745Smrg # even though it is searched at run-time. Try to do the best guess by 2892f2408745Smrg # appending ld.so.conf contents (and includes) to the search path. 289350f2e948Smrg if test -f /etc/ld.so.conf; then 2894b40a6198Smrg 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' ' '` 289557ba8e8bSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 289650f2e948Smrg fi 289750f2e948Smrg 289850f2e948Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 289950f2e948Smrg # powerpc, because MkLinux only supported shared libraries with the 290050f2e948Smrg # GNU dynamic linker. Since this was broken with cross compilers, 290150f2e948Smrg # most powerpc-linux boxes support dynamic linking these days and 290250f2e948Smrg # people can always --disable-shared, the test was removed, and we 290350f2e948Smrg # assume the GNU/Linux dynamic linker is in use. 290450f2e948Smrg dynamic_linker='GNU/Linux ld.so' 29051ac89addSmrg ;; 290645bc899bSmrg 29071ac89addSmrgnetbsd*) 290850f2e948Smrg version_type=sunos 290950f2e948Smrg need_lib_prefix=no 291050f2e948Smrg need_version=no 29115592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2912f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 291350f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 291450f2e948Smrg dynamic_linker='NetBSD (a.out) ld.so' 29151ac89addSmrg else 2916f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2917f2408745Smrg soname_spec='$libname$release$shared_ext$major' 291850f2e948Smrg dynamic_linker='NetBSD ld.elf_so' 29191ac89addSmrg fi 292050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 292150f2e948Smrg shlibpath_overrides_runpath=yes 292250f2e948Smrg hardcode_into_libs=yes 29231ac89addSmrg ;; 292445bc899bSmrg 292550f2e948Smrgnewsos6) 2926b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 2927f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 292950f2e948Smrg shlibpath_overrides_runpath=yes 29301ac89addSmrg ;; 293145bc899bSmrg 29325592a31fSmrg*nto* | *qnx*) 29335592a31fSmrg version_type=qnx 293450f2e948Smrg need_lib_prefix=no 293550f2e948Smrg need_version=no 2936f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2937f2408745Smrg soname_spec='$libname$release$shared_ext$major' 293850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 29395592a31fSmrg shlibpath_overrides_runpath=no 29405592a31fSmrg hardcode_into_libs=yes 29415592a31fSmrg dynamic_linker='ldqnx.so' 29421ac89addSmrg ;; 294345bc899bSmrg 2944f2408745Smrgopenbsd* | bitrig*) 294550f2e948Smrg version_type=sunos 2946f2408745Smrg sys_lib_dlsearch_path_spec=/usr/lib 294750f2e948Smrg need_lib_prefix=no 2948f2408745Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2949f2408745Smrg need_version=no 29501ac89addSmrg else 2951f2408745Smrg need_version=yes 29521ac89addSmrg fi 2953f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2954f2408745Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2955f2408745Smrg shlibpath_var=LD_LIBRARY_PATH 2956f2408745Smrg shlibpath_overrides_runpath=yes 29571ac89addSmrg ;; 295845bc899bSmrg 295950f2e948Smrgos2*) 296050f2e948Smrg libname_spec='$name' 2961f2408745Smrg version_type=windows 2962f2408745Smrg shrext_cmds=.dll 2963f2408745Smrg need_version=no 296450f2e948Smrg need_lib_prefix=no 2965f2408745Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2966f2408745Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2967f2408745Smrg v=$($ECHO $release$versuffix | tr -d .-); 2968f2408745Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2969f2408745Smrg $ECHO $n$v`$shared_ext' 2970f2408745Smrg library_names_spec='${libname}_dll.$libext' 297150f2e948Smrg dynamic_linker='OS/2 ld.exe' 2972f2408745Smrg shlibpath_var=BEGINLIBPATH 2973f2408745Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2974f2408745Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2975f2408745Smrg postinstall_cmds='base_file=`basename \$file`~ 2976f2408745Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2977f2408745Smrg dldir=$destdir/`dirname \$dlpath`~ 2978f2408745Smrg test -d \$dldir || mkdir -p \$dldir~ 2979f2408745Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2980f2408745Smrg chmod a+x \$dldir/$dlname~ 2981f2408745Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2982f2408745Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2983f2408745Smrg fi' 2984f2408745Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2985f2408745Smrg dlpath=$dir/\$dldll~ 2986f2408745Smrg $RM \$dlpath' 29871ac89addSmrg ;; 29881ac89addSmrg 298950f2e948Smrgosf3* | osf4* | osf5*) 299050f2e948Smrg version_type=osf 299150f2e948Smrg need_lib_prefix=no 299250f2e948Smrg need_version=no 2993f2408745Smrg soname_spec='$libname$release$shared_ext$major' 2994f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 299550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 299650f2e948Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2997f2408745Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29981ac89addSmrg ;; 299945bc899bSmrg 300050f2e948Smrgrdos*) 300150f2e948Smrg dynamic_linker=no 30021ac89addSmrg ;; 300345bc899bSmrg 300450f2e948Smrgsolaris*) 3005b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 300650f2e948Smrg need_lib_prefix=no 300750f2e948Smrg need_version=no 3008f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3009f2408745Smrg soname_spec='$libname$release$shared_ext$major' 301050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 301150f2e948Smrg shlibpath_overrides_runpath=yes 301250f2e948Smrg hardcode_into_libs=yes 301350f2e948Smrg # ldd complains unless libraries are executable 301450f2e948Smrg postinstall_cmds='chmod +x $lib' 301550f2e948Smrg ;; 301645bc899bSmrg 301750f2e948Smrgsunos4*) 301850f2e948Smrg version_type=sunos 3019f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 302050f2e948Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 302150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 302250f2e948Smrg shlibpath_overrides_runpath=yes 3023f2408745Smrg if test yes = "$with_gnu_ld"; then 302450f2e948Smrg need_lib_prefix=no 30251ac89addSmrg fi 302650f2e948Smrg need_version=yes 302745bc899bSmrg ;; 302845bc899bSmrg 302950f2e948Smrgsysv4 | sysv4.3*) 3030b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 3031f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3032f2408745Smrg soname_spec='$libname$release$shared_ext$major' 303350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 303450f2e948Smrg case $host_vendor in 303550f2e948Smrg sni) 303650f2e948Smrg shlibpath_overrides_runpath=no 303750f2e948Smrg need_lib_prefix=no 303850f2e948Smrg runpath_var=LD_RUN_PATH 303950f2e948Smrg ;; 304050f2e948Smrg siemens) 304150f2e948Smrg need_lib_prefix=no 304250f2e948Smrg ;; 304350f2e948Smrg motorola) 304450f2e948Smrg need_lib_prefix=no 304550f2e948Smrg need_version=no 304650f2e948Smrg shlibpath_overrides_runpath=no 304750f2e948Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 304850f2e948Smrg ;; 3049226fade8Smrg esac 305050f2e948Smrg ;; 305145bc899bSmrg 305250f2e948Smrgsysv4*MP*) 3053f2408745Smrg if test -d /usr/nec; then 3054b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 3055f2408745Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3056f2408745Smrg soname_spec='$libname$shared_ext.$major' 305750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 305850f2e948Smrg fi 305950f2e948Smrg ;; 306045bc899bSmrg 306150f2e948Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3062f2408745Smrg version_type=sco 306350f2e948Smrg need_lib_prefix=no 306450f2e948Smrg need_version=no 3065f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3066f2408745Smrg soname_spec='$libname$release$shared_ext$major' 306750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 30685592a31fSmrg shlibpath_overrides_runpath=yes 306950f2e948Smrg hardcode_into_libs=yes 3070f2408745Smrg if test yes = "$with_gnu_ld"; then 307150f2e948Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3072226fade8Smrg else 307350f2e948Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 307450f2e948Smrg case $host_os in 307550f2e948Smrg sco3.2v5*) 307650f2e948Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 307750f2e948Smrg ;; 307850f2e948Smrg esac 3079226fade8Smrg fi 308050f2e948Smrg sys_lib_dlsearch_path_spec='/usr/lib' 308150f2e948Smrg ;; 308245bc899bSmrg 30835592a31fSmrgtpf*) 30845592a31fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3085b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 30865592a31fSmrg need_lib_prefix=no 30875592a31fSmrg need_version=no 3088f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30895592a31fSmrg shlibpath_var=LD_LIBRARY_PATH 30905592a31fSmrg shlibpath_overrides_runpath=no 30915592a31fSmrg hardcode_into_libs=yes 30925592a31fSmrg ;; 30935592a31fSmrg 309450f2e948Smrguts4*) 3095b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 3096f2408745Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3097f2408745Smrg soname_spec='$libname$release$shared_ext$major' 309850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 309950f2e948Smrg ;; 3100226fade8Smrg 310150f2e948Smrg*) 310250f2e948Smrg dynamic_linker=no 310350f2e948Smrg ;; 310450f2e948Smrgesac 310550f2e948SmrgAC_MSG_RESULT([$dynamic_linker]) 3106f2408745Smrgtest no = "$dynamic_linker" && can_build_shared=no 3107226fade8Smrg 310850f2e948Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3109f2408745Smrgif test yes = "$GCC"; then 311050f2e948Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31111ac89addSmrgfi 311245bc899bSmrg 3113f2408745Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3114f2408745Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31155592a31fSmrgfi 3116f2408745Smrg 3117f2408745Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3118f2408745Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31195592a31fSmrgfi 312045bc899bSmrg 3121f2408745Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3122f2408745Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3123f2408745Smrg 3124f2408745Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3125f2408745Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3126f2408745Smrg 3127f2408745Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3128f2408745Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3129f2408745Smrg 31305592a31fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 31315592a31fSmrg [Variables whose values should be saved in libtool wrapper scripts and 31325592a31fSmrg restored at link time]) 31335592a31fSmrg_LT_DECL([], [need_lib_prefix], [0], 31345592a31fSmrg [Do we need the "lib" prefix for modules?]) 31355592a31fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31365592a31fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31375592a31fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31385592a31fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31395592a31fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31405592a31fSmrg [Is shlibpath searched before the hard-coded library search path?]) 31415592a31fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31425592a31fSmrg_LT_DECL([], [library_names_spec], [1], 31435592a31fSmrg [[List of archive names. First name is the real one, the rest are links. 31445592a31fSmrg The last name is the one that the linker finds with -lNAME]]) 31455592a31fSmrg_LT_DECL([], [soname_spec], [1], 31465592a31fSmrg [[The coded name of the library, if different from the real name]]) 3147b40a6198Smrg_LT_DECL([], [install_override_mode], [1], 3148b40a6198Smrg [Permission mode override for installation of shared libraries]) 31495592a31fSmrg_LT_DECL([], [postinstall_cmds], [2], 31505592a31fSmrg [Command to use after installation of a shared archive]) 31515592a31fSmrg_LT_DECL([], [postuninstall_cmds], [2], 31525592a31fSmrg [Command to use after uninstallation of a shared archive]) 31535592a31fSmrg_LT_DECL([], [finish_cmds], [2], 31545592a31fSmrg [Commands used to finish a libtool library installation in a directory]) 31555592a31fSmrg_LT_DECL([], [finish_eval], [1], 31565592a31fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 31575592a31fSmrg not shown]]) 31585592a31fSmrg_LT_DECL([], [hardcode_into_libs], [0], 31595592a31fSmrg [Whether we should hardcode library paths into libraries]) 31605592a31fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31615592a31fSmrg [Compile-time system search path for libraries]) 3162f2408745Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3163f2408745Smrg [Detected run-time system search path for libraries]) 3164f2408745Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3165f2408745Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31665592a31fSmrg])# _LT_SYS_DYNAMIC_LINKER 31675592a31fSmrg 31685592a31fSmrg 31695592a31fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 31703a925b30Smrg# -------------------------- 3171f2408745Smrg# find a file program that can recognize shared library 31725592a31fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31735592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 31743a925b30SmrgAC_MSG_CHECKING([for $1]) 31753a925b30SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31763a925b30Smrg[case $MAGIC_CMD in 31773a925b30Smrg[[\\/*] | ?:[\\/]*]) 3178f2408745Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 317950f2e948Smrg ;; 318050f2e948Smrg*) 3181f2408745Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3182f2408745Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 318350f2e948Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 318450f2e948Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 318550f2e948Smrgdnl not every word. This closes a longstanding sh security hole. 31865592a31fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 318750f2e948Smrg for ac_dir in $ac_dummy; do 3188f2408745Smrg IFS=$lt_save_ifs 318950f2e948Smrg test -z "$ac_dir" && ac_dir=. 3190f2408745Smrg if test -f "$ac_dir/$1"; then 3191f2408745Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 319250f2e948Smrg if test -n "$file_magic_test_file"; then 319350f2e948Smrg case $deplibs_check_method in 319450f2e948Smrg "file_magic "*) 319550f2e948Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3196f2408745Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 319750f2e948Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 319850f2e948Smrg $EGREP "$file_magic_regex" > /dev/null; then 319950f2e948Smrg : 320050f2e948Smrg else 32015592a31fSmrg cat <<_LT_EOF 1>&2 320245bc899bSmrg 320350f2e948Smrg*** Warning: the command libtool uses to detect shared libraries, 320450f2e948Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 320550f2e948Smrg*** The result is that libtool may fail to recognize shared libraries 320650f2e948Smrg*** as such. This will affect the creation of libtool libraries that 320750f2e948Smrg*** depend on shared libraries, but programs linked with such libtool 320850f2e948Smrg*** libraries will work regardless of this problem. Nevertheless, you 320950f2e948Smrg*** may want to report the problem to your system manager and/or to 321050f2e948Smrg*** bug-libtool@gnu.org 321145bc899bSmrg 32125592a31fSmrg_LT_EOF 321350f2e948Smrg fi ;; 321450f2e948Smrg esac 321550f2e948Smrg fi 321650f2e948Smrg break 321750f2e948Smrg fi 321850f2e948Smrg done 3219f2408745Smrg IFS=$lt_save_ifs 3220f2408745Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 322145bc899bSmrg ;; 322250f2e948Smrgesac]) 3223f2408745SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 322450f2e948Smrgif test -n "$MAGIC_CMD"; then 322550f2e948Smrg AC_MSG_RESULT($MAGIC_CMD) 322650f2e948Smrgelse 322750f2e948Smrg AC_MSG_RESULT(no) 322850f2e948Smrgfi 32295592a31fSmrg_LT_DECL([], [MAGIC_CMD], [0], 32305592a31fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32315592a31fSmrg])# _LT_PATH_TOOL_PREFIX 323245bc899bSmrg 32335592a31fSmrg# Old name: 32345592a31fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32355592a31fSmrgdnl aclocal-1.4 backwards compatibility: 32365592a31fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 323745bc899bSmrg 32385592a31fSmrg 32395592a31fSmrg# _LT_PATH_MAGIC 32405592a31fSmrg# -------------- 3241f2408745Smrg# find a file program that can recognize a shared library 32425592a31fSmrgm4_defun([_LT_PATH_MAGIC], 32435592a31fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 324450f2e948Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 324550f2e948Smrg if test -n "$ac_tool_prefix"; then 32465592a31fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 324750f2e948Smrg else 324850f2e948Smrg MAGIC_CMD=: 324950f2e948Smrg fi 325050f2e948Smrgfi 32515592a31fSmrg])# _LT_PATH_MAGIC 325245bc899bSmrg 325345bc899bSmrg 32545592a31fSmrg# LT_PATH_LD 325550f2e948Smrg# ---------- 325650f2e948Smrg# find the pathname to the GNU or non-GNU linker 32575592a31fSmrgAC_DEFUN([LT_PATH_LD], 32585592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 32593a925b30SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32603a925b30SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32615592a31fSmrgm4_require([_LT_DECL_SED])dnl 32625592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 3263b40a6198Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32645592a31fSmrg 32655592a31fSmrgAC_ARG_WITH([gnu-ld], 32665592a31fSmrg [AS_HELP_STRING([--with-gnu-ld], 32675592a31fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3268f2408745Smrg [test no = "$withval" || with_gnu_ld=yes], 32695592a31fSmrg [with_gnu_ld=no])dnl 32705592a31fSmrg 327150f2e948Smrgac_prog=ld 3272f2408745Smrgif test yes = "$GCC"; then 327350f2e948Smrg # Check if gcc -print-prog-name=ld gives a path. 327450f2e948Smrg AC_MSG_CHECKING([for ld used by $CC]) 327550f2e948Smrg case $host in 327650f2e948Smrg *-*-mingw*) 3277f2408745Smrg # gcc leaves a trailing carriage return, which upsets mingw 327850f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 327950f2e948Smrg *) 328050f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 328150f2e948Smrg esac 328250f2e948Smrg case $ac_prog in 328350f2e948Smrg # Accept absolute paths. 328450f2e948Smrg [[\\/]]* | ?:[[\\/]]*) 328550f2e948Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 328650f2e948Smrg # Canonicalize the pathname of ld 32875592a31fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32885592a31fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32895592a31fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 329050f2e948Smrg done 3291f2408745Smrg test -z "$LD" && LD=$ac_prog 329250f2e948Smrg ;; 329350f2e948Smrg "") 329450f2e948Smrg # If it fails, then pretend we aren't using GCC. 329550f2e948Smrg ac_prog=ld 329650f2e948Smrg ;; 329750f2e948Smrg *) 329850f2e948Smrg # If it is relative, then search for the first ld in PATH. 329950f2e948Smrg with_gnu_ld=unknown 330050f2e948Smrg ;; 330150f2e948Smrg esac 3302f2408745Smrgelif test yes = "$with_gnu_ld"; then 330350f2e948Smrg AC_MSG_CHECKING([for GNU ld]) 3304226fade8Smrgelse 330550f2e948Smrg AC_MSG_CHECKING([for non-GNU ld]) 3306226fade8Smrgfi 330750f2e948SmrgAC_CACHE_VAL(lt_cv_path_LD, 330850f2e948Smrg[if test -z "$LD"; then 3309f2408745Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 331050f2e948Smrg for ac_dir in $PATH; do 3311f2408745Smrg IFS=$lt_save_ifs 331250f2e948Smrg test -z "$ac_dir" && ac_dir=. 331350f2e948Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3314f2408745Smrg lt_cv_path_LD=$ac_dir/$ac_prog 331550f2e948Smrg # Check to see if the program is GNU ld. I'd rather use --version, 331650f2e948Smrg # but apparently some variants of GNU ld only accept -v. 331750f2e948Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 331850f2e948Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 331950f2e948Smrg *GNU* | *'with BFD'*) 3320f2408745Smrg test no != "$with_gnu_ld" && break 332150f2e948Smrg ;; 332250f2e948Smrg *) 3323f2408745Smrg test yes != "$with_gnu_ld" && break 332450f2e948Smrg ;; 332550f2e948Smrg esac 332650f2e948Smrg fi 332750f2e948Smrg done 3328f2408745Smrg IFS=$lt_save_ifs 3329226fade8Smrgelse 3330f2408745Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 333150f2e948Smrgfi]) 3332f2408745SmrgLD=$lt_cv_path_LD 333350f2e948Smrgif test -n "$LD"; then 333450f2e948Smrg AC_MSG_RESULT($LD) 3335226fade8Smrgelse 333650f2e948Smrg AC_MSG_RESULT(no) 3337226fade8Smrgfi 333850f2e948Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33395592a31fSmrg_LT_PATH_LD_GNU 33405592a31fSmrgAC_SUBST([LD]) 3341226fade8Smrg 33425592a31fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33435592a31fSmrg])# LT_PATH_LD 3344226fade8Smrg 33455592a31fSmrg# Old names: 33465592a31fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33475592a31fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33485592a31fSmrgdnl aclocal-1.4 backwards compatibility: 33495592a31fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 33505592a31fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 33515592a31fSmrg 33525592a31fSmrg 33535592a31fSmrg# _LT_PATH_LD_GNU 33545592a31fSmrg#- -------------- 33555592a31fSmrgm4_defun([_LT_PATH_LD_GNU], 33565592a31fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 335750f2e948Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 335850f2e948Smrgcase `$LD -v 2>&1 </dev/null` in 335950f2e948Smrg*GNU* | *'with BFD'*) 336050f2e948Smrg lt_cv_prog_gnu_ld=yes 336150f2e948Smrg ;; 336250f2e948Smrg*) 336350f2e948Smrg lt_cv_prog_gnu_ld=no 336450f2e948Smrg ;; 336550f2e948Smrgesac]) 336650f2e948Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33675592a31fSmrg])# _LT_PATH_LD_GNU 3368226fade8Smrg 3369226fade8Smrg 33705592a31fSmrg# _LT_CMD_RELOAD 33715592a31fSmrg# -------------- 337250f2e948Smrg# find reload flag for linker 337350f2e948Smrg# -- PORTME Some linkers may need a different reload flag. 33745592a31fSmrgm4_defun([_LT_CMD_RELOAD], 337550f2e948Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 337650f2e948Smrg lt_cv_ld_reload_flag, 337750f2e948Smrg [lt_cv_ld_reload_flag='-r']) 337850f2e948Smrgreload_flag=$lt_cv_ld_reload_flag 337950f2e948Smrgcase $reload_flag in 338050f2e948Smrg"" | " "*) ;; 338150f2e948Smrg*) reload_flag=" $reload_flag" ;; 338250f2e948Smrgesac 338350f2e948Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 338450f2e948Smrgcase $host_os in 3385b40a6198Smrg cygwin* | mingw* | pw32* | cegcc*) 3386f2408745Smrg if test yes != "$GCC"; then 3387b40a6198Smrg reload_cmds=false 3388b40a6198Smrg fi 3389b40a6198Smrg ;; 339050f2e948Smrg darwin*) 3391f2408745Smrg if test yes = "$GCC"; then 3392f2408745Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 33931ac89addSmrg else 339450f2e948Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 33951ac89addSmrg fi 339650f2e948Smrg ;; 339750f2e948Smrgesac 3398b40a6198Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3399b40a6198Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34005592a31fSmrg])# _LT_CMD_RELOAD 340145bc899bSmrg 3402226fade8Smrg 3403f2408745Smrg# _LT_PATH_DD 3404f2408745Smrg# ----------- 3405f2408745Smrg# find a working dd 3406f2408745Smrgm4_defun([_LT_PATH_DD], 3407f2408745Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3408f2408745Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3409f2408745Smrgcat conftest.i conftest.i >conftest2.i 3410f2408745Smrg: ${lt_DD:=$DD} 3411f2408745SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3412f2408745Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3413f2408745Smrg cmp -s conftest.i conftest.out \ 3414f2408745Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3415f2408745Smrgfi]) 3416f2408745Smrgrm -f conftest.i conftest2.i conftest.out]) 3417f2408745Smrg])# _LT_PATH_DD 3418f2408745Smrg 3419f2408745Smrg 3420f2408745Smrg# _LT_CMD_TRUNCATE 3421f2408745Smrg# ---------------- 3422f2408745Smrg# find command to truncate a binary pipe 3423f2408745Smrgm4_defun([_LT_CMD_TRUNCATE], 3424f2408745Smrg[m4_require([_LT_PATH_DD]) 3425f2408745SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3426f2408745Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3427f2408745Smrgcat conftest.i conftest.i >conftest2.i 3428f2408745Smrglt_cv_truncate_bin= 3429f2408745Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3430f2408745Smrg cmp -s conftest.i conftest.out \ 3431f2408745Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3432f2408745Smrgfi 3433f2408745Smrgrm -f conftest.i conftest2.i conftest.out 3434f2408745Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3435f2408745Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3436f2408745Smrg [Command to truncate a binary pipe]) 3437f2408745Smrg])# _LT_CMD_TRUNCATE 3438f2408745Smrg 3439f2408745Smrg 34405592a31fSmrg# _LT_CHECK_MAGIC_METHOD 34415592a31fSmrg# ---------------------- 344250f2e948Smrg# how to check for library dependencies 344350f2e948Smrg# -- PORTME fill in with the dynamic library characteristics 34445592a31fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34455592a31fSmrg[m4_require([_LT_DECL_EGREP]) 34465592a31fSmrgm4_require([_LT_DECL_OBJDUMP]) 34475592a31fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 344850f2e948Smrglt_cv_deplibs_check_method, 344950f2e948Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 345050f2e948Smrglt_cv_file_magic_test_file= 345150f2e948Smrglt_cv_deplibs_check_method='unknown' 345250f2e948Smrg# Need to set the preceding variable on all platforms that support 345350f2e948Smrg# interlibrary dependencies. 345450f2e948Smrg# 'none' -- dependencies not supported. 3455f2408745Smrg# 'unknown' -- same as none, but documents that we really don't know. 345650f2e948Smrg# 'pass_all' -- all dependencies passed with no checks. 345750f2e948Smrg# 'test_compile' -- check by making test program. 345850f2e948Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3459f2408745Smrg# that responds to the $file_magic_cmd with a given extended regex. 3460f2408745Smrg# If you have 'file' or equivalent on your system and you're not sure 3461f2408745Smrg# whether 'pass_all' will *always* work, you probably want this one. 346245bc899bSmrg 3463226fade8Smrgcase $host_os in 346450f2e948Smrgaix[[4-9]]*) 346550f2e948Smrg lt_cv_deplibs_check_method=pass_all 346650f2e948Smrg ;; 346745bc899bSmrg 346850f2e948Smrgbeos*) 346950f2e948Smrg lt_cv_deplibs_check_method=pass_all 347050f2e948Smrg ;; 347145bc899bSmrg 347250f2e948Smrgbsdi[[45]]*) 347350f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 347450f2e948Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 347550f2e948Smrg lt_cv_file_magic_test_file=/shlib/libc.so 347650f2e948Smrg ;; 347745bc899bSmrg 347850f2e948Smrgcygwin*) 347950f2e948Smrg # func_win32_libid is a shell function defined in ltmain.sh 348050f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 348150f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 348250f2e948Smrg ;; 348345bc899bSmrg 348450f2e948Smrgmingw* | pw32*) 348550f2e948Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 348650f2e948Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 348750f2e948Smrg # unless we find 'file', for example because we are cross-compiling. 3488f2408745Smrg if ( file / ) >/dev/null 2>&1; then 348950f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 349050f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 349150f2e948Smrg else 3492b40a6198Smrg # Keep this pattern in sync with the one in func_win32_libid. 3493b40a6198Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 349450f2e948Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 349550f2e948Smrg fi 349650f2e948Smrg ;; 349745bc899bSmrg 3498b40a6198Smrgcegcc*) 34995592a31fSmrg # use the weaker test based on 'objdump'. See mingw*. 35005592a31fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35015592a31fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35025592a31fSmrg ;; 35035592a31fSmrg 350450f2e948Smrgdarwin* | rhapsody*) 350550f2e948Smrg lt_cv_deplibs_check_method=pass_all 350650f2e948Smrg ;; 3507226fade8Smrg 350850f2e948Smrgfreebsd* | dragonfly*) 35095592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3510226fade8Smrg case $host_cpu in 351150f2e948Smrg i*86 ) 351250f2e948Smrg # Not sure whether the presence of OpenBSD here was a mistake. 351350f2e948Smrg # Let's accept both of them until this is cleared up. 351450f2e948Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 351550f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 351650f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3517226fade8Smrg ;; 3518226fade8Smrg esac 351950f2e948Smrg else 352050f2e948Smrg lt_cv_deplibs_check_method=pass_all 352150f2e948Smrg fi 352250f2e948Smrg ;; 3523226fade8Smrg 3524b40a6198Smrghaiku*) 3525b40a6198Smrg lt_cv_deplibs_check_method=pass_all 3526b40a6198Smrg ;; 3527b40a6198Smrg 352850f2e948Smrghpux10.20* | hpux11*) 352950f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 353050f2e948Smrg case $host_cpu in 353150f2e948Smrg ia64*) 353250f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 353350f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3534226fade8Smrg ;; 353550f2e948Smrg hppa*64*) 3536b40a6198Smrg [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]'] 353750f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3538226fade8Smrg ;; 353950f2e948Smrg *) 3540b40a6198Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 354150f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3542226fade8Smrg ;; 354350f2e948Smrg esac 354450f2e948Smrg ;; 3545226fade8Smrg 354650f2e948Smrginterix[[3-9]]*) 354750f2e948Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 354850f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 354950f2e948Smrg ;; 3550226fade8Smrg 355150f2e948Smrgirix5* | irix6* | nonstopux*) 355250f2e948Smrg case $LD in 355350f2e948Smrg *-32|*"-32 ") libmagic=32-bit;; 355450f2e948Smrg *-n32|*"-n32 ") libmagic=N32;; 355550f2e948Smrg *-64|*"-64 ") libmagic=64-bit;; 355650f2e948Smrg *) libmagic=never-match;; 355750f2e948Smrg esac 355850f2e948Smrg lt_cv_deplibs_check_method=pass_all 355950f2e948Smrg ;; 3560226fade8Smrg 3561b40a6198Smrg# This must be glibc/ELF. 3562f2408745Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 356350f2e948Smrg lt_cv_deplibs_check_method=pass_all 356450f2e948Smrg ;; 3565226fade8Smrg 356657ba8e8bSmrgnetbsd*) 35675592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 356850f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 356950f2e948Smrg else 357050f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 357150f2e948Smrg fi 357250f2e948Smrg ;; 3573226fade8Smrg 357450f2e948Smrgnewos6*) 357550f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 357650f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 357750f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 357850f2e948Smrg ;; 3579226fade8Smrg 35805592a31fSmrg*nto* | *qnx*) 35815592a31fSmrg lt_cv_deplibs_check_method=pass_all 358250f2e948Smrg ;; 3583226fade8Smrg 3584f2408745Smrgopenbsd* | bitrig*) 3585f2408745Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 358650f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 358750f2e948Smrg else 358850f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 358950f2e948Smrg fi 359050f2e948Smrg ;; 3591226fade8Smrg 359250f2e948Smrgosf3* | osf4* | osf5*) 359350f2e948Smrg lt_cv_deplibs_check_method=pass_all 359450f2e948Smrg ;; 3595226fade8Smrg 359650f2e948Smrgrdos*) 359750f2e948Smrg lt_cv_deplibs_check_method=pass_all 359850f2e948Smrg ;; 3599226fade8Smrg 360050f2e948Smrgsolaris*) 360150f2e948Smrg lt_cv_deplibs_check_method=pass_all 360250f2e948Smrg ;; 360350f2e948Smrg 36045592a31fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36055592a31fSmrg lt_cv_deplibs_check_method=pass_all 36065592a31fSmrg ;; 36075592a31fSmrg 360850f2e948Smrgsysv4 | sysv4.3*) 360950f2e948Smrg case $host_vendor in 361050f2e948Smrg motorola) 361150f2e948Smrg 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]]' 361250f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3613226fade8Smrg ;; 361450f2e948Smrg ncr) 361550f2e948Smrg lt_cv_deplibs_check_method=pass_all 3616226fade8Smrg ;; 361750f2e948Smrg sequent) 361850f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 361950f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3620226fade8Smrg ;; 362150f2e948Smrg sni) 362250f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 362350f2e948Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 362450f2e948Smrg lt_cv_file_magic_test_file=/lib/libc.so 362550f2e948Smrg ;; 362650f2e948Smrg siemens) 362750f2e948Smrg lt_cv_deplibs_check_method=pass_all 362850f2e948Smrg ;; 362950f2e948Smrg pc) 363050f2e948Smrg lt_cv_deplibs_check_method=pass_all 363150f2e948Smrg ;; 363250f2e948Smrg esac 363350f2e948Smrg ;; 363445bc899bSmrg 36355592a31fSmrgtpf*) 363650f2e948Smrg lt_cv_deplibs_check_method=pass_all 363750f2e948Smrg ;; 3638f2408745Smrgos2*) 3639f2408745Smrg lt_cv_deplibs_check_method=pass_all 3640f2408745Smrg ;; 3641226fade8Smrgesac 3642226fade8Smrg]) 3643b40a6198Smrg 3644b40a6198Smrgfile_magic_glob= 3645b40a6198Smrgwant_nocaseglob=no 3646b40a6198Smrgif test "$build" = "$host"; then 3647b40a6198Smrg case $host_os in 3648b40a6198Smrg mingw* | pw32*) 3649b40a6198Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3650b40a6198Smrg want_nocaseglob=yes 3651b40a6198Smrg else 3652b40a6198Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3653b40a6198Smrg fi 3654b40a6198Smrg ;; 3655b40a6198Smrg esac 3656b40a6198Smrgfi 3657b40a6198Smrg 365850f2e948Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 365950f2e948Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 366050f2e948Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36615592a31fSmrg 36625592a31fSmrg_LT_DECL([], [deplibs_check_method], [1], 36635592a31fSmrg [Method to check whether dependent libraries are shared objects]) 36645592a31fSmrg_LT_DECL([], [file_magic_cmd], [1], 3665b40a6198Smrg [Command to use when deplibs_check_method = "file_magic"]) 3666b40a6198Smrg_LT_DECL([], [file_magic_glob], [1], 3667b40a6198Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3668b40a6198Smrg_LT_DECL([], [want_nocaseglob], [1], 3669b40a6198Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36705592a31fSmrg])# _LT_CHECK_MAGIC_METHOD 3671226fade8Smrg 367245bc899bSmrg 36735592a31fSmrg# LT_PATH_NM 367450f2e948Smrg# ---------- 36755592a31fSmrg# find the pathname to a BSD- or MS-compatible name lister 36765592a31fSmrgAC_DEFUN([LT_PATH_NM], 36775592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 36785592a31fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 367950f2e948Smrg[if test -n "$NM"; then 368050f2e948Smrg # Let the user override the test. 3681f2408745Smrg lt_cv_path_NM=$NM 368250f2e948Smrgelse 3683f2408745Smrg lt_nm_to_check=${ac_tool_prefix}nm 368450f2e948Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 368550f2e948Smrg lt_nm_to_check="$lt_nm_to_check nm" 368650f2e948Smrg fi 368750f2e948Smrg for lt_tmp_nm in $lt_nm_to_check; do 3688f2408745Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 368950f2e948Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3690f2408745Smrg IFS=$lt_save_ifs 369150f2e948Smrg test -z "$ac_dir" && ac_dir=. 3692f2408745Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3693f2408745Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 369450f2e948Smrg # Check to see if the nm accepts a BSD-compat flag. 3695f2408745Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 369650f2e948Smrg # nm: unknown option "B" ignored 369750f2e948Smrg # Tru64's nm complains that /dev/null is an invalid object file 3698f2408745Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3699f2408745Smrg case $build_os in 3700f2408745Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3701f2408745Smrg *) lt_bad_file=/dev/null ;; 3702f2408745Smrg esac 3703f2408745Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3704f2408745Smrg *$lt_bad_file* | *'Invalid file or object type'*) 370550f2e948Smrg lt_cv_path_NM="$tmp_nm -B" 3706f2408745Smrg break 2 370750f2e948Smrg ;; 370850f2e948Smrg *) 370950f2e948Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 371050f2e948Smrg */dev/null*) 371150f2e948Smrg lt_cv_path_NM="$tmp_nm -p" 3712f2408745Smrg break 2 371350f2e948Smrg ;; 371450f2e948Smrg *) 371550f2e948Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 371650f2e948Smrg continue # so that we can try to find one that supports BSD flags 371750f2e948Smrg ;; 371850f2e948Smrg esac 371950f2e948Smrg ;; 372050f2e948Smrg esac 372150f2e948Smrg fi 372250f2e948Smrg done 3723f2408745Smrg IFS=$lt_save_ifs 3724226fade8Smrg done 37255592a31fSmrg : ${lt_cv_path_NM=no} 372650f2e948Smrgfi]) 3727f2408745Smrgif test no != "$lt_cv_path_NM"; then 3728f2408745Smrg NM=$lt_cv_path_NM 37295592a31fSmrgelse 37305592a31fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3731b40a6198Smrg if test -n "$DUMPBIN"; then : 3732b40a6198Smrg # Let the user override the test. 3733b40a6198Smrg else 3734b40a6198Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3735f2408745Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3736b40a6198Smrg *COFF*) 3737f2408745Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3738b40a6198Smrg ;; 3739b40a6198Smrg *) 3740b40a6198Smrg DUMPBIN=: 3741b40a6198Smrg ;; 3742b40a6198Smrg esac 3743b40a6198Smrg fi 37445592a31fSmrg AC_SUBST([DUMPBIN]) 3745f2408745Smrg if test : != "$DUMPBIN"; then 3746f2408745Smrg NM=$DUMPBIN 37475592a31fSmrg fi 37485592a31fSmrgfi 37495592a31fSmrgtest -z "$NM" && NM=nm 37505592a31fSmrgAC_SUBST([NM]) 37515592a31fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37525592a31fSmrg 37535592a31fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37545592a31fSmrg [lt_cv_nm_interface="BSD nm" 37555592a31fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3756b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37575592a31fSmrg (eval "$ac_compile" 2>conftest.err) 37585592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3759b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37605592a31fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37615592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3762b40a6198Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37635592a31fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 37645592a31fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37655592a31fSmrg lt_cv_nm_interface="MS dumpbin" 37665592a31fSmrg fi 37675592a31fSmrg rm -f conftest*]) 37685592a31fSmrg])# LT_PATH_NM 376945bc899bSmrg 37705592a31fSmrg# Old names: 37715592a31fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37725592a31fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37735592a31fSmrgdnl aclocal-1.4 backwards compatibility: 37745592a31fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 37755592a31fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 377645bc899bSmrg 3777b40a6198Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3778b40a6198Smrg# -------------------------------- 3779b40a6198Smrg# how to determine the name of the shared library 3780b40a6198Smrg# associated with a specific link library. 3781b40a6198Smrg# -- PORTME fill in with the dynamic library characteristics 3782b40a6198Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3783b40a6198Smrg[m4_require([_LT_DECL_EGREP]) 3784b40a6198Smrgm4_require([_LT_DECL_OBJDUMP]) 3785b40a6198Smrgm4_require([_LT_DECL_DLLTOOL]) 3786b40a6198SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3787b40a6198Smrglt_cv_sharedlib_from_linklib_cmd, 3788b40a6198Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 37895592a31fSmrg 3790b40a6198Smrgcase $host_os in 3791b40a6198Smrgcygwin* | mingw* | pw32* | cegcc*) 3792f2408745Smrg # two different shell functions defined in ltmain.sh; 3793f2408745Smrg # decide which one to use based on capabilities of $DLLTOOL 3794b40a6198Smrg case `$DLLTOOL --help 2>&1` in 3795b40a6198Smrg *--identify-strict*) 3796b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3797b40a6198Smrg ;; 3798b40a6198Smrg *) 3799b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3800b40a6198Smrg ;; 3801b40a6198Smrg esac 3802b40a6198Smrg ;; 3803b40a6198Smrg*) 3804b40a6198Smrg # fallback: assume linklib IS sharedlib 3805f2408745Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3806b40a6198Smrg ;; 3807b40a6198Smrgesac 3808b40a6198Smrg]) 3809b40a6198Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3810b40a6198Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3811b40a6198Smrg 3812b40a6198Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3813b40a6198Smrg [Command to associate shared and link libraries]) 3814b40a6198Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3815b40a6198Smrg 3816b40a6198Smrg 3817b40a6198Smrg# _LT_PATH_MANIFEST_TOOL 3818b40a6198Smrg# ---------------------- 3819b40a6198Smrg# locate the manifest tool 3820b40a6198Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3821b40a6198Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3822b40a6198Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3823b40a6198SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3824b40a6198Smrg [lt_cv_path_mainfest_tool=no 3825b40a6198Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3826b40a6198Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3827b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3828b40a6198Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3829b40a6198Smrg lt_cv_path_mainfest_tool=yes 3830b40a6198Smrg fi 3831b40a6198Smrg rm -f conftest*]) 3832f2408745Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 3833b40a6198Smrg MANIFEST_TOOL=: 3834b40a6198Smrgfi 3835b40a6198Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3836b40a6198Smrg])# _LT_PATH_MANIFEST_TOOL 3837b40a6198Smrg 3838b40a6198Smrg 3839f2408745Smrg# _LT_DLL_DEF_P([FILE]) 3840f2408745Smrg# --------------------- 3841f2408745Smrg# True iff FILE is a Windows DLL '.def' file. 3842f2408745Smrg# Keep in sync with func_dll_def_p in the libtool script 3843f2408745SmrgAC_DEFUN([_LT_DLL_DEF_P], 3844f2408745Smrg[dnl 3845f2408745Smrg test DEF = "`$SED -n dnl 3846f2408745Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3847f2408745Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3848f2408745Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3849f2408745Smrg -e q dnl Only consider the first "real" line 3850f2408745Smrg $1`" dnl 3851f2408745Smrg])# _LT_DLL_DEF_P 3852f2408745Smrg 3853f2408745Smrg 3854b40a6198Smrg# LT_LIB_M 38555592a31fSmrg# -------- 385650f2e948Smrg# check for math library 38575592a31fSmrgAC_DEFUN([LT_LIB_M], 385850f2e948Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 385950f2e948SmrgLIBM= 386050f2e948Smrgcase $host in 3861b40a6198Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 386250f2e948Smrg # These system don't have libm, or don't need it 386350f2e948Smrg ;; 386450f2e948Smrg*-ncr-sysv4.3*) 3865f2408745Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 386650f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 386750f2e948Smrg ;; 386850f2e948Smrg*) 3869f2408745Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3870226fade8Smrg ;; 3871226fade8Smrgesac 38725592a31fSmrgAC_SUBST([LIBM]) 38735592a31fSmrg])# LT_LIB_M 387445bc899bSmrg 38755592a31fSmrg# Old name: 38765592a31fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38775592a31fSmrgdnl aclocal-1.4 backwards compatibility: 38785592a31fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 387945bc899bSmrg 388045bc899bSmrg 38815592a31fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38825592a31fSmrg# ------------------------------- 38835592a31fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 38845592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 388545bc899bSmrg 38865592a31fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 388745bc899bSmrg 3888f2408745Smrgif test yes = "$GCC"; then 3889b40a6198Smrg case $cc_basename in 3890b40a6198Smrg nvcc*) 3891b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3892b40a6198Smrg *) 3893b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3894b40a6198Smrg esac 389545bc899bSmrg 38965592a31fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 38975592a31fSmrg lt_cv_prog_compiler_rtti_exceptions, 38985592a31fSmrg [-fno-rtti -fno-exceptions], [], 38995592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39005592a31fSmrgfi 39015592a31fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39025592a31fSmrg [Compiler flag to turn off builtin functions]) 39035592a31fSmrg])# _LT_COMPILER_NO_RTTI 390445bc899bSmrg 390545bc899bSmrg 39065592a31fSmrg# _LT_CMD_GLOBAL_SYMBOLS 39075592a31fSmrg# ---------------------- 39085592a31fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39095592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39105592a31fSmrgAC_REQUIRE([AC_PROG_CC])dnl 3911b40a6198SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39125592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 39135592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 39145592a31fSmrgm4_require([_LT_DECL_SED])dnl 39155592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 39165592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 391745bc899bSmrg 39185592a31fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39195592a31fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39205592a31fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 392150f2e948Smrg[ 39225592a31fSmrg# These are sane defaults that work on at least a few old systems. 39235592a31fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 392445bc899bSmrg 39255592a31fSmrg# Character class describing NM global symbol codes. 39265592a31fSmrgsymcode='[[BCDEGRST]]' 392745bc899bSmrg 39285592a31fSmrg# Regexp to match symbols that can be accessed directly from C. 39295592a31fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 393045bc899bSmrg 39315592a31fSmrg# Define system-specific variables. 39325592a31fSmrgcase $host_os in 39335592a31fSmrgaix*) 39345592a31fSmrg symcode='[[BCDT]]' 39355592a31fSmrg ;; 39365592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 39375592a31fSmrg symcode='[[ABCDGISTW]]' 39385592a31fSmrg ;; 39395592a31fSmrghpux*) 3940f2408745Smrg if test ia64 = "$host_cpu"; then 39415592a31fSmrg symcode='[[ABCDEGRST]]' 39425592a31fSmrg fi 39435592a31fSmrg ;; 39445592a31fSmrgirix* | nonstopux*) 39455592a31fSmrg symcode='[[BCDEGRST]]' 39465592a31fSmrg ;; 39475592a31fSmrgosf*) 39485592a31fSmrg symcode='[[BCDEGQRST]]' 39495592a31fSmrg ;; 39505592a31fSmrgsolaris*) 39515592a31fSmrg symcode='[[BDRT]]' 39525592a31fSmrg ;; 39535592a31fSmrgsco3.2v5*) 39545592a31fSmrg symcode='[[DT]]' 39555592a31fSmrg ;; 39565592a31fSmrgsysv4.2uw2*) 39575592a31fSmrg symcode='[[DT]]' 39585592a31fSmrg ;; 39595592a31fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39605592a31fSmrg symcode='[[ABDT]]' 39615592a31fSmrg ;; 39625592a31fSmrgsysv4) 39635592a31fSmrg symcode='[[DFNSTU]]' 39645592a31fSmrg ;; 39655592a31fSmrgesac 396645bc899bSmrg 39675592a31fSmrg# If we're using GNU nm, then use its standard symbol codes. 39685592a31fSmrgcase `$NM -V 2>&1` in 39695592a31fSmrg*GNU* | *'with BFD'*) 39705592a31fSmrg symcode='[[ABCDGIRSTW]]' ;; 39715592a31fSmrgesac 397245bc899bSmrg 3973f2408745Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3974f2408745Smrg # Gets list of data symbols to import. 3975f2408745Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3976f2408745Smrg # Adjust the below global symbol transforms to fixup imported variables. 3977f2408745Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3978f2408745Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3979f2408745Smrg lt_c_name_lib_hook="\ 3980f2408745Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3981f2408745Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3982f2408745Smrgelse 3983f2408745Smrg # Disable hooks by default. 3984f2408745Smrg lt_cv_sys_global_symbol_to_import= 3985f2408745Smrg lt_cdecl_hook= 3986f2408745Smrg lt_c_name_hook= 3987f2408745Smrg lt_c_name_lib_hook= 3988f2408745Smrgfi 3989f2408745Smrg 39905592a31fSmrg# Transform an extracted symbol line into a proper C declaration. 39915592a31fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 39925592a31fSmrg# so use this general approach. 3993f2408745Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3994f2408745Smrg$lt_cdecl_hook\ 3995f2408745Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3996f2408745Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 399745bc899bSmrg 39985592a31fSmrg# Transform an extracted symbol line into symbol name and symbol address 3999f2408745Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4000f2408745Smrg$lt_c_name_hook\ 4001f2408745Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4002f2408745Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4003f2408745Smrg 4004f2408745Smrg# Transform an extracted symbol line into symbol name with lib prefix and 4005f2408745Smrg# symbol address. 4006f2408745Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4007f2408745Smrg$lt_c_name_lib_hook\ 4008f2408745Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4009f2408745Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4010f2408745Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 401145bc899bSmrg 40125592a31fSmrg# Handle CRLF in mingw tool chain 40135592a31fSmrgopt_cr= 40145592a31fSmrgcase $build_os in 40155592a31fSmrgmingw*) 40165592a31fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40175592a31fSmrg ;; 40185592a31fSmrgesac 40193a925b30Smrg 40205592a31fSmrg# Try without a prefix underscore, then with it. 40215592a31fSmrgfor ac_symprfx in "" "_"; do 40223a925b30Smrg 40235592a31fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40245592a31fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40253a925b30Smrg 40265592a31fSmrg # Write the raw and C identifiers. 40275592a31fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4028f2408745Smrg # Fake it for dumpbin and say T for any non-static function, 4029f2408745Smrg # D for any global variable and I for any imported variable. 40305592a31fSmrg # Also find C++ and __fastcall symbols from MSVC++, 40315592a31fSmrg # which start with @ or ?. 40325592a31fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40335592a31fSmrg" {last_section=section; section=\$ 3};"\ 4034b40a6198Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40355592a31fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4036f2408745Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4037f2408745Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4038f2408745Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40395592a31fSmrg" \$ 0!~/External *\|/{next};"\ 40405592a31fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40415592a31fSmrg" {if(hide[section]) next};"\ 4042f2408745Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4043f2408745Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4044f2408745Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4045f2408745Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40465592a31fSmrg" ' prfx=^$ac_symprfx]" 40475592a31fSmrg else 40485592a31fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40493a925b30Smrg fi 4050b40a6198Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 405145bc899bSmrg 40525592a31fSmrg # Check to see that the pipe works correctly. 40535592a31fSmrg pipe_works=no 405445bc899bSmrg 40555592a31fSmrg rm -f conftest* 40565592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 40575592a31fSmrg#ifdef __cplusplus 40585592a31fSmrgextern "C" { 40595592a31fSmrg#endif 40605592a31fSmrgchar nm_test_var; 40615592a31fSmrgvoid nm_test_func(void); 40625592a31fSmrgvoid nm_test_func(void){} 40635592a31fSmrg#ifdef __cplusplus 40645592a31fSmrg} 40655592a31fSmrg#endif 40665592a31fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 40675592a31fSmrg_LT_EOF 40683a925b30Smrg 40695592a31fSmrg if AC_TRY_EVAL(ac_compile); then 40705592a31fSmrg # Now try to grab the symbols. 40715592a31fSmrg nlist=conftest.nm 4072b40a6198Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40735592a31fSmrg # Try sorting and uniquifying the output. 40745592a31fSmrg if sort "$nlist" | uniq > "$nlist"T; then 40755592a31fSmrg mv -f "$nlist"T "$nlist" 40765592a31fSmrg else 40775592a31fSmrg rm -f "$nlist"T 40785592a31fSmrg fi 40793a925b30Smrg 40805592a31fSmrg # Make sure that we snagged all the symbols we need. 40815592a31fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40825592a31fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40835592a31fSmrg cat <<_LT_EOF > conftest.$ac_ext 4084b40a6198Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4085f2408745Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4086f2408745Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4087b40a6198Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4088b40a6198Smrg# define LT@&t@_DLSYM_CONST 4089f2408745Smrg#elif defined __osf__ 4090b40a6198Smrg/* This system does not cope well with relocations in const data. */ 4091b40a6198Smrg# define LT@&t@_DLSYM_CONST 4092b40a6198Smrg#else 4093b40a6198Smrg# define LT@&t@_DLSYM_CONST const 4094b40a6198Smrg#endif 4095b40a6198Smrg 40965592a31fSmrg#ifdef __cplusplus 40975592a31fSmrgextern "C" { 40985592a31fSmrg#endif 40993a925b30Smrg 41005592a31fSmrg_LT_EOF 41015592a31fSmrg # Now generate the symbol file. 41025592a31fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41033a925b30Smrg 41045592a31fSmrg cat <<_LT_EOF >> conftest.$ac_ext 41053a925b30Smrg 41065592a31fSmrg/* The mapping between symbol names and symbols. */ 4107b40a6198SmrgLT@&t@_DLSYM_CONST struct { 41085592a31fSmrg const char *name; 41095592a31fSmrg void *address; 41105592a31fSmrg} 41115592a31fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41125592a31fSmrg{ 41135592a31fSmrg { "@PROGRAM@", (void *) 0 }, 41145592a31fSmrg_LT_EOF 4115f2408745Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41165592a31fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 41175592a31fSmrg {0, (void *) 0} 41185592a31fSmrg}; 41193a925b30Smrg 41205592a31fSmrg/* This works around a problem in FreeBSD linker */ 41215592a31fSmrg#ifdef FREEBSD_WORKAROUND 41225592a31fSmrgstatic const void *lt_preloaded_setup() { 41235592a31fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 41245592a31fSmrg} 41255592a31fSmrg#endif 41263a925b30Smrg 41275592a31fSmrg#ifdef __cplusplus 41285592a31fSmrg} 41295592a31fSmrg#endif 41305592a31fSmrg_LT_EOF 41315592a31fSmrg # Now try linking the two files. 41325592a31fSmrg mv conftest.$ac_objext conftstm.$ac_objext 4133b40a6198Smrg lt_globsym_save_LIBS=$LIBS 4134b40a6198Smrg lt_globsym_save_CFLAGS=$CFLAGS 4135f2408745Smrg LIBS=conftstm.$ac_objext 41365592a31fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4137f2408745Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41385592a31fSmrg pipe_works=yes 41395592a31fSmrg fi 4140b40a6198Smrg LIBS=$lt_globsym_save_LIBS 4141b40a6198Smrg CFLAGS=$lt_globsym_save_CFLAGS 41425592a31fSmrg else 41435592a31fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41445592a31fSmrg fi 41455592a31fSmrg else 41465592a31fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41475592a31fSmrg fi 414850f2e948Smrg else 41495592a31fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 415050f2e948Smrg fi 415150f2e948Smrg else 41525592a31fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41535592a31fSmrg cat conftest.$ac_ext >&5 415450f2e948Smrg fi 41555592a31fSmrg rm -rf conftest* conftst* 415645bc899bSmrg 41575592a31fSmrg # Do not use the global_symbol_pipe unless it works. 4158f2408745Smrg if test yes = "$pipe_works"; then 41595592a31fSmrg break 41605592a31fSmrg else 41615592a31fSmrg lt_cv_sys_global_symbol_pipe= 41625592a31fSmrg fi 41635592a31fSmrgdone 41645592a31fSmrg]) 41655592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41665592a31fSmrg lt_cv_sys_global_symbol_to_cdecl= 41675592a31fSmrgfi 41685592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41695592a31fSmrg AC_MSG_RESULT(failed) 417050f2e948Smrgelse 41715592a31fSmrg AC_MSG_RESULT(ok) 417250f2e948Smrgfi 417345bc899bSmrg 4174b40a6198Smrg# Response file support. 4175b40a6198Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4176b40a6198Smrg nm_file_list_spec='@' 4177b40a6198Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4178b40a6198Smrg nm_file_list_spec='@' 4179b40a6198Smrgfi 4180b40a6198Smrg 41815592a31fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41825592a31fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 41835592a31fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41845592a31fSmrg [Transform the output of nm in a proper C declaration]) 4185f2408745Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4186f2408745Smrg [Transform the output of nm into a list of symbols to manually relocate]) 41875592a31fSmrg_LT_DECL([global_symbol_to_c_name_address], 41885592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41895592a31fSmrg [Transform the output of nm in a C name address pair]) 41905592a31fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41915592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41925592a31fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4193f2408745Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4194f2408745Smrg [The name lister interface]) 4195b40a6198Smrg_LT_DECL([], [nm_file_list_spec], [1], 4196b40a6198Smrg [Specify filename containing input files for $NM]) 41975592a31fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 419845bc899bSmrg 419945bc899bSmrg 42005592a31fSmrg# _LT_COMPILER_PIC([TAGNAME]) 42015592a31fSmrg# --------------------------- 42025592a31fSmrgm4_defun([_LT_COMPILER_PIC], 42035592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 42045592a31fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42055592a31fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42065592a31fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 420745bc899bSmrg 42085592a31fSmrgm4_if([$1], [CXX], [ 42095592a31fSmrg # C++ specific cases for pic, static, wl, etc. 4210f2408745Smrg if test yes = "$GXX"; then 42115592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42125592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42133a925b30Smrg 42145592a31fSmrg case $host_os in 42155592a31fSmrg aix*) 42165592a31fSmrg # All AIX code is PIC. 4217f2408745Smrg if test ia64 = "$host_cpu"; then 42185592a31fSmrg # AIX 5 now supports IA64 processor 42195592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42203a925b30Smrg fi 4221f2408745Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42223a925b30Smrg ;; 422345bc899bSmrg 42245592a31fSmrg amigaos*) 422550f2e948Smrg case $host_cpu in 42265592a31fSmrg powerpc) 42275592a31fSmrg # see comment about AmigaOS4 .so support 42285592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42295592a31fSmrg ;; 42305592a31fSmrg m68k) 42315592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4232f2408745Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4233f2408745Smrg # like '-m68040'. 42345592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 423550f2e948Smrg ;; 423650f2e948Smrg esac 423750f2e948Smrg ;; 42383a925b30Smrg 42395592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42405592a31fSmrg # PIC is the default for these OSes. 42415592a31fSmrg ;; 42425592a31fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42435592a31fSmrg # This hack is so that the source file can tell whether it is being 42445592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 42455592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42465592a31fSmrg # (--disable-auto-import) libraries 42475592a31fSmrg m4_if([$1], [GCJ], [], 42485592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4249f2408745Smrg case $host_os in 4250f2408745Smrg os2*) 4251f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4252f2408745Smrg ;; 4253f2408745Smrg esac 42545592a31fSmrg ;; 42555592a31fSmrg darwin* | rhapsody*) 42565592a31fSmrg # PIC is the default on this platform 42575592a31fSmrg # Common symbols not allowed in MH_DYLIB files 42585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42595592a31fSmrg ;; 42605592a31fSmrg *djgpp*) 42615592a31fSmrg # DJGPP does not support shared libraries at all 42625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42635592a31fSmrg ;; 4264b40a6198Smrg haiku*) 4265b40a6198Smrg # PIC is the default for Haiku. 4266b40a6198Smrg # The "-static" flag exists, but is broken. 4267b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4268b40a6198Smrg ;; 42695592a31fSmrg interix[[3-9]]*) 42705592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42715592a31fSmrg # Instead, we relocate shared libraries at runtime. 42725592a31fSmrg ;; 42735592a31fSmrg sysv4*MP*) 42745592a31fSmrg if test -d /usr/nec; then 42755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42765592a31fSmrg fi 42775592a31fSmrg ;; 42785592a31fSmrg hpux*) 42795592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42805592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42815592a31fSmrg # sets the default TLS model and affects inlining. 42825592a31fSmrg case $host_cpu in 42835592a31fSmrg hppa*64*) 428450f2e948Smrg ;; 42853a925b30Smrg *) 42865592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 428750f2e948Smrg ;; 42885592a31fSmrg esac 42895592a31fSmrg ;; 42905592a31fSmrg *qnx* | *nto*) 42915592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42925592a31fSmrg # it will coredump. 42935592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42945592a31fSmrg ;; 42955592a31fSmrg *) 42965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42975592a31fSmrg ;; 42983a925b30Smrg esac 42995592a31fSmrg else 43005592a31fSmrg case $host_os in 43015592a31fSmrg aix[[4-9]]*) 43025592a31fSmrg # All AIX code is PIC. 4303f2408745Smrg if test ia64 = "$host_cpu"; then 43045592a31fSmrg # AIX 5 now supports IA64 processor 43055592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43065592a31fSmrg else 43075592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43083a925b30Smrg fi 430950f2e948Smrg ;; 43105592a31fSmrg chorus*) 43115592a31fSmrg case $cc_basename in 43125592a31fSmrg cxch68*) 43135592a31fSmrg # Green Hills C++ Compiler 43145592a31fSmrg # _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" 43153a925b30Smrg ;; 431650f2e948Smrg esac 431750f2e948Smrg ;; 4318b40a6198Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4319b40a6198Smrg # This hack is so that the source file can tell whether it is being 4320b40a6198Smrg # built for inclusion in a dll (and should export symbols for example). 4321b40a6198Smrg m4_if([$1], [GCJ], [], 4322b40a6198Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4323b40a6198Smrg ;; 43245592a31fSmrg dgux*) 43255592a31fSmrg case $cc_basename in 43265592a31fSmrg ec++*) 43275592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43285592a31fSmrg ;; 43295592a31fSmrg ghcx*) 43305592a31fSmrg # Green Hills C++ Compiler 43315592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43325592a31fSmrg ;; 43335592a31fSmrg *) 43345592a31fSmrg ;; 433550f2e948Smrg esac 433650f2e948Smrg ;; 43375592a31fSmrg freebsd* | dragonfly*) 43385592a31fSmrg # FreeBSD uses GNU C++ 433950f2e948Smrg ;; 43405592a31fSmrg hpux9* | hpux10* | hpux11*) 43415592a31fSmrg case $cc_basename in 43425592a31fSmrg CC*) 43435592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4344f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4345f2408745Smrg if test ia64 != "$host_cpu"; then 43465592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43475592a31fSmrg fi 43485592a31fSmrg ;; 43495592a31fSmrg aCC*) 43505592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4351f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43525592a31fSmrg case $host_cpu in 43535592a31fSmrg hppa*64*|ia64*) 43545592a31fSmrg # +Z the default 43555592a31fSmrg ;; 43565592a31fSmrg *) 43575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43585592a31fSmrg ;; 43595592a31fSmrg esac 43605592a31fSmrg ;; 43615592a31fSmrg *) 43625592a31fSmrg ;; 43635592a31fSmrg esac 436450f2e948Smrg ;; 43655592a31fSmrg interix*) 43665592a31fSmrg # This is c89, which is MS Visual C++ (no shared libs) 43675592a31fSmrg # Anyone wants to do a port? 436850f2e948Smrg ;; 43695592a31fSmrg irix5* | irix6* | nonstopux*) 43705592a31fSmrg case $cc_basename in 43715592a31fSmrg CC*) 43725592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43735592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43745592a31fSmrg # CC pic flag -KPIC is the default. 43755592a31fSmrg ;; 43765592a31fSmrg *) 43775592a31fSmrg ;; 43785592a31fSmrg esac 43793a925b30Smrg ;; 4380f2408745Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43815592a31fSmrg case $cc_basename in 43825592a31fSmrg KCC*) 43835592a31fSmrg # KAI C++ Compiler 43845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43855592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43865592a31fSmrg ;; 43875592a31fSmrg ecpc* ) 4388f2408745Smrg # old Intel C++ for x86_64, which still supported -KPIC. 43895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43915592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43925592a31fSmrg ;; 43935592a31fSmrg icpc* ) 43945592a31fSmrg # Intel C++, used to be incompatible with GCC. 43955592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 43965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43975592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43985592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43995592a31fSmrg ;; 44005592a31fSmrg pgCC* | pgcpp*) 44015592a31fSmrg # Portland Group C++ compiler 44025592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44045592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44055592a31fSmrg ;; 44065592a31fSmrg cxx*) 44075592a31fSmrg # Compaq C++ 44085592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44095592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44105592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44115592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44125592a31fSmrg ;; 4413b40a6198Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4414b40a6198Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44165592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44185592a31fSmrg ;; 44195592a31fSmrg *) 44205592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 44215592a31fSmrg *Sun\ C*) 44225592a31fSmrg # Sun C++ 5.9 44235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44255592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44265592a31fSmrg ;; 44275592a31fSmrg esac 44285592a31fSmrg ;; 44295592a31fSmrg esac 44303a925b30Smrg ;; 44315592a31fSmrg lynxos*) 44323a925b30Smrg ;; 44335592a31fSmrg m88k*) 44343a925b30Smrg ;; 44355592a31fSmrg mvs*) 44365592a31fSmrg case $cc_basename in 44375592a31fSmrg cxx*) 44385592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44395592a31fSmrg ;; 44405592a31fSmrg *) 44415592a31fSmrg ;; 44425592a31fSmrg esac 44433a925b30Smrg ;; 444457ba8e8bSmrg netbsd*) 44453a925b30Smrg ;; 44465592a31fSmrg *qnx* | *nto*) 44475592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44485592a31fSmrg # it will coredump. 44495592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44505592a31fSmrg ;; 44515592a31fSmrg osf3* | osf4* | osf5*) 44525592a31fSmrg case $cc_basename in 44535592a31fSmrg KCC*) 44545592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44555592a31fSmrg ;; 44565592a31fSmrg RCC*) 44575592a31fSmrg # Rational C++ 2.4.1 44585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44595592a31fSmrg ;; 44605592a31fSmrg cxx*) 44615592a31fSmrg # Digital/Compaq C++ 44625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44635592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44645592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44655592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44665592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44675592a31fSmrg ;; 44685592a31fSmrg *) 44695592a31fSmrg ;; 44705592a31fSmrg esac 44713a925b30Smrg ;; 44725592a31fSmrg psos*) 44733a925b30Smrg ;; 44745592a31fSmrg solaris*) 44755592a31fSmrg case $cc_basename in 4476b40a6198Smrg CC* | sunCC*) 44775592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 44785592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44795592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44805592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44815592a31fSmrg ;; 44825592a31fSmrg gcx*) 44835592a31fSmrg # Green Hills C++ Compiler 44845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44855592a31fSmrg ;; 44865592a31fSmrg *) 44875592a31fSmrg ;; 44885592a31fSmrg esac 44893a925b30Smrg ;; 44905592a31fSmrg sunos4*) 44915592a31fSmrg case $cc_basename in 44925592a31fSmrg CC*) 44935592a31fSmrg # Sun C++ 4.x 44945592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44965592a31fSmrg ;; 44975592a31fSmrg lcc*) 44985592a31fSmrg # Lucid 44995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45005592a31fSmrg ;; 45013a925b30Smrg *) 45023a925b30Smrg ;; 45033a925b30Smrg esac 450450f2e948Smrg ;; 45055592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45065592a31fSmrg case $cc_basename in 45075592a31fSmrg CC*) 45085592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45095592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45105592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45115592a31fSmrg ;; 45125592a31fSmrg esac 451350f2e948Smrg ;; 45145592a31fSmrg tandem*) 45155592a31fSmrg case $cc_basename in 45165592a31fSmrg NCC*) 45175592a31fSmrg # NonStop-UX NCC 3.20 45185592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45195592a31fSmrg ;; 45203a925b30Smrg *) 45213a925b30Smrg ;; 45225592a31fSmrg esac 452350f2e948Smrg ;; 45245592a31fSmrg vxworks*) 452550f2e948Smrg ;; 452650f2e948Smrg *) 45275592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 452850f2e948Smrg ;; 45293a925b30Smrg esac 45305592a31fSmrg fi 45315592a31fSmrg], 45325592a31fSmrg[ 4533f2408745Smrg if test yes = "$GCC"; then 45345592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45365592a31fSmrg 45375592a31fSmrg case $host_os in 45385592a31fSmrg aix*) 45395592a31fSmrg # All AIX code is PIC. 4540f2408745Smrg if test ia64 = "$host_cpu"; then 45415592a31fSmrg # AIX 5 now supports IA64 processor 45425592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45435592a31fSmrg fi 4544f2408745Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45455592a31fSmrg ;; 45465592a31fSmrg 45475592a31fSmrg amigaos*) 45485592a31fSmrg case $host_cpu in 45495592a31fSmrg powerpc) 45505592a31fSmrg # see comment about AmigaOS4 .so support 45515592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45525592a31fSmrg ;; 45535592a31fSmrg m68k) 45545592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4555f2408745Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4556f2408745Smrg # like '-m68040'. 45575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45585592a31fSmrg ;; 45595592a31fSmrg esac 45605592a31fSmrg ;; 45615592a31fSmrg 45625592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45635592a31fSmrg # PIC is the default for these OSes. 45645592a31fSmrg ;; 45655592a31fSmrg 45665592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45675592a31fSmrg # This hack is so that the source file can tell whether it is being 45685592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 45695592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45705592a31fSmrg # (--disable-auto-import) libraries 45715592a31fSmrg m4_if([$1], [GCJ], [], 45725592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4573f2408745Smrg case $host_os in 4574f2408745Smrg os2*) 4575f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4576f2408745Smrg ;; 4577f2408745Smrg esac 45785592a31fSmrg ;; 45795592a31fSmrg 45805592a31fSmrg darwin* | rhapsody*) 45815592a31fSmrg # PIC is the default on this platform 45825592a31fSmrg # Common symbols not allowed in MH_DYLIB files 45835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45845592a31fSmrg ;; 45855592a31fSmrg 4586b40a6198Smrg haiku*) 4587b40a6198Smrg # PIC is the default for Haiku. 4588b40a6198Smrg # The "-static" flag exists, but is broken. 4589b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4590b40a6198Smrg ;; 4591b40a6198Smrg 45925592a31fSmrg hpux*) 45935592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45945592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45955592a31fSmrg # sets the default TLS model and affects inlining. 45965592a31fSmrg case $host_cpu in 45975592a31fSmrg hppa*64*) 45985592a31fSmrg # +Z the default 45993a925b30Smrg ;; 46003a925b30Smrg *) 46015592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46023a925b30Smrg ;; 46035592a31fSmrg esac 46045592a31fSmrg ;; 46055592a31fSmrg 46065592a31fSmrg interix[[3-9]]*) 46075592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46085592a31fSmrg # Instead, we relocate shared libraries at runtime. 46095592a31fSmrg ;; 46105592a31fSmrg 46115592a31fSmrg msdosdjgpp*) 46125592a31fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46135592a31fSmrg # on systems that don't support them. 46145592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46155592a31fSmrg enable_shared=no 46165592a31fSmrg ;; 46175592a31fSmrg 46185592a31fSmrg *nto* | *qnx*) 46195592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46205592a31fSmrg # it will coredump. 46215592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46225592a31fSmrg ;; 46235592a31fSmrg 46245592a31fSmrg sysv4*MP*) 46255592a31fSmrg if test -d /usr/nec; then 46265592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46275592a31fSmrg fi 46285592a31fSmrg ;; 46295592a31fSmrg 46305592a31fSmrg *) 46315592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46325592a31fSmrg ;; 46333a925b30Smrg esac 4634b40a6198Smrg 4635b40a6198Smrg case $cc_basename in 4636b40a6198Smrg nvcc*) # Cuda Compiler Driver 2.2 4637b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4638b40a6198Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4639b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4640b40a6198Smrg fi 4641b40a6198Smrg ;; 4642b40a6198Smrg esac 46435592a31fSmrg else 46445592a31fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 46455592a31fSmrg case $host_os in 46465592a31fSmrg aix*) 46475592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4648f2408745Smrg if test ia64 = "$host_cpu"; then 46495592a31fSmrg # AIX 5 now supports IA64 processor 46505592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46515592a31fSmrg else 46525592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46535592a31fSmrg fi 46545592a31fSmrg ;; 46555592a31fSmrg 4656f2408745Smrg darwin* | rhapsody*) 4657f2408745Smrg # PIC is the default on this platform 4658f2408745Smrg # Common symbols not allowed in MH_DYLIB files 4659f2408745Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4660f2408745Smrg case $cc_basename in 4661f2408745Smrg nagfor*) 4662f2408745Smrg # NAG Fortran compiler 4663f2408745Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4664f2408745Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4665f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4666f2408745Smrg ;; 4667f2408745Smrg esac 4668f2408745Smrg ;; 4669f2408745Smrg 46705592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46715592a31fSmrg # This hack is so that the source file can tell whether it is being 46725592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 46735592a31fSmrg m4_if([$1], [GCJ], [], 46745592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4675f2408745Smrg case $host_os in 4676f2408745Smrg os2*) 4677f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4678f2408745Smrg ;; 4679f2408745Smrg esac 46805592a31fSmrg ;; 46815592a31fSmrg 46825592a31fSmrg hpux9* | hpux10* | hpux11*) 46835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46845592a31fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46855592a31fSmrg # not for PA HP-UX. 46865592a31fSmrg case $host_cpu in 46875592a31fSmrg hppa*64*|ia64*) 46885592a31fSmrg # +Z the default 46893a925b30Smrg ;; 46903a925b30Smrg *) 46915592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 46923a925b30Smrg ;; 46935592a31fSmrg esac 46945592a31fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4695f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46965592a31fSmrg ;; 469745bc899bSmrg 46985592a31fSmrg irix5* | irix6* | nonstopux*) 46995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47005592a31fSmrg # PIC (with -KPIC) is the default. 47015592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47025592a31fSmrg ;; 470345bc899bSmrg 4704f2408745Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47055592a31fSmrg case $cc_basename in 4706f2408745Smrg # old Intel for x86_64, which still supported -KPIC. 47075592a31fSmrg ecc*) 47085592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47095592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47105592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47115592a31fSmrg ;; 47125592a31fSmrg # icc used to be incompatible with GCC. 47135592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 47145592a31fSmrg icc* | ifort*) 47155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47165592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47185592a31fSmrg ;; 47195592a31fSmrg # Lahey Fortran 8.1. 47205592a31fSmrg lf95*) 47215592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47225592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47245592a31fSmrg ;; 4725b40a6198Smrg nagfor*) 4726b40a6198Smrg # NAG Fortran compiler 4727b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4728b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4729b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4730b40a6198Smrg ;; 4731f2408745Smrg tcc*) 4732f2408745Smrg # Fabrice Bellard et al's Tiny C Compiler 4733f2408745Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4734f2408745Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4735f2408745Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4736f2408745Smrg ;; 4737b40a6198Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47385592a31fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 47395592a31fSmrg # which looks to be a dead project) 47405592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47415592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47425592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47435592a31fSmrg ;; 47445592a31fSmrg ccc*) 47455592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47465592a31fSmrg # All Alpha code is PIC. 47475592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47485592a31fSmrg ;; 4749b40a6198Smrg xl* | bgxl* | bgf* | mpixl*) 4750b40a6198Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47515592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47525592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47535592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47545592a31fSmrg ;; 47555592a31fSmrg *) 47565592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 4757b40a6198Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4758b40a6198Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4759b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4760b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4761b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4762b40a6198Smrg ;; 4763b40a6198Smrg *Sun\ F* | *Sun*Fortran*) 4764b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4765b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4766b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4767b40a6198Smrg ;; 47685592a31fSmrg *Sun\ C*) 47695592a31fSmrg # Sun C 5.9 47705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47715592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47725592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47735592a31fSmrg ;; 4774b40a6198Smrg *Intel*\ [[CF]]*Compiler*) 4775b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4776b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4777b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4778b40a6198Smrg ;; 4779b40a6198Smrg *Portland\ Group*) 4780b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4781b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47825592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47835592a31fSmrg ;; 47845592a31fSmrg esac 47855592a31fSmrg ;; 47865592a31fSmrg esac 47875592a31fSmrg ;; 478845bc899bSmrg 47895592a31fSmrg newsos6) 47905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47915592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47925592a31fSmrg ;; 47931ac89addSmrg 47945592a31fSmrg *nto* | *qnx*) 47955592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47965592a31fSmrg # it will coredump. 47975592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47985592a31fSmrg ;; 47991ac89addSmrg 48005592a31fSmrg osf3* | osf4* | osf5*) 48015592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48025592a31fSmrg # All OSF/1 code is PIC. 48035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48045592a31fSmrg ;; 48051ac89addSmrg 48065592a31fSmrg rdos*) 48075592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48085592a31fSmrg ;; 48091ac89addSmrg 48105592a31fSmrg solaris*) 48115592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48125592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48135592a31fSmrg case $cc_basename in 4814b40a6198Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48165592a31fSmrg *) 48175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48185592a31fSmrg esac 48195592a31fSmrg ;; 482045bc899bSmrg 48215592a31fSmrg sunos4*) 48225592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48255592a31fSmrg ;; 482645bc899bSmrg 48275592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 48285592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48305592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48315592a31fSmrg ;; 483245bc899bSmrg 48335592a31fSmrg sysv4*MP*) 4834f2408745Smrg if test -d /usr/nec; then 48355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48375592a31fSmrg fi 48385592a31fSmrg ;; 483945bc899bSmrg 48405592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48415592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48425592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48435592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48445592a31fSmrg ;; 48453a925b30Smrg 48465592a31fSmrg unicos*) 48475592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48485592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48495592a31fSmrg ;; 48501ac89addSmrg 48515592a31fSmrg uts4*) 48525592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48535592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48545592a31fSmrg ;; 48555592a31fSmrg 48565592a31fSmrg *) 48575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48585592a31fSmrg ;; 485950f2e948Smrg esac 48605592a31fSmrg fi 48615592a31fSmrg]) 48625592a31fSmrgcase $host_os in 4863f2408745Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48645592a31fSmrg *djgpp*) 48655592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48665592a31fSmrg ;; 48675592a31fSmrg *) 48685592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48695592a31fSmrg ;; 48705592a31fSmrgesac 4871b40a6198Smrg 4872b40a6198SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4873b40a6198Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4874b40a6198Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4875b40a6198Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48761ac89addSmrg 48775592a31fSmrg# 48785592a31fSmrg# Check to make sure the PIC flag actually works. 48795592a31fSmrg# 48805592a31fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48815592a31fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48825592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48835592a31fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48845592a31fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48855592a31fSmrg "" | " "*) ;; 48865592a31fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48875592a31fSmrg esac], 48885592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 489050f2e948Smrgfi 48915592a31fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48925592a31fSmrg [Additional compiler flags for building library objects]) 48931ac89addSmrg 4894b40a6198Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4895b40a6198Smrg [How to pass a linker flag through the compiler]) 48965592a31fSmrg# 48975592a31fSmrg# Check to make sure the static flag actually works. 48985592a31fSmrg# 48995592a31fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49005592a31fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49015592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49025592a31fSmrg $lt_tmp_static_flag, 49035592a31fSmrg [], 49045592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49055592a31fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49065592a31fSmrg [Compiler flag to prevent dynamic linking]) 49075592a31fSmrg])# _LT_COMPILER_PIC 49081ac89addSmrg 49091ac89addSmrg 49105592a31fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 49115592a31fSmrg# ---------------------------- 49125592a31fSmrg# See if the linker supports building shared libraries. 49135592a31fSmrgm4_defun([_LT_LINKER_SHLIBS], 49145592a31fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 49155592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 4916b40a6198Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49175592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49185592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 49195592a31fSmrgm4_require([_LT_DECL_SED])dnl 49205592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49215592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 49225592a31fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49235592a31fSmrgm4_if([$1], [CXX], [ 49245592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4925b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49265592a31fSmrg case $host_os in 49275592a31fSmrg aix[[4-9]]*) 49285592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 4929f2408745Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4930f2408745Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4931f2408745Smrg # weak defined symbols like other global defined symbols, whereas 4932f2408745Smrg # GNU nm marks them as "W". 4933f2408745Smrg # While the 'weak' keyword is ignored in the Export File, we need 4934f2408745Smrg # it in the Import File for the 'aix-soname' feature, so we have 4935f2408745Smrg # to replace the "-B" option with "-P" for AIX nm. 49365592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4937f2408745Smrg _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' 49385592a31fSmrg else 4939f2408745Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 494050f2e948Smrg fi 494150f2e948Smrg ;; 49425592a31fSmrg pw32*) 4943f2408745Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4944b40a6198Smrg ;; 49455592a31fSmrg cygwin* | mingw* | cegcc*) 4946b40a6198Smrg case $cc_basename in 4947b40a6198Smrg cl*) 4948b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4949b40a6198Smrg ;; 4950b40a6198Smrg *) 4951b40a6198Smrg _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' 4952b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4953b40a6198Smrg ;; 4954b40a6198Smrg esac 4955b40a6198Smrg ;; 49565592a31fSmrg *) 49575592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4958b40a6198Smrg ;; 49595592a31fSmrg esac 49605592a31fSmrg], [ 49615592a31fSmrg runpath_var= 49625592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 49635592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 49645592a31fSmrg _LT_TAGVAR(archive_cmds, $1)= 49655592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49665592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 49675592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49685592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49695592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49705592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 49715592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 49725592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49735592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49745592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49755592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49765592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49775592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 49785592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49795592a31fSmrg _LT_TAGVAR(module_cmds, $1)= 49805592a31fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 49815592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49825592a31fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49835592a31fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49845592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49855592a31fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 49865592a31fSmrg # included in the symbol list 49875592a31fSmrg _LT_TAGVAR(include_expsyms, $1)= 49885592a31fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4989f2408745Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4990f2408745Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4991f2408745Smrg # as well as any symbol that contains 'd'. 49925592a31fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49935592a31fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49945592a31fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 49955592a31fSmrg # the symbol is explicitly referenced. Since portable code cannot 49965592a31fSmrg # rely on this symbol name, it's probably fine to never include it in 49975592a31fSmrg # preloaded symbol tables. 49985592a31fSmrg # Exclude shared library initialization/finalization symbols. 49995592a31fSmrgdnl Note also adjust exclude_expsyms for C++ above. 50005592a31fSmrg extract_expsyms_cmds= 50011ac89addSmrg 50025592a31fSmrg case $host_os in 50035592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 50045592a31fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50055592a31fSmrg # When not using gcc, we currently assume that we are using 50065592a31fSmrg # Microsoft Visual C++. 5007f2408745Smrg if test yes != "$GCC"; then 50085592a31fSmrg with_gnu_ld=no 500950f2e948Smrg fi 50103a925b30Smrg ;; 50115592a31fSmrg interix*) 50125592a31fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50135592a31fSmrg with_gnu_ld=yes 50145592a31fSmrg ;; 5015f2408745Smrg openbsd* | bitrig*) 50165592a31fSmrg with_gnu_ld=no 50175592a31fSmrg ;; 50183a925b30Smrg esac 50191ac89addSmrg 50205592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5021b40a6198Smrg 5022b40a6198Smrg # On some targets, GNU ld is compatible enough with the native linker 5023b40a6198Smrg # that we're better off using the native interface for both. 5024b40a6198Smrg lt_use_gnu_ld_interface=no 5025f2408745Smrg if test yes = "$with_gnu_ld"; then 5026b40a6198Smrg case $host_os in 5027b40a6198Smrg aix*) 5028b40a6198Smrg # The AIX port of GNU ld has always aspired to compatibility 5029b40a6198Smrg # with the native linker. However, as the warning in the GNU ld 5030b40a6198Smrg # block says, versions before 2.19.5* couldn't really create working 5031b40a6198Smrg # shared libraries, regardless of the interface used. 5032b40a6198Smrg case `$LD -v 2>&1` in 5033b40a6198Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5034b40a6198Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5035b40a6198Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5036b40a6198Smrg *) 5037b40a6198Smrg lt_use_gnu_ld_interface=yes 5038b40a6198Smrg ;; 5039b40a6198Smrg esac 5040b40a6198Smrg ;; 5041b40a6198Smrg *) 5042b40a6198Smrg lt_use_gnu_ld_interface=yes 5043b40a6198Smrg ;; 5044b40a6198Smrg esac 5045b40a6198Smrg fi 5046b40a6198Smrg 5047f2408745Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50485592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5049f2408745Smrg wlarc='$wl' 50501ac89addSmrg 50515592a31fSmrg # Set some defaults for GNU ld with shared library support. These 50525592a31fSmrg # are reset later if shared libraries are not supported. Putting them 50535592a31fSmrg # here allows them to be overridden if necessary. 50545592a31fSmrg runpath_var=LD_RUN_PATH 5055f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5056f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50575592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 50585592a31fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5059f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50605592a31fSmrg else 50615592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50625592a31fSmrg fi 50635592a31fSmrg supports_anon_versioning=no 5064f2408745Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5065b40a6198Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50665592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50675592a31fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50685592a31fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50695592a31fSmrg *\ 2.11.*) ;; # other 2.11 versions 50705592a31fSmrg *) supports_anon_versioning=yes ;; 50715592a31fSmrg esac 50721ac89addSmrg 50735592a31fSmrg # See if GNU ld supports shared libraries. 50745592a31fSmrg case $host_os in 50755592a31fSmrg aix[[3-9]]*) 50765592a31fSmrg # On AIX/PPC, the GNU linker is very broken 5077f2408745Smrg if test ia64 != "$host_cpu"; then 50785592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 50795592a31fSmrg cat <<_LT_EOF 1>&2 50801ac89addSmrg 5081b40a6198Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50825592a31fSmrg*** to be unable to reliably create shared libraries on AIX. 50835592a31fSmrg*** Therefore, libtool is disabling shared libraries support. If you 5084b40a6198Smrg*** really care for shared libraries, you may want to install binutils 5085b40a6198Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5086b40a6198Smrg*** You will then need to restart the configuration process. 50871ac89addSmrg 50885592a31fSmrg_LT_EOF 50895592a31fSmrg fi 50905592a31fSmrg ;; 50911ac89addSmrg 50925592a31fSmrg amigaos*) 50935592a31fSmrg case $host_cpu in 50945592a31fSmrg powerpc) 50955592a31fSmrg # see comment about AmigaOS4 .so support 5096f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50975592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 50985592a31fSmrg ;; 50995592a31fSmrg m68k) 51005592a31fSmrg _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)' 51015592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51025592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51035592a31fSmrg ;; 51045592a31fSmrg esac 51055592a31fSmrg ;; 51061ac89addSmrg 51075592a31fSmrg beos*) 51085592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51095592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51105592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51115592a31fSmrg # support --undefined. This deserves some investigation. FIXME 5112f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51135592a31fSmrg else 51145592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51155592a31fSmrg fi 51165592a31fSmrg ;; 51171ac89addSmrg 51185592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 51195592a31fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51205592a31fSmrg # as there is no search path for DLLs. 51215592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5122f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51235592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51245592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 51255592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5126b40a6198Smrg _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' 5127b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51285592a31fSmrg 51295592a31fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5130f2408745Smrg _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' 5131f2408745Smrg # If the export-symbols file already is a .def file, use it as 5132f2408745Smrg # is; otherwise, prepend EXPORTS... 5133f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5134f2408745Smrg cp $export_symbols $output_objdir/$soname.def; 5135f2408745Smrg else 5136f2408745Smrg echo EXPORTS > $output_objdir/$soname.def; 5137f2408745Smrg cat $export_symbols >> $output_objdir/$soname.def; 5138f2408745Smrg fi~ 5139f2408745Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51405592a31fSmrg else 51415592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51425592a31fSmrg fi 51435592a31fSmrg ;; 51441ac89addSmrg 5145b40a6198Smrg haiku*) 5146f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5147b40a6198Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5148b40a6198Smrg ;; 5149b40a6198Smrg 5150f2408745Smrg os2*) 5151f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5152f2408745Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5153f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5154f2408745Smrg shrext_cmds=.dll 5155f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5156f2408745Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5157f2408745Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5158f2408745Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5159f2408745Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5160f2408745Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5161f2408745Smrg emximp -o $lib $output_objdir/$libname.def' 5162f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5163f2408745Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5164f2408745Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5165f2408745Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5166f2408745Smrg prefix_cmds="$SED"~ 5167f2408745Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5168f2408745Smrg prefix_cmds="$prefix_cmds -e 1d"; 5169f2408745Smrg fi~ 5170f2408745Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5171f2408745Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5172f2408745Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5173f2408745Smrg emximp -o $lib $output_objdir/$libname.def' 5174f2408745Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5175f2408745Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5176f2408745Smrg ;; 5177f2408745Smrg 51785592a31fSmrg interix[[3-9]]*) 51795592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 51805592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5181f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5182f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51835592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51845592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51855592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 51865592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 51875592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51885592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5189f2408745Smrg _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' 5190f2408745Smrg _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' 51915592a31fSmrg ;; 51921ac89addSmrg 5193b40a6198Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51945592a31fSmrg tmp_diet=no 5195f2408745Smrg if test linux-dietlibc = "$host_os"; then 51965592a31fSmrg case $cc_basename in 51975592a31fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 51985592a31fSmrg esac 51995592a31fSmrg fi 52005592a31fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5201f2408745Smrg && test no = "$tmp_diet" 52025592a31fSmrg then 5203b40a6198Smrg tmp_addflag=' $pic_flag' 52045592a31fSmrg tmp_sharedflag='-shared' 52055592a31fSmrg case $cc_basename,$host_cpu in 52065592a31fSmrg pgcc*) # Portland Group C compiler 5207f2408745Smrg _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' 52085592a31fSmrg tmp_addflag=' $pic_flag' 52095592a31fSmrg ;; 5210b40a6198Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 5211b40a6198Smrg # Portland Group f77 and f90 compilers 5212f2408745Smrg _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' 52135592a31fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 52145592a31fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52155592a31fSmrg tmp_addflag=' -i_dynamic' ;; 52165592a31fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52175592a31fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52185592a31fSmrg ifc* | ifort*) # Intel Fortran compiler 52195592a31fSmrg tmp_addflag=' -nofor_main' ;; 52205592a31fSmrg lf95*) # Lahey Fortran 8.1 52215592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52225592a31fSmrg tmp_sharedflag='--shared' ;; 5223f2408745Smrg nagfor*) # NAGFOR 5.3 5224f2408745Smrg tmp_sharedflag='-Wl,-shared' ;; 5225b40a6198Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52265592a31fSmrg tmp_sharedflag='-qmkshrobj' 52275592a31fSmrg tmp_addflag= ;; 5228b40a6198Smrg nvcc*) # Cuda Compiler Driver 2.2 5229f2408745Smrg _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' 5230b40a6198Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5231b40a6198Smrg ;; 52325592a31fSmrg esac 52335592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 52345592a31fSmrg *Sun\ C*) # Sun C 5.9 5235f2408745Smrg _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' 52365592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52375592a31fSmrg tmp_sharedflag='-G' ;; 52385592a31fSmrg *Sun\ F*) # Sun Fortran 8.3 52395592a31fSmrg tmp_sharedflag='-G' ;; 52405592a31fSmrg esac 5241f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52421ac89addSmrg 5243f2408745Smrg if test yes = "$supports_anon_versioning"; then 52445592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5245f2408745Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5246f2408745Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5247f2408745Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52485592a31fSmrg fi 52491ac89addSmrg 52505592a31fSmrg case $cc_basename in 5251f2408745Smrg tcc*) 5252f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5253f2408745Smrg ;; 5254b40a6198Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52555592a31fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52565592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5257f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5258b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5259f2408745Smrg if test yes = "$supports_anon_versioning"; then 52605592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5261f2408745Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5262f2408745Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5263f2408745Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52645592a31fSmrg fi 52655592a31fSmrg ;; 52665592a31fSmrg esac 52675592a31fSmrg else 52685592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52695592a31fSmrg fi 52705592a31fSmrg ;; 52711ac89addSmrg 527257ba8e8bSmrg netbsd*) 52735592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52745592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52755592a31fSmrg wlarc= 52765592a31fSmrg else 5277f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5278f2408745Smrg _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' 52795592a31fSmrg fi 52805592a31fSmrg ;; 52811ac89addSmrg 52825592a31fSmrg solaris*) 52835592a31fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52845592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52855592a31fSmrg cat <<_LT_EOF 1>&2 52861ac89addSmrg 52875592a31fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52885592a31fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 52895592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 52905592a31fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 52915592a31fSmrg*** your PATH or compiler configuration so that the native linker is 52925592a31fSmrg*** used, and then restart. 52931ac89addSmrg 52945592a31fSmrg_LT_EOF 52955592a31fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5296f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5297f2408745Smrg _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' 52985592a31fSmrg else 52995592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53005592a31fSmrg fi 53015592a31fSmrg ;; 53021ac89addSmrg 53035592a31fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53045592a31fSmrg case `$LD -v 2>&1` in 53055592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53065592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53075592a31fSmrg cat <<_LT_EOF 1>&2 53081ac89addSmrg 5309f2408745Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53105592a31fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53115592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53125592a31fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53135592a31fSmrg*** your PATH or compiler configuration so that the native linker is 53145592a31fSmrg*** used, and then restart. 53151ac89addSmrg 53165592a31fSmrg_LT_EOF 53175592a31fSmrg ;; 53185592a31fSmrg *) 53195592a31fSmrg # For security reasons, it is highly recommended that you always 53205592a31fSmrg # use absolute paths for naming shared libraries, and exclude the 53215592a31fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 53225592a31fSmrg # requires that you compile everything twice, which is a pain. 53235592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5324f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5325f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5326f2408745Smrg _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' 53275592a31fSmrg else 53285592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53295592a31fSmrg fi 53305592a31fSmrg ;; 53315592a31fSmrg esac 53325592a31fSmrg ;; 53331ac89addSmrg 53345592a31fSmrg sunos4*) 53355592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53365592a31fSmrg wlarc= 53375592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53385592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53395592a31fSmrg ;; 53401ac89addSmrg 53415592a31fSmrg *) 53425592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5343f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5344f2408745Smrg _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' 53455592a31fSmrg else 53465592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53475592a31fSmrg fi 53485592a31fSmrg ;; 53495592a31fSmrg esac 53501ac89addSmrg 5351f2408745Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53525592a31fSmrg runpath_var= 53535592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53545592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53555592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53565592a31fSmrg fi 53575592a31fSmrg else 53585592a31fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 53595592a31fSmrg case $host_os in 53605592a31fSmrg aix3*) 53615592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53625592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 53635592a31fSmrg _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' 53645592a31fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 53655592a31fSmrg # are no directories specified by -L. 53665592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5367f2408745Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53685592a31fSmrg # Neither direct hardcoding nor static linking is supported with a 53695592a31fSmrg # broken collect2. 53705592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53715592a31fSmrg fi 53725592a31fSmrg ;; 53731ac89addSmrg 53745592a31fSmrg aix[[4-9]]*) 5375f2408745Smrg if test ia64 = "$host_cpu"; then 53765592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 53775592a31fSmrg # have to do anything special. 53785592a31fSmrg aix_use_runtimelinking=no 53795592a31fSmrg exp_sym_flag='-Bexport' 5380f2408745Smrg no_entry_flag= 53815592a31fSmrg else 53825592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 5383f2408745Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5384f2408745Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5385f2408745Smrg # weak defined symbols like other global defined symbols, whereas 5386f2408745Smrg # GNU nm marks them as "W". 5387f2408745Smrg # While the 'weak' keyword is ignored in the Export File, we need 5388f2408745Smrg # it in the Import File for the 'aix-soname' feature, so we have 5389f2408745Smrg # to replace the "-B" option with "-P" for AIX nm. 53905592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5391f2408745Smrg _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' 53925592a31fSmrg else 5393f2408745Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 53945592a31fSmrg fi 53955592a31fSmrg aix_use_runtimelinking=no 53961ac89addSmrg 53975592a31fSmrg # Test if we are trying to use run time linking or normal 53985592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5399f2408745Smrg # have runtime linking enabled, and use it for executables. 5400f2408745Smrg # For shared libraries, we enable/disable runtime linking 5401f2408745Smrg # depending on the kind of the shared library created - 5402f2408745Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5403f2408745Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5404f2408745Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5405f2408745Smrg # lib.a static archive 5406f2408745Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5407f2408745Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5408f2408745Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5409f2408745Smrg # lib.a(lib.so.V) shared, rtl:no 5410f2408745Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5411f2408745Smrg # lib.a static archive 54125592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54135592a31fSmrg for ld_flag in $LDFLAGS; do 5414f2408745Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54155592a31fSmrg aix_use_runtimelinking=yes 54165592a31fSmrg break 54175592a31fSmrg fi 54185592a31fSmrg done 5419f2408745Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5420f2408745Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5421f2408745Smrg # so we don't have lib.a shared libs to link our executables. 5422f2408745Smrg # We have to force runtime linking in this case. 5423f2408745Smrg aix_use_runtimelinking=yes 5424f2408745Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5425f2408745Smrg fi 54265592a31fSmrg ;; 54275592a31fSmrg esac 54281ac89addSmrg 54295592a31fSmrg exp_sym_flag='-bexport' 54305592a31fSmrg no_entry_flag='-bnoentry' 54315592a31fSmrg fi 54321ac89addSmrg 54335592a31fSmrg # When large executables or shared objects are built, AIX ld can 54345592a31fSmrg # have problems creating the table of contents. If linking a library 54355592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 54365592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54375592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54385592a31fSmrg 54395592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 54405592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 54415592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54425592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54435592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5444f2408745Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5445f2408745Smrg case $with_aix_soname,$aix_use_runtimelinking in 5446f2408745Smrg aix,*) ;; # traditional, no import file 5447f2408745Smrg svr4,* | *,yes) # use import file 5448f2408745Smrg # The Import File defines what to hardcode. 5449f2408745Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5450f2408745Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5451f2408745Smrg ;; 5452f2408745Smrg esac 54531ac89addSmrg 5454f2408745Smrg if test yes = "$GCC"; then 54555592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54565592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 54575592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 5458f2408745Smrg collect2name=`$CC -print-prog-name=collect2` 54595592a31fSmrg if test -f "$collect2name" && 54605592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54615592a31fSmrg then 54625592a31fSmrg # We have reworked collect2 54635592a31fSmrg : 54645592a31fSmrg else 54655592a31fSmrg # We have old collect2 54665592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54675592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 54685592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 54695592a31fSmrg # to unsupported forces relinking 54705592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54715592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54725592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54735592a31fSmrg fi 54745592a31fSmrg ;; 54755592a31fSmrg esac 54765592a31fSmrg shared_flag='-shared' 5477f2408745Smrg if test yes = "$aix_use_runtimelinking"; then 5478f2408745Smrg shared_flag="$shared_flag "'$wl-G' 54795592a31fSmrg fi 5480f2408745Smrg # Need to ensure runtime linking is disabled for the traditional 5481f2408745Smrg # shared library, or the linker may eventually find shared libraries 5482f2408745Smrg # /with/ Import File - we do not want to mix them. 5483f2408745Smrg shared_flag_aix='-shared' 5484f2408745Smrg shared_flag_svr4='-shared $wl-G' 54855592a31fSmrg else 54865592a31fSmrg # not using gcc 5487f2408745Smrg if test ia64 = "$host_cpu"; then 54885592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54895592a31fSmrg # chokes on -Wl,-G. The following line is correct: 54905592a31fSmrg shared_flag='-G' 54915592a31fSmrg else 5492f2408745Smrg if test yes = "$aix_use_runtimelinking"; then 5493f2408745Smrg shared_flag='$wl-G' 54945592a31fSmrg else 5495f2408745Smrg shared_flag='$wl-bM:SRE' 54965592a31fSmrg fi 5497f2408745Smrg shared_flag_aix='$wl-bM:SRE' 5498f2408745Smrg shared_flag_svr4='$wl-G' 54995592a31fSmrg fi 55005592a31fSmrg fi 55011ac89addSmrg 5502f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55035592a31fSmrg # It seems that -bexpall does not export symbols beginning with 55045592a31fSmrg # underscore (_), so it is better to generate a list of symbols to export. 55055592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5506f2408745Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55075592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 55085592a31fSmrg # -berok will link without error, but may produce a broken library. 55095592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55105592a31fSmrg # Determine the default libpath from the value encoded in an 55115592a31fSmrg # empty executable. 5512b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5513f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5514f2408745Smrg _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 55155592a31fSmrg else 5516f2408745Smrg if test ia64 = "$host_cpu"; then 5517f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55185592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5519f2408745Smrg _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" 55205592a31fSmrg else 55215592a31fSmrg # Determine the default libpath from the value encoded in an 55225592a31fSmrg # empty executable. 5523b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5524f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55255592a31fSmrg # Warning - without using the other run time loading flags, 55265592a31fSmrg # -berok will link without error, but may produce a broken library. 5527f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5528f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5529f2408745Smrg if test yes = "$with_gnu_ld"; then 5530b40a6198Smrg # We only use this code for GNU lds that support --whole-archive. 5531f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5532b40a6198Smrg else 5533b40a6198Smrg # Exported symbols can be pulled into shared objects from archives 5534b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5535b40a6198Smrg fi 55365592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5537f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5538f2408745Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5539f2408745Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5540f2408745Smrg if test svr4 != "$with_aix_soname"; then 5541f2408745Smrg # This is similar to how AIX traditionally builds its shared libraries. 5542f2408745Smrg _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' 5543f2408745Smrg fi 5544f2408745Smrg if test aix != "$with_aix_soname"; then 5545f2408745Smrg _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' 5546f2408745Smrg else 5547f2408745Smrg # used by -dlpreopen to get the symbols 5548f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5549f2408745Smrg fi 5550f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55515592a31fSmrg fi 55525592a31fSmrg fi 55535592a31fSmrg ;; 55541ac89addSmrg 55555592a31fSmrg amigaos*) 55565592a31fSmrg case $host_cpu in 55575592a31fSmrg powerpc) 55585592a31fSmrg # see comment about AmigaOS4 .so support 5559f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55605592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55615592a31fSmrg ;; 55625592a31fSmrg m68k) 55635592a31fSmrg _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)' 55645592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55655592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55665592a31fSmrg ;; 55675592a31fSmrg esac 55685592a31fSmrg ;; 55691ac89addSmrg 55705592a31fSmrg bsdi[[45]]*) 55715592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55725592a31fSmrg ;; 55731ac89addSmrg 55745592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 55755592a31fSmrg # When not using gcc, we currently assume that we are using 55765592a31fSmrg # Microsoft Visual C++. 55775592a31fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55785592a31fSmrg # no search path for DLLs. 5579b40a6198Smrg case $cc_basename in 5580b40a6198Smrg cl*) 5581b40a6198Smrg # Native MSVC 5582b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5583b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5584b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5585b40a6198Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5586b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 5587b40a6198Smrg libext=lib 5588b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 5589f2408745Smrg shrext_cmds=.dll 5590b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 5591f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5592f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5593f2408745Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5594f2408745Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5595f2408745Smrg else 5596f2408745Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5597f2408745Smrg fi~ 5598f2408745Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5599f2408745Smrg linknames=' 5600b40a6198Smrg # The linker will not automatically build a static lib if we build a DLL. 5601b40a6198Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5602b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5603b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5604b40a6198Smrg _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' 5605b40a6198Smrg # Don't use ranlib 5606b40a6198Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5607b40a6198Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5608f2408745Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5609f2408745Smrg case $lt_outputfile in 5610f2408745Smrg *.exe|*.EXE) ;; 5611f2408745Smrg *) 5612f2408745Smrg lt_outputfile=$lt_outputfile.exe 5613f2408745Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5614f2408745Smrg ;; 5615f2408745Smrg esac~ 5616f2408745Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5617f2408745Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5618f2408745Smrg $RM "$lt_outputfile.manifest"; 5619f2408745Smrg fi' 5620b40a6198Smrg ;; 5621b40a6198Smrg *) 5622b40a6198Smrg # Assume MSVC wrapper 5623b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5624b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5625b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 5626b40a6198Smrg libext=lib 5627b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 5628f2408745Smrg shrext_cmds=.dll 5629b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 5630b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5631b40a6198Smrg # The linker will automatically build a .lib file if we build a DLL. 5632b40a6198Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5633b40a6198Smrg # FIXME: Should let the user specify the lib program. 5634b40a6198Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5635b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5636b40a6198Smrg ;; 5637b40a6198Smrg esac 56385592a31fSmrg ;; 56391ac89addSmrg 56405592a31fSmrg darwin* | rhapsody*) 56415592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 56425592a31fSmrg ;; 56431ac89addSmrg 56445592a31fSmrg dgux*) 56455592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56465592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56475592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56485592a31fSmrg ;; 56491ac89addSmrg 56505592a31fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56515592a31fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 56525592a31fSmrg # does not break anything, and helps significantly (at the cost of a little 56535592a31fSmrg # extra space). 56545592a31fSmrg freebsd2.2*) 56555592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56565592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56575592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56585592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56595592a31fSmrg ;; 566045bc899bSmrg 56615592a31fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5662b40a6198Smrg freebsd2.*) 56635592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56645592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56655592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56665592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56675592a31fSmrg ;; 566845bc899bSmrg 56695592a31fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56705592a31fSmrg freebsd* | dragonfly*) 5671b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56725592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56735592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56745592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56755592a31fSmrg ;; 567645bc899bSmrg 56775592a31fSmrg hpux9*) 5678f2408745Smrg if test yes = "$GCC"; then 5679f2408745Smrg _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' 56805592a31fSmrg else 5681f2408745Smrg _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' 56825592a31fSmrg fi 5683f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56845592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56855592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 568645bc899bSmrg 56875592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 56885592a31fSmrg # but as the default location of the library. 56895592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5690f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56915592a31fSmrg ;; 569245bc899bSmrg 56935592a31fSmrg hpux10*) 5694f2408745Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5695f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 56965592a31fSmrg else 56975592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 56985592a31fSmrg fi 5699f2408745Smrg if test no = "$with_gnu_ld"; then 5700f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57015592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57025592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57035592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5704f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57055592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 57065592a31fSmrg # but as the default location of the library. 57075592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57085592a31fSmrg fi 57095592a31fSmrg ;; 571045bc899bSmrg 57115592a31fSmrg hpux11*) 5712f2408745Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57135592a31fSmrg case $host_cpu in 57145592a31fSmrg hppa*64*) 5715f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57165592a31fSmrg ;; 57175592a31fSmrg ia64*) 5718f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57195592a31fSmrg ;; 57205592a31fSmrg *) 5721f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57225592a31fSmrg ;; 57235592a31fSmrg esac 57245592a31fSmrg else 57255592a31fSmrg case $host_cpu in 57265592a31fSmrg hppa*64*) 5727f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57285592a31fSmrg ;; 57295592a31fSmrg ia64*) 5730f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57315592a31fSmrg ;; 57325592a31fSmrg *) 5733b40a6198Smrg m4_if($1, [], [ 5734b40a6198Smrg # Older versions of the 11.00 compiler do not understand -b yet 5735b40a6198Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5736b40a6198Smrg _LT_LINKER_OPTION([if $CC understands -b], 5737b40a6198Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5738f2408745Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5739b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5740f2408745Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57415592a31fSmrg ;; 57425592a31fSmrg esac 57435592a31fSmrg fi 5744f2408745Smrg if test no = "$with_gnu_ld"; then 5745f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57465592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 574745bc899bSmrg 57485592a31fSmrg case $host_cpu in 57495592a31fSmrg hppa*64*|ia64*) 57505592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57515592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57525592a31fSmrg ;; 57535592a31fSmrg *) 57545592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57555592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5756f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 575745bc899bSmrg 57585592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 57595592a31fSmrg # but as the default location of the library. 57605592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57615592a31fSmrg ;; 57625592a31fSmrg esac 57635592a31fSmrg fi 576450f2e948Smrg ;; 57655592a31fSmrg 57665592a31fSmrg irix5* | irix6* | nonstopux*) 5767f2408745Smrg if test yes = "$GCC"; then 5768f2408745Smrg _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' 57695592a31fSmrg # Try to use the -exported_symbol ld option, if it does not 57705592a31fSmrg # work, assume that -exports_file does not work either and 57715592a31fSmrg # implicitly export all symbols. 5772b40a6198Smrg # This should be the same for all languages, so no per-tag cache variable. 5773b40a6198Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5774b40a6198Smrg [lt_cv_irix_exported_symbol], 5775f2408745Smrg [save_LDFLAGS=$LDFLAGS 5776f2408745Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5777b40a6198Smrg AC_LINK_IFELSE( 5778b40a6198Smrg [AC_LANG_SOURCE( 5779b40a6198Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5780b40a6198Smrg [C++], [[int foo (void) { return 0; }]], 5781b40a6198Smrg [Fortran 77], [[ 5782b40a6198Smrg subroutine foo 5783b40a6198Smrg end]], 5784b40a6198Smrg [Fortran], [[ 5785b40a6198Smrg subroutine foo 5786b40a6198Smrg end]])])], 5787b40a6198Smrg [lt_cv_irix_exported_symbol=yes], 5788b40a6198Smrg [lt_cv_irix_exported_symbol=no]) 5789f2408745Smrg LDFLAGS=$save_LDFLAGS]) 5790f2408745Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5791f2408745Smrg _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' 5792b40a6198Smrg fi 57935592a31fSmrg else 5794f2408745Smrg _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' 5795f2408745Smrg _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' 57965592a31fSmrg fi 57975592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5798f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 57995592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58005592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58015592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580250f2e948Smrg ;; 58031ac89addSmrg 5804f2408745Smrg linux*) 5805f2408745Smrg case $cc_basename in 5806f2408745Smrg tcc*) 5807f2408745Smrg # Fabrice Bellard et al's Tiny C Compiler 5808f2408745Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5809f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5810f2408745Smrg ;; 5811f2408745Smrg esac 5812f2408745Smrg ;; 5813f2408745Smrg 581457ba8e8bSmrg netbsd*) 58155592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58165592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58175592a31fSmrg else 58185592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58195592a31fSmrg fi 58205592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58215592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58225592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58235592a31fSmrg ;; 58241ac89addSmrg 58255592a31fSmrg newsos6) 58265592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58275592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5828f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58295592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58305592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58315592a31fSmrg ;; 58321ac89addSmrg 58335592a31fSmrg *nto* | *qnx*) 58345592a31fSmrg ;; 58351ac89addSmrg 5836f2408745Smrg openbsd* | bitrig*) 58375592a31fSmrg if test -f /usr/libexec/ld.so; then 58385592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58395592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58405592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5841f2408745Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58425592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5843f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5844f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5845f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58465592a31fSmrg else 5847f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5848f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58495592a31fSmrg fi 58505592a31fSmrg else 58515592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58525592a31fSmrg fi 58535592a31fSmrg ;; 58541ac89addSmrg 58555592a31fSmrg os2*) 58565592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58575592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58585592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5859f2408745Smrg shrext_cmds=.dll 5860f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5861f2408745Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5862f2408745Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5863f2408745Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5864f2408745Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5865f2408745Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5866f2408745Smrg emximp -o $lib $output_objdir/$libname.def' 5867f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5868f2408745Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5869f2408745Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5870f2408745Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5871f2408745Smrg prefix_cmds="$SED"~ 5872f2408745Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5873f2408745Smrg prefix_cmds="$prefix_cmds -e 1d"; 5874f2408745Smrg fi~ 5875f2408745Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5876f2408745Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5877f2408745Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5878f2408745Smrg emximp -o $lib $output_objdir/$libname.def' 5879f2408745Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5880f2408745Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58815592a31fSmrg ;; 58821ac89addSmrg 58835592a31fSmrg osf3*) 5884f2408745Smrg if test yes = "$GCC"; then 5885f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5886f2408745Smrg _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' 58875592a31fSmrg else 58885592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5889f2408745Smrg _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' 58905592a31fSmrg fi 58915592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5892f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58935592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58945592a31fSmrg ;; 58951ac89addSmrg 58965592a31fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5897f2408745Smrg if test yes = "$GCC"; then 5898f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5899f2408745Smrg _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' 5900f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59015592a31fSmrg else 59025592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5903f2408745Smrg _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' 59045592a31fSmrg _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~ 5905f2408745Smrg $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' 59061ac89addSmrg 59075592a31fSmrg # Both c and cxx compiler support -rpath directly 59085592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59095592a31fSmrg fi 59105592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59115592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59125592a31fSmrg ;; 59131ac89addSmrg 59145592a31fSmrg solaris*) 59155592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5916f2408745Smrg if test yes = "$GCC"; then 5917f2408745Smrg wlarc='$wl' 5918f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59195592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5920f2408745Smrg $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' 59215592a31fSmrg else 59225592a31fSmrg case `$CC -V 2>&1` in 59235592a31fSmrg *"Compilers 5.0"*) 59245592a31fSmrg wlarc='' 5925f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59265592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5927f2408745Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59285592a31fSmrg ;; 59295592a31fSmrg *) 5930f2408745Smrg wlarc='$wl' 5931f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59325592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5933f2408745Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59345592a31fSmrg ;; 59355592a31fSmrg esac 59365592a31fSmrg fi 59375592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59385592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59395592a31fSmrg case $host_os in 59405592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59415592a31fSmrg *) 59425592a31fSmrg # The compiler driver will combine and reorder linker options, 5943f2408745Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59445592a31fSmrg # but is careful enough not to reorder. 59455592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5946f2408745Smrg if test yes = "$GCC"; then 5947f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59485592a31fSmrg else 59495592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59505592a31fSmrg fi 59515592a31fSmrg ;; 59525592a31fSmrg esac 59535592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59545592a31fSmrg ;; 59551ac89addSmrg 59565592a31fSmrg sunos4*) 5957f2408745Smrg if test sequent = "$host_vendor"; then 59585592a31fSmrg # Use $CC to link under sequent, because it throws in some extra .o 59595592a31fSmrg # files that make .init and .fini sections work. 5960f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59615592a31fSmrg else 59625592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59635592a31fSmrg fi 59645592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59655592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59665592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59675592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59685592a31fSmrg ;; 59691ac89addSmrg 59705592a31fSmrg sysv4) 59715592a31fSmrg case $host_vendor in 59725592a31fSmrg sni) 59735592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59745592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59755592a31fSmrg ;; 59765592a31fSmrg siemens) 59775592a31fSmrg ## LD is ld it makes a PLAMLIB 59785592a31fSmrg ## CC just makes a GrossModule. 59795592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59805592a31fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59815592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 59825592a31fSmrg ;; 59835592a31fSmrg motorola) 59845592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59855592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59865592a31fSmrg ;; 59875592a31fSmrg esac 59885592a31fSmrg runpath_var='LD_RUN_PATH' 59895592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59905592a31fSmrg ;; 59911ac89addSmrg 59925592a31fSmrg sysv4.3*) 59935592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59945592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59955592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 59965592a31fSmrg ;; 59971ac89addSmrg 59985592a31fSmrg sysv4*MP*) 59995592a31fSmrg if test -d /usr/nec; then 60005592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60015592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60025592a31fSmrg runpath_var=LD_RUN_PATH 60035592a31fSmrg hardcode_runpath_var=yes 60045592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60055592a31fSmrg fi 60065592a31fSmrg ;; 60071ac89addSmrg 60085592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6009f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60105592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60115592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60125592a31fSmrg runpath_var='LD_RUN_PATH' 60131ac89addSmrg 6014f2408745Smrg if test yes = "$GCC"; then 6015f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6016f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60175592a31fSmrg else 6018f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6019f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60205592a31fSmrg fi 60215592a31fSmrg ;; 60221ac89addSmrg 60235592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 6024f2408745Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60255592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 60265592a31fSmrg # always be unresolved, which means just about no library would 60275592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 60285592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 60295592a31fSmrg # as -z defs. 6030f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6031f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60325592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60335592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6034f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60355592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60365592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6037f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60385592a31fSmrg runpath_var='LD_RUN_PATH' 60391ac89addSmrg 6040f2408745Smrg if test yes = "$GCC"; then 6041f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6042f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60435592a31fSmrg else 6044f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6045f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60465592a31fSmrg fi 60475592a31fSmrg ;; 60481ac89addSmrg 60495592a31fSmrg uts4*) 60505592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60515592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60525592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60535592a31fSmrg ;; 605450f2e948Smrg 60555592a31fSmrg *) 60565592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60575592a31fSmrg ;; 60585592a31fSmrg esac 605950f2e948Smrg 6060f2408745Smrg if test sni = "$host_vendor"; then 60615592a31fSmrg case $host in 60625592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6063f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60645592a31fSmrg ;; 60655592a31fSmrg esac 60665592a31fSmrg fi 60675592a31fSmrg fi 60685592a31fSmrg]) 60695592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6070f2408745Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 607150f2e948Smrg 60725592a31fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 607350f2e948Smrg 60745592a31fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60755592a31fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60765592a31fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 60775592a31fSmrg [The commands to extract the exported symbol list from a shared archive]) 607850f2e948Smrg 60795592a31fSmrg# 60805592a31fSmrg# Do we need to explicitly link libc? 60815592a31fSmrg# 60825592a31fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60835592a31fSmrgx|xyes) 60845592a31fSmrg # Assume -lc should be added 60855592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 60861ac89addSmrg 6087f2408745Smrg if test yes,yes = "$GCC,$enable_shared"; then 60885592a31fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 60895592a31fSmrg *'~'*) 60905592a31fSmrg # FIXME: we may have to deal with multi-command sequences. 60915592a31fSmrg ;; 60925592a31fSmrg '$CC '*) 60935592a31fSmrg # Test whether the compiler implicitly links with -lc since on some 60945592a31fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 60955592a31fSmrg # to ld, don't add -lc before -lgcc. 6096b40a6198Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6097b40a6198Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6098b40a6198Smrg [$RM conftest* 6099b40a6198Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6100b40a6198Smrg 6101b40a6198Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6102b40a6198Smrg soname=conftest 6103b40a6198Smrg lib=conftest 6104b40a6198Smrg libobjs=conftest.$ac_objext 6105b40a6198Smrg deplibs= 6106b40a6198Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6107b40a6198Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6108b40a6198Smrg compiler_flags=-v 6109b40a6198Smrg linker_flags=-v 6110b40a6198Smrg verstring= 6111b40a6198Smrg output_objdir=. 6112b40a6198Smrg libname=conftest 6113b40a6198Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6114b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6115b40a6198Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6116b40a6198Smrg then 6117b40a6198Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6118b40a6198Smrg else 6119b40a6198Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6120b40a6198Smrg fi 6121b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6122b40a6198Smrg else 6123b40a6198Smrg cat conftest.err 1>&5 6124b40a6198Smrg fi 6125b40a6198Smrg $RM conftest* 6126b40a6198Smrg ]) 6127b40a6198Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61285592a31fSmrg ;; 61295592a31fSmrg esac 61305592a31fSmrg fi 61315592a31fSmrg ;; 61325592a31fSmrgesac 61331ac89addSmrg 61345592a31fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61355592a31fSmrg [Whether or not to add -lc for building shared libraries]) 61365592a31fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61375592a31fSmrg [enable_shared_with_static_runtimes], [0], 61385592a31fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 61395592a31fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61405592a31fSmrg [Compiler flag to allow reflexive dlopens]) 61415592a31fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61425592a31fSmrg [Compiler flag to generate shared objects directly from archives]) 61435592a31fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 61445592a31fSmrg [Whether the compiler copes with passing no objects directly]) 61455592a31fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61465592a31fSmrg [Create an old-style archive from a shared archive]) 61475592a31fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61485592a31fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 61495592a31fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61505592a31fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61515592a31fSmrg_LT_TAGDECL([], [module_cmds], [2], 61525592a31fSmrg [Commands used to build a loadable module if different from building 61535592a31fSmrg a shared archive.]) 61545592a31fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61555592a31fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 61565592a31fSmrg [Whether we are building with GNU ld or not]) 61575592a31fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61585592a31fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 61595592a31fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 61605592a31fSmrg [Flag that enforces no undefined symbols]) 61615592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61625592a31fSmrg [Flag to hardcode $libdir into a binary during linking. 61635592a31fSmrg This must work even if $libdir does not exist]) 61645592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61655592a31fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 61665592a31fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6167f2408745Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61685592a31fSmrg DIR into the resulting binary]) 61695592a31fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6170f2408745Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61715592a31fSmrg DIR into the resulting binary and the resulting library dependency is 6172f2408745Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61735592a31fSmrg library is relocated]) 61745592a31fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61755592a31fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61765592a31fSmrg into the resulting binary]) 61775592a31fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61785592a31fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61795592a31fSmrg into the resulting binary]) 61805592a31fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 61815592a31fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 61825592a31fSmrg into the library and all subsequent libraries and executables linked 61835592a31fSmrg against it]) 61845592a31fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 61855592a31fSmrg [Set to yes if linker adds runtime paths of dependent libraries 61865592a31fSmrg to runtime path list]) 61875592a31fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 61885592a31fSmrg [Whether libtool must link a program against all its dependency libraries]) 61895592a31fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 61905592a31fSmrg [Set to "yes" if exported symbols are required]) 61915592a31fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 61925592a31fSmrg [The commands to list exported symbols]) 61935592a31fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 61945592a31fSmrg [Symbols that should not be listed in the preloaded symbols]) 61955592a31fSmrg_LT_TAGDECL([], [include_expsyms], [1], 61965592a31fSmrg [Symbols that must always be exported]) 61975592a31fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 61985592a31fSmrg [Commands necessary for linking programs (against libraries) with templates]) 6199b40a6198Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6200b40a6198Smrg [Commands necessary for finishing linking programs]) 62015592a31fSmrg_LT_TAGDECL([], [file_list_spec], [1], 62025592a31fSmrg [Specify filename containing input files]) 62035592a31fSmrgdnl FIXME: Not yet implemented 62045592a31fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62055592a31fSmrgdnl [Compiler flag to generate thread safe objects]) 62065592a31fSmrg])# _LT_LINKER_SHLIBS 62075592a31fSmrg 62085592a31fSmrg 62095592a31fSmrg# _LT_LANG_C_CONFIG([TAG]) 62105592a31fSmrg# ------------------------ 62115592a31fSmrg# Ensure that the configuration variables for a C compiler are suitably 62125592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6213f2408745Smrg# the compiler configuration to 'libtool'. 62145592a31fSmrgm4_defun([_LT_LANG_C_CONFIG], 62155592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 6216f2408745Smrglt_save_CC=$CC 62175592a31fSmrgAC_LANG_PUSH(C) 62181ac89addSmrg 62195592a31fSmrg# Source file extension for C test sources. 62205592a31fSmrgac_ext=c 62211ac89addSmrg 62225592a31fSmrg# Object file extension for compiled C test sources. 62235592a31fSmrgobjext=o 62245592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 62251ac89addSmrg 62265592a31fSmrg# Code to be used in simple compile tests 62275592a31fSmrglt_simple_compile_test_code="int some_variable = 0;" 62281ac89addSmrg 62295592a31fSmrg# Code to be used in simple link tests 62305592a31fSmrglt_simple_link_test_code='int main(){return(0);}' 62311ac89addSmrg 62325592a31fSmrg_LT_TAG_COMPILER 62335592a31fSmrg# Save the default compiler, since it gets overwritten when the other 62345592a31fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62355592a31fSmrgcompiler_DEFAULT=$CC 62361ac89addSmrg 62375592a31fSmrg# save warnings/boilerplate of simple test code 62385592a31fSmrg_LT_COMPILER_BOILERPLATE 62395592a31fSmrg_LT_LINKER_BOILERPLATE 62401ac89addSmrg 62415592a31fSmrgif test -n "$compiler"; then 62425592a31fSmrg _LT_COMPILER_NO_RTTI($1) 62435592a31fSmrg _LT_COMPILER_PIC($1) 62445592a31fSmrg _LT_COMPILER_C_O($1) 62455592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 62465592a31fSmrg _LT_LINKER_SHLIBS($1) 62475592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 62485592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 62495592a31fSmrg LT_SYS_DLOPEN_SELF 62505592a31fSmrg _LT_CMD_STRIPLIB 62515592a31fSmrg 6252f2408745Smrg # Report what library types will actually be built 62535592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62545592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 62555592a31fSmrg 62565592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6257f2408745Smrg test no = "$can_build_shared" && enable_shared=no 62585592a31fSmrg 62595592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 62605592a31fSmrg # are all built from PIC. 62615592a31fSmrg case $host_os in 62625592a31fSmrg aix3*) 6263f2408745Smrg test yes = "$enable_shared" && enable_static=no 62645592a31fSmrg if test -n "$RANLIB"; then 62655592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62665592a31fSmrg postinstall_cmds='$RANLIB $lib' 62675592a31fSmrg fi 62685592a31fSmrg ;; 62691ac89addSmrg 62705592a31fSmrg aix[[4-9]]*) 6271f2408745Smrg if test ia64 != "$host_cpu"; then 6272f2408745Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6273f2408745Smrg yes,aix,yes) ;; # shared object as lib.so file only 6274f2408745Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6275f2408745Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6276f2408745Smrg esac 62775592a31fSmrg fi 62785592a31fSmrg ;; 62795592a31fSmrg esac 62805592a31fSmrg AC_MSG_RESULT([$enable_shared]) 62811ac89addSmrg 62825592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 62835592a31fSmrg # Make sure either enable_shared or enable_static is yes. 6284f2408745Smrg test yes = "$enable_shared" || enable_static=yes 62855592a31fSmrg AC_MSG_RESULT([$enable_static]) 62861ac89addSmrg 62875592a31fSmrg _LT_CONFIG($1) 62885592a31fSmrgfi 62895592a31fSmrgAC_LANG_POP 6290f2408745SmrgCC=$lt_save_CC 62915592a31fSmrg])# _LT_LANG_C_CONFIG 629250f2e948Smrg 629350f2e948Smrg 62945592a31fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 62955592a31fSmrg# -------------------------- 62965592a31fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 62975592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6298f2408745Smrg# the compiler configuration to 'libtool'. 62995592a31fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 6300b40a6198Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63015592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 6302b40a6198Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6303f2408745Smrgif test -n "$CXX" && ( test no != "$CXX" && 6304f2408745Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6305f2408745Smrg (test g++ != "$CXX"))); then 6306b40a6198Smrg AC_PROG_CXXCPP 6307b40a6198Smrgelse 6308b40a6198Smrg _lt_caught_CXX_error=yes 6309b40a6198Smrgfi 63105592a31fSmrg 63115592a31fSmrgAC_LANG_PUSH(C++) 63125592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63135592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 63145592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 63155592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63165592a31fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 63175592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63185592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 63195592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63205592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63215592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63225592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63235592a31fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63245592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 63255592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 63265592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 63275592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 63285592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63295592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6330b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6331b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63325592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 63335592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63345592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63351ac89addSmrg 63365592a31fSmrg# Source file extension for C++ test sources. 63375592a31fSmrgac_ext=cpp 63381ac89addSmrg 63395592a31fSmrg# Object file extension for compiled C++ test sources. 63405592a31fSmrgobjext=o 63415592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 63425592a31fSmrg 63435592a31fSmrg# No sense in running all these tests if we already determined that 63445592a31fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 63455592a31fSmrg# are currently assumed to apply to all compilers on this platform, 63465592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 6347f2408745Smrgif test yes != "$_lt_caught_CXX_error"; then 63485592a31fSmrg # Code to be used in simple compile tests 63495592a31fSmrg lt_simple_compile_test_code="int some_variable = 0;" 63505592a31fSmrg 63515592a31fSmrg # Code to be used in simple link tests 63525592a31fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63535592a31fSmrg 63545592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63555592a31fSmrg _LT_TAG_COMPILER 63565592a31fSmrg 63575592a31fSmrg # save warnings/boilerplate of simple test code 63585592a31fSmrg _LT_COMPILER_BOILERPLATE 63595592a31fSmrg _LT_LINKER_BOILERPLATE 63605592a31fSmrg 63615592a31fSmrg # Allow CC to be a program name with arguments. 63625592a31fSmrg lt_save_CC=$CC 6363b40a6198Smrg lt_save_CFLAGS=$CFLAGS 63645592a31fSmrg lt_save_LD=$LD 63655592a31fSmrg lt_save_GCC=$GCC 63665592a31fSmrg GCC=$GXX 63675592a31fSmrg lt_save_with_gnu_ld=$with_gnu_ld 63685592a31fSmrg lt_save_path_LD=$lt_cv_path_LD 63695592a31fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63705592a31fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63715592a31fSmrg else 63725592a31fSmrg $as_unset lt_cv_prog_gnu_ld 63735592a31fSmrg fi 63745592a31fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 63755592a31fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 63765592a31fSmrg else 63775592a31fSmrg $as_unset lt_cv_path_LD 63785592a31fSmrg fi 63795592a31fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 63805592a31fSmrg CC=${CXX-"c++"} 6381b40a6198Smrg CFLAGS=$CXXFLAGS 63825592a31fSmrg compiler=$CC 63835592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 63845592a31fSmrg _LT_CC_BASENAME([$compiler]) 63851ac89addSmrg 63865592a31fSmrg if test -n "$compiler"; then 63875592a31fSmrg # We don't want -fno-exception when compiling C++ code, so set the 63885592a31fSmrg # no_builtin_flag separately 6389f2408745Smrg if test yes = "$GXX"; then 63905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 63915592a31fSmrg else 63925592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 63935592a31fSmrg fi 63941ac89addSmrg 6395f2408745Smrg if test yes = "$GXX"; then 63965592a31fSmrg # Set up default GNU C++ configuration 639750f2e948Smrg 63985592a31fSmrg LT_PATH_LD 639950f2e948Smrg 64005592a31fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64015592a31fSmrg # archiving commands below assume that GNU ld is being used. 6402f2408745Smrg if test yes = "$with_gnu_ld"; then 6403f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6404f2408745Smrg _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' 640550f2e948Smrg 6406f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6407f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 640850f2e948Smrg 64095592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 64105592a31fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64115592a31fSmrg # investigate it a little bit more. (MM) 6412f2408745Smrg wlarc='$wl' 641350f2e948Smrg 64145592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 64155592a31fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64165592a31fSmrg $GREP 'no-whole-archive' > /dev/null; then 6417f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64185592a31fSmrg else 64195592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64205592a31fSmrg fi 64215592a31fSmrg else 64225592a31fSmrg with_gnu_ld=no 64235592a31fSmrg wlarc= 64245592a31fSmrg 64255592a31fSmrg # A generic and very simple default shared library creation 64265592a31fSmrg # command for GNU C++ for the case where it uses the native 64275592a31fSmrg # linker, instead of GNU ld. If possible, this setting should 64285592a31fSmrg # overridden to take advantage of the native linker features on 64295592a31fSmrg # the platform it is being used on. 64305592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64315592a31fSmrg fi 643250f2e948Smrg 64335592a31fSmrg # Commands to make compiler produce verbose output that lists 64345592a31fSmrg # what "hidden" libraries, object files and flags are used when 64355592a31fSmrg # linking a shared library. 6436b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 643750f2e948Smrg 64385592a31fSmrg else 64395592a31fSmrg GXX=no 64405592a31fSmrg with_gnu_ld=no 64415592a31fSmrg wlarc= 64425592a31fSmrg fi 644350f2e948Smrg 64445592a31fSmrg # PORTME: fill in a description of your system's C++ link characteristics 64455592a31fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64465592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 64475592a31fSmrg case $host_os in 64485592a31fSmrg aix3*) 64495592a31fSmrg # FIXME: insert proper C++ library support 64505592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64515592a31fSmrg ;; 64525592a31fSmrg aix[[4-9]]*) 6453f2408745Smrg if test ia64 = "$host_cpu"; then 64545592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 64555592a31fSmrg # have to do anything special. 64565592a31fSmrg aix_use_runtimelinking=no 64575592a31fSmrg exp_sym_flag='-Bexport' 6458f2408745Smrg no_entry_flag= 64595592a31fSmrg else 64605592a31fSmrg aix_use_runtimelinking=no 64615592a31fSmrg 64625592a31fSmrg # Test if we are trying to use run time linking or normal 64635592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6464f2408745Smrg # have runtime linking enabled, and use it for executables. 6465f2408745Smrg # For shared libraries, we enable/disable runtime linking 6466f2408745Smrg # depending on the kind of the shared library created - 6467f2408745Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6468f2408745Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6469f2408745Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6470f2408745Smrg # lib.a static archive 6471f2408745Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6472f2408745Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6473f2408745Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6474f2408745Smrg # lib.a(lib.so.V) shared, rtl:no 6475f2408745Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6476f2408745Smrg # lib.a static archive 64775592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64785592a31fSmrg for ld_flag in $LDFLAGS; do 64795592a31fSmrg case $ld_flag in 64805592a31fSmrg *-brtl*) 64815592a31fSmrg aix_use_runtimelinking=yes 64825592a31fSmrg break 64835592a31fSmrg ;; 64845592a31fSmrg esac 64855592a31fSmrg done 6486f2408745Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6487f2408745Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6488f2408745Smrg # so we don't have lib.a shared libs to link our executables. 6489f2408745Smrg # We have to force runtime linking in this case. 6490f2408745Smrg aix_use_runtimelinking=yes 6491f2408745Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6492f2408745Smrg fi 64935592a31fSmrg ;; 64945592a31fSmrg esac 649550f2e948Smrg 64965592a31fSmrg exp_sym_flag='-bexport' 64975592a31fSmrg no_entry_flag='-bnoentry' 64985592a31fSmrg fi 649950f2e948Smrg 65005592a31fSmrg # When large executables or shared objects are built, AIX ld can 65015592a31fSmrg # have problems creating the table of contents. If linking a library 65025592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 65035592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65045592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65055592a31fSmrg 65065592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 65075592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65085592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65095592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65105592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6511f2408745Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6512f2408745Smrg case $with_aix_soname,$aix_use_runtimelinking in 6513f2408745Smrg aix,*) ;; # no import file 6514f2408745Smrg svr4,* | *,yes) # use import file 6515f2408745Smrg # The Import File defines what to hardcode. 6516f2408745Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6517f2408745Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6518f2408745Smrg ;; 6519f2408745Smrg esac 65205592a31fSmrg 6521f2408745Smrg if test yes = "$GXX"; then 65225592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65235592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 65245592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 6525f2408745Smrg collect2name=`$CC -print-prog-name=collect2` 65265592a31fSmrg if test -f "$collect2name" && 65275592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65285592a31fSmrg then 65295592a31fSmrg # We have reworked collect2 65305592a31fSmrg : 65315592a31fSmrg else 65325592a31fSmrg # We have old collect2 65335592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65345592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 65355592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 65365592a31fSmrg # to unsupported forces relinking 65375592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65385592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65395592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65405592a31fSmrg fi 65415592a31fSmrg esac 65425592a31fSmrg shared_flag='-shared' 6543f2408745Smrg if test yes = "$aix_use_runtimelinking"; then 6544f2408745Smrg shared_flag=$shared_flag' $wl-G' 65455592a31fSmrg fi 6546f2408745Smrg # Need to ensure runtime linking is disabled for the traditional 6547f2408745Smrg # shared library, or the linker may eventually find shared libraries 6548f2408745Smrg # /with/ Import File - we do not want to mix them. 6549f2408745Smrg shared_flag_aix='-shared' 6550f2408745Smrg shared_flag_svr4='-shared $wl-G' 65515592a31fSmrg else 65525592a31fSmrg # not using gcc 6553f2408745Smrg if test ia64 = "$host_cpu"; then 65545592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65555592a31fSmrg # chokes on -Wl,-G. The following line is correct: 65565592a31fSmrg shared_flag='-G' 65575592a31fSmrg else 6558f2408745Smrg if test yes = "$aix_use_runtimelinking"; then 6559f2408745Smrg shared_flag='$wl-G' 65605592a31fSmrg else 6561f2408745Smrg shared_flag='$wl-bM:SRE' 65625592a31fSmrg fi 6563f2408745Smrg shared_flag_aix='$wl-bM:SRE' 6564f2408745Smrg shared_flag_svr4='$wl-G' 65655592a31fSmrg fi 65665592a31fSmrg fi 656750f2e948Smrg 6568f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65695592a31fSmrg # It seems that -bexpall does not export symbols beginning with 65705592a31fSmrg # underscore (_), so it is better to generate a list of symbols to 65715592a31fSmrg # export. 65725592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6573f2408745Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65745592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 65755592a31fSmrg # -berok will link without error, but may produce a broken library. 6576f2408745Smrg # The "-G" linker flag allows undefined symbols. 6577f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65785592a31fSmrg # Determine the default libpath from the value encoded in an empty 65795592a31fSmrg # executable. 6580b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6581f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65825592a31fSmrg 6583f2408745Smrg _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 65845592a31fSmrg else 6585f2408745Smrg if test ia64 = "$host_cpu"; then 6586f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65875592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6588f2408745Smrg _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" 65895592a31fSmrg else 65905592a31fSmrg # Determine the default libpath from the value encoded in an 65915592a31fSmrg # empty executable. 6592b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6593f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65945592a31fSmrg # Warning - without using the other run time loading flags, 65955592a31fSmrg # -berok will link without error, but may produce a broken library. 6596f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6597f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6598f2408745Smrg if test yes = "$with_gnu_ld"; then 6599b40a6198Smrg # We only use this code for GNU lds that support --whole-archive. 6600f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6601b40a6198Smrg else 6602b40a6198Smrg # Exported symbols can be pulled into shared objects from archives 6603b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6604b40a6198Smrg fi 66055592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6606f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6607f2408745Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6608f2408745Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6609f2408745Smrg if test svr4 != "$with_aix_soname"; then 6610f2408745Smrg # This is similar to how AIX traditionally builds its shared 6611f2408745Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6612f2408745Smrg _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' 6613f2408745Smrg fi 6614f2408745Smrg if test aix != "$with_aix_soname"; then 6615f2408745Smrg _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' 6616f2408745Smrg else 6617f2408745Smrg # used by -dlpreopen to get the symbols 6618f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6619f2408745Smrg fi 6620f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66215592a31fSmrg fi 66225592a31fSmrg fi 66235592a31fSmrg ;; 662450f2e948Smrg 66255592a31fSmrg beos*) 66265592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66275592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66285592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66295592a31fSmrg # support --undefined. This deserves some investigation. FIXME 6630f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66315592a31fSmrg else 66325592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66335592a31fSmrg fi 66345592a31fSmrg ;; 663550f2e948Smrg 66365592a31fSmrg chorus*) 66375592a31fSmrg case $cc_basename in 66385592a31fSmrg *) 66395592a31fSmrg # FIXME: insert proper C++ library support 66405592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66415592a31fSmrg ;; 66425592a31fSmrg esac 66435592a31fSmrg ;; 664450f2e948Smrg 66455592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 6646b40a6198Smrg case $GXX,$cc_basename in 6647b40a6198Smrg ,cl* | no,cl*) 6648b40a6198Smrg # Native MSVC 6649b40a6198Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6650b40a6198Smrg # no search path for DLLs. 6651b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6652b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6653b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6654b40a6198Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6655b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 6656b40a6198Smrg libext=lib 6657b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 6658f2408745Smrg shrext_cmds=.dll 6659b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 6660f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6661f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6662f2408745Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6663f2408745Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6664f2408745Smrg else 6665f2408745Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6666f2408745Smrg fi~ 6667f2408745Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6668f2408745Smrg linknames=' 6669b40a6198Smrg # The linker will not automatically build a static lib if we build a DLL. 6670b40a6198Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6671b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6672b40a6198Smrg # Don't use ranlib 6673b40a6198Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6674b40a6198Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6675f2408745Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6676f2408745Smrg case $lt_outputfile in 6677f2408745Smrg *.exe|*.EXE) ;; 6678f2408745Smrg *) 6679f2408745Smrg lt_outputfile=$lt_outputfile.exe 6680f2408745Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6681f2408745Smrg ;; 6682f2408745Smrg esac~ 6683f2408745Smrg func_to_tool_file "$lt_outputfile"~ 6684f2408745Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6685f2408745Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6686f2408745Smrg $RM "$lt_outputfile.manifest"; 6687f2408745Smrg fi' 6688b40a6198Smrg ;; 6689b40a6198Smrg *) 6690b40a6198Smrg # g++ 6691b40a6198Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6692b40a6198Smrg # as there is no search path for DLLs. 6693b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6694f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6695b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6696b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6697b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6698b40a6198Smrg 6699b40a6198Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6700f2408745Smrg _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' 6701f2408745Smrg # If the export-symbols file already is a .def file, use it as 6702f2408745Smrg # is; otherwise, prepend EXPORTS... 6703f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6704f2408745Smrg cp $export_symbols $output_objdir/$soname.def; 6705f2408745Smrg else 6706f2408745Smrg echo EXPORTS > $output_objdir/$soname.def; 6707f2408745Smrg cat $export_symbols >> $output_objdir/$soname.def; 6708f2408745Smrg fi~ 6709f2408745Smrg $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' 6710b40a6198Smrg else 6711b40a6198Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6712b40a6198Smrg fi 6713b40a6198Smrg ;; 6714b40a6198Smrg esac 6715b40a6198Smrg ;; 67165592a31fSmrg darwin* | rhapsody*) 67175592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 67185592a31fSmrg ;; 671950f2e948Smrg 6720f2408745Smrg os2*) 6721f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6722f2408745Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6723f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6724f2408745Smrg shrext_cmds=.dll 6725f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6726f2408745Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6727f2408745Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6728f2408745Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6729f2408745Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6730f2408745Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6731f2408745Smrg emximp -o $lib $output_objdir/$libname.def' 6732f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6733f2408745Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6734f2408745Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6735f2408745Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6736f2408745Smrg prefix_cmds="$SED"~ 6737f2408745Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6738f2408745Smrg prefix_cmds="$prefix_cmds -e 1d"; 6739f2408745Smrg fi~ 6740f2408745Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6741f2408745Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6742f2408745Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6743f2408745Smrg emximp -o $lib $output_objdir/$libname.def' 6744f2408745Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6745f2408745Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6746f2408745Smrg ;; 6747f2408745Smrg 67485592a31fSmrg dgux*) 67495592a31fSmrg case $cc_basename in 67505592a31fSmrg ec++*) 67515592a31fSmrg # FIXME: insert proper C++ library support 67525592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67535592a31fSmrg ;; 67545592a31fSmrg ghcx*) 67555592a31fSmrg # Green Hills C++ Compiler 67565592a31fSmrg # FIXME: insert proper C++ library support 67575592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67585592a31fSmrg ;; 67595592a31fSmrg *) 67605592a31fSmrg # FIXME: insert proper C++ library support 67615592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67625592a31fSmrg ;; 67635592a31fSmrg esac 67645592a31fSmrg ;; 676550f2e948Smrg 6766b40a6198Smrg freebsd2.*) 67675592a31fSmrg # C++ shared libraries reported to be fairly broken before 67685592a31fSmrg # switch to ELF 67695592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67705592a31fSmrg ;; 677150f2e948Smrg 67725592a31fSmrg freebsd-elf*) 67735592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67745592a31fSmrg ;; 67755592a31fSmrg 67765592a31fSmrg freebsd* | dragonfly*) 67775592a31fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67785592a31fSmrg # conventions 67795592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 67805592a31fSmrg ;; 678150f2e948Smrg 6782b40a6198Smrg haiku*) 6783f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6784b40a6198Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6785b40a6198Smrg ;; 6786b40a6198Smrg 67875592a31fSmrg hpux9*) 6788f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67895592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6790f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 67915592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 67925592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 67935592a31fSmrg # but as the default 67945592a31fSmrg # location of the library. 67955592a31fSmrg 67965592a31fSmrg case $cc_basename in 67975592a31fSmrg CC*) 67985592a31fSmrg # FIXME: insert proper C++ library support 67995592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68005592a31fSmrg ;; 68015592a31fSmrg aCC*) 6802f2408745Smrg _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' 68035592a31fSmrg # Commands to make compiler produce verbose output that lists 68045592a31fSmrg # what "hidden" libraries, object files and flags are used when 68055592a31fSmrg # linking a shared library. 68065592a31fSmrg # 68075592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 68085592a31fSmrg # explicitly linking system object files so we need to strip them 68095592a31fSmrg # from the output so that they don't get included in the library 68105592a31fSmrg # dependencies. 6811f2408745Smrg 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"' 68125592a31fSmrg ;; 68135592a31fSmrg *) 6814f2408745Smrg if test yes = "$GXX"; then 6815f2408745Smrg _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' 68165592a31fSmrg else 68175592a31fSmrg # FIXME: insert proper C++ library support 68185592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68195592a31fSmrg fi 68205592a31fSmrg ;; 68215592a31fSmrg esac 68225592a31fSmrg ;; 682350f2e948Smrg 68245592a31fSmrg hpux10*|hpux11*) 6825f2408745Smrg if test no = "$with_gnu_ld"; then 6826f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68275592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68285592a31fSmrg 68295592a31fSmrg case $host_cpu in 68305592a31fSmrg hppa*64*|ia64*) 68315592a31fSmrg ;; 68325592a31fSmrg *) 6833f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68345592a31fSmrg ;; 68355592a31fSmrg esac 68365592a31fSmrg fi 68375592a31fSmrg case $host_cpu in 68385592a31fSmrg hppa*64*|ia64*) 68395592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 68405592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68415592a31fSmrg ;; 68425592a31fSmrg *) 68435592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68445592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68455592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68465592a31fSmrg # but as the default 68475592a31fSmrg # location of the library. 68485592a31fSmrg ;; 68495592a31fSmrg esac 68505592a31fSmrg 68515592a31fSmrg case $cc_basename in 68525592a31fSmrg CC*) 68535592a31fSmrg # FIXME: insert proper C++ library support 68545592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68555592a31fSmrg ;; 68565592a31fSmrg aCC*) 68575592a31fSmrg case $host_cpu in 68585592a31fSmrg hppa*64*) 6859f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68605592a31fSmrg ;; 68615592a31fSmrg ia64*) 6862f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68635592a31fSmrg ;; 68645592a31fSmrg *) 6865f2408745Smrg _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' 68665592a31fSmrg ;; 68675592a31fSmrg esac 68685592a31fSmrg # Commands to make compiler produce verbose output that lists 68695592a31fSmrg # what "hidden" libraries, object files and flags are used when 68705592a31fSmrg # linking a shared library. 68715592a31fSmrg # 68725592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 68735592a31fSmrg # explicitly linking system object files so we need to strip them 68745592a31fSmrg # from the output so that they don't get included in the library 68755592a31fSmrg # dependencies. 6876f2408745Smrg 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"' 68775592a31fSmrg ;; 68785592a31fSmrg *) 6879f2408745Smrg if test yes = "$GXX"; then 6880f2408745Smrg if test no = "$with_gnu_ld"; then 68815592a31fSmrg case $host_cpu in 68825592a31fSmrg hppa*64*) 6883f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68845592a31fSmrg ;; 68855592a31fSmrg ia64*) 6886f2408745Smrg _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' 68875592a31fSmrg ;; 68885592a31fSmrg *) 6889f2408745Smrg _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' 68905592a31fSmrg ;; 68915592a31fSmrg esac 68925592a31fSmrg fi 68935592a31fSmrg else 68945592a31fSmrg # FIXME: insert proper C++ library support 68955592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68965592a31fSmrg fi 68975592a31fSmrg ;; 68985592a31fSmrg esac 68995592a31fSmrg ;; 690050f2e948Smrg 69015592a31fSmrg interix[[3-9]]*) 69025592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 69035592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6904f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6905f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69065592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69075592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69085592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 69095592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 69105592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69115592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6912f2408745Smrg _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' 6913f2408745Smrg _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' 69145592a31fSmrg ;; 69155592a31fSmrg irix5* | irix6*) 69165592a31fSmrg case $cc_basename in 69175592a31fSmrg CC*) 69185592a31fSmrg # SGI C++ 6919f2408745Smrg _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' 69205592a31fSmrg 69215592a31fSmrg # Archives containing C++ object files must be created using 69225592a31fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69235592a31fSmrg # necessary to make sure instantiated templates are included 69245592a31fSmrg # in the archive. 69255592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69265592a31fSmrg ;; 69275592a31fSmrg *) 6928f2408745Smrg if test yes = "$GXX"; then 6929f2408745Smrg if test no = "$with_gnu_ld"; then 6930f2408745Smrg _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' 69315592a31fSmrg else 6932f2408745Smrg _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' 69335592a31fSmrg fi 69345592a31fSmrg fi 69355592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69365592a31fSmrg ;; 69375592a31fSmrg esac 6938f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69395592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69405592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 69415592a31fSmrg ;; 694250f2e948Smrg 6943f2408745Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69445592a31fSmrg case $cc_basename in 69455592a31fSmrg KCC*) 69465592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69475592a31fSmrg 69485592a31fSmrg # KCC will only create a shared library if the output file 69495592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69505592a31fSmrg # to its proper name (with version) after linking. 6951f2408745Smrg _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' 6952f2408745Smrg _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' 69535592a31fSmrg # Commands to make compiler produce verbose output that lists 69545592a31fSmrg # what "hidden" libraries, object files and flags are used when 69555592a31fSmrg # linking a shared library. 69565592a31fSmrg # 69575592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 69585592a31fSmrg # explicitly linking system object files so we need to strip them 69595592a31fSmrg # from the output so that they don't get included in the library 69605592a31fSmrg # dependencies. 6961f2408745Smrg 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"' 69625592a31fSmrg 6963f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6964f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69655592a31fSmrg 69665592a31fSmrg # Archives containing C++ object files must be created using 69675592a31fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69685592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69695592a31fSmrg ;; 69705592a31fSmrg icpc* | ecpc* ) 69715592a31fSmrg # Intel C++ 69725592a31fSmrg with_gnu_ld=yes 69735592a31fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 69745592a31fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69755592a31fSmrg # earlier do not add the objects themselves. 69765592a31fSmrg case `$CC -V 2>&1` in 69775592a31fSmrg *"Version 7."*) 6978f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6979f2408745Smrg _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' 69805592a31fSmrg ;; 69815592a31fSmrg *) # Version 8.0 or newer 69825592a31fSmrg tmp_idyn= 69835592a31fSmrg case $host_cpu in 69845592a31fSmrg ia64*) tmp_idyn=' -i_dynamic';; 69855592a31fSmrg esac 6986f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6987f2408745Smrg _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' 69885592a31fSmrg ;; 69895592a31fSmrg esac 69905592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6991f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6992f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6993f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 69945592a31fSmrg ;; 69955592a31fSmrg pgCC* | pgcpp*) 69965592a31fSmrg # Portland Group C++ compiler 69975592a31fSmrg case `$CC -V` in 6998b40a6198Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 69995592a31fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7000f2408745Smrg rm -rf $tpldir~ 7001f2408745Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7002f2408745Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70035592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7004f2408745Smrg rm -rf $tpldir~ 7005f2408745Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7006f2408745Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7007f2408745Smrg $RANLIB $oldlib' 70085592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7009f2408745Smrg rm -rf $tpldir~ 7010f2408745Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7011f2408745Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70125592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7013f2408745Smrg rm -rf $tpldir~ 7014f2408745Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7015f2408745Smrg $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' 70165592a31fSmrg ;; 7017b40a6198Smrg *) # Version 6 and above use weak symbols 7018f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7019f2408745Smrg _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' 70205592a31fSmrg ;; 70215592a31fSmrg esac 702250f2e948Smrg 7023f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7024f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7025f2408745Smrg _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' 70265592a31fSmrg ;; 70275592a31fSmrg cxx*) 70285592a31fSmrg # Compaq C++ 7029f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7030f2408745Smrg _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' 703150f2e948Smrg 70325592a31fSmrg runpath_var=LD_RUN_PATH 70335592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70345592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 703550f2e948Smrg 70365592a31fSmrg # Commands to make compiler produce verbose output that lists 70375592a31fSmrg # what "hidden" libraries, object files and flags are used when 70385592a31fSmrg # linking a shared library. 70395592a31fSmrg # 70405592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 70415592a31fSmrg # explicitly linking system object files so we need to strip them 70425592a31fSmrg # from the output so that they don't get included in the library 70435592a31fSmrg # dependencies. 7044f2408745Smrg 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' 70455592a31fSmrg ;; 7046b40a6198Smrg xl* | mpixl* | bgxl*) 70475592a31fSmrg # IBM XL 8.0 on PPC, with GNU ld 7048f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7049f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7050f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7051f2408745Smrg if test yes = "$supports_anon_versioning"; then 70525592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7053f2408745Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7054f2408745Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7055f2408745Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70565592a31fSmrg fi 70575592a31fSmrg ;; 70585592a31fSmrg *) 70595592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 70605592a31fSmrg *Sun\ C*) 70615592a31fSmrg # Sun C++ 5.9 70625592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7063f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7064f2408745Smrg _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' 70655592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7066f2408745Smrg _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' 70675592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70685592a31fSmrg 70695592a31fSmrg # Not sure whether something based on 70705592a31fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70715592a31fSmrg # would be better. 7072b40a6198Smrg output_verbose_link_cmd='func_echo_all' 70735592a31fSmrg 70745592a31fSmrg # Archives containing C++ object files must be created using 70755592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70765592a31fSmrg # necessary to make sure instantiated templates are included 70775592a31fSmrg # in the archive. 70785592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70795592a31fSmrg ;; 70805592a31fSmrg esac 70815592a31fSmrg ;; 70825592a31fSmrg esac 70835592a31fSmrg ;; 708450f2e948Smrg 70855592a31fSmrg lynxos*) 70865592a31fSmrg # FIXME: insert proper C++ library support 70875592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 70885592a31fSmrg ;; 708950f2e948Smrg 70905592a31fSmrg m88k*) 70915592a31fSmrg # FIXME: insert proper C++ library support 70925592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 70935592a31fSmrg ;; 709450f2e948Smrg 70955592a31fSmrg mvs*) 70965592a31fSmrg case $cc_basename in 70975592a31fSmrg cxx*) 70985592a31fSmrg # FIXME: insert proper C++ library support 70995592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71005592a31fSmrg ;; 71015592a31fSmrg *) 71025592a31fSmrg # FIXME: insert proper C++ library support 71035592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71045592a31fSmrg ;; 71055592a31fSmrg esac 71065592a31fSmrg ;; 710750f2e948Smrg 71085592a31fSmrg netbsd*) 71095592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71105592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71115592a31fSmrg wlarc= 71125592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71135592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71145592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71155592a31fSmrg fi 71165592a31fSmrg # Workaround some broken pre-1.5 toolchains 71175592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71185592a31fSmrg ;; 711950f2e948Smrg 71205592a31fSmrg *nto* | *qnx*) 71215592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 71225592a31fSmrg ;; 712350f2e948Smrg 7124f2408745Smrg openbsd* | bitrig*) 71255592a31fSmrg if test -f /usr/libexec/ld.so; then 71265592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71275592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71285592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71295592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7130f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7131f2408745Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7132f2408745Smrg _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' 7133f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7134f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71355592a31fSmrg fi 7136b40a6198Smrg output_verbose_link_cmd=func_echo_all 71375592a31fSmrg else 71385592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71395592a31fSmrg fi 71405592a31fSmrg ;; 714150f2e948Smrg 71425592a31fSmrg osf3* | osf4* | osf5*) 71435592a31fSmrg case $cc_basename in 71445592a31fSmrg KCC*) 71455592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71465592a31fSmrg 71475592a31fSmrg # KCC will only create a shared library if the output file 71485592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71495592a31fSmrg # to its proper name (with version) after linking. 7150f2408745Smrg _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' 71515592a31fSmrg 7152f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71535592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71545592a31fSmrg 71555592a31fSmrg # Archives containing C++ object files must be created using 71565592a31fSmrg # the KAI C++ compiler. 71575592a31fSmrg case $host in 71585592a31fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71595592a31fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71605592a31fSmrg esac 71615592a31fSmrg ;; 71625592a31fSmrg RCC*) 71635592a31fSmrg # Rational C++ 2.4.1 71645592a31fSmrg # FIXME: insert proper C++ library support 71655592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71665592a31fSmrg ;; 71675592a31fSmrg cxx*) 71685592a31fSmrg case $host in 71695592a31fSmrg osf3*) 7170f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7171f2408745Smrg _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' 7172f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71735592a31fSmrg ;; 71745592a31fSmrg *) 71755592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7176f2408745Smrg _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' 71775592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7178f2408745Smrg echo "-hidden">> $lib.exp~ 7179f2408745Smrg $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~ 7180f2408745Smrg $RM $lib.exp' 71815592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71825592a31fSmrg ;; 71835592a31fSmrg esac 718450f2e948Smrg 71855592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 718650f2e948Smrg 71875592a31fSmrg # Commands to make compiler produce verbose output that lists 71885592a31fSmrg # what "hidden" libraries, object files and flags are used when 71895592a31fSmrg # linking a shared library. 71905592a31fSmrg # 71915592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 71925592a31fSmrg # explicitly linking system object files so we need to strip them 71935592a31fSmrg # from the output so that they don't get included in the library 71945592a31fSmrg # dependencies. 7195f2408745Smrg 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"' 71965592a31fSmrg ;; 71975592a31fSmrg *) 7198f2408745Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7199f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72005592a31fSmrg case $host in 72015592a31fSmrg osf3*) 7202f2408745Smrg _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' 72035592a31fSmrg ;; 72045592a31fSmrg *) 7205f2408745Smrg _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' 72065592a31fSmrg ;; 72075592a31fSmrg esac 72085592a31fSmrg 7209f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72105592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72115592a31fSmrg 72125592a31fSmrg # Commands to make compiler produce verbose output that lists 72135592a31fSmrg # what "hidden" libraries, object files and flags are used when 72145592a31fSmrg # linking a shared library. 7215b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72165592a31fSmrg 72175592a31fSmrg else 72185592a31fSmrg # FIXME: insert proper C++ library support 72195592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72205592a31fSmrg fi 72215592a31fSmrg ;; 72225592a31fSmrg esac 72235592a31fSmrg ;; 722450f2e948Smrg 72255592a31fSmrg psos*) 72265592a31fSmrg # FIXME: insert proper C++ library support 72275592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72285592a31fSmrg ;; 722950f2e948Smrg 72305592a31fSmrg sunos4*) 72315592a31fSmrg case $cc_basename in 72325592a31fSmrg CC*) 72335592a31fSmrg # Sun C++ 4.x 72345592a31fSmrg # FIXME: insert proper C++ library support 72355592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72365592a31fSmrg ;; 72375592a31fSmrg lcc*) 72385592a31fSmrg # Lucid 72395592a31fSmrg # FIXME: insert proper C++ library support 72405592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72415592a31fSmrg ;; 72425592a31fSmrg *) 72435592a31fSmrg # FIXME: insert proper C++ library support 72445592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72455592a31fSmrg ;; 72465592a31fSmrg esac 72475592a31fSmrg ;; 724850f2e948Smrg 72495592a31fSmrg solaris*) 72505592a31fSmrg case $cc_basename in 7251b40a6198Smrg CC* | sunCC*) 72525592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 72535592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72545592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7255f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72565592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7257f2408745Smrg $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' 72585592a31fSmrg 72595592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72605592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72615592a31fSmrg case $host_os in 72625592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72635592a31fSmrg *) 72645592a31fSmrg # The compiler driver will combine and reorder linker options, 7265f2408745Smrg # but understands '-z linker_flag'. 72665592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72675592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72685592a31fSmrg ;; 72695592a31fSmrg esac 72705592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 727150f2e948Smrg 7272b40a6198Smrg output_verbose_link_cmd='func_echo_all' 727350f2e948Smrg 72745592a31fSmrg # Archives containing C++ object files must be created using 72755592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72765592a31fSmrg # necessary to make sure instantiated templates are included 72775592a31fSmrg # in the archive. 72785592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72795592a31fSmrg ;; 72805592a31fSmrg gcx*) 72815592a31fSmrg # Green Hills C++ Compiler 7282f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 728350f2e948Smrg 72845592a31fSmrg # The C++ compiler must be used to create the archive. 72855592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72865592a31fSmrg ;; 72875592a31fSmrg *) 72885592a31fSmrg # GNU C++ compiler with Solaris linker 7289f2408745Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7290f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 72915592a31fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7292f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72935592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7294f2408745Smrg $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' 72955592a31fSmrg 72965592a31fSmrg # Commands to make compiler produce verbose output that lists 72975592a31fSmrg # what "hidden" libraries, object files and flags are used when 72985592a31fSmrg # linking a shared library. 7299b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73005592a31fSmrg else 7301f2408745Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73025592a31fSmrg # platform. 7303f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73045592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7305f2408745Smrg $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' 73065592a31fSmrg 73075592a31fSmrg # Commands to make compiler produce verbose output that lists 73085592a31fSmrg # what "hidden" libraries, object files and flags are used when 73095592a31fSmrg # linking a shared library. 7310b40a6198Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73115592a31fSmrg fi 73125592a31fSmrg 7313f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73145592a31fSmrg case $host_os in 73155592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73165592a31fSmrg *) 7317f2408745Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73185592a31fSmrg ;; 73195592a31fSmrg esac 73205592a31fSmrg fi 73215592a31fSmrg ;; 73225592a31fSmrg esac 73235592a31fSmrg ;; 732450f2e948Smrg 73255592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7326f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73275592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73285592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73295592a31fSmrg runpath_var='LD_RUN_PATH' 733050f2e948Smrg 73315592a31fSmrg case $cc_basename in 73325592a31fSmrg CC*) 7333f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7334f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73355592a31fSmrg ;; 73365592a31fSmrg *) 7337f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7338f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73395592a31fSmrg ;; 73405592a31fSmrg esac 73415592a31fSmrg ;; 734250f2e948Smrg 73435592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 7344f2408745Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73455592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 73465592a31fSmrg # always be unresolved, which means just about no library would 73475592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 73485592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 73495592a31fSmrg # as -z defs. 7350f2408745Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7351f2408745Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73525592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73535592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7354f2408745Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73555592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73565592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7357f2408745Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73585592a31fSmrg runpath_var='LD_RUN_PATH' 735950f2e948Smrg 73605592a31fSmrg case $cc_basename in 73615592a31fSmrg CC*) 7362f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7363f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7364b40a6198Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7365f2408745Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7366b40a6198Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7367f2408745Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 73685592a31fSmrg ;; 73695592a31fSmrg *) 7370f2408745Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7371f2408745Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73725592a31fSmrg ;; 73735592a31fSmrg esac 73745592a31fSmrg ;; 737550f2e948Smrg 73765592a31fSmrg tandem*) 73775592a31fSmrg case $cc_basename in 73785592a31fSmrg NCC*) 73795592a31fSmrg # NonStop-UX NCC 3.20 73805592a31fSmrg # FIXME: insert proper C++ library support 73815592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73825592a31fSmrg ;; 73835592a31fSmrg *) 73845592a31fSmrg # FIXME: insert proper C++ library support 73855592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73865592a31fSmrg ;; 73875592a31fSmrg esac 73885592a31fSmrg ;; 738950f2e948Smrg 73905592a31fSmrg vxworks*) 73915592a31fSmrg # FIXME: insert proper C++ library support 73925592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73935592a31fSmrg ;; 73941ac89addSmrg 73955592a31fSmrg *) 73965592a31fSmrg # FIXME: insert proper C++ library support 73975592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73985592a31fSmrg ;; 73995592a31fSmrg esac 74001ac89addSmrg 74015592a31fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7402f2408745Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74035592a31fSmrg 7404f2408745Smrg _LT_TAGVAR(GCC, $1)=$GXX 7405f2408745Smrg _LT_TAGVAR(LD, $1)=$LD 74065592a31fSmrg 74075592a31fSmrg ## CAVEAT EMPTOR: 74085592a31fSmrg ## There is no encapsulation within the following macros, do not change 74095592a31fSmrg ## the running order or otherwise move them around unless you know exactly 74105592a31fSmrg ## what you are doing... 74115592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74125592a31fSmrg _LT_COMPILER_PIC($1) 74135592a31fSmrg _LT_COMPILER_C_O($1) 74145592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 74155592a31fSmrg _LT_LINKER_SHLIBS($1) 74165592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 74175592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74185592a31fSmrg 74195592a31fSmrg _LT_CONFIG($1) 74205592a31fSmrg fi # test -n "$compiler" 74215592a31fSmrg 74225592a31fSmrg CC=$lt_save_CC 7423b40a6198Smrg CFLAGS=$lt_save_CFLAGS 74245592a31fSmrg LDCXX=$LD 74255592a31fSmrg LD=$lt_save_LD 74265592a31fSmrg GCC=$lt_save_GCC 74275592a31fSmrg with_gnu_ld=$lt_save_with_gnu_ld 74285592a31fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 74295592a31fSmrg lt_cv_path_LD=$lt_save_path_LD 74305592a31fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74315592a31fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7432f2408745Smrgfi # test yes != "$_lt_caught_CXX_error" 74331ac89addSmrg 74345592a31fSmrgAC_LANG_POP 74355592a31fSmrg])# _LT_LANG_CXX_CONFIG 74361ac89addSmrg 74371ac89addSmrg 7438b40a6198Smrg# _LT_FUNC_STRIPNAME_CNF 7439b40a6198Smrg# ---------------------- 7440b40a6198Smrg# func_stripname_cnf prefix suffix name 7441b40a6198Smrg# strip PREFIX and SUFFIX off of NAME. 7442b40a6198Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7443b40a6198Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7444b40a6198Smrg# dot (in which case that matches only a dot). 7445b40a6198Smrg# 7446b40a6198Smrg# This function is identical to the (non-XSI) version of func_stripname, 7447b40a6198Smrg# except this one can be used by m4 code that may be executed by configure, 7448b40a6198Smrg# rather than the libtool script. 7449b40a6198Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7450b40a6198SmrgAC_REQUIRE([_LT_DECL_SED]) 7451b40a6198SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7452b40a6198Smrgfunc_stripname_cnf () 7453b40a6198Smrg{ 7454f2408745Smrg case @S|@2 in 7455f2408745Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7456f2408745Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7457b40a6198Smrg esac 7458b40a6198Smrg} # func_stripname_cnf 7459b40a6198Smrg])# _LT_FUNC_STRIPNAME_CNF 7460b40a6198Smrg 7461f2408745Smrg 74625592a31fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74635592a31fSmrg# --------------------------------- 74645592a31fSmrg# Figure out "hidden" library dependencies from verbose 74655592a31fSmrg# compiler output when linking a shared library. 74665592a31fSmrg# Parse the compiler output and extract the necessary 74675592a31fSmrg# objects, libraries and library flags. 74685592a31fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74695592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7470b40a6198SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74715592a31fSmrg# Dependencies to place before and after the object being linked: 74725592a31fSmrg_LT_TAGVAR(predep_objects, $1)= 74735592a31fSmrg_LT_TAGVAR(postdep_objects, $1)= 74745592a31fSmrg_LT_TAGVAR(predeps, $1)= 74755592a31fSmrg_LT_TAGVAR(postdeps, $1)= 74765592a31fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 74771ac89addSmrg 74785592a31fSmrgdnl we can't use the lt_simple_compile_test_code here, 74795592a31fSmrgdnl because it contains code intended for an executable, 74805592a31fSmrgdnl not a library. It's possible we should let each 74815592a31fSmrgdnl tag define a new lt_????_link_test_code variable, 74825592a31fSmrgdnl but it's only used here... 74835592a31fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74845592a31fSmrgint a; 74855592a31fSmrgvoid foo (void) { a = 0; } 74865592a31fSmrg_LT_EOF 74875592a31fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74885592a31fSmrgclass Foo 74895592a31fSmrg{ 74905592a31fSmrgpublic: 74915592a31fSmrg Foo (void) { a = 0; } 74925592a31fSmrgprivate: 74935592a31fSmrg int a; 74945592a31fSmrg}; 74955592a31fSmrg_LT_EOF 74965592a31fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 74975592a31fSmrg subroutine foo 74985592a31fSmrg implicit none 74995592a31fSmrg integer*4 a 75005592a31fSmrg a=0 75015592a31fSmrg return 75025592a31fSmrg end 75035592a31fSmrg_LT_EOF 75045592a31fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75055592a31fSmrg subroutine foo 75065592a31fSmrg implicit none 75075592a31fSmrg integer a 75085592a31fSmrg a=0 75095592a31fSmrg return 75105592a31fSmrg end 75115592a31fSmrg_LT_EOF 75125592a31fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75135592a31fSmrgpublic class foo { 75145592a31fSmrg private int a; 75155592a31fSmrg public void bar (void) { 75165592a31fSmrg a = 0; 75175592a31fSmrg } 75185592a31fSmrg}; 75195592a31fSmrg_LT_EOF 7520b40a6198Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7521b40a6198Smrgpackage foo 7522b40a6198Smrgfunc foo() { 7523b40a6198Smrg} 7524b40a6198Smrg_LT_EOF 75255592a31fSmrg]) 7526b40a6198Smrg 7527b40a6198Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7528b40a6198Smrgcase "$CC $CFLAGS " in #( 7529b40a6198Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7530b40a6198Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7531b40a6198Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7532b40a6198Smrgesac 7533b40a6198Smrg 75345592a31fSmrgdnl Parse the compiler output and extract the necessary 75355592a31fSmrgdnl objects, libraries and library flags. 75365592a31fSmrgif AC_TRY_EVAL(ac_compile); then 75375592a31fSmrg # Parse the compiler output and extract the necessary 75385592a31fSmrg # objects, libraries and library flags. 753945bc899bSmrg 75405592a31fSmrg # Sentinel used to keep track of whether or not we are before 75415592a31fSmrg # the conftest object file. 75425592a31fSmrg pre_test_object_deps_done=no 754345bc899bSmrg 75445592a31fSmrg for p in `eval "$output_verbose_link_cmd"`; do 7545f2408745Smrg case $prev$p in 754645bc899bSmrg 75475592a31fSmrg -L* | -R* | -l*) 75485592a31fSmrg # Some compilers place space between "-{L,R}" and the path. 75495592a31fSmrg # Remove the space. 7550f2408745Smrg if test x-L = "$p" || 7551f2408745Smrg test x-R = "$p"; then 75525592a31fSmrg prev=$p 75535592a31fSmrg continue 75545592a31fSmrg fi 755550f2e948Smrg 7556b40a6198Smrg # Expand the sysroot to ease extracting the directories later. 7557b40a6198Smrg if test -z "$prev"; then 7558b40a6198Smrg case $p in 7559b40a6198Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7560b40a6198Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7561b40a6198Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7562b40a6198Smrg esac 7563b40a6198Smrg fi 7564b40a6198Smrg case $p in 7565b40a6198Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7566b40a6198Smrg esac 7567f2408745Smrg if test no = "$pre_test_object_deps_done"; then 7568f2408745Smrg case $prev in 7569b40a6198Smrg -L | -R) 75705592a31fSmrg # Internal compiler library paths should come after those 75715592a31fSmrg # provided the user. The postdeps already come after the 75725592a31fSmrg # user supplied libs so there is no need to process them. 75735592a31fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7574f2408745Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75755592a31fSmrg else 7576f2408745Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75775592a31fSmrg fi 75785592a31fSmrg ;; 75795592a31fSmrg # The "-l" case would never come before the object being 75805592a31fSmrg # linked, so don't bother handling this case. 75815592a31fSmrg esac 75825592a31fSmrg else 75835592a31fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7584f2408745Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 75855592a31fSmrg else 7586f2408745Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75875592a31fSmrg fi 75885592a31fSmrg fi 7589b40a6198Smrg prev= 75905592a31fSmrg ;; 759150f2e948Smrg 7592b40a6198Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 75935592a31fSmrg *.$objext) 75945592a31fSmrg # This assumes that the test object file only shows up 75955592a31fSmrg # once in the compiler output. 75965592a31fSmrg if test "$p" = "conftest.$objext"; then 75975592a31fSmrg pre_test_object_deps_done=yes 75985592a31fSmrg continue 75995592a31fSmrg fi 760050f2e948Smrg 7601f2408745Smrg if test no = "$pre_test_object_deps_done"; then 76025592a31fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7603f2408745Smrg _LT_TAGVAR(predep_objects, $1)=$p 76045592a31fSmrg else 76055592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76065592a31fSmrg fi 76075592a31fSmrg else 76085592a31fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7609f2408745Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76105592a31fSmrg else 76115592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76125592a31fSmrg fi 76135592a31fSmrg fi 76145592a31fSmrg ;; 761550f2e948Smrg 76165592a31fSmrg *) ;; # Ignore the rest. 761750f2e948Smrg 76185592a31fSmrg esac 76195592a31fSmrg done 76203a925b30Smrg 76215592a31fSmrg # Clean up. 76225592a31fSmrg rm -f a.out a.exe 762350f2e948Smrgelse 76245592a31fSmrg echo "libtool.m4: error: problem compiling $1 test program" 762550f2e948Smrgfi 762650f2e948Smrg 76275592a31fSmrg$RM -f confest.$objext 7628b40a6198SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 762950f2e948Smrg 76305592a31fSmrg# PORTME: override above test on systems where it is broken 76315592a31fSmrgm4_if([$1], [CXX], 76325592a31fSmrg[case $host_os in 76335592a31fSmrginterix[[3-9]]*) 76345592a31fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76355592a31fSmrg # hack all around it, let's just trust "g++" to DTRT. 76365592a31fSmrg _LT_TAGVAR(predep_objects,$1)= 76375592a31fSmrg _LT_TAGVAR(postdep_objects,$1)= 76385592a31fSmrg _LT_TAGVAR(postdeps,$1)= 76395592a31fSmrg ;; 76405592a31fSmrgesac 76415592a31fSmrg]) 764250f2e948Smrg 76435592a31fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 76445592a31fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76455592a31fSmrgesac 76465592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76475592a31fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7648f2408745Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76495592a31fSmrgfi 76505592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76515592a31fSmrg [The directories searched by this compiler when creating a shared library]) 76525592a31fSmrg_LT_TAGDECL([], [predep_objects], [1], 76535592a31fSmrg [Dependencies to place before and after the objects being linked to 76545592a31fSmrg create a shared library]) 76555592a31fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 76565592a31fSmrg_LT_TAGDECL([], [predeps], [1]) 76575592a31fSmrg_LT_TAGDECL([], [postdeps], [1]) 76585592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76595592a31fSmrg [The library search path used internally by the compiler when linking 76605592a31fSmrg a shared library]) 76615592a31fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 76625592a31fSmrg 76635592a31fSmrg 76645592a31fSmrg# _LT_LANG_F77_CONFIG([TAG]) 76655592a31fSmrg# -------------------------- 76665592a31fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 76675592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7668f2408745Smrg# to write the compiler configuration to 'libtool'. 76695592a31fSmrgm4_defun([_LT_LANG_F77_CONFIG], 7670b40a6198Smrg[AC_LANG_PUSH(Fortran 77) 7671f2408745Smrgif test -z "$F77" || test no = "$F77"; then 7672b40a6198Smrg _lt_disable_F77=yes 7673b40a6198Smrgfi 767450f2e948Smrg 76755592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76765592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 76775592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 76785592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76795592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76805592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 76815592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76825592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76835592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76845592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76855592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 76865592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 76875592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 76885592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 76895592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 76905592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7691b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7692b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 76935592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 76945592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 76955592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 769650f2e948Smrg 76975592a31fSmrg# Source file extension for f77 test sources. 76985592a31fSmrgac_ext=f 769950f2e948Smrg 77005592a31fSmrg# Object file extension for compiled f77 test sources. 77015592a31fSmrgobjext=o 77025592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 77035592a31fSmrg 77045592a31fSmrg# No sense in running all these tests if we already determined that 77055592a31fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 77065592a31fSmrg# are currently assumed to apply to all compilers on this platform, 77075592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 7708f2408745Smrgif test yes != "$_lt_disable_F77"; then 77095592a31fSmrg # Code to be used in simple compile tests 77105592a31fSmrg lt_simple_compile_test_code="\ 77115592a31fSmrg subroutine t 77125592a31fSmrg return 77135592a31fSmrg end 77145592a31fSmrg" 771550f2e948Smrg 77165592a31fSmrg # Code to be used in simple link tests 77175592a31fSmrg lt_simple_link_test_code="\ 77185592a31fSmrg program t 77195592a31fSmrg end 77205592a31fSmrg" 772150f2e948Smrg 77225592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77235592a31fSmrg _LT_TAG_COMPILER 772450f2e948Smrg 77255592a31fSmrg # save warnings/boilerplate of simple test code 77265592a31fSmrg _LT_COMPILER_BOILERPLATE 77275592a31fSmrg _LT_LINKER_BOILERPLATE 772850f2e948Smrg 77295592a31fSmrg # Allow CC to be a program name with arguments. 7730f2408745Smrg lt_save_CC=$CC 77315592a31fSmrg lt_save_GCC=$GCC 7732b40a6198Smrg lt_save_CFLAGS=$CFLAGS 77335592a31fSmrg CC=${F77-"f77"} 7734b40a6198Smrg CFLAGS=$FFLAGS 77355592a31fSmrg compiler=$CC 77365592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 77375592a31fSmrg _LT_CC_BASENAME([$compiler]) 77385592a31fSmrg GCC=$G77 77395592a31fSmrg if test -n "$compiler"; then 77405592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77415592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 774250f2e948Smrg 77435592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7744f2408745Smrg test no = "$can_build_shared" && enable_shared=no 774550f2e948Smrg 77465592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 77475592a31fSmrg # are all built from PIC. 77485592a31fSmrg case $host_os in 77495592a31fSmrg aix3*) 7750f2408745Smrg test yes = "$enable_shared" && enable_static=no 77515592a31fSmrg if test -n "$RANLIB"; then 77525592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77535592a31fSmrg postinstall_cmds='$RANLIB $lib' 77545592a31fSmrg fi 77555592a31fSmrg ;; 77565592a31fSmrg aix[[4-9]]*) 7757f2408745Smrg if test ia64 != "$host_cpu"; then 7758f2408745Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7759f2408745Smrg yes,aix,yes) ;; # shared object as lib.so file only 7760f2408745Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7761f2408745Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7762f2408745Smrg esac 77635592a31fSmrg fi 77645592a31fSmrg ;; 77655592a31fSmrg esac 77665592a31fSmrg AC_MSG_RESULT([$enable_shared]) 77675592a31fSmrg 77685592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 77695592a31fSmrg # Make sure either enable_shared or enable_static is yes. 7770f2408745Smrg test yes = "$enable_shared" || enable_static=yes 77715592a31fSmrg AC_MSG_RESULT([$enable_static]) 77725592a31fSmrg 7773f2408745Smrg _LT_TAGVAR(GCC, $1)=$G77 7774f2408745Smrg _LT_TAGVAR(LD, $1)=$LD 77755592a31fSmrg 77765592a31fSmrg ## CAVEAT EMPTOR: 77775592a31fSmrg ## There is no encapsulation within the following macros, do not change 77785592a31fSmrg ## the running order or otherwise move them around unless you know exactly 77795592a31fSmrg ## what you are doing... 77805592a31fSmrg _LT_COMPILER_PIC($1) 77815592a31fSmrg _LT_COMPILER_C_O($1) 77825592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 77835592a31fSmrg _LT_LINKER_SHLIBS($1) 77845592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 77855592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 77865592a31fSmrg 77875592a31fSmrg _LT_CONFIG($1) 77885592a31fSmrg fi # test -n "$compiler" 77895592a31fSmrg 77905592a31fSmrg GCC=$lt_save_GCC 7791f2408745Smrg CC=$lt_save_CC 7792f2408745Smrg CFLAGS=$lt_save_CFLAGS 7793f2408745Smrgfi # test yes != "$_lt_disable_F77" 779450f2e948Smrg 77955592a31fSmrgAC_LANG_POP 77965592a31fSmrg])# _LT_LANG_F77_CONFIG 779750f2e948Smrg 779850f2e948Smrg 77995592a31fSmrg# _LT_LANG_FC_CONFIG([TAG]) 78005592a31fSmrg# ------------------------- 78015592a31fSmrg# Ensure that the configuration variables for a Fortran compiler are 78025592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7803f2408745Smrg# to write the compiler configuration to 'libtool'. 78045592a31fSmrgm4_defun([_LT_LANG_FC_CONFIG], 7805b40a6198Smrg[AC_LANG_PUSH(Fortran) 7806b40a6198Smrg 7807f2408745Smrgif test -z "$FC" || test no = "$FC"; then 7808b40a6198Smrg _lt_disable_FC=yes 7809b40a6198Smrgfi 78105592a31fSmrg 78115592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78125592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 78135592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 78145592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78155592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78165592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 78175592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78185592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78195592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78205592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78215592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 78225592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 78235592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 78245592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 78255592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78265592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7827b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7828b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78295592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 78305592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78315592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78325592a31fSmrg 78335592a31fSmrg# Source file extension for fc test sources. 78345592a31fSmrgac_ext=${ac_fc_srcext-f} 78355592a31fSmrg 78365592a31fSmrg# Object file extension for compiled fc test sources. 78375592a31fSmrgobjext=o 78385592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 78395592a31fSmrg 78405592a31fSmrg# No sense in running all these tests if we already determined that 78415592a31fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 78425592a31fSmrg# are currently assumed to apply to all compilers on this platform, 78435592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 7844f2408745Smrgif test yes != "$_lt_disable_FC"; then 78455592a31fSmrg # Code to be used in simple compile tests 78465592a31fSmrg lt_simple_compile_test_code="\ 78475592a31fSmrg subroutine t 78485592a31fSmrg return 78495592a31fSmrg end 78505592a31fSmrg" 785150f2e948Smrg 78525592a31fSmrg # Code to be used in simple link tests 78535592a31fSmrg lt_simple_link_test_code="\ 78545592a31fSmrg program t 78555592a31fSmrg end 78565592a31fSmrg" 785750f2e948Smrg 78585592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78595592a31fSmrg _LT_TAG_COMPILER 786050f2e948Smrg 78615592a31fSmrg # save warnings/boilerplate of simple test code 78625592a31fSmrg _LT_COMPILER_BOILERPLATE 78635592a31fSmrg _LT_LINKER_BOILERPLATE 786450f2e948Smrg 78655592a31fSmrg # Allow CC to be a program name with arguments. 7866f2408745Smrg lt_save_CC=$CC 78675592a31fSmrg lt_save_GCC=$GCC 7868b40a6198Smrg lt_save_CFLAGS=$CFLAGS 78695592a31fSmrg CC=${FC-"f95"} 7870b40a6198Smrg CFLAGS=$FCFLAGS 78715592a31fSmrg compiler=$CC 78725592a31fSmrg GCC=$ac_cv_fc_compiler_gnu 78735592a31fSmrg 78745592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 78755592a31fSmrg _LT_CC_BASENAME([$compiler]) 787650f2e948Smrg 78775592a31fSmrg if test -n "$compiler"; then 78785592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78795592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 78805592a31fSmrg 78815592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7882f2408745Smrg test no = "$can_build_shared" && enable_shared=no 78835592a31fSmrg 78845592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 78855592a31fSmrg # are all built from PIC. 78863a925b30Smrg case $host_os in 78875592a31fSmrg aix3*) 7888f2408745Smrg test yes = "$enable_shared" && enable_static=no 78895592a31fSmrg if test -n "$RANLIB"; then 78905592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 78915592a31fSmrg postinstall_cmds='$RANLIB $lib' 78925592a31fSmrg fi 78935592a31fSmrg ;; 78943a925b30Smrg aix[[4-9]]*) 7895f2408745Smrg if test ia64 != "$host_cpu"; then 7896f2408745Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7897f2408745Smrg yes,aix,yes) ;; # shared object as lib.so file only 7898f2408745Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7899f2408745Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7900f2408745Smrg esac 79013a925b30Smrg fi 79025592a31fSmrg ;; 79033a925b30Smrg esac 79045592a31fSmrg AC_MSG_RESULT([$enable_shared]) 79055592a31fSmrg 79065592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 79075592a31fSmrg # Make sure either enable_shared or enable_static is yes. 7908f2408745Smrg test yes = "$enable_shared" || enable_static=yes 79095592a31fSmrg AC_MSG_RESULT([$enable_static]) 79105592a31fSmrg 7911f2408745Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7912f2408745Smrg _LT_TAGVAR(LD, $1)=$LD 79135592a31fSmrg 79145592a31fSmrg ## CAVEAT EMPTOR: 79155592a31fSmrg ## There is no encapsulation within the following macros, do not change 79165592a31fSmrg ## the running order or otherwise move them around unless you know exactly 79175592a31fSmrg ## what you are doing... 79185592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 79195592a31fSmrg _LT_COMPILER_PIC($1) 79205592a31fSmrg _LT_COMPILER_C_O($1) 79215592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 79225592a31fSmrg _LT_LINKER_SHLIBS($1) 79235592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 79245592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 79255592a31fSmrg 79265592a31fSmrg _LT_CONFIG($1) 79275592a31fSmrg fi # test -n "$compiler" 79285592a31fSmrg 79295592a31fSmrg GCC=$lt_save_GCC 7930b40a6198Smrg CC=$lt_save_CC 7931b40a6198Smrg CFLAGS=$lt_save_CFLAGS 7932f2408745Smrgfi # test yes != "$_lt_disable_FC" 793350f2e948Smrg 79345592a31fSmrgAC_LANG_POP 79355592a31fSmrg])# _LT_LANG_FC_CONFIG 793650f2e948Smrg 793750f2e948Smrg 79385592a31fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 79395592a31fSmrg# -------------------------- 79405592a31fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79415592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7942f2408745Smrg# to write the compiler configuration to 'libtool'. 79435592a31fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 79445592a31fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79455592a31fSmrgAC_LANG_SAVE 794650f2e948Smrg 79475592a31fSmrg# Source file extension for Java test sources. 79485592a31fSmrgac_ext=java 794950f2e948Smrg 79505592a31fSmrg# Object file extension for compiled Java test sources. 79515592a31fSmrgobjext=o 79525592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 795350f2e948Smrg 79545592a31fSmrg# Code to be used in simple compile tests 79555592a31fSmrglt_simple_compile_test_code="class foo {}" 795650f2e948Smrg 79575592a31fSmrg# Code to be used in simple link tests 79585592a31fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 795950f2e948Smrg 79605592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79615592a31fSmrg_LT_TAG_COMPILER 796245bc899bSmrg 79635592a31fSmrg# save warnings/boilerplate of simple test code 79645592a31fSmrg_LT_COMPILER_BOILERPLATE 79655592a31fSmrg_LT_LINKER_BOILERPLATE 796645bc899bSmrg 79675592a31fSmrg# Allow CC to be a program name with arguments. 7968b40a6198Smrglt_save_CC=$CC 7969b40a6198Smrglt_save_CFLAGS=$CFLAGS 79705592a31fSmrglt_save_GCC=$GCC 79715592a31fSmrgGCC=yes 79725592a31fSmrgCC=${GCJ-"gcj"} 7973b40a6198SmrgCFLAGS=$GCJFLAGS 79745592a31fSmrgcompiler=$CC 79755592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 7976f2408745Smrg_LT_TAGVAR(LD, $1)=$LD 79775592a31fSmrg_LT_CC_BASENAME([$compiler]) 79785592a31fSmrg 79795592a31fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 79805592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79815592a31fSmrg 79825592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7983b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7984b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79855592a31fSmrg 79865592a31fSmrgif test -n "$compiler"; then 79875592a31fSmrg _LT_COMPILER_NO_RTTI($1) 79885592a31fSmrg _LT_COMPILER_PIC($1) 79895592a31fSmrg _LT_COMPILER_C_O($1) 79905592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 79915592a31fSmrg _LT_LINKER_SHLIBS($1) 79925592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 79935592a31fSmrg 79945592a31fSmrg _LT_CONFIG($1) 79955592a31fSmrgfi 79965592a31fSmrg 79975592a31fSmrgAC_LANG_RESTORE 79985592a31fSmrg 79995592a31fSmrgGCC=$lt_save_GCC 8000b40a6198SmrgCC=$lt_save_CC 8001b40a6198SmrgCFLAGS=$lt_save_CFLAGS 80025592a31fSmrg])# _LT_LANG_GCJ_CONFIG 80035592a31fSmrg 80045592a31fSmrg 8005b40a6198Smrg# _LT_LANG_GO_CONFIG([TAG]) 8006b40a6198Smrg# -------------------------- 8007b40a6198Smrg# Ensure that the configuration variables for the GNU Go compiler 80085592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8009f2408745Smrg# to write the compiler configuration to 'libtool'. 8010b40a6198Smrgm4_defun([_LT_LANG_GO_CONFIG], 8011b40a6198Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80125592a31fSmrgAC_LANG_SAVE 80135592a31fSmrg 8014b40a6198Smrg# Source file extension for Go test sources. 8015b40a6198Smrgac_ext=go 80165592a31fSmrg 8017b40a6198Smrg# Object file extension for compiled Go test sources. 80185592a31fSmrgobjext=o 80195592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 80205592a31fSmrg 80215592a31fSmrg# Code to be used in simple compile tests 8022b40a6198Smrglt_simple_compile_test_code="package main; func main() { }" 80235592a31fSmrg 80245592a31fSmrg# Code to be used in simple link tests 8025b40a6198Smrglt_simple_link_test_code='package main; func main() { }' 80265592a31fSmrg 80275592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80285592a31fSmrg_LT_TAG_COMPILER 80295592a31fSmrg 80305592a31fSmrg# save warnings/boilerplate of simple test code 80315592a31fSmrg_LT_COMPILER_BOILERPLATE 80325592a31fSmrg_LT_LINKER_BOILERPLATE 803345bc899bSmrg 80345592a31fSmrg# Allow CC to be a program name with arguments. 8035b40a6198Smrglt_save_CC=$CC 8036b40a6198Smrglt_save_CFLAGS=$CFLAGS 80375592a31fSmrglt_save_GCC=$GCC 8038b40a6198SmrgGCC=yes 8039b40a6198SmrgCC=${GOC-"gccgo"} 8040b40a6198SmrgCFLAGS=$GOFLAGS 80415592a31fSmrgcompiler=$CC 80425592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 8043f2408745Smrg_LT_TAGVAR(LD, $1)=$LD 80445592a31fSmrg_LT_CC_BASENAME([$compiler]) 8045b40a6198Smrg 8046b40a6198Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8047b40a6198Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8048b40a6198Smrg 8049b40a6198Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8050b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8051b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 805245bc899bSmrg 80535592a31fSmrgif test -n "$compiler"; then 8054b40a6198Smrg _LT_COMPILER_NO_RTTI($1) 8055b40a6198Smrg _LT_COMPILER_PIC($1) 8056b40a6198Smrg _LT_COMPILER_C_O($1) 8057b40a6198Smrg _LT_COMPILER_FILE_LOCKS($1) 8058b40a6198Smrg _LT_LINKER_SHLIBS($1) 8059b40a6198Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8060b40a6198Smrg 80615592a31fSmrg _LT_CONFIG($1) 80625592a31fSmrgfi 806345bc899bSmrg 80645592a31fSmrgAC_LANG_RESTORE 806545bc899bSmrg 8066b40a6198SmrgGCC=$lt_save_GCC 8067b40a6198SmrgCC=$lt_save_CC 8068b40a6198SmrgCFLAGS=$lt_save_CFLAGS 8069b40a6198Smrg])# _LT_LANG_GO_CONFIG 807045bc899bSmrg 8071b40a6198Smrg 8072b40a6198Smrg# _LT_LANG_RC_CONFIG([TAG]) 8073b40a6198Smrg# ------------------------- 8074b40a6198Smrg# Ensure that the configuration variables for the Windows resource compiler 8075b40a6198Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8076f2408745Smrg# to write the compiler configuration to 'libtool'. 8077b40a6198Smrgm4_defun([_LT_LANG_RC_CONFIG], 8078b40a6198Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8079b40a6198SmrgAC_LANG_SAVE 8080b40a6198Smrg 8081b40a6198Smrg# Source file extension for RC test sources. 8082b40a6198Smrgac_ext=rc 8083b40a6198Smrg 8084b40a6198Smrg# Object file extension for compiled RC test sources. 8085b40a6198Smrgobjext=o 8086b40a6198Smrg_LT_TAGVAR(objext, $1)=$objext 8087b40a6198Smrg 8088b40a6198Smrg# Code to be used in simple compile tests 8089b40a6198Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8090b40a6198Smrg 8091b40a6198Smrg# Code to be used in simple link tests 8092f2408745Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8093b40a6198Smrg 8094b40a6198Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8095b40a6198Smrg_LT_TAG_COMPILER 8096b40a6198Smrg 8097b40a6198Smrg# save warnings/boilerplate of simple test code 8098b40a6198Smrg_LT_COMPILER_BOILERPLATE 8099b40a6198Smrg_LT_LINKER_BOILERPLATE 8100b40a6198Smrg 8101b40a6198Smrg# Allow CC to be a program name with arguments. 8102f2408745Smrglt_save_CC=$CC 8103b40a6198Smrglt_save_CFLAGS=$CFLAGS 8104b40a6198Smrglt_save_GCC=$GCC 8105b40a6198SmrgGCC= 8106b40a6198SmrgCC=${RC-"windres"} 8107b40a6198SmrgCFLAGS= 8108b40a6198Smrgcompiler=$CC 8109b40a6198Smrg_LT_TAGVAR(compiler, $1)=$CC 8110b40a6198Smrg_LT_CC_BASENAME([$compiler]) 8111b40a6198Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8112b40a6198Smrg 8113b40a6198Smrgif test -n "$compiler"; then 8114b40a6198Smrg : 8115b40a6198Smrg _LT_CONFIG($1) 8116b40a6198Smrgfi 8117b40a6198Smrg 8118b40a6198SmrgGCC=$lt_save_GCC 8119b40a6198SmrgAC_LANG_RESTORE 8120b40a6198SmrgCC=$lt_save_CC 8121b40a6198SmrgCFLAGS=$lt_save_CFLAGS 8122b40a6198Smrg])# _LT_LANG_RC_CONFIG 8123b40a6198Smrg 8124b40a6198Smrg 8125b40a6198Smrg# LT_PROG_GCJ 8126b40a6198Smrg# ----------- 8127b40a6198SmrgAC_DEFUN([LT_PROG_GCJ], 81285592a31fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81295592a31fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81305592a31fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8131f2408745Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81325592a31fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 81335592a31fSmrg]) 813445bc899bSmrg 81355592a31fSmrg# Old name: 81365592a31fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81375592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81385592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 813945bc899bSmrg 814045bc899bSmrg 8141b40a6198Smrg# LT_PROG_GO 8142b40a6198Smrg# ---------- 8143b40a6198SmrgAC_DEFUN([LT_PROG_GO], 8144b40a6198Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8145b40a6198Smrg]) 8146b40a6198Smrg 8147b40a6198Smrg 81485592a31fSmrg# LT_PROG_RC 81495592a31fSmrg# ---------- 81505592a31fSmrgAC_DEFUN([LT_PROG_RC], 81515592a31fSmrg[AC_CHECK_TOOL(RC, windres,) 81525592a31fSmrg]) 81531ac89addSmrg 81545592a31fSmrg# Old name: 81555592a31fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81565592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81575592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81581ac89addSmrg 81591ac89addSmrg 81605592a31fSmrg# _LT_DECL_EGREP 81615592a31fSmrg# -------------- 81625592a31fSmrg# If we don't have a new enough Autoconf to choose the best grep 81635592a31fSmrg# available, choose the one first in the user's PATH. 81645592a31fSmrgm4_defun([_LT_DECL_EGREP], 81655592a31fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81665592a31fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81675592a31fSmrgtest -z "$GREP" && GREP=grep 81685592a31fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81695592a31fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81705592a31fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81715592a31fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81725592a31fSmrgAC_SUBST([GREP]) 81735592a31fSmrg]) 8174226fade8Smrg 817550f2e948Smrg 81765592a31fSmrg# _LT_DECL_OBJDUMP 81775592a31fSmrg# -------------- 81785592a31fSmrg# If we don't have a new enough Autoconf to choose the best objdump 81795592a31fSmrg# available, choose the one first in the user's PATH. 81805592a31fSmrgm4_defun([_LT_DECL_OBJDUMP], 81815592a31fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81825592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81835592a31fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81845592a31fSmrgAC_SUBST([OBJDUMP]) 81855592a31fSmrg]) 818650f2e948Smrg 8187b40a6198Smrg# _LT_DECL_DLLTOOL 8188b40a6198Smrg# ---------------- 8189b40a6198Smrg# Ensure DLLTOOL variable is set. 8190b40a6198Smrgm4_defun([_LT_DECL_DLLTOOL], 8191b40a6198Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8192b40a6198Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8193b40a6198Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8194b40a6198SmrgAC_SUBST([DLLTOOL]) 8195b40a6198Smrg]) 819650f2e948Smrg 81975592a31fSmrg# _LT_DECL_SED 81985592a31fSmrg# ------------ 81995592a31fSmrg# Check for a fully-functional sed program, that truncates 82005592a31fSmrg# as few characters as possible. Prefer GNU sed if found. 82015592a31fSmrgm4_defun([_LT_DECL_SED], 82025592a31fSmrg[AC_PROG_SED 82035592a31fSmrgtest -z "$SED" && SED=sed 82045592a31fSmrgXsed="$SED -e 1s/^X//" 82055592a31fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82065592a31fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82075592a31fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82085592a31fSmrg])# _LT_DECL_SED 82095592a31fSmrg 82105592a31fSmrgm4_ifndef([AC_PROG_SED], [ 82115592a31fSmrg# NOTE: This macro has been submitted for inclusion into # 82125592a31fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82135592a31fSmrg# a released version of Autoconf we should remove this # 82145592a31fSmrg# macro and use it instead. # 82155592a31fSmrg 82165592a31fSmrgm4_defun([AC_PROG_SED], 82175592a31fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82185592a31fSmrgAC_CACHE_VAL(lt_cv_path_SED, 82195592a31fSmrg[# Loop through the user's path and test for sed and gsed. 82205592a31fSmrg# Then use that list of sed's as ones to test for truncation. 82215592a31fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82225592a31fSmrgfor as_dir in $PATH 82235592a31fSmrgdo 82245592a31fSmrg IFS=$as_save_IFS 82255592a31fSmrg test -z "$as_dir" && as_dir=. 82265592a31fSmrg for lt_ac_prog in sed gsed; do 82275592a31fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 82285592a31fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82295592a31fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82305592a31fSmrg fi 82315592a31fSmrg done 82325592a31fSmrg done 82335592a31fSmrgdone 82345592a31fSmrgIFS=$as_save_IFS 82355592a31fSmrglt_ac_max=0 82365592a31fSmrglt_ac_count=0 82375592a31fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82385592a31fSmrg# along with /bin/sed that truncates output. 82395592a31fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8240f2408745Smrg test ! -f "$lt_ac_sed" && continue 82415592a31fSmrg cat /dev/null > conftest.in 82425592a31fSmrg lt_ac_count=0 82435592a31fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82445592a31fSmrg # Check for GNU sed and select it if it is found. 82455592a31fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82465592a31fSmrg lt_cv_path_SED=$lt_ac_sed 82475592a31fSmrg break 824845bc899bSmrg fi 82495592a31fSmrg while true; do 82505592a31fSmrg cat conftest.in conftest.in >conftest.tmp 82515592a31fSmrg mv conftest.tmp conftest.in 82525592a31fSmrg cp conftest.in conftest.nl 82535592a31fSmrg echo >>conftest.nl 82545592a31fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82555592a31fSmrg cmp -s conftest.out conftest.nl || break 82565592a31fSmrg # 10000 chars as input seems more than enough 8257f2408745Smrg test 10 -lt "$lt_ac_count" && break 82585592a31fSmrg lt_ac_count=`expr $lt_ac_count + 1` 8259f2408745Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82605592a31fSmrg lt_ac_max=$lt_ac_count 82615592a31fSmrg lt_cv_path_SED=$lt_ac_sed 82625592a31fSmrg fi 82635592a31fSmrg done 82645592a31fSmrgdone 826545bc899bSmrg]) 82665592a31fSmrgSED=$lt_cv_path_SED 82675592a31fSmrgAC_SUBST([SED]) 82685592a31fSmrgAC_MSG_RESULT([$SED]) 82695592a31fSmrg])#AC_PROG_SED 82705592a31fSmrg])#m4_ifndef 82711ac89addSmrg 82725592a31fSmrg# Old name: 82735592a31fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82745592a31fSmrgdnl aclocal-1.4 backwards compatibility: 82755592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 82765592a31fSmrg 82775592a31fSmrg 82785592a31fSmrg# _LT_CHECK_SHELL_FEATURES 82795592a31fSmrg# ------------------------ 82805592a31fSmrg# Find out whether the shell is Bourne or XSI compatible, 82815592a31fSmrg# or has some other useful features. 82825592a31fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8283f2408745Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82845592a31fSmrg lt_unset=unset 82855592a31fSmrgelse 82865592a31fSmrg lt_unset=false 828745bc899bSmrgfi 82885592a31fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82895592a31fSmrg 82905592a31fSmrg# test EBCDIC or ASCII 82915592a31fSmrgcase `echo X|tr X '\101'` in 82925592a31fSmrg A) # ASCII based system 82935592a31fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 82945592a31fSmrg lt_SP2NL='tr \040 \012' 82955592a31fSmrg lt_NL2SP='tr \015\012 \040\040' 82965592a31fSmrg ;; 82975592a31fSmrg *) # EBCDIC based system 82985592a31fSmrg lt_SP2NL='tr \100 \n' 82995592a31fSmrg lt_NL2SP='tr \r\n \100\100' 83005592a31fSmrg ;; 830145bc899bSmrgesac 83025592a31fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83035592a31fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83045592a31fSmrg])# _LT_CHECK_SHELL_FEATURES 830550f2e948Smrg 830650f2e948Smrg 8307b40a6198Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8308b40a6198Smrg# ----------------------------- 8309f2408745Smrg# Determine what file name conversion functions should be used by 8310b40a6198Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8311b40a6198Smrg# for certain cross-compile configurations and native mingw. 8312b40a6198Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8313b40a6198Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8314b40a6198SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8315b40a6198SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8316b40a6198SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8317b40a6198Smrg[case $host in 8318b40a6198Smrg *-*-mingw* ) 8319b40a6198Smrg case $build in 8320b40a6198Smrg *-*-mingw* ) # actually msys 8321b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8322b40a6198Smrg ;; 8323b40a6198Smrg *-*-cygwin* ) 8324b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8325b40a6198Smrg ;; 8326b40a6198Smrg * ) # otherwise, assume *nix 8327b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8328b40a6198Smrg ;; 8329b40a6198Smrg esac 83305592a31fSmrg ;; 8331b40a6198Smrg *-*-cygwin* ) 8332b40a6198Smrg case $build in 8333b40a6198Smrg *-*-mingw* ) # actually msys 8334b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8335b40a6198Smrg ;; 8336b40a6198Smrg *-*-cygwin* ) 8337b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8338b40a6198Smrg ;; 8339b40a6198Smrg * ) # otherwise, assume *nix 8340b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8341b40a6198Smrg ;; 8342b40a6198Smrg esac 83435592a31fSmrg ;; 8344b40a6198Smrg * ) # unhandled hosts (and "normal" native builds) 8345b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8346b40a6198Smrg ;; 8347b40a6198Smrgesac 83485592a31fSmrg]) 8349b40a6198Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8350b40a6198SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8351b40a6198Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8352b40a6198Smrg [0], [convert $build file names to $host format])dnl 8353b40a6198Smrg 8354b40a6198SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8355b40a6198SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8356b40a6198Smrg[#assume ordinary cross tools, or native build. 8357b40a6198Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8358b40a6198Smrgcase $host in 8359b40a6198Smrg *-*-mingw* ) 8360b40a6198Smrg case $build in 8361b40a6198Smrg *-*-mingw* ) # actually msys 8362b40a6198Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8363b40a6198Smrg ;; 8364b40a6198Smrg esac 8365b40a6198Smrg ;; 8366b40a6198Smrgesac 8367b40a6198Smrg]) 8368b40a6198Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8369b40a6198SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8370b40a6198Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8371b40a6198Smrg [0], [convert $build files to toolchain format])dnl 8372b40a6198Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 837345bc899bSmrg 83745592a31fSmrg# Helper functions for option handling. -*- Autoconf -*- 83755592a31fSmrg# 8376f2408745Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8377f2408745Smrg# Foundation, Inc. 83785592a31fSmrg# Written by Gary V. Vaughan, 2004 83795592a31fSmrg# 83805592a31fSmrg# This file is free software; the Free Software Foundation gives 83815592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 83825592a31fSmrg# modifications, as long as this notice is preserved. 838345bc899bSmrg 8384f2408745Smrg# serial 8 ltoptions.m4 838545bc899bSmrg 83865592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 83875592a31fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 838845bc899bSmrg 838945bc899bSmrg 83905592a31fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 83915592a31fSmrg# ------------------------------------------ 83925592a31fSmrgm4_define([_LT_MANGLE_OPTION], 83935592a31fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 839445bc899bSmrg 83951ac89addSmrg 83965592a31fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 83975592a31fSmrg# --------------------------------------- 83985592a31fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 83995592a31fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84005592a31fSmrg# saved as a flag. 84015592a31fSmrgm4_define([_LT_SET_OPTION], 84025592a31fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84035592a31fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84045592a31fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8405f2408745Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84065592a31fSmrg]) 84071ac89addSmrg 84081ac89addSmrg 84095592a31fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84105592a31fSmrg# ------------------------------------------------------------ 84115592a31fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84125592a31fSmrgm4_define([_LT_IF_OPTION], 84135592a31fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 84145592a31fSmrg 84155592a31fSmrg 84165592a31fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84175592a31fSmrg# ------------------------------------------------------- 84185592a31fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84195592a31fSmrg# are set. 84205592a31fSmrgm4_define([_LT_UNLESS_OPTIONS], 84215592a31fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84225592a31fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84235592a31fSmrg [m4_define([$0_found])])])[]dnl 84245592a31fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84255592a31fSmrg])[]dnl 84265592a31fSmrg]) 842745bc899bSmrg 842845bc899bSmrg 84295592a31fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84305592a31fSmrg# ---------------------------------------- 84315592a31fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 84325592a31fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84335592a31fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84345592a31fSmrg# the unknown option and exit. 84355592a31fSmrgm4_defun([_LT_SET_OPTIONS], 84365592a31fSmrg[# Set options 84375592a31fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84385592a31fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 84395592a31fSmrg 84405592a31fSmrgm4_if([$1],[LT_INIT],[ 84415592a31fSmrg dnl 84425592a31fSmrg dnl Simply set some default values (i.e off) if boolean options were not 84435592a31fSmrg dnl specified: 84445592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84455592a31fSmrg ]) 84465592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84475592a31fSmrg ]) 84485592a31fSmrg dnl 84495592a31fSmrg dnl If no reference was made to various pairs of opposing options, then 84505592a31fSmrg dnl we run the default mode handler for the pair. For example, if neither 8451f2408745Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84525592a31fSmrg dnl archives by default: 84535592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 84545592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 84555592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 84565592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8457f2408745Smrg [_LT_ENABLE_FAST_INSTALL]) 8458f2408745Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8459f2408745Smrg [_LT_WITH_AIX_SONAME([aix])]) 84605592a31fSmrg ]) 84615592a31fSmrg])# _LT_SET_OPTIONS 846245bc899bSmrg 846345bc899bSmrg 846445bc899bSmrg 84655592a31fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 84665592a31fSmrg# ----------------------------------------- 84675592a31fSmrgm4_define([_LT_MANGLE_DEFUN], 84685592a31fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 846945bc899bSmrg 847050f2e948Smrg 84715592a31fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 84725592a31fSmrg# ----------------------------------------------- 84735592a31fSmrgm4_define([LT_OPTION_DEFINE], 84745592a31fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 84755592a31fSmrg])# LT_OPTION_DEFINE 847650f2e948Smrg 847750f2e948Smrg 84785592a31fSmrg# dlopen 84795592a31fSmrg# ------ 84805592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84815592a31fSmrg]) 84825592a31fSmrg 84835592a31fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 84845592a31fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 84855592a31fSmrgAC_DIAGNOSE([obsolete], 84865592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8487f2408745Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 84885592a31fSmrg]) 84895592a31fSmrg 84905592a31fSmrgdnl aclocal-1.4 backwards compatibility: 84915592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 84925592a31fSmrg 84935592a31fSmrg 84945592a31fSmrg# win32-dll 84955592a31fSmrg# --------- 84965592a31fSmrg# Declare package support for building win32 dll's. 84975592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 84985592a31fSmrg[enable_win32_dll=yes 84995592a31fSmrg 85005592a31fSmrgcase $host in 8501b40a6198Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85025592a31fSmrg AC_CHECK_TOOL(AS, as, false) 85035592a31fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85045592a31fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85055592a31fSmrg ;; 85065592a31fSmrgesac 850745bc899bSmrg 85085592a31fSmrgtest -z "$AS" && AS=as 8509b40a6198Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 851045bc899bSmrg 85115592a31fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8512b40a6198Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 851345bc899bSmrg 85145592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8515b40a6198Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85165592a31fSmrg])# win32-dll 851745bc899bSmrg 85185592a31fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85195592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85205592a31fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85215592a31fSmrgAC_DIAGNOSE([obsolete], 85225592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8523f2408745Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85245592a31fSmrg]) 852545bc899bSmrg 85265592a31fSmrgdnl aclocal-1.4 backwards compatibility: 85275592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 852845bc899bSmrg 852945bc899bSmrg 85305592a31fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 85315592a31fSmrg# ---------------------------- 8532f2408745Smrg# implement the --enable-shared flag, and supports the 'shared' and 8533f2408745Smrg# 'disable-shared' LT_INIT options. 8534f2408745Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85355592a31fSmrgm4_define([_LT_ENABLE_SHARED], 85365592a31fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85375592a31fSmrgAC_ARG_ENABLE([shared], 85385592a31fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85395592a31fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85405592a31fSmrg [p=${PACKAGE-default} 85415592a31fSmrg case $enableval in 85425592a31fSmrg yes) enable_shared=yes ;; 85435592a31fSmrg no) enable_shared=no ;; 85445592a31fSmrg *) 85455592a31fSmrg enable_shared=no 85465592a31fSmrg # Look at the argument we got. We use all the common list separators. 8547f2408745Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85485592a31fSmrg for pkg in $enableval; do 8549f2408745Smrg IFS=$lt_save_ifs 85505592a31fSmrg if test "X$pkg" = "X$p"; then 85515592a31fSmrg enable_shared=yes 85525592a31fSmrg fi 85535592a31fSmrg done 8554f2408745Smrg IFS=$lt_save_ifs 8555226fade8Smrg ;; 85565592a31fSmrg esac], 85575592a31fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 855845bc899bSmrg 85595592a31fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 85605592a31fSmrg [Whether or not to build shared libraries]) 85615592a31fSmrg])# _LT_ENABLE_SHARED 856245bc899bSmrg 85635592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 85645592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 856545bc899bSmrg 85665592a31fSmrg# Old names: 85675592a31fSmrgAC_DEFUN([AC_ENABLE_SHARED], 85685592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 85695592a31fSmrg]) 857045bc899bSmrg 85715592a31fSmrgAC_DEFUN([AC_DISABLE_SHARED], 85725592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 85735592a31fSmrg]) 857445bc899bSmrg 85755592a31fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 85765592a31fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 857745bc899bSmrg 85785592a31fSmrgdnl aclocal-1.4 backwards compatibility: 85795592a31fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 85805592a31fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 858145bc899bSmrg 858245bc899bSmrg 858345bc899bSmrg 85845592a31fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 85855592a31fSmrg# ---------------------------- 8586f2408745Smrg# implement the --enable-static flag, and support the 'static' and 8587f2408745Smrg# 'disable-static' LT_INIT options. 8588f2408745Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85895592a31fSmrgm4_define([_LT_ENABLE_STATIC], 85905592a31fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 85915592a31fSmrgAC_ARG_ENABLE([static], 85925592a31fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 85935592a31fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 85945592a31fSmrg [p=${PACKAGE-default} 85955592a31fSmrg case $enableval in 85965592a31fSmrg yes) enable_static=yes ;; 85975592a31fSmrg no) enable_static=no ;; 85985592a31fSmrg *) 85995592a31fSmrg enable_static=no 86005592a31fSmrg # Look at the argument we got. We use all the common list separators. 8601f2408745Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86025592a31fSmrg for pkg in $enableval; do 8603f2408745Smrg IFS=$lt_save_ifs 86045592a31fSmrg if test "X$pkg" = "X$p"; then 86055592a31fSmrg enable_static=yes 86065592a31fSmrg fi 86075592a31fSmrg done 8608f2408745Smrg IFS=$lt_save_ifs 8609226fade8Smrg ;; 86105592a31fSmrg esac], 86115592a31fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 861245bc899bSmrg 86135592a31fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 86145592a31fSmrg [Whether or not to build static libraries]) 86155592a31fSmrg])# _LT_ENABLE_STATIC 861645bc899bSmrg 86175592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86185592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 861945bc899bSmrg 86205592a31fSmrg# Old names: 86215592a31fSmrgAC_DEFUN([AC_ENABLE_STATIC], 86225592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86235592a31fSmrg]) 862445bc899bSmrg 86255592a31fSmrgAC_DEFUN([AC_DISABLE_STATIC], 86265592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86275592a31fSmrg]) 862845bc899bSmrg 86295592a31fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86305592a31fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 863145bc899bSmrg 86325592a31fSmrgdnl aclocal-1.4 backwards compatibility: 86335592a31fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86345592a31fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 863545bc899bSmrg 863645bc899bSmrg 863745bc899bSmrg 86385592a31fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86395592a31fSmrg# ---------------------------------- 8640f2408745Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 8641f2408745Smrg# and 'disable-fast-install' LT_INIT options. 8642f2408745Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86435592a31fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 86445592a31fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86455592a31fSmrgAC_ARG_ENABLE([fast-install], 86465592a31fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86475592a31fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86485592a31fSmrg [p=${PACKAGE-default} 86495592a31fSmrg case $enableval in 86505592a31fSmrg yes) enable_fast_install=yes ;; 86515592a31fSmrg no) enable_fast_install=no ;; 86525592a31fSmrg *) 86535592a31fSmrg enable_fast_install=no 86545592a31fSmrg # Look at the argument we got. We use all the common list separators. 8655f2408745Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86565592a31fSmrg for pkg in $enableval; do 8657f2408745Smrg IFS=$lt_save_ifs 86585592a31fSmrg if test "X$pkg" = "X$p"; then 86595592a31fSmrg enable_fast_install=yes 866050f2e948Smrg fi 86615592a31fSmrg done 8662f2408745Smrg IFS=$lt_save_ifs 8663226fade8Smrg ;; 86645592a31fSmrg esac], 86655592a31fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 866645bc899bSmrg 86675592a31fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 86685592a31fSmrg [Whether or not to optimize for fast installation])dnl 86695592a31fSmrg])# _LT_ENABLE_FAST_INSTALL 867045bc899bSmrg 86715592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 86725592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 86731ac89addSmrg 86745592a31fSmrg# Old names: 86755592a31fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 86765592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 86775592a31fSmrgAC_DIAGNOSE([obsolete], 86785592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8679f2408745Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 86805592a31fSmrg]) 86811ac89addSmrg 86825592a31fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 86835592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 86845592a31fSmrgAC_DIAGNOSE([obsolete], 86855592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8686f2408745Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 86875592a31fSmrg]) 86881ac89addSmrg 86895592a31fSmrgdnl aclocal-1.4 backwards compatibility: 86905592a31fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 86915592a31fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 86921ac89addSmrg 869350f2e948Smrg 8694f2408745Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8695f2408745Smrg# ---------------------------------- 8696f2408745Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8697f2408745Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8698f2408745Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8699f2408745Smrgm4_define([_LT_WITH_AIX_SONAME], 8700f2408745Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8701f2408745Smrgshared_archive_member_spec= 8702f2408745Smrgcase $host,$enable_shared in 8703f2408745Smrgpower*-*-aix[[5-9]]*,yes) 8704f2408745Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8705f2408745Smrg AC_ARG_WITH([aix-soname], 8706f2408745Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8707f2408745Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8708f2408745Smrg [case $withval in 8709f2408745Smrg aix|svr4|both) 8710f2408745Smrg ;; 8711f2408745Smrg *) 8712f2408745Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8713f2408745Smrg ;; 8714f2408745Smrg esac 8715f2408745Smrg lt_cv_with_aix_soname=$with_aix_soname], 8716f2408745Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8717f2408745Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8718f2408745Smrg with_aix_soname=$lt_cv_with_aix_soname]) 8719f2408745Smrg AC_MSG_RESULT([$with_aix_soname]) 8720f2408745Smrg if test aix != "$with_aix_soname"; then 8721f2408745Smrg # For the AIX way of multilib, we name the shared archive member 8722f2408745Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8723f2408745Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8724f2408745Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8725f2408745Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8726f2408745Smrg if test 64 = "${OBJECT_MODE-32}"; then 8727f2408745Smrg shared_archive_member_spec=shr_64 8728f2408745Smrg else 8729f2408745Smrg shared_archive_member_spec=shr 8730f2408745Smrg fi 8731f2408745Smrg fi 8732f2408745Smrg ;; 8733f2408745Smrg*) 8734f2408745Smrg with_aix_soname=aix 8735f2408745Smrg ;; 8736f2408745Smrgesac 8737f2408745Smrg 8738f2408745Smrg_LT_DECL([], [shared_archive_member_spec], [0], 8739f2408745Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8740f2408745Smrg])# _LT_WITH_AIX_SONAME 8741f2408745Smrg 8742f2408745SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8743f2408745SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8744f2408745SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8745f2408745Smrg 8746f2408745Smrg 87475592a31fSmrg# _LT_WITH_PIC([MODE]) 87485592a31fSmrg# -------------------- 8749f2408745Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87505592a31fSmrg# LT_INIT options. 8751f2408745Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87525592a31fSmrgm4_define([_LT_WITH_PIC], 87535592a31fSmrg[AC_ARG_WITH([pic], 8754b40a6198Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 87555592a31fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8756b40a6198Smrg [lt_p=${PACKAGE-default} 8757b40a6198Smrg case $withval in 8758b40a6198Smrg yes|no) pic_mode=$withval ;; 8759b40a6198Smrg *) 8760b40a6198Smrg pic_mode=default 8761b40a6198Smrg # Look at the argument we got. We use all the common list separators. 8762f2408745Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8763b40a6198Smrg for lt_pkg in $withval; do 8764f2408745Smrg IFS=$lt_save_ifs 8765b40a6198Smrg if test "X$lt_pkg" = "X$lt_p"; then 8766b40a6198Smrg pic_mode=yes 8767b40a6198Smrg fi 8768b40a6198Smrg done 8769f2408745Smrg IFS=$lt_save_ifs 8770b40a6198Smrg ;; 8771b40a6198Smrg esac], 8772f2408745Smrg [pic_mode=m4_default([$1], [default])]) 87731ac89addSmrg 87745592a31fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 87755592a31fSmrg])# _LT_WITH_PIC 87761ac89addSmrg 87775592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 87785592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 877950f2e948Smrg 87805592a31fSmrg# Old name: 87815592a31fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 87825592a31fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 87835592a31fSmrgAC_DIAGNOSE([obsolete], 87845592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8785f2408745Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 878650f2e948Smrg]) 878750f2e948Smrg 87885592a31fSmrgdnl aclocal-1.4 backwards compatibility: 87895592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 879050f2e948Smrg 879150f2e948Smrg 87925592a31fSmrgm4_define([_LTDL_MODE], []) 87935592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 87945592a31fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 87955592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 87965592a31fSmrg [m4_define([_LTDL_MODE], [recursive])]) 87975592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 87985592a31fSmrg [m4_define([_LTDL_MODE], [subproject])]) 879950f2e948Smrg 88005592a31fSmrgm4_define([_LTDL_TYPE], []) 88015592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88025592a31fSmrg [m4_define([_LTDL_TYPE], [installable])]) 88035592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88045592a31fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 880550f2e948Smrg 88065592a31fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 880745bc899bSmrg# 8808f2408745Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8809f2408745Smrg# Foundation, Inc. 88105592a31fSmrg# Written by Gary V. Vaughan, 2004 8811226fade8Smrg# 88125592a31fSmrg# This file is free software; the Free Software Foundation gives 88135592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 88145592a31fSmrg# modifications, as long as this notice is preserved. 88155592a31fSmrg 88165592a31fSmrg# serial 6 ltsugar.m4 88175592a31fSmrg 88185592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 88195592a31fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 88205592a31fSmrg 88215592a31fSmrg 88225592a31fSmrg# lt_join(SEP, ARG1, [ARG2...]) 88235592a31fSmrg# ----------------------------- 88245592a31fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88255592a31fSmrg# associated separator. 88265592a31fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88275592a31fSmrg# versions in m4sugar had bugs. 88285592a31fSmrgm4_define([lt_join], 88295592a31fSmrg[m4_if([$#], [1], [], 88305592a31fSmrg [$#], [2], [[$2]], 88315592a31fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88325592a31fSmrgm4_define([_lt_join], 88335592a31fSmrg[m4_if([$#$2], [2], [], 88345592a31fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88355592a31fSmrg 88365592a31fSmrg 88375592a31fSmrg# lt_car(LIST) 88385592a31fSmrg# lt_cdr(LIST) 88395592a31fSmrg# ------------ 88405592a31fSmrg# Manipulate m4 lists. 88415592a31fSmrg# These macros are necessary as long as will still need to support 8842f2408745Smrg# Autoconf-2.59, which quotes differently. 88435592a31fSmrgm4_define([lt_car], [[$1]]) 88445592a31fSmrgm4_define([lt_cdr], 88455592a31fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88465592a31fSmrg [$#], 1, [], 88475592a31fSmrg [m4_dquote(m4_shift($@))])]) 88485592a31fSmrgm4_define([lt_unquote], $1) 88495592a31fSmrg 88505592a31fSmrg 88515592a31fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88525592a31fSmrg# ------------------------------------------ 8853f2408745Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 88545592a31fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 88555592a31fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 88565592a31fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 88575592a31fSmrg# than defined and empty). 88583a925b30Smrg# 88595592a31fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 88605592a31fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 88615592a31fSmrgm4_define([lt_append], 88625592a31fSmrg[m4_define([$1], 88635592a31fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 88645592a31fSmrg 88655592a31fSmrg 88665592a31fSmrg 88675592a31fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 88685592a31fSmrg# ---------------------------------------------------------- 88695592a31fSmrg# Produce a SEP delimited list of all paired combinations of elements of 88705592a31fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 88715592a31fSmrg# has the form PREFIXmINFIXSUFFIXn. 88725592a31fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 88735592a31fSmrgm4_define([lt_combine], 88745592a31fSmrg[m4_if(m4_eval([$# > 3]), [1], 88755592a31fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 88765592a31fSmrg[[m4_foreach([_Lt_prefix], [$2], 88775592a31fSmrg [m4_foreach([_Lt_suffix], 88785592a31fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 88795592a31fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 88805592a31fSmrg 88815592a31fSmrg 88825592a31fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 88835592a31fSmrg# ----------------------------------------------------------------------- 88845592a31fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 88855592a31fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 88865592a31fSmrgm4_define([lt_if_append_uniq], 88875592a31fSmrg[m4_ifdef([$1], 88885592a31fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 88895592a31fSmrg [lt_append([$1], [$2], [$3])$4], 88905592a31fSmrg [$5])], 88915592a31fSmrg [lt_append([$1], [$2], [$3])$4])]) 88925592a31fSmrg 88935592a31fSmrg 88945592a31fSmrg# lt_dict_add(DICT, KEY, VALUE) 88955592a31fSmrg# ----------------------------- 88965592a31fSmrgm4_define([lt_dict_add], 88975592a31fSmrg[m4_define([$1($2)], [$3])]) 889845bc899bSmrg 889945bc899bSmrg 89005592a31fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89015592a31fSmrg# -------------------------------------------- 89025592a31fSmrgm4_define([lt_dict_add_subkey], 89035592a31fSmrg[m4_define([$1($2:$3)], [$4])]) 890445bc899bSmrg 890545bc899bSmrg 89065592a31fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89075592a31fSmrg# ---------------------------------- 89085592a31fSmrgm4_define([lt_dict_fetch], 89095592a31fSmrg[m4_ifval([$3], 89105592a31fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89115592a31fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 891245bc899bSmrg 89131ac89addSmrg 89145592a31fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89155592a31fSmrg# ----------------------------------------------------------------- 89165592a31fSmrgm4_define([lt_if_dict_fetch], 89175592a31fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89185592a31fSmrg [$5], 89195592a31fSmrg [$6])]) 892045bc899bSmrg 89215592a31fSmrg 89225592a31fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89235592a31fSmrg# -------------------------------------------------------------- 89245592a31fSmrgm4_define([lt_dict_filter], 89255592a31fSmrg[m4_if([$5], [], [], 89265592a31fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89275592a31fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89285592a31fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8929226fade8Smrg]) 893050f2e948Smrg 89315592a31fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89325592a31fSmrg# 8933f2408745Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 89345592a31fSmrg# Written by Scott James Remnant, 2004 89355592a31fSmrg# 89365592a31fSmrg# This file is free software; the Free Software Foundation gives 89375592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 89385592a31fSmrg# modifications, as long as this notice is preserved. 893950f2e948Smrg 8940b40a6198Smrg# @configure_input@ 894150f2e948Smrg 8942f2408745Smrg# serial 4179 ltversion.m4 89435592a31fSmrg# This file is part of GNU Libtool 894450f2e948Smrg 8945f2408745Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8946f2408745Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 894750f2e948Smrg 89485592a31fSmrgAC_DEFUN([LTVERSION_VERSION], 8949f2408745Smrg[macro_version='2.4.6' 8950f2408745Smrgmacro_revision='2.4.6' 89515592a31fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89525592a31fSmrg_LT_DECL(, macro_revision, 0) 8953226fade8Smrg]) 895450f2e948Smrg 89555592a31fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 89565592a31fSmrg# 8957f2408745Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8958f2408745Smrg# Foundation, Inc. 89595592a31fSmrg# Written by Scott James Remnant, 2004. 89605592a31fSmrg# 89615592a31fSmrg# This file is free software; the Free Software Foundation gives 89625592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 89635592a31fSmrg# modifications, as long as this notice is preserved. 89645592a31fSmrg 8965b40a6198Smrg# serial 5 lt~obsolete.m4 89665592a31fSmrg 89675592a31fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 89685592a31fSmrg# 8969f2408745Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 89705592a31fSmrg# which have later been changed to m4_define as they aren't part of the 89715592a31fSmrg# exported API, or moved to Autoconf or Automake where they belong. 89725592a31fSmrg# 89735592a31fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 89745592a31fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 89755592a31fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 89765592a31fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 89775592a31fSmrg# and doesn't know about Autoconf macros at all.) 89785592a31fSmrg# 89795592a31fSmrg# So we provide this file, which has a silly filename so it's always 89805592a31fSmrg# included after everything else. This provides aclocal with the 89815592a31fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 89825592a31fSmrg# because those macros already exist, or will be overwritten later. 8983f2408745Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 89845592a31fSmrg# 89855592a31fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 89865592a31fSmrg# Yes, that means every name once taken will need to remain here until 89875592a31fSmrg# we give up compatibility with versions before 1.7, at which point 89885592a31fSmrg# we need to keep only those names which we still refer to. 89895592a31fSmrg 89905592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 89915592a31fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 89925592a31fSmrg 89935592a31fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 89945592a31fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 89955592a31fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 89965592a31fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 89975592a31fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 89985592a31fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 89995592a31fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90005592a31fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90015592a31fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90025592a31fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90035592a31fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90045592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90055592a31fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90065592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90075592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90085592a31fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90095592a31fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90105592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90115592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90125592a31fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90135592a31fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90145592a31fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90155592a31fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90165592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90175592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90185592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90195592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90205592a31fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90215592a31fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90225592a31fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90235592a31fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90245592a31fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90255592a31fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90265592a31fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90275592a31fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90285592a31fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90295592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90305592a31fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90315592a31fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90325592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90335592a31fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90345592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90355592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90365592a31fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90375592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90385592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90395592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90405592a31fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90415592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90425592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90435592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90445592a31fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90455592a31fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90465592a31fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9047b40a6198Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9048b40a6198Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9049b40a6198Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9050b40a6198Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9051b40a6198Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9052b40a6198Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9053b40a6198Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 90545592a31fSmrg 9055f2408745Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9056f2408745Smrg# serial 11 (pkg-config-0.29.1) 905745bc899bSmrg 9058f2408745Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9059f2408745Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9060f2408745Smrgdnl 9061f2408745Smrgdnl This program is free software; you can redistribute it and/or modify 9062f2408745Smrgdnl it under the terms of the GNU General Public License as published by 9063f2408745Smrgdnl the Free Software Foundation; either version 2 of the License, or 9064f2408745Smrgdnl (at your option) any later version. 9065f2408745Smrgdnl 9066f2408745Smrgdnl This program is distributed in the hope that it will be useful, but 9067f2408745Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9068f2408745Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9069f2408745Smrgdnl General Public License for more details. 9070f2408745Smrgdnl 9071f2408745Smrgdnl You should have received a copy of the GNU General Public License 9072f2408745Smrgdnl along with this program; if not, write to the Free Software 9073f2408745Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9074f2408745Smrgdnl 02111-1307, USA. 9075f2408745Smrgdnl 9076f2408745Smrgdnl As a special exception to the GNU General Public License, if you 9077f2408745Smrgdnl distribute this file as part of a program that contains a 9078f2408745Smrgdnl configuration script generated by Autoconf, you may include it under 9079f2408745Smrgdnl the same distribution terms that you use for the rest of that 9080f2408745Smrgdnl program. 9081f2408745Smrg 9082f2408745Smrgdnl PKG_PREREQ(MIN-VERSION) 9083f2408745Smrgdnl ----------------------- 9084f2408745Smrgdnl Since: 0.29 9085f2408745Smrgdnl 9086f2408745Smrgdnl Verify that the version of the pkg-config macros are at least 9087f2408745Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9088f2408745Smrgdnl installed version of pkg-config, this checks the developer's version 9089f2408745Smrgdnl of pkg.m4 when generating configure. 9090f2408745Smrgdnl 9091f2408745Smrgdnl To ensure that this macro is defined, also add: 9092f2408745Smrgdnl m4_ifndef([PKG_PREREQ], 9093f2408745Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9094f2408745Smrgdnl 9095f2408745Smrgdnl See the "Since" comment for each macro you use to see what version 9096f2408745Smrgdnl of the macros you require. 9097f2408745Smrgm4_defun([PKG_PREREQ], 9098f2408745Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9099f2408745Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9100f2408745Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9101f2408745Smrg])dnl PKG_PREREQ 9102f2408745Smrg 9103f2408745Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9104f2408745Smrgdnl ---------------------------------- 9105f2408745Smrgdnl Since: 0.16 9106f2408745Smrgdnl 9107f2408745Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9108f2408745Smrgdnl first found in the path. Checks that the version of pkg-config found 9109f2408745Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9110f2408745Smrgdnl used since that's the first version where most current features of 9111f2408745Smrgdnl pkg-config existed. 911245bc899bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 911345bc899bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9114c97b1c41Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9115c97b1c41Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9116b40a6198SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9117b40a6198SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9118b40a6198SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9119b40a6198Smrg 912045bc899bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 912145bc899bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 912245bc899bSmrgfi 912345bc899bSmrgif test -n "$PKG_CONFIG"; then 912445bc899bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 912545bc899bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 912645bc899bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 912745bc899bSmrg AC_MSG_RESULT([yes]) 912845bc899bSmrg else 912945bc899bSmrg AC_MSG_RESULT([no]) 913045bc899bSmrg PKG_CONFIG="" 913145bc899bSmrg fi 913245bc899bSmrgfi[]dnl 9133f2408745Smrg])dnl PKG_PROG_PKG_CONFIG 913445bc899bSmrg 9135f2408745Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9136f2408745Smrgdnl ------------------------------------------------------------------- 9137f2408745Smrgdnl Since: 0.18 9138f2408745Smrgdnl 9139f2408745Smrgdnl Check to see whether a particular set of modules exists. Similar to 9140f2408745Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9141f2408745Smrgdnl 9142f2408745Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9143f2408745Smrgdnl only at the first occurence in configure.ac, so if the first place 9144f2408745Smrgdnl it's called might be skipped (such as if it is within an "if", you 9145f2408745Smrgdnl have to call PKG_CHECK_EXISTS manually 914645bc899bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 914745bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 914845bc899bSmrgif test -n "$PKG_CONFIG" && \ 914945bc899bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9150b40a6198Smrg m4_default([$2], [:]) 915145bc899bSmrgm4_ifvaln([$3], [else 915245bc899bSmrg $3])dnl 915345bc899bSmrgfi]) 915445bc899bSmrg 9155f2408745Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9156f2408745Smrgdnl --------------------------------------------- 9157f2408745Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9158f2408745Smrgdnl pkg_failed based on the result. 915945bc899bSmrgm4_define([_PKG_CONFIG], 916050f2e948Smrg[if test -n "$$1"; then 916150f2e948Smrg pkg_cv_[]$1="$$1" 916250f2e948Smrg elif test -n "$PKG_CONFIG"; then 916350f2e948Smrg PKG_CHECK_EXISTS([$3], 9164c97b1c41Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9165c97b1c41Smrg test "x$?" != "x0" && pkg_failed=yes ], 916650f2e948Smrg [pkg_failed=yes]) 916750f2e948Smrg else 916850f2e948Smrg pkg_failed=untried 916945bc899bSmrgfi[]dnl 9170f2408745Smrg])dnl _PKG_CONFIG 917145bc899bSmrg 9172f2408745Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9173f2408745Smrgdnl --------------------------- 9174f2408745Smrgdnl Internal check to see if pkg-config supports short errors. 917545bc899bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 917645bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 917745bc899bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 917845bc899bSmrg _pkg_short_errors_supported=yes 917945bc899bSmrgelse 918045bc899bSmrg _pkg_short_errors_supported=no 918145bc899bSmrgfi[]dnl 9182f2408745Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 918345bc899bSmrg 918445bc899bSmrg 9185f2408745Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9186f2408745Smrgdnl [ACTION-IF-NOT-FOUND]) 9187f2408745Smrgdnl -------------------------------------------------------------- 9188f2408745Smrgdnl Since: 0.4.0 9189f2408745Smrgdnl 9190f2408745Smrgdnl Note that if there is a possibility the first call to 9191f2408745Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9192f2408745Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 919345bc899bSmrgAC_DEFUN([PKG_CHECK_MODULES], 919445bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 919545bc899bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 919645bc899bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 919745bc899bSmrg 919845bc899bSmrgpkg_failed=no 919945bc899bSmrgAC_MSG_CHECKING([for $1]) 920045bc899bSmrg 920145bc899bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 920245bc899bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 920345bc899bSmrg 920445bc899bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 920545bc899bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 920645bc899bSmrgSee the pkg-config man page for more details.]) 920745bc899bSmrg 920845bc899bSmrgif test $pkg_failed = yes; then 9209b40a6198Smrg AC_MSG_RESULT([no]) 921045bc899bSmrg _PKG_SHORT_ERRORS_SUPPORTED 921145bc899bSmrg if test $_pkg_short_errors_supported = yes; then 9212c97b1c41Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 921345bc899bSmrg else 9214c97b1c41Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 921545bc899bSmrg fi 921645bc899bSmrg # Put the nasty error message in config.log where it belongs 921745bc899bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 921845bc899bSmrg 9219b40a6198Smrg m4_default([$4], [AC_MSG_ERROR( 922045bc899bSmrg[Package requirements ($2) were not met: 922145bc899bSmrg 922245bc899bSmrg$$1_PKG_ERRORS 922345bc899bSmrg 922445bc899bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 922545bc899bSmrginstalled software in a non-standard prefix. 922645bc899bSmrg 9227c97b1c41Smrg_PKG_TEXT])[]dnl 9228b40a6198Smrg ]) 922945bc899bSmrgelif test $pkg_failed = untried; then 9230b40a6198Smrg AC_MSG_RESULT([no]) 9231b40a6198Smrg m4_default([$4], [AC_MSG_FAILURE( 923245bc899bSmrg[The pkg-config script could not be found or is too old. Make sure it 923345bc899bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 923445bc899bSmrgpath to pkg-config. 923545bc899bSmrg 923645bc899bSmrg_PKG_TEXT 923745bc899bSmrg 9238c97b1c41SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9239b40a6198Smrg ]) 924045bc899bSmrgelse 924145bc899bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 924245bc899bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 924345bc899bSmrg AC_MSG_RESULT([yes]) 9244b40a6198Smrg $3 924545bc899bSmrgfi[]dnl 9246f2408745Smrg])dnl PKG_CHECK_MODULES 924745bc899bSmrg 924857ba8e8bSmrg 9249f2408745Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9250f2408745Smrgdnl [ACTION-IF-NOT-FOUND]) 9251f2408745Smrgdnl --------------------------------------------------------------------- 9252f2408745Smrgdnl Since: 0.29 9253f2408745Smrgdnl 9254f2408745Smrgdnl Checks for existence of MODULES and gathers its build flags with 9255f2408745Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9256f2408745Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9257f2408745Smrgdnl 9258f2408745Smrgdnl Note that if there is a possibility the first call to 9259f2408745Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9260f2408745Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9261f2408745Smrgdnl configure.ac. 9262f2408745SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9263f2408745Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9264f2408745Smrg_save_PKG_CONFIG=$PKG_CONFIG 9265f2408745SmrgPKG_CONFIG="$PKG_CONFIG --static" 9266f2408745SmrgPKG_CHECK_MODULES($@) 9267f2408745SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9268f2408745Smrg])dnl PKG_CHECK_MODULES_STATIC 9269f2408745Smrg 9270f2408745Smrg 9271f2408745Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 9272f2408745Smrgdnl ------------------------- 9273f2408745Smrgdnl Since: 0.27 9274f2408745Smrgdnl 9275f2408745Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 9276f2408745Smrgdnl should install pkg-config .pc files. By default the directory is 9277f2408745Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 9278f2408745Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9279f2408745Smrgdnl parameter. 928057ba8e8bSmrgAC_DEFUN([PKG_INSTALLDIR], 928157ba8e8bSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 928257ba8e8bSmrgm4_pushdef([pkg_description], 928357ba8e8bSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 928457ba8e8bSmrgAC_ARG_WITH([pkgconfigdir], 928557ba8e8bSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 928657ba8e8bSmrg [with_pkgconfigdir=]pkg_default) 928757ba8e8bSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 928857ba8e8bSmrgm4_popdef([pkg_default]) 928957ba8e8bSmrgm4_popdef([pkg_description]) 9290f2408745Smrg])dnl PKG_INSTALLDIR 929157ba8e8bSmrg 929257ba8e8bSmrg 9293f2408745Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9294f2408745Smrgdnl -------------------------------- 9295f2408745Smrgdnl Since: 0.27 9296f2408745Smrgdnl 9297f2408745Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9298f2408745Smrgdnl module should install arch-independent pkg-config .pc files. By 9299f2408745Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 9300f2408745Smrgdnl changed by passing DIRECTORY. The user can override through the 9301f2408745Smrgdnl --with-noarch-pkgconfigdir parameter. 930257ba8e8bSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 930357ba8e8bSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 930457ba8e8bSmrgm4_pushdef([pkg_description], 930557ba8e8bSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 930657ba8e8bSmrgAC_ARG_WITH([noarch-pkgconfigdir], 930757ba8e8bSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 930857ba8e8bSmrg [with_noarch_pkgconfigdir=]pkg_default) 930957ba8e8bSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 931057ba8e8bSmrgm4_popdef([pkg_default]) 931157ba8e8bSmrgm4_popdef([pkg_description]) 9312f2408745Smrg])dnl PKG_NOARCH_INSTALLDIR 931357ba8e8bSmrg 931457ba8e8bSmrg 9315f2408745Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9316f2408745Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9317f2408745Smrgdnl ------------------------------------------- 9318f2408745Smrgdnl Since: 0.28 9319f2408745Smrgdnl 9320f2408745Smrgdnl Retrieves the value of the pkg-config variable for the given module. 932157ba8e8bSmrgAC_DEFUN([PKG_CHECK_VAR], 932257ba8e8bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 932357ba8e8bSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 932457ba8e8bSmrg 932557ba8e8bSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 932657ba8e8bSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 932757ba8e8bSmrg 932857ba8e8bSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9329f2408745Smrg])dnl PKG_CHECK_VAR 9330f2408745Smrg 9331f2408745Smrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9332f2408745Smrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9333f2408745Smrgdnl [DESCRIPTION], [DEFAULT]) 9334f2408745Smrgdnl ------------------------------------------ 9335f2408745Smrgdnl 9336f2408745Smrgdnl Prepare a "--with-" configure option using the lowercase 9337f2408745Smrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9338f2408745Smrgdnl PKG_CHECK_MODULES in a single macro. 9339f2408745SmrgAC_DEFUN([PKG_WITH_MODULES], 9340f2408745Smrg[ 9341f2408745Smrgm4_pushdef([with_arg], m4_tolower([$1])) 9342f2408745Smrg 9343f2408745Smrgm4_pushdef([description], 9344f2408745Smrg [m4_default([$5], [build with ]with_arg[ support])]) 9345f2408745Smrg 9346f2408745Smrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 9347f2408745Smrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9348f2408745Smrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9349f2408745Smrg 9350f2408745Smrgm4_case(def_arg, 9351f2408745Smrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9352f2408745Smrg [m4_pushdef([with_without],[--with-]with_arg)]) 9353f2408745Smrg 9354f2408745SmrgAC_ARG_WITH(with_arg, 9355f2408745Smrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9356f2408745Smrg [AS_TR_SH([with_]with_arg)=def_arg]) 9357f2408745Smrg 9358f2408745SmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 9359f2408745Smrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9360f2408745Smrg [auto],[PKG_CHECK_MODULES([$1],[$2], 9361f2408745Smrg [m4_n([def_action_if_found]) $3], 9362f2408745Smrg [m4_n([def_action_if_not_found]) $4])]) 9363f2408745Smrg 9364f2408745Smrgm4_popdef([with_arg]) 9365f2408745Smrgm4_popdef([description]) 9366f2408745Smrgm4_popdef([def_arg]) 9367f2408745Smrg 9368f2408745Smrg])dnl PKG_WITH_MODULES 9369f2408745Smrg 9370f2408745Smrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9371f2408745Smrgdnl [DESCRIPTION], [DEFAULT]) 9372f2408745Smrgdnl ----------------------------------------------- 9373f2408745Smrgdnl 9374f2408745Smrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9375f2408745Smrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 9376f2408745SmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 9377f2408745Smrg[ 9378f2408745SmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9379f2408745Smrg 9380f2408745SmrgAM_CONDITIONAL([HAVE_][$1], 9381f2408745Smrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9382f2408745Smrg])dnl PKG_HAVE_WITH_MODULES 9383f2408745Smrg 9384f2408745Smrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9385f2408745Smrgdnl [DESCRIPTION], [DEFAULT]) 9386f2408745Smrgdnl ------------------------------------------------------ 9387f2408745Smrgdnl 9388f2408745Smrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9389f2408745Smrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9390f2408745Smrgdnl and preprocessor variable. 9391f2408745SmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9392f2408745Smrg[ 9393f2408745SmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9394f2408745Smrg 9395f2408745SmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9396f2408745Smrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9397f2408745Smrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 939857ba8e8bSmrg 939950f2e948Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 940045bc899bSmrgdnl 9401b40a6198Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9402c97b1c41Smrgdnl 940345bc899bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9404b40a6198Smrgdnl copy of this software and associated documentation files (the "Software"), 9405b40a6198Smrgdnl to deal in the Software without restriction, including without limitation 9406b40a6198Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9407b40a6198Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9408b40a6198Smrgdnl Software is furnished to do so, subject to the following conditions: 940945bc899bSmrgdnl 9410b40a6198Smrgdnl The above copyright notice and this permission notice (including the next 9411b40a6198Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9412b40a6198Smrgdnl Software. 941345bc899bSmrgdnl 9414b40a6198Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9415b40a6198Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9416b40a6198Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9417b40a6198Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9418b40a6198Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9419b40a6198Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9420b40a6198Smrgdnl DEALINGS IN THE SOFTWARE. 942145bc899bSmrg 942245bc899bSmrg# XORG_MACROS_VERSION(required-version) 942345bc899bSmrg# ------------------------------------- 942445bc899bSmrg# Minimum version: 1.1.0 942545bc899bSmrg# 942645bc899bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 942745bc899bSmrg# your configure.ac with the minimum required version, such as: 942845bc899bSmrg# XORG_MACROS_VERSION(1.1) 942945bc899bSmrg# 94305592a31fSmrg# To ensure that this macro is defined, also add: 94315592a31fSmrg# m4_ifndef([XORG_MACROS_VERSION], 94325592a31fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 943345bc899bSmrg# 943445bc899bSmrg# 9435c97b1c41Smrg# See the "minimum version" comment for each macro you use to see what 943645bc899bSmrg# version you require. 94375592a31fSmrgm4_defun([XORG_MACROS_VERSION],[ 943857ba8e8bSmrgm4_define([vers_have], [1.19.0]) 94395592a31fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 94405592a31fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 94415592a31fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 94425592a31fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 94435592a31fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 94445592a31fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 94455592a31fSmrgm4_undefine([vers_have]) 94465592a31fSmrgm4_undefine([maj_have]) 94475592a31fSmrgm4_undefine([maj_needed]) 944845bc899bSmrg]) # XORG_MACROS_VERSION 944945bc899bSmrg 945045bc899bSmrg# XORG_PROG_RAWCPP() 945145bc899bSmrg# ------------------ 945245bc899bSmrg# Minimum version: 1.0.0 945345bc899bSmrg# 945445bc899bSmrg# Find cpp program and necessary flags for use in pre-processing text files 945545bc899bSmrg# such as man pages and config files 945645bc899bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 945745bc899bSmrgAC_REQUIRE([AC_PROG_CPP]) 9458c97b1c41SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 945945bc899bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 946045bc899bSmrg 946145bc899bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 946245bc899bSmrg# which is not the best choice for supporting other OS'es, but covers most 946345bc899bSmrg# of the ones we need for now. 946445bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9465b40a6198SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 946645bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 946745bc899bSmrg AC_MSG_RESULT([no]) 946845bc899bSmrgelse 946945bc899bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 947045bc899bSmrg RAWCPPFLAGS=-undef 947145bc899bSmrg AC_MSG_RESULT([yes]) 947250f2e948Smrg # under Cygwin unix is still defined even with -undef 947350f2e948Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 947450f2e948Smrg RAWCPPFLAGS="-undef -ansi" 947550f2e948Smrg AC_MSG_RESULT([yes, with -ansi]) 947645bc899bSmrg else 947745bc899bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 947845bc899bSmrg fi 947945bc899bSmrgfi 948045bc899bSmrgrm -f conftest.$ac_ext 948145bc899bSmrg 948245bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9483b40a6198SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 948445bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 948545bc899bSmrg AC_MSG_RESULT([no]) 948645bc899bSmrgelse 948745bc899bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 948857ba8e8bSmrg TRADITIONALCPPFLAGS="-traditional" 948945bc899bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 949045bc899bSmrg AC_MSG_RESULT([yes]) 949145bc899bSmrg else 949245bc899bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 949345bc899bSmrg fi 949445bc899bSmrgfi 949545bc899bSmrgrm -f conftest.$ac_ext 949645bc899bSmrgAC_SUBST(RAWCPPFLAGS) 949757ba8e8bSmrgAC_SUBST(TRADITIONALCPPFLAGS) 949845bc899bSmrg]) # XORG_PROG_RAWCPP 949945bc899bSmrg 950045bc899bSmrg# XORG_MANPAGE_SECTIONS() 950145bc899bSmrg# ----------------------- 950245bc899bSmrg# Minimum version: 1.0.0 950345bc899bSmrg# 950445bc899bSmrg# Determine which sections man pages go in for the different man page types 950545bc899bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 950645bc899bSmrg# Not sure if there's any better way than just hardcoding by OS name. 950745bc899bSmrg# Override default settings by setting environment variables 9508b40a6198Smrg# Added MAN_SUBSTS in version 1.8 9509b40a6198Smrg# Added AC_PROG_SED in version 1.8 951045bc899bSmrg 951145bc899bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 951245bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9513b40a6198SmrgAC_REQUIRE([AC_PROG_SED]) 951445bc899bSmrg 951545bc899bSmrgif test x$APP_MAN_SUFFIX = x ; then 951645bc899bSmrg APP_MAN_SUFFIX=1 951745bc899bSmrgfi 951845bc899bSmrgif test x$APP_MAN_DIR = x ; then 951945bc899bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 952045bc899bSmrgfi 952145bc899bSmrg 952245bc899bSmrgif test x$LIB_MAN_SUFFIX = x ; then 952345bc899bSmrg LIB_MAN_SUFFIX=3 952445bc899bSmrgfi 952545bc899bSmrgif test x$LIB_MAN_DIR = x ; then 952645bc899bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 952745bc899bSmrgfi 952845bc899bSmrg 952945bc899bSmrgif test x$FILE_MAN_SUFFIX = x ; then 953045bc899bSmrg case $host_os in 953145bc899bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 953245bc899bSmrg *) FILE_MAN_SUFFIX=5 ;; 953345bc899bSmrg esac 953445bc899bSmrgfi 953545bc899bSmrgif test x$FILE_MAN_DIR = x ; then 953645bc899bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 953745bc899bSmrgfi 953845bc899bSmrg 953945bc899bSmrgif test x$MISC_MAN_SUFFIX = x ; then 954045bc899bSmrg case $host_os in 954145bc899bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 954245bc899bSmrg *) MISC_MAN_SUFFIX=7 ;; 954345bc899bSmrg esac 954445bc899bSmrgfi 954545bc899bSmrgif test x$MISC_MAN_DIR = x ; then 954645bc899bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 954745bc899bSmrgfi 954845bc899bSmrg 954945bc899bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 955045bc899bSmrg case $host_os in 955145bc899bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 955245bc899bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 955345bc899bSmrg esac 955445bc899bSmrgfi 955545bc899bSmrgif test x$DRIVER_MAN_DIR = x ; then 955645bc899bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 955745bc899bSmrgfi 955845bc899bSmrg 955945bc899bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 956045bc899bSmrg case $host_os in 956145bc899bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 956245bc899bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 956345bc899bSmrg esac 956445bc899bSmrgfi 956545bc899bSmrgif test x$ADMIN_MAN_DIR = x ; then 956645bc899bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 956745bc899bSmrgfi 956845bc899bSmrg 956945bc899bSmrg 957045bc899bSmrgAC_SUBST([APP_MAN_SUFFIX]) 957145bc899bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 957245bc899bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 957345bc899bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 957445bc899bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 957545bc899bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 957645bc899bSmrgAC_SUBST([APP_MAN_DIR]) 957745bc899bSmrgAC_SUBST([LIB_MAN_DIR]) 957845bc899bSmrgAC_SUBST([FILE_MAN_DIR]) 957945bc899bSmrgAC_SUBST([MISC_MAN_DIR]) 958045bc899bSmrgAC_SUBST([DRIVER_MAN_DIR]) 958145bc899bSmrgAC_SUBST([ADMIN_MAN_DIR]) 9582b40a6198Smrg 9583b40a6198SmrgXORG_MAN_PAGE="X Version 11" 9584b40a6198SmrgAC_SUBST([XORG_MAN_PAGE]) 9585b40a6198SmrgMAN_SUBSTS="\ 9586b40a6198Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9587b40a6198Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9588b40a6198Smrg -e 's|__xservername__|Xorg|g' \ 9589b40a6198Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9590b40a6198Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9591b40a6198Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9592b40a6198Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9593b40a6198Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9594b40a6198Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9595b40a6198Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9596b40a6198Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9597b40a6198Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9598b40a6198SmrgAC_SUBST([MAN_SUBSTS]) 9599b40a6198Smrg 960045bc899bSmrg]) # XORG_MANPAGE_SECTIONS 960145bc899bSmrg 9602b40a6198Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9603b40a6198Smrg# ------------------------ 9604b40a6198Smrg# Minimum version: 1.7.0 9605b40a6198Smrg# 9606b40a6198Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9607b40a6198Smrg# provided by xorg-sgml-doctools, if installed. 9608b40a6198SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9609b40a6198SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9610b40a6198SmrgXORG_SGML_PATH= 9611b40a6198SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9612b40a6198Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9613b40a6198Smrg [m4_ifval([$1],[:], 9614b40a6198Smrg [if test x"$cross_compiling" != x"yes" ; then 9615b40a6198Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9616b40a6198Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9617b40a6198Smrg fi]) 9618b40a6198Smrg ]) 9619b40a6198Smrg 9620b40a6198Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9621b40a6198Smrg# the path and the name of the doc stylesheet 9622b40a6198Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9623b40a6198Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9624b40a6198Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9625b40a6198Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9626b40a6198Smrgelse 9627b40a6198Smrg AC_MSG_RESULT([no]) 9628b40a6198Smrgfi 9629b40a6198Smrg 9630b40a6198SmrgAC_SUBST(XORG_SGML_PATH) 9631b40a6198SmrgAC_SUBST(STYLESHEET_SRCDIR) 9632b40a6198SmrgAC_SUBST(XSL_STYLESHEET) 9633b40a6198SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9634b40a6198Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9635b40a6198Smrg 963645bc899bSmrg# XORG_CHECK_LINUXDOC 963745bc899bSmrg# ------------------- 963845bc899bSmrg# Minimum version: 1.0.0 963945bc899bSmrg# 964045bc899bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 964145bc899bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 964245bc899bSmrg# Whether or not the necessary tools and files are found can be checked 964345bc899bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 964445bc899bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9645b40a6198SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9646b40a6198SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 964745bc899bSmrg 964845bc899bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 964945bc899bSmrg 9650b40a6198SmrgAC_MSG_CHECKING([whether to build documentation]) 965145bc899bSmrg 9652b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 965345bc899bSmrg BUILDDOC=yes 965445bc899bSmrgelse 965545bc899bSmrg BUILDDOC=no 965645bc899bSmrgfi 965745bc899bSmrg 965845bc899bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 965945bc899bSmrg 966045bc899bSmrgAC_MSG_RESULT([$BUILDDOC]) 966145bc899bSmrg 9662b40a6198SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 966345bc899bSmrg 9664b40a6198Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 966545bc899bSmrg BUILDPDFDOC=yes 966645bc899bSmrgelse 966745bc899bSmrg BUILDPDFDOC=no 966845bc899bSmrgfi 966945bc899bSmrg 967045bc899bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 967145bc899bSmrg 967245bc899bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 967345bc899bSmrg 9674b40a6198SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 967550f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 967645bc899bSmrgMAKE_PDF="$PS2PDF" 967750f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 967845bc899bSmrg 967945bc899bSmrgAC_SUBST(MAKE_TEXT) 968045bc899bSmrgAC_SUBST(MAKE_PS) 968145bc899bSmrgAC_SUBST(MAKE_PDF) 968245bc899bSmrgAC_SUBST(MAKE_HTML) 968345bc899bSmrg]) # XORG_CHECK_LINUXDOC 968445bc899bSmrg 968550f2e948Smrg# XORG_CHECK_DOCBOOK 968650f2e948Smrg# ------------------- 968750f2e948Smrg# Minimum version: 1.0.0 968850f2e948Smrg# 968950f2e948Smrg# Checks for the ability to build output formats from SGML DocBook source. 969050f2e948Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 969150f2e948Smrg# indicates whether the necessary tools and files are found and, if set, 969250f2e948Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 969350f2e948SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9694b40a6198SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9695b40a6198Smrg 969650f2e948SmrgBUILDTXTDOC=no 969750f2e948SmrgBUILDPDFDOC=no 969850f2e948SmrgBUILDPSDOC=no 969950f2e948SmrgBUILDHTMLDOC=no 970050f2e948Smrg 970150f2e948SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 970250f2e948SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 970350f2e948SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 970450f2e948SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 970550f2e948Smrg 9706b40a6198SmrgAC_MSG_CHECKING([whether to build text documentation]) 9707b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 970850f2e948Smrg test x$BUILD_TXTDOC != xno; then 970950f2e948Smrg BUILDTXTDOC=yes 971050f2e948Smrgfi 971150f2e948SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 971250f2e948SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 971350f2e948Smrg 9714b40a6198SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9715b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 971650f2e948Smrg test x$BUILD_PDFDOC != xno; then 971750f2e948Smrg BUILDPDFDOC=yes 971850f2e948Smrgfi 971950f2e948SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 972050f2e948SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 972150f2e948Smrg 9722b40a6198SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9723b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 972450f2e948Smrg test x$BUILD_PSDOC != xno; then 972550f2e948Smrg BUILDPSDOC=yes 972650f2e948Smrgfi 972750f2e948SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 972850f2e948SmrgAC_MSG_RESULT([$BUILDPSDOC]) 972950f2e948Smrg 9730b40a6198SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9731b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 973250f2e948Smrg test x$BUILD_HTMLDOC != xno; then 973350f2e948Smrg BUILDHTMLDOC=yes 973450f2e948Smrgfi 973550f2e948SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 973650f2e948SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 973750f2e948Smrg 973850f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 973950f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 974050f2e948SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 974150f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 974250f2e948Smrg 974350f2e948SmrgAC_SUBST(MAKE_TEXT) 974450f2e948SmrgAC_SUBST(MAKE_PS) 974550f2e948SmrgAC_SUBST(MAKE_PDF) 974650f2e948SmrgAC_SUBST(MAKE_HTML) 974750f2e948Smrg]) # XORG_CHECK_DOCBOOK 974850f2e948Smrg 9749b40a6198Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9750b40a6198Smrg# ---------------- 9751b40a6198Smrg# Minimum version: 1.5.0 9752b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9753b40a6198Smrg# 9754b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9755b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9756b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9757b40a6198Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9758b40a6198Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9759b40a6198Smrg# --with-xmlto assumes 'auto'. 9760b40a6198Smrg# 9761b40a6198Smrg# Interface to module: 9762b40a6198Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9763b40a6198Smrg# XMLTO: returns the path of the xmlto program found 9764b40a6198Smrg# returns the path set by the user in the environment 9765b40a6198Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9766b40a6198Smrg# 'no' user instructs the module not to use xmlto 9767b40a6198Smrg# 9768b40a6198Smrg# Added in version 1.10.0 9769b40a6198Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9770b40a6198Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9771b40a6198Smrg# 9772b40a6198Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9773b40a6198Smrg# 9774b40a6198SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9775b40a6198SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9776b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9777b40a6198SmrgAC_ARG_WITH(xmlto, 9778b40a6198Smrg AS_HELP_STRING([--with-xmlto], 9779b40a6198Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9780b40a6198Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9781b40a6198Smrgm4_undefine([_defopt]) 9782b40a6198Smrg 9783b40a6198Smrgif test "x$use_xmlto" = x"auto"; then 9784b40a6198Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9785b40a6198Smrg if test "x$XMLTO" = "x"; then 9786b40a6198Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9787b40a6198Smrg have_xmlto=no 9788b40a6198Smrg else 9789b40a6198Smrg have_xmlto=yes 9790b40a6198Smrg fi 9791b40a6198Smrgelif test "x$use_xmlto" = x"yes" ; then 9792b40a6198Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9793b40a6198Smrg if test "x$XMLTO" = "x"; then 9794b40a6198Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9795b40a6198Smrg fi 9796b40a6198Smrg have_xmlto=yes 9797b40a6198Smrgelif test "x$use_xmlto" = x"no" ; then 9798b40a6198Smrg if test "x$XMLTO" != "x"; then 9799b40a6198Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9800b40a6198Smrg fi 9801b40a6198Smrg have_xmlto=no 9802b40a6198Smrgelse 9803b40a6198Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9804b40a6198Smrgfi 9805b40a6198Smrg 9806b40a6198Smrg# Test for a minimum version of xmlto, if provided. 9807b40a6198Smrgm4_ifval([$1], 9808b40a6198Smrg[if test "$have_xmlto" = yes; then 9809b40a6198Smrg # scrape the xmlto version 9810b40a6198Smrg AC_MSG_CHECKING([the xmlto version]) 9811b40a6198Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9812b40a6198Smrg AC_MSG_RESULT([$xmlto_version]) 9813b40a6198Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9814b40a6198Smrg [if test "x$use_xmlto" = xauto; then 9815b40a6198Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9816b40a6198Smrg have_xmlto=no 9817b40a6198Smrg else 9818b40a6198Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9819b40a6198Smrg fi]) 9820b40a6198Smrgfi]) 9821b40a6198Smrg 9822b40a6198Smrg# Test for the ability of xmlto to generate a text target 9823b40a6198Smrghave_xmlto_text=no 9824b40a6198Smrgcat > conftest.xml << "EOF" 9825b40a6198SmrgEOF 9826b40a6198SmrgAS_IF([test "$have_xmlto" = yes], 9827b40a6198Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9828b40a6198Smrg [have_xmlto_text=yes], 9829b40a6198Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9830b40a6198Smrgrm -f conftest.xml 9831b40a6198SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9832b40a6198SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9833b40a6198Smrg]) # XORG_WITH_XMLTO 9834b40a6198Smrg 9835b40a6198Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9836b40a6198Smrg# -------------------------------------------- 9837b40a6198Smrg# Minimum version: 1.12.0 9838b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9839b40a6198Smrg# 9840b40a6198Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9841b40a6198Smrg# XML-based language used for the transformation of XML documents. 9842b40a6198Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9843b40a6198Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9844b40a6198Smrg# The XSLT processor is often used as a standalone tool for transformations. 9845b40a6198Smrg# It should not be assumed that this tool is used only to work with documnetation. 9846b40a6198Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9847b40a6198Smrg# 9848b40a6198Smrg# Interface to module: 9849b40a6198Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9850b40a6198Smrg# XSLTPROC: returns the path of the xsltproc program found 9851b40a6198Smrg# returns the path set by the user in the environment 9852b40a6198Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9853b40a6198Smrg# 'no' user instructs the module not to use xsltproc 9854b40a6198Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9855b40a6198Smrg# 9856b40a6198Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9857b40a6198Smrg# 9858b40a6198SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9859b40a6198SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9860b40a6198Smrg# Preserves the interface, should it be implemented later 9861b40a6198Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9862b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9863b40a6198SmrgAC_ARG_WITH(xsltproc, 9864b40a6198Smrg AS_HELP_STRING([--with-xsltproc], 9865b40a6198Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9866b40a6198Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9867b40a6198Smrgm4_undefine([_defopt]) 9868b40a6198Smrg 9869b40a6198Smrgif test "x$use_xsltproc" = x"auto"; then 9870b40a6198Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9871b40a6198Smrg if test "x$XSLTPROC" = "x"; then 9872b40a6198Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9873b40a6198Smrg have_xsltproc=no 9874b40a6198Smrg else 9875b40a6198Smrg have_xsltproc=yes 9876b40a6198Smrg fi 9877b40a6198Smrgelif test "x$use_xsltproc" = x"yes" ; then 9878b40a6198Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9879b40a6198Smrg if test "x$XSLTPROC" = "x"; then 9880b40a6198Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9881b40a6198Smrg fi 9882b40a6198Smrg have_xsltproc=yes 9883b40a6198Smrgelif test "x$use_xsltproc" = x"no" ; then 9884b40a6198Smrg if test "x$XSLTPROC" != "x"; then 9885b40a6198Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9886b40a6198Smrg fi 9887b40a6198Smrg have_xsltproc=no 9888b40a6198Smrgelse 9889b40a6198Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9890b40a6198Smrgfi 9891b40a6198Smrg 9892b40a6198SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9893b40a6198Smrg]) # XORG_WITH_XSLTPROC 9894b40a6198Smrg 9895b40a6198Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9896b40a6198Smrg# ---------------------------------------- 9897b40a6198Smrg# Minimum version: 1.15.0 9898b40a6198Smrg# 9899b40a6198Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9900b40a6198Smrg# scanning arbitrary text files, extracting information from those text files, 9901b40a6198Smrg# and printing reports based on that information. 9902b40a6198Smrg# 9903b40a6198Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9904b40a6198Smrg# 9905b40a6198Smrg# Interface to module: 9906b40a6198Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9907b40a6198Smrg# PERL: returns the path of the perl program found 9908b40a6198Smrg# returns the path set by the user in the environment 9909b40a6198Smrg# --with-perl: 'yes' user instructs the module to use perl 9910b40a6198Smrg# 'no' user instructs the module not to use perl 9911b40a6198Smrg# have_perl: returns yes if perl found in PATH or no 9912b40a6198Smrg# 9913b40a6198Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9914b40a6198Smrg# 9915b40a6198SmrgAC_DEFUN([XORG_WITH_PERL],[ 9916b40a6198SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9917b40a6198Smrg# Preserves the interface, should it be implemented later 9918b40a6198Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9919b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9920b40a6198SmrgAC_ARG_WITH(perl, 9921b40a6198Smrg AS_HELP_STRING([--with-perl], 9922b40a6198Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9923b40a6198Smrg [use_perl=$withval], [use_perl=]_defopt) 9924b40a6198Smrgm4_undefine([_defopt]) 9925b40a6198Smrg 9926b40a6198Smrgif test "x$use_perl" = x"auto"; then 9927b40a6198Smrg AC_PATH_PROG([PERL], [perl]) 9928b40a6198Smrg if test "x$PERL" = "x"; then 9929b40a6198Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9930b40a6198Smrg have_perl=no 9931b40a6198Smrg else 9932b40a6198Smrg have_perl=yes 9933b40a6198Smrg fi 9934b40a6198Smrgelif test "x$use_perl" = x"yes" ; then 9935b40a6198Smrg AC_PATH_PROG([PERL], [perl]) 9936b40a6198Smrg if test "x$PERL" = "x"; then 9937b40a6198Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9938b40a6198Smrg fi 9939b40a6198Smrg have_perl=yes 9940b40a6198Smrgelif test "x$use_perl" = x"no" ; then 9941b40a6198Smrg if test "x$PERL" != "x"; then 9942b40a6198Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9943b40a6198Smrg fi 9944b40a6198Smrg have_perl=no 9945b40a6198Smrgelse 9946b40a6198Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9947b40a6198Smrgfi 9948b40a6198Smrg 9949b40a6198SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9950b40a6198Smrg]) # XORG_WITH_PERL 9951b40a6198Smrg 9952b40a6198Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9953b40a6198Smrg# ---------------- 9954b40a6198Smrg# Minimum version: 1.5.0 9955b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9956b40a6198Smrg# 9957b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9958b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9959b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9960b40a6198Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9961b40a6198Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9962b40a6198Smrg# --with-asciidoc assumes 'auto'. 9963b40a6198Smrg# 9964b40a6198Smrg# Interface to module: 9965b40a6198Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9966b40a6198Smrg# ASCIIDOC: returns the path of the asciidoc program found 9967b40a6198Smrg# returns the path set by the user in the environment 9968b40a6198Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9969b40a6198Smrg# 'no' user instructs the module not to use asciidoc 9970b40a6198Smrg# 9971b40a6198Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9972b40a6198Smrg# 9973b40a6198SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9974b40a6198SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9975b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9976b40a6198SmrgAC_ARG_WITH(asciidoc, 9977b40a6198Smrg AS_HELP_STRING([--with-asciidoc], 9978b40a6198Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9979b40a6198Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9980b40a6198Smrgm4_undefine([_defopt]) 9981b40a6198Smrg 9982b40a6198Smrgif test "x$use_asciidoc" = x"auto"; then 9983b40a6198Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9984b40a6198Smrg if test "x$ASCIIDOC" = "x"; then 9985b40a6198Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9986b40a6198Smrg have_asciidoc=no 9987b40a6198Smrg else 9988b40a6198Smrg have_asciidoc=yes 9989b40a6198Smrg fi 9990b40a6198Smrgelif test "x$use_asciidoc" = x"yes" ; then 9991b40a6198Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9992b40a6198Smrg if test "x$ASCIIDOC" = "x"; then 9993b40a6198Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9994b40a6198Smrg fi 9995b40a6198Smrg have_asciidoc=yes 9996b40a6198Smrgelif test "x$use_asciidoc" = x"no" ; then 9997b40a6198Smrg if test "x$ASCIIDOC" != "x"; then 9998b40a6198Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9999b40a6198Smrg fi 10000b40a6198Smrg have_asciidoc=no 10001b40a6198Smrgelse 10002b40a6198Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10003b40a6198Smrgfi 10004b40a6198Smrgm4_ifval([$1], 10005b40a6198Smrg[if test "$have_asciidoc" = yes; then 10006b40a6198Smrg # scrape the asciidoc version 10007b40a6198Smrg AC_MSG_CHECKING([the asciidoc version]) 10008b40a6198Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10009b40a6198Smrg AC_MSG_RESULT([$asciidoc_version]) 10010b40a6198Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10011b40a6198Smrg [if test "x$use_asciidoc" = xauto; then 10012b40a6198Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10013b40a6198Smrg have_asciidoc=no 10014b40a6198Smrg else 10015b40a6198Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10016b40a6198Smrg fi]) 10017b40a6198Smrgfi]) 10018b40a6198SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10019b40a6198Smrg]) # XORG_WITH_ASCIIDOC 10020b40a6198Smrg 10021b40a6198Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1002257ba8e8bSmrg# ------------------------------------------- 10023b40a6198Smrg# Minimum version: 1.5.0 10024b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1002557ba8e8bSmrg# Minimum version for optional DOT checking: 1.18.0 10026b40a6198Smrg# 10027b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 10028b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 10029b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10030b40a6198Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10031b40a6198Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10032b40a6198Smrg# --with-doxygen assumes 'auto'. 10033b40a6198Smrg# 10034b40a6198Smrg# Interface to module: 10035b40a6198Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10036b40a6198Smrg# DOXYGEN: returns the path of the doxygen program found 10037b40a6198Smrg# returns the path set by the user in the environment 10038b40a6198Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10039b40a6198Smrg# 'no' user instructs the module not to use doxygen 10040b40a6198Smrg# 10041b40a6198Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10042b40a6198Smrg# 10043b40a6198SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10044b40a6198SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1004557ba8e8bSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10046b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 10047b40a6198SmrgAC_ARG_WITH(doxygen, 10048b40a6198Smrg AS_HELP_STRING([--with-doxygen], 10049b40a6198Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10050b40a6198Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10051b40a6198Smrgm4_undefine([_defopt]) 10052b40a6198Smrg 10053b40a6198Smrgif test "x$use_doxygen" = x"auto"; then 10054b40a6198Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10055b40a6198Smrg if test "x$DOXYGEN" = "x"; then 10056b40a6198Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10057b40a6198Smrg have_doxygen=no 10058b40a6198Smrg else 10059b40a6198Smrg have_doxygen=yes 10060b40a6198Smrg fi 10061b40a6198Smrgelif test "x$use_doxygen" = x"yes" ; then 10062b40a6198Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10063b40a6198Smrg if test "x$DOXYGEN" = "x"; then 10064b40a6198Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10065b40a6198Smrg fi 10066b40a6198Smrg have_doxygen=yes 10067b40a6198Smrgelif test "x$use_doxygen" = x"no" ; then 10068b40a6198Smrg if test "x$DOXYGEN" != "x"; then 10069b40a6198Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10070b40a6198Smrg fi 10071b40a6198Smrg have_doxygen=no 10072b40a6198Smrgelse 10073b40a6198Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10074b40a6198Smrgfi 10075b40a6198Smrgm4_ifval([$1], 10076b40a6198Smrg[if test "$have_doxygen" = yes; then 10077b40a6198Smrg # scrape the doxygen version 10078b40a6198Smrg AC_MSG_CHECKING([the doxygen version]) 10079b40a6198Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10080b40a6198Smrg AC_MSG_RESULT([$doxygen_version]) 10081b40a6198Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10082b40a6198Smrg [if test "x$use_doxygen" = xauto; then 10083b40a6198Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10084b40a6198Smrg have_doxygen=no 10085b40a6198Smrg else 10086b40a6198Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10087b40a6198Smrg fi]) 10088b40a6198Smrgfi]) 1008957ba8e8bSmrg 1009057ba8e8bSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1009157ba8e8bSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1009257ba8e8bSmrgdnl HAVE_DOT = @HAVE_DOT@ 1009357ba8e8bSmrgHAVE_DOT=no 1009457ba8e8bSmrgif test "x$have_doxygen" = "xyes"; then 1009557ba8e8bSmrg AC_PATH_PROG([DOT], [dot]) 1009657ba8e8bSmrg if test "x$DOT" != "x"; then 1009757ba8e8bSmrg HAVE_DOT=yes 1009857ba8e8bSmrg fi 1009957ba8e8bSmrgfi 1010057ba8e8bSmrg 1010157ba8e8bSmrgAC_SUBST([HAVE_DOT]) 1010257ba8e8bSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10103b40a6198SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10104b40a6198Smrg]) # XORG_WITH_DOXYGEN 10105b40a6198Smrg 10106b40a6198Smrg# XORG_WITH_GROFF([DEFAULT]) 10107b40a6198Smrg# ---------------- 10108b40a6198Smrg# Minimum version: 1.6.0 10109b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10110b40a6198Smrg# 10111b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 10112b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 10113b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10114b40a6198Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10115b40a6198Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 10116b40a6198Smrg# --with-groff assumes 'auto'. 10117b40a6198Smrg# 10118b40a6198Smrg# Interface to module: 10119b40a6198Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10120b40a6198Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10121b40a6198Smrg# HAVE_GROFF_MS: the -ms macros package 10122b40a6198Smrg# GROFF: returns the path of the groff program found 10123b40a6198Smrg# returns the path set by the user in the environment 10124b40a6198Smrg# --with-groff: 'yes' user instructs the module to use groff 10125b40a6198Smrg# 'no' user instructs the module not to use groff 10126b40a6198Smrg# 10127b40a6198Smrg# Added in version 1.9.0: 10128b40a6198Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10129b40a6198Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10130b40a6198Smrg# psselect from the psutils package. 10131b40a6198Smrg# the ghostcript package. Refer to the grohtml man pages 10132b40a6198Smrg# 10133b40a6198Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10134b40a6198Smrg# 10135b40a6198Smrg# OS and distros often splits groff in a basic and full package, the former 10136b40a6198Smrg# having the groff program and the later having devices, fonts and macros 10137b40a6198Smrg# Checking for the groff executable is not enough. 10138b40a6198Smrg# 10139b40a6198Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10140b40a6198Smrg# unset HAVE_GROFF or GROFF env variables. 10141b40a6198Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10142b40a6198Smrg# 10143b40a6198SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10144b40a6198SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10145b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 10146b40a6198SmrgAC_ARG_WITH(groff, 10147b40a6198Smrg AS_HELP_STRING([--with-groff], 10148b40a6198Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10149b40a6198Smrg [use_groff=$withval], [use_groff=]_defopt) 10150b40a6198Smrgm4_undefine([_defopt]) 10151b40a6198Smrg 10152b40a6198Smrgif test "x$use_groff" = x"auto"; then 10153b40a6198Smrg AC_PATH_PROG([GROFF], [groff]) 10154b40a6198Smrg if test "x$GROFF" = "x"; then 10155b40a6198Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10156b40a6198Smrg have_groff=no 10157b40a6198Smrg else 10158b40a6198Smrg have_groff=yes 10159b40a6198Smrg fi 10160b40a6198Smrgelif test "x$use_groff" = x"yes" ; then 10161b40a6198Smrg AC_PATH_PROG([GROFF], [groff]) 10162b40a6198Smrg if test "x$GROFF" = "x"; then 10163b40a6198Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10164b40a6198Smrg fi 10165b40a6198Smrg have_groff=yes 10166b40a6198Smrgelif test "x$use_groff" = x"no" ; then 10167b40a6198Smrg if test "x$GROFF" != "x"; then 10168b40a6198Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10169b40a6198Smrg fi 10170b40a6198Smrg have_groff=no 10171b40a6198Smrgelse 10172b40a6198Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10173b40a6198Smrgfi 10174b40a6198Smrg 10175b40a6198Smrg# We have groff, test for the presence of the macro packages 10176b40a6198Smrgif test "x$have_groff" = x"yes"; then 10177b40a6198Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10178b40a6198Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10179b40a6198Smrg groff_ms_works=yes 10180b40a6198Smrg else 10181b40a6198Smrg groff_ms_works=no 10182b40a6198Smrg fi 10183b40a6198Smrg AC_MSG_RESULT([$groff_ms_works]) 10184b40a6198Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10185b40a6198Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10186b40a6198Smrg groff_mm_works=yes 10187b40a6198Smrg else 10188b40a6198Smrg groff_mm_works=no 10189b40a6198Smrg fi 10190b40a6198Smrg AC_MSG_RESULT([$groff_mm_works]) 10191b40a6198Smrgfi 10192b40a6198Smrg 10193b40a6198Smrg# We have groff, test for HTML dependencies, one command per package 10194b40a6198Smrgif test "x$have_groff" = x"yes"; then 10195b40a6198Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10196b40a6198Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10197b40a6198Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10198b40a6198Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10199b40a6198Smrg have_groff_html=yes 10200b40a6198Smrg else 10201b40a6198Smrg have_groff_html=no 10202b40a6198Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10203b40a6198Smrg fi 10204b40a6198Smrgfi 10205b40a6198Smrg 10206b40a6198Smrg# Set Automake conditionals for Makefiles 10207b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10208b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10209b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10210b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10211b40a6198Smrg]) # XORG_WITH_GROFF 10212b40a6198Smrg 10213b40a6198Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10214b40a6198Smrg# --------------------------------------- 10215b40a6198Smrg# Minimum version: 1.6.0 10216b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10217b40a6198Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10218b40a6198Smrg# 10219b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 10220b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 10221b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10222b40a6198Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10223b40a6198Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10224b40a6198Smrg# --with-fop assumes 'auto'. 10225b40a6198Smrg# 10226b40a6198Smrg# Interface to module: 10227b40a6198Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10228b40a6198Smrg# FOP: returns the path of the fop program found 10229b40a6198Smrg# returns the path set by the user in the environment 10230b40a6198Smrg# --with-fop: 'yes' user instructs the module to use fop 10231b40a6198Smrg# 'no' user instructs the module not to use fop 10232b40a6198Smrg# 10233b40a6198Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10234b40a6198Smrg# 10235b40a6198SmrgAC_DEFUN([XORG_WITH_FOP],[ 10236b40a6198SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10237b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 10238b40a6198SmrgAC_ARG_WITH(fop, 10239b40a6198Smrg AS_HELP_STRING([--with-fop], 10240b40a6198Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10241b40a6198Smrg [use_fop=$withval], [use_fop=]_defopt) 10242b40a6198Smrgm4_undefine([_defopt]) 10243b40a6198Smrg 10244b40a6198Smrgif test "x$use_fop" = x"auto"; then 10245b40a6198Smrg AC_PATH_PROG([FOP], [fop]) 10246b40a6198Smrg if test "x$FOP" = "x"; then 10247b40a6198Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10248b40a6198Smrg have_fop=no 10249b40a6198Smrg else 10250b40a6198Smrg have_fop=yes 10251b40a6198Smrg fi 10252b40a6198Smrgelif test "x$use_fop" = x"yes" ; then 10253b40a6198Smrg AC_PATH_PROG([FOP], [fop]) 10254b40a6198Smrg if test "x$FOP" = "x"; then 10255b40a6198Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10256b40a6198Smrg fi 10257b40a6198Smrg have_fop=yes 10258b40a6198Smrgelif test "x$use_fop" = x"no" ; then 10259b40a6198Smrg if test "x$FOP" != "x"; then 10260b40a6198Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10261b40a6198Smrg fi 10262b40a6198Smrg have_fop=no 10263b40a6198Smrgelse 10264b40a6198Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10265b40a6198Smrgfi 10266b40a6198Smrg 10267b40a6198Smrg# Test for a minimum version of fop, if provided. 10268b40a6198Smrgm4_ifval([$1], 10269b40a6198Smrg[if test "$have_fop" = yes; then 10270b40a6198Smrg # scrape the fop version 10271b40a6198Smrg AC_MSG_CHECKING([for fop minimum version]) 10272b40a6198Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10273b40a6198Smrg AC_MSG_RESULT([$fop_version]) 10274b40a6198Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10275b40a6198Smrg [if test "x$use_fop" = xauto; then 10276b40a6198Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10277b40a6198Smrg have_fop=no 10278b40a6198Smrg else 10279b40a6198Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10280b40a6198Smrg fi]) 10281b40a6198Smrgfi]) 10282b40a6198SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10283b40a6198Smrg]) # XORG_WITH_FOP 10284b40a6198Smrg 1028557ba8e8bSmrg# XORG_WITH_M4([MIN-VERSION]) 1028657ba8e8bSmrg# --------------------------- 1028757ba8e8bSmrg# Minimum version: 1.19.0 1028857ba8e8bSmrg# 1028957ba8e8bSmrg# This macro attempts to locate an m4 macro processor which supports 1029057ba8e8bSmrg# -I option and is only useful for modules relying on M4 in order to 1029157ba8e8bSmrg# expand macros in source code files. 1029257ba8e8bSmrg# 1029357ba8e8bSmrg# Interface to module: 1029457ba8e8bSmrg# M4: returns the path of the m4 program found 1029557ba8e8bSmrg# returns the path set by the user in the environment 1029657ba8e8bSmrg# 1029757ba8e8bSmrgAC_DEFUN([XORG_WITH_M4], [ 1029857ba8e8bSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1029957ba8e8bSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1030057ba8e8bSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1030157ba8e8bSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1030257ba8e8bSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1030357ba8e8bSmrg [$PATH:/usr/gnu/bin])]) 1030457ba8e8bSmrg 1030557ba8e8bSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1030657ba8e8bSmrg]) # XORG_WITH_M4 1030757ba8e8bSmrg 10308b40a6198Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10309b40a6198Smrg# ---------------- 10310b40a6198Smrg# Minimum version: 1.6.0 10311b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10312b40a6198Smrg# 10313b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 10314b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 10315b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10316b40a6198Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10317b40a6198Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10318b40a6198Smrg# --with-ps2pdf assumes 'auto'. 10319b40a6198Smrg# 10320b40a6198Smrg# Interface to module: 10321b40a6198Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10322b40a6198Smrg# PS2PDF: returns the path of the ps2pdf program found 10323b40a6198Smrg# returns the path set by the user in the environment 10324b40a6198Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10325b40a6198Smrg# 'no' user instructs the module not to use ps2pdf 10326b40a6198Smrg# 10327b40a6198Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10328b40a6198Smrg# 10329b40a6198SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10330b40a6198SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10331b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 10332b40a6198SmrgAC_ARG_WITH(ps2pdf, 10333b40a6198Smrg AS_HELP_STRING([--with-ps2pdf], 10334b40a6198Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10335b40a6198Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10336b40a6198Smrgm4_undefine([_defopt]) 10337b40a6198Smrg 10338b40a6198Smrgif test "x$use_ps2pdf" = x"auto"; then 10339b40a6198Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10340b40a6198Smrg if test "x$PS2PDF" = "x"; then 10341b40a6198Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10342b40a6198Smrg have_ps2pdf=no 10343b40a6198Smrg else 10344b40a6198Smrg have_ps2pdf=yes 10345b40a6198Smrg fi 10346b40a6198Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10347b40a6198Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10348b40a6198Smrg if test "x$PS2PDF" = "x"; then 10349b40a6198Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10350b40a6198Smrg fi 10351b40a6198Smrg have_ps2pdf=yes 10352b40a6198Smrgelif test "x$use_ps2pdf" = x"no" ; then 10353b40a6198Smrg if test "x$PS2PDF" != "x"; then 10354b40a6198Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10355b40a6198Smrg fi 10356b40a6198Smrg have_ps2pdf=no 10357b40a6198Smrgelse 10358b40a6198Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10359b40a6198Smrgfi 10360b40a6198SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10361b40a6198Smrg]) # XORG_WITH_PS2PDF 10362b40a6198Smrg 10363b40a6198Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10364b40a6198Smrg# ---------------- 10365b40a6198Smrg# Minimum version: 1.6.0 10366b40a6198Smrg# 10367b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 10368b40a6198Smrg# not at the appropriate level. This macro enables a builder to skip all 10369b40a6198Smrg# documentation targets except traditional man pages. 10370b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10371b40a6198Smrg# maximum flexibilty in controlling documentation building. 10372b40a6198Smrg# Refer to: 10373b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 10374b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10375b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 10376b40a6198Smrg# XORG_WITH_FOP --with-fop 10377b40a6198Smrg# XORG_WITH_GROFF --with-groff 10378b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10379b40a6198Smrg# 10380b40a6198Smrg# Interface to module: 10381b40a6198Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10382b40a6198Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10383b40a6198Smrg# 'no' user instructs the module not to generate docs 10384b40a6198Smrg# parm1: specify the default value, yes or no. 10385b40a6198Smrg# 10386b40a6198SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10387b40a6198Smrgm4_define([docs_default], m4_default([$1], [yes])) 10388b40a6198SmrgAC_ARG_ENABLE(docs, 10389b40a6198Smrg AS_HELP_STRING([--enable-docs], 10390b40a6198Smrg [Enable building the documentation (default: ]docs_default[)]), 10391b40a6198Smrg [build_docs=$enableval], [build_docs=]docs_default) 10392b40a6198Smrgm4_undefine([docs_default]) 10393b40a6198SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10394b40a6198SmrgAC_MSG_CHECKING([whether to build documentation]) 10395b40a6198SmrgAC_MSG_RESULT([$build_docs]) 10396b40a6198Smrg]) # XORG_ENABLE_DOCS 10397b40a6198Smrg 10398b40a6198Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10399b40a6198Smrg# ---------------- 10400b40a6198Smrg# Minimum version: 1.6.0 10401b40a6198Smrg# 10402b40a6198Smrg# This macro enables a builder to skip all developer documentation. 10403b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10404b40a6198Smrg# maximum flexibilty in controlling documentation building. 10405b40a6198Smrg# Refer to: 10406b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 10407b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10408b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 10409b40a6198Smrg# XORG_WITH_FOP --with-fop 10410b40a6198Smrg# XORG_WITH_GROFF --with-groff 10411b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10412b40a6198Smrg# 10413b40a6198Smrg# Interface to module: 10414b40a6198Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10415b40a6198Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10416b40a6198Smrg# 'no' user instructs the module not to generate developer docs 10417b40a6198Smrg# parm1: specify the default value, yes or no. 10418b40a6198Smrg# 10419b40a6198SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10420b40a6198Smrgm4_define([devel_default], m4_default([$1], [yes])) 10421b40a6198SmrgAC_ARG_ENABLE(devel-docs, 10422b40a6198Smrg AS_HELP_STRING([--enable-devel-docs], 10423b40a6198Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10424b40a6198Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10425b40a6198Smrgm4_undefine([devel_default]) 10426b40a6198SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10427b40a6198SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10428b40a6198SmrgAC_MSG_RESULT([$build_devel_docs]) 10429b40a6198Smrg]) # XORG_ENABLE_DEVEL_DOCS 10430b40a6198Smrg 10431b40a6198Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10432b40a6198Smrg# ---------------- 10433b40a6198Smrg# Minimum version: 1.6.0 10434b40a6198Smrg# 10435b40a6198Smrg# This macro enables a builder to skip all functional specification targets. 10436b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10437b40a6198Smrg# maximum flexibilty in controlling documentation building. 10438b40a6198Smrg# Refer to: 10439b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 10440b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10441b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 10442b40a6198Smrg# XORG_WITH_FOP --with-fop 10443b40a6198Smrg# XORG_WITH_GROFF --with-groff 10444b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10445b40a6198Smrg# 10446b40a6198Smrg# Interface to module: 10447b40a6198Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10448b40a6198Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10449b40a6198Smrg# 'no' user instructs the module not to generate specs 10450b40a6198Smrg# parm1: specify the default value, yes or no. 10451b40a6198Smrg# 10452b40a6198SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10453b40a6198Smrgm4_define([spec_default], m4_default([$1], [yes])) 10454b40a6198SmrgAC_ARG_ENABLE(specs, 10455b40a6198Smrg AS_HELP_STRING([--enable-specs], 10456b40a6198Smrg [Enable building the specs (default: ]spec_default[)]), 10457b40a6198Smrg [build_specs=$enableval], [build_specs=]spec_default) 10458b40a6198Smrgm4_undefine([spec_default]) 10459b40a6198SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10460b40a6198SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10461b40a6198SmrgAC_MSG_RESULT([$build_specs]) 10462b40a6198Smrg]) # XORG_ENABLE_SPECS 10463b40a6198Smrg 10464b40a6198Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10465b40a6198Smrg# ---------------------------------------------- 10466b40a6198Smrg# Minimum version: 1.13.0 10467b40a6198Smrg# 10468b40a6198Smrg# This macro enables a builder to enable/disable unit testing 10469b40a6198Smrg# It makes no assumption about the test cases implementation 10470b40a6198Smrg# Test cases may or may not use Automake "Support for test suites" 10471b40a6198Smrg# They may or may not use the software utility library GLib 10472b40a6198Smrg# 10473b40a6198Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10474b40a6198Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10475b40a6198Smrg# The variable enable_unit_tests is used by other macros in this file. 10476b40a6198Smrg# 10477b40a6198Smrg# Interface to module: 10478b40a6198Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10479b40a6198Smrg# enable_unit_tests: used in configure.ac for additional configuration 10480b40a6198Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10481b40a6198Smrg# 'no' user instructs the module not to build tests 10482b40a6198Smrg# parm1: specify the default value, yes or no. 10483b40a6198Smrg# 10484b40a6198SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10485b40a6198SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10486b40a6198SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10487b40a6198SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10488b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 10489b40a6198SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10490b40a6198Smrg [Enable building unit test cases (default: ]_defopt[)]), 10491b40a6198Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10492b40a6198Smrgm4_undefine([_defopt]) 10493b40a6198SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10494b40a6198SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10495b40a6198SmrgAC_MSG_RESULT([$enable_unit_tests]) 10496b40a6198Smrg]) # XORG_ENABLE_UNIT_TESTS 10497b40a6198Smrg 10498b40a6198Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10499b40a6198Smrg# ------------------------------------------------------ 10500b40a6198Smrg# Minimum version: 1.17.0 10501b40a6198Smrg# 10502b40a6198Smrg# This macro enables a builder to enable/disable integration testing 10503b40a6198Smrg# It makes no assumption about the test cases' implementation 10504b40a6198Smrg# Test cases may or may not use Automake "Support for test suites" 10505b40a6198Smrg# 10506b40a6198Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10507b40a6198Smrg# usually requires less dependencies and may be built and run under less 10508b40a6198Smrg# stringent environments than integration tests. 10509b40a6198Smrg# 10510b40a6198Smrg# Interface to module: 10511b40a6198Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10512b40a6198Smrg# enable_integration_tests: used in configure.ac for additional configuration 10513b40a6198Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10514b40a6198Smrg# 'no' user instructs the module not to build tests 10515b40a6198Smrg# parm1: specify the default value, yes or no. 10516b40a6198Smrg# 10517b40a6198SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10518b40a6198SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10519b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 10520b40a6198SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10521b40a6198Smrg [Enable building integration test cases (default: ]_defopt[)]), 10522b40a6198Smrg [enable_integration_tests=$enableval], 10523b40a6198Smrg [enable_integration_tests=]_defopt) 10524b40a6198Smrgm4_undefine([_defopt]) 10525b40a6198SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10526b40a6198Smrg [test "x$enable_integration_tests" != xno]) 10527b40a6198SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10528b40a6198SmrgAC_MSG_RESULT([$enable_integration_tests]) 10529b40a6198Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10530b40a6198Smrg 10531b40a6198Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10532b40a6198Smrg# ---------------------------------------- 10533b40a6198Smrg# Minimum version: 1.13.0 10534b40a6198Smrg# 10535b40a6198Smrg# GLib is a library which provides advanced data structures and functions. 10536b40a6198Smrg# This macro enables a module to test for the presence of Glib. 10537b40a6198Smrg# 10538b40a6198Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10539b40a6198Smrg# Otherwise the value of $enable_unit_tests is blank. 10540b40a6198Smrg# 10541b40a6198Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10542b40a6198Smrg# test support usually requires less dependencies and may be built and run under 10543b40a6198Smrg# less stringent environments than integration tests. 10544b40a6198Smrg# 10545b40a6198Smrg# Interface to module: 10546b40a6198Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10547b40a6198Smrg# with_glib: used in configure.ac to know if GLib has been found 10548b40a6198Smrg# --with-glib: 'yes' user instructs the module to use glib 10549b40a6198Smrg# 'no' user instructs the module not to use glib 10550b40a6198Smrg# 10551b40a6198SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10552b40a6198SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10553b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 10554b40a6198SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10555b40a6198Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10556b40a6198Smrg [with_glib=$withval], [with_glib=]_defopt) 10557b40a6198Smrgm4_undefine([_defopt]) 10558b40a6198Smrg 10559b40a6198Smrghave_glib=no 10560b40a6198Smrg# Do not probe GLib if user explicitly disabled unit testing 10561b40a6198Smrgif test "x$enable_unit_tests" != x"no"; then 10562b40a6198Smrg # Do not probe GLib if user explicitly disabled it 10563b40a6198Smrg if test "x$with_glib" != x"no"; then 10564b40a6198Smrg m4_ifval( 10565b40a6198Smrg [$1], 10566b40a6198Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10567b40a6198Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10568b40a6198Smrg ) 10569b40a6198Smrg fi 10570b40a6198Smrgfi 10571b40a6198Smrg 10572b40a6198Smrg# Not having GLib when unit testing has been explicitly requested is an error 10573b40a6198Smrgif test "x$enable_unit_tests" = x"yes"; then 10574b40a6198Smrg if test "x$have_glib" = x"no"; then 10575b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10576b40a6198Smrg fi 10577b40a6198Smrgfi 10578b40a6198Smrg 10579b40a6198Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10580b40a6198Smrgif test "x$enable_unit_tests" = x"no"; then 10581b40a6198Smrg if test "x$with_glib" = x"yes"; then 10582b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10583b40a6198Smrg fi 10584b40a6198Smrgfi 10585b40a6198Smrg 10586b40a6198Smrg# Not having GLib when it has been explicitly requested is an error 10587b40a6198Smrgif test "x$with_glib" = x"yes"; then 10588b40a6198Smrg if test "x$have_glib" = x"no"; then 10589b40a6198Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10590b40a6198Smrg fi 10591b40a6198Smrgfi 10592b40a6198Smrg 10593b40a6198SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10594b40a6198Smrg]) # XORG_WITH_GLIB 10595b40a6198Smrg 10596b40a6198Smrg# XORG_LD_WRAP([required|optional]) 10597b40a6198Smrg# --------------------------------- 10598b40a6198Smrg# Minimum version: 1.13.0 10599b40a6198Smrg# 10600b40a6198Smrg# Check if linker supports -wrap, passed via compiler flags 10601b40a6198Smrg# 10602b40a6198Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10603b40a6198Smrg# Otherwise the value of $enable_unit_tests is blank. 10604b40a6198Smrg# 10605b40a6198Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10606b40a6198Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10607b40a6198Smrg# available, an argument of "optional" allows use when some unit tests require 10608b40a6198Smrg# ld -wrap and others do not. 10609b40a6198Smrg# 10610b40a6198SmrgAC_DEFUN([XORG_LD_WRAP],[ 10611b40a6198SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10612b40a6198Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10613b40a6198Smrg void __wrap_exit(int status) { return; }], 10614b40a6198Smrg [exit(0);])]) 10615b40a6198Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10616b40a6198Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10617b40a6198Smrg if test "x$have_ld_wrap" = x"no"; then 10618b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10619b40a6198Smrg fi 10620b40a6198Smrgfi 10621b40a6198SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10622b40a6198Smrg# 10623b40a6198Smrg]) # XORG_LD_WRAP 10624b40a6198Smrg 10625b40a6198Smrg# XORG_CHECK_LINKER_FLAGS 10626b40a6198Smrg# ----------------------- 10627b40a6198Smrg# SYNOPSIS 10628b40a6198Smrg# 10629b40a6198Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10630b40a6198Smrg# 10631b40a6198Smrg# DESCRIPTION 10632b40a6198Smrg# 10633b40a6198Smrg# Check whether the given linker FLAGS work with the current language's 10634b40a6198Smrg# linker, or whether they give an error. 10635b40a6198Smrg# 10636b40a6198Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10637b40a6198Smrg# success/failure. 10638b40a6198Smrg# 10639b40a6198Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10640b40a6198Smrg# 10641b40a6198Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10642b40a6198Smrg# 10643b40a6198Smrg# LICENSE 10644b40a6198Smrg# 10645b40a6198Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10646b40a6198Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10647b40a6198Smrg# Copyright (c) 2009 Matteo Frigo 10648b40a6198Smrg# 10649b40a6198Smrg# This program is free software: you can redistribute it and/or modify it 10650b40a6198Smrg# under the terms of the GNU General Public License as published by the 10651b40a6198Smrg# Free Software Foundation, either version 3 of the License, or (at your 10652b40a6198Smrg# option) any later version. 10653b40a6198Smrg# 10654b40a6198Smrg# This program is distributed in the hope that it will be useful, but 10655b40a6198Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10656b40a6198Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10657b40a6198Smrg# Public License for more details. 10658b40a6198Smrg# 10659b40a6198Smrg# You should have received a copy of the GNU General Public License along 10660b40a6198Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10661b40a6198Smrg# 10662b40a6198Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10663b40a6198Smrg# gives unlimited permission to copy, distribute and modify the configure 10664b40a6198Smrg# scripts that are the output of Autoconf when processing the Macro. You 10665b40a6198Smrg# need not follow the terms of the GNU General Public License when using 10666b40a6198Smrg# or distributing such scripts, even though portions of the text of the 10667b40a6198Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10668b40a6198Smrg# all other use of the material that constitutes the Autoconf Macro. 10669b40a6198Smrg# 10670b40a6198Smrg# This special exception to the GPL applies to versions of the Autoconf 10671b40a6198Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10672b40a6198Smrg# modified version of the Autoconf Macro, you may extend this special 10673b40a6198Smrg# exception to the GPL to apply to your modified version as well.# 10674b40a6198SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10675b40a6198Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10676b40a6198Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10677b40a6198SmrgAS_LITERAL_IF([$1], 10678b40a6198Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10679b40a6198Smrg ax_save_FLAGS=$LDFLAGS 10680b40a6198Smrg LDFLAGS="$1" 10681b40a6198Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10682b40a6198Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10683b40a6198Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10684b40a6198Smrg LDFLAGS=$ax_save_FLAGS])], 10685b40a6198Smrg [ax_save_FLAGS=$LDFLAGS 10686b40a6198Smrg LDFLAGS="$1" 10687b40a6198Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10688b40a6198Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10689b40a6198Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10690b40a6198Smrg LDFLAGS=$ax_save_FLAGS]) 10691b40a6198Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10692b40a6198SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10693b40a6198Smrgif test "x$xorg_check_linker_flags" = xyes; then 10694b40a6198Smrg m4_default([$2], :) 10695b40a6198Smrgelse 10696b40a6198Smrg m4_default([$3], :) 10697b40a6198Smrgfi 10698b40a6198Smrg]) # XORG_CHECK_LINKER_FLAGS 10699b40a6198Smrg 10700b40a6198Smrg# XORG_MEMORY_CHECK_FLAGS 10701b40a6198Smrg# ----------------------- 10702b40a6198Smrg# Minimum version: 1.16.0 10703b40a6198Smrg# 10704b40a6198Smrg# This macro attempts to find appropriate memory checking functionality 10705b40a6198Smrg# for various platforms which unit testing code may use to catch various 10706b40a6198Smrg# forms of memory allocation and access errors in testing. 10707b40a6198Smrg# 10708b40a6198Smrg# Interface to module: 10709b40a6198Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10710b40a6198Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10711b40a6198Smrg# 10712b40a6198Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10713b40a6198Smrg# 10714b40a6198SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10715b40a6198Smrg 10716b40a6198SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10717b40a6198SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10718b40a6198Smrg [Environment variables to enable memory checking in tests]) 10719b40a6198Smrg 10720b40a6198Smrg# Check for different types of support on different platforms 10721b40a6198Smrgcase $host_os in 10722b40a6198Smrg solaris*) 10723b40a6198Smrg AC_CHECK_LIB([umem], [umem_alloc], 10724b40a6198Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10725b40a6198Smrg ;; 10726b40a6198Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10727b40a6198Smrg # both directly and inverted, so should not be 0 or 255. 10728b40a6198Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10729b40a6198Smrg ;; 10730b40a6198Smrg darwin*) 10731b40a6198Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10732b40a6198Smrg ;; 10733b40a6198Smrg *bsd*) 10734b40a6198Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10735b40a6198Smrg ;; 10736b40a6198Smrgesac 10737b40a6198Smrg 10738b40a6198Smrg# User supplied flags override default flags 10739b40a6198Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10740b40a6198Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10741b40a6198Smrgfi 10742b40a6198Smrg 10743b40a6198SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10744b40a6198Smrg]) # XORG_WITH_LINT 10745b40a6198Smrg 1074645bc899bSmrg# XORG_CHECK_MALLOC_ZERO 1074745bc899bSmrg# ---------------------- 1074845bc899bSmrg# Minimum version: 1.0.0 1074945bc899bSmrg# 1075045bc899bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1075145bc899bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1075245bc899bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1075345bc899bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1075445bc899bSmrgAC_ARG_ENABLE(malloc0returnsnull, 107555592a31fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1075645bc899bSmrg [malloc(0) returns NULL (default: auto)]), 1075745bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1075845bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1075945bc899bSmrg 1076045bc899bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1076145bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1076257ba8e8bSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1076357ba8e8bSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10764b40a6198Smrg#include <stdlib.h> 10765b40a6198Smrg],[ 1076645bc899bSmrg char *m0, *r0, *c0, *p; 1076745bc899bSmrg m0 = malloc(0); 1076845bc899bSmrg p = malloc(10); 1076945bc899bSmrg r0 = realloc(p,0); 10770b40a6198Smrg c0 = calloc(0,10); 10771b40a6198Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10772b40a6198Smrg])], 1077357ba8e8bSmrg [xorg_cv_malloc0_returns_null=yes], 1077457ba8e8bSmrg [xorg_cv_malloc0_returns_null=no])]) 1077557ba8e8bSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 1077645bc899bSmrgfi 1077745bc899bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1077845bc899bSmrg 1077945bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1078045bc899bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1078145bc899bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1078245bc899bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1078345bc899bSmrgelse 1078445bc899bSmrg MALLOC_ZERO_CFLAGS="" 1078545bc899bSmrg XMALLOC_ZERO_CFLAGS="" 1078645bc899bSmrg XTMALLOC_ZERO_CFLAGS="" 1078745bc899bSmrgfi 1078845bc899bSmrg 1078945bc899bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1079045bc899bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1079145bc899bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1079245bc899bSmrg]) # XORG_CHECK_MALLOC_ZERO 1079345bc899bSmrg 1079445bc899bSmrg# XORG_WITH_LINT() 1079545bc899bSmrg# ---------------- 1079645bc899bSmrg# Minimum version: 1.1.0 1079745bc899bSmrg# 10798b40a6198Smrg# This macro enables the use of a tool that flags some suspicious and 10799b40a6198Smrg# non-portable constructs (likely to be bugs) in C language source code. 10800b40a6198Smrg# It will attempt to locate the tool and use appropriate options. 10801b40a6198Smrg# There are various lint type tools on different platforms. 10802b40a6198Smrg# 10803b40a6198Smrg# Interface to module: 10804b40a6198Smrg# LINT: returns the path to the tool found on the platform 10805b40a6198Smrg# or the value set to LINT on the configure cmd line 10806b40a6198Smrg# also an Automake conditional 10807b40a6198Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10808b40a6198Smrg# 10809b40a6198Smrg# --with-lint: 'yes' user instructs the module to use lint 10810b40a6198Smrg# 'no' user instructs the module not to use lint (default) 10811b40a6198Smrg# 10812b40a6198Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10813b40a6198Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1081445bc899bSmrg# 1081545bc899bSmrgAC_DEFUN([XORG_WITH_LINT],[ 1081645bc899bSmrg 10817b40a6198SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10818b40a6198SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 108195592a31fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1082045bc899bSmrg [Use a lint-style source code checker (default: disabled)])], 1082145bc899bSmrg [use_lint=$withval], [use_lint=no]) 10822b40a6198Smrg 10823b40a6198Smrg# Obtain platform specific info like program name and options 10824b40a6198Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10825b40a6198Smrgcase $host_os in 10826b40a6198Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10827b40a6198Smrg lint_name=splint 10828b40a6198Smrg lint_options="-badflag" 10829b40a6198Smrg ;; 10830b40a6198Smrg *freebsd* | *netbsd*) 10831b40a6198Smrg lint_name=lint 10832b40a6198Smrg lint_options="-u -b" 10833b40a6198Smrg ;; 10834b40a6198Smrg *solaris*) 10835b40a6198Smrg lint_name=lint 10836b40a6198Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10837b40a6198Smrg ;; 10838b40a6198Smrgesac 10839b40a6198Smrg 10840b40a6198Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10841b40a6198Smrgif test "x$use_lint" = x"yes" ; then 10842b40a6198Smrg AC_PATH_PROG([LINT], [$lint_name]) 10843b40a6198Smrg if test "x$LINT" = "x"; then 10844b40a6198Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10845b40a6198Smrg fi 10846b40a6198Smrgelif test "x$use_lint" = x"no" ; then 10847b40a6198Smrg if test "x$LINT" != "x"; then 10848b40a6198Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10849b40a6198Smrg fi 1085045bc899bSmrgelse 10851b40a6198Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1085245bc899bSmrgfi 10853b40a6198Smrg 10854b40a6198Smrg# User supplied flags override default flags 10855b40a6198Smrgif test "x$LINT_FLAGS" != "x"; then 10856b40a6198Smrg lint_options=$LINT_FLAGS 1085745bc899bSmrgfi 1085845bc899bSmrg 10859b40a6198SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10860b40a6198SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1086145bc899bSmrg 1086245bc899bSmrg]) # XORG_WITH_LINT 1086345bc899bSmrg 1086445bc899bSmrg# XORG_LINT_LIBRARY(LIBNAME) 1086545bc899bSmrg# -------------------------- 1086645bc899bSmrg# Minimum version: 1.1.0 1086745bc899bSmrg# 1086845bc899bSmrg# Sets up flags for building lint libraries for checking programs that call 1086945bc899bSmrg# functions in the library. 1087045bc899bSmrg# 10871b40a6198Smrg# Interface to module: 10872b40a6198Smrg# LINTLIB - Automake variable with the name of lint library file to make 10873b40a6198Smrg# MAKE_LINT_LIB - Automake conditional 10874b40a6198Smrg# 10875b40a6198Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10876b40a6198Smrg# - 'no' user instructs the module not to create a lint library (default) 1087745bc899bSmrg 1087845bc899bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1087945bc899bSmrgAC_REQUIRE([XORG_WITH_LINT]) 108805592a31fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1088145bc899bSmrg [Create lint library (default: disabled)])], 1088245bc899bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10883b40a6198Smrg 10884b40a6198Smrgif test "x$make_lint_lib" = x"yes" ; then 10885b40a6198Smrg LINTLIB=llib-l$1.ln 10886b40a6198Smrg if test "x$LINT" = "x"; then 10887b40a6198Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10888b40a6198Smrg fi 10889b40a6198Smrgelif test "x$make_lint_lib" != x"no" ; then 10890b40a6198Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1089145bc899bSmrgfi 10892b40a6198Smrg 1089345bc899bSmrgAC_SUBST(LINTLIB) 1089445bc899bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1089545bc899bSmrg 1089645bc899bSmrg]) # XORG_LINT_LIBRARY 1089745bc899bSmrg 10898b40a6198Smrg# XORG_COMPILER_BRAND 10899b40a6198Smrg# ------------------- 10900b40a6198Smrg# Minimum version: 1.14.0 10901b40a6198Smrg# 10902b40a6198Smrg# Checks for various brands of compilers and sets flags as appropriate: 10903b40a6198Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10904b40a6198Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10905b40a6198Smrg# clang compiler - sets CLANGCC to "yes" 10906b40a6198Smrg# Intel compiler - sets INTELCC to "yes" 10907b40a6198Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10908b40a6198Smrg# 10909b40a6198SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10910b40a6198SmrgAC_LANG_CASE( 10911b40a6198Smrg [C], [ 10912b40a6198Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10913b40a6198Smrg ], 10914b40a6198Smrg [C++], [ 10915b40a6198Smrg AC_REQUIRE([AC_PROG_CXX]) 10916b40a6198Smrg ] 10917b40a6198Smrg) 10918b40a6198SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10919b40a6198SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10920b40a6198SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10921b40a6198Smrg]) # XORG_COMPILER_BRAND 10922b40a6198Smrg 10923b40a6198Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10924b40a6198Smrg# --------------- 10925b40a6198Smrg# Minimum version: 1.16.0 10926b40a6198Smrg# 10927b40a6198Smrg# Test if the compiler works when passed the given flag as a command line argument. 10928b40a6198Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10929b40a6198Smrg# next flag in the list until there are no more options. 10930b40a6198Smrg# 10931b40a6198Smrg# Note that this does not guarantee that the compiler supports the flag as some 10932b40a6198Smrg# compilers will simply ignore arguments that they do not understand, but we do 10933b40a6198Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10934b40a6198Smrg# -Werror=unused-command-line-argument 10935b40a6198Smrg# 10936b40a6198SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10937b40a6198Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10938b40a6198Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10939b40a6198Smrg 10940b40a6198SmrgAC_LANG_COMPILER_REQUIRE 10941b40a6198Smrg 10942b40a6198SmrgAC_LANG_CASE( 10943b40a6198Smrg [C], [ 10944b40a6198Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10945b40a6198Smrg define([PREFIX], [C]) 10946b40a6198Smrg define([CACHE_PREFIX], [cc]) 10947b40a6198Smrg define([COMPILER], [$CC]) 10948b40a6198Smrg ], 10949b40a6198Smrg [C++], [ 10950b40a6198Smrg define([PREFIX], [CXX]) 10951b40a6198Smrg define([CACHE_PREFIX], [cxx]) 10952b40a6198Smrg define([COMPILER], [$CXX]) 10953b40a6198Smrg ] 10954b40a6198Smrg) 10955b40a6198Smrg 10956b40a6198Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10957b40a6198Smrg 10958b40a6198Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10959b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10960b40a6198Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10961b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10962b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10963b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10964b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10965b40a6198Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10966b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10967b40a6198Smrgfi 10968b40a6198Smrg 10969b40a6198Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10970b40a6198Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10971b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10972b40a6198Smrg fi 10973b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10974b40a6198Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10975b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10976b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10977b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10978b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10979b40a6198Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10980b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10981b40a6198Smrgfi 10982b40a6198Smrg 10983b40a6198Smrgfound="no" 10984b40a6198Smrgm4_foreach([flag], m4_cdr($@), [ 10985b40a6198Smrg if test $found = "no" ; then 10986c97b1c41Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10987b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10988b40a6198Smrg fi 10989b40a6198Smrg 10990c97b1c41Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10991b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10992b40a6198Smrg fi 10993b40a6198Smrg 10994b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10995b40a6198Smrg 10996b40a6198Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10997c97b1c41Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10998b40a6198Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10999b40a6198Smrg AC_CACHE_VAL($cacheid, 11000b40a6198Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11001b40a6198Smrg [eval $cacheid=yes], 11002b40a6198Smrg [eval $cacheid=no])]) 11003b40a6198Smrg 11004b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11005b40a6198Smrg 11006b40a6198Smrg eval supported=\$$cacheid 11007b40a6198Smrg AC_MSG_RESULT([$supported]) 11008b40a6198Smrg if test "$supported" = "yes" ; then 11009b40a6198Smrg $1="$$1 ]flag[" 11010b40a6198Smrg found="yes" 11011b40a6198Smrg fi 11012b40a6198Smrg fi 11013b40a6198Smrg]) 11014b40a6198Smrg]) # XORG_TESTSET_CFLAG 11015b40a6198Smrg 11016b40a6198Smrg# XORG_COMPILER_FLAGS 11017b40a6198Smrg# --------------- 11018b40a6198Smrg# Minimum version: 1.16.0 11019b40a6198Smrg# 11020b40a6198Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11021b40a6198Smrg# arguments supported by the selected compiler which do NOT alter the generated 11022b40a6198Smrg# code. These arguments will cause the compiler to print various warnings 11023b40a6198Smrg# during compilation AND turn a conservative set of warnings into errors. 11024b40a6198Smrg# 11025b40a6198Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11026b40a6198Smrg# future versions of util-macros as options are added to new compilers. 11027b40a6198Smrg# 11028b40a6198SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 11029b40a6198SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11030b40a6198Smrg 11031b40a6198SmrgAC_ARG_ENABLE(selective-werror, 11032b40a6198Smrg AS_HELP_STRING([--disable-selective-werror], 11033b40a6198Smrg [Turn off selective compiler errors. (default: enabled)]), 11034b40a6198Smrg [SELECTIVE_WERROR=$enableval], 11035b40a6198Smrg [SELECTIVE_WERROR=yes]) 11036b40a6198Smrg 11037b40a6198SmrgAC_LANG_CASE( 11038b40a6198Smrg [C], [ 11039b40a6198Smrg define([PREFIX], [C]) 11040b40a6198Smrg ], 11041b40a6198Smrg [C++], [ 11042b40a6198Smrg define([PREFIX], [CXX]) 11043b40a6198Smrg ] 11044b40a6198Smrg) 11045b40a6198Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 11046b40a6198Smrgif test "x$SUNCC" = "xyes"; then 11047b40a6198Smrg [BASE_]PREFIX[FLAGS]="-v" 11048b40a6198Smrgelse 11049b40a6198Smrg [BASE_]PREFIX[FLAGS]="" 11050b40a6198Smrgfi 11051b40a6198Smrg 11052b40a6198Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11053b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11054b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11055b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11056b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11057b40a6198Smrg 11058b40a6198SmrgAC_LANG_CASE( 11059b40a6198Smrg [C], [ 11060b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11061b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11062b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11063b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1106457ba8e8bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11065b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11066b40a6198Smrg ] 11067b40a6198Smrg) 11068b40a6198Smrg 11069b40a6198Smrg# This chunk adds additional warnings that could catch undesired effects. 11070b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11071b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11072b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11073b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11074b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11075b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1107657ba8e8bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11077b40a6198Smrg 11078b40a6198Smrg# These are currently disabled because they are noisy. They will be enabled 11079b40a6198Smrg# in the future once the codebase is sufficiently modernized to silence 11080b40a6198Smrg# them. For now, I don't want them to drown out the other warnings. 11081b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11082b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1108357ba8e8bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11084b40a6198Smrg 11085b40a6198Smrg# Turn some warnings into errors, so we don't accidently get successful builds 11086b40a6198Smrg# when there are problems that should be fixed. 11087b40a6198Smrg 11088b40a6198Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11089b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11090b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11091b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11092b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11093b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11094b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11095b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11096b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11097b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11098b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11099b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11100b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11101b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11102b40a6198Smrgelse 11103b40a6198SmrgAC_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]) 11104b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11105b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11106b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11107b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11108b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11109b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11110b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11111b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11112b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11113b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11114b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11115b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11116b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11117b40a6198Smrgfi 11118b40a6198Smrg 11119b40a6198SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11120b40a6198Smrg]) # XORG_COMPILER_FLAGS 11121b40a6198Smrg 1112250f2e948Smrg# XORG_CWARNFLAGS 1112350f2e948Smrg# --------------- 1112450f2e948Smrg# Minimum version: 1.2.0 11125b40a6198Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1112650f2e948Smrg# 1112750f2e948Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1112850f2e948Smrg# 11129b40a6198Smrg# This function is deprecated because it defines -fno-strict-aliasing 11130b40a6198Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11131b40a6198Smrg# is needed, then it should be added explicitly in the module when 11132b40a6198Smrg# it is updated to use BASE_CFLAGS. 11133b40a6198Smrg# 1113450f2e948SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11135b40a6198SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11136b40a6198SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11137b40a6198SmrgAC_LANG_CASE( 11138b40a6198Smrg [C], [ 11139b40a6198Smrg CWARNFLAGS="$BASE_CFLAGS" 11140b40a6198Smrg if test "x$GCC" = xyes ; then 11141b40a6198Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11142b40a6198Smrg fi 11143b40a6198Smrg AC_SUBST(CWARNFLAGS) 11144b40a6198Smrg ] 11145b40a6198Smrg) 1114650f2e948Smrg]) # XORG_CWARNFLAGS 111475592a31fSmrg 111485592a31fSmrg# XORG_STRICT_OPTION 111495592a31fSmrg# ----------------------- 111505592a31fSmrg# Minimum version: 1.3.0 111515592a31fSmrg# 11152b40a6198Smrg# Add configure option to enable strict compilation flags, such as treating 11153b40a6198Smrg# warnings as fatal errors. 11154b40a6198Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11155b40a6198Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11156b40a6198Smrg# 11157b40a6198Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11158b40a6198Smrg# when strict compilation is unconditionally desired. 111595592a31fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 111605592a31fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11161b40a6198SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 111625592a31fSmrg 111635592a31fSmrgAC_ARG_ENABLE(strict-compilation, 111645592a31fSmrg AS_HELP_STRING([--enable-strict-compilation], 111655592a31fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 111665592a31fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11167b40a6198Smrg 11168b40a6198SmrgAC_LANG_CASE( 11169b40a6198Smrg [C], [ 11170b40a6198Smrg define([PREFIX], [C]) 11171b40a6198Smrg ], 11172b40a6198Smrg [C++], [ 11173b40a6198Smrg define([PREFIX], [CXX]) 11174b40a6198Smrg ] 11175b40a6198Smrg) 11176b40a6198Smrg 11177b40a6198Smrg[STRICT_]PREFIX[FLAGS]="" 11178b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11179b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11180b40a6198Smrg 11181b40a6198Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11182b40a6198Smrg# activate it with -Werror, so we add it here explicitly. 11183b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11184b40a6198Smrg 111855592a31fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 11186b40a6198Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11187b40a6198Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 111885592a31fSmrgfi 11189b40a6198SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11190b40a6198SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11191b40a6198SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 111925592a31fSmrg]) # XORG_STRICT_OPTION 111935592a31fSmrg 111945592a31fSmrg# XORG_DEFAULT_OPTIONS 111955592a31fSmrg# -------------------- 111965592a31fSmrg# Minimum version: 1.3.0 111975592a31fSmrg# 111985592a31fSmrg# Defines default options for X.Org modules. 111995592a31fSmrg# 112005592a31fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11201b40a6198SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11202b40a6198SmrgXORG_COMPILER_FLAGS 112035592a31fSmrgXORG_CWARNFLAGS 112045592a31fSmrgXORG_STRICT_OPTION 112055592a31fSmrgXORG_RELEASE_VERSION 112065592a31fSmrgXORG_CHANGELOG 112075592a31fSmrgXORG_INSTALL 112085592a31fSmrgXORG_MANPAGE_SECTIONS 11209b40a6198Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11210b40a6198Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 112115592a31fSmrg]) # XORG_DEFAULT_OPTIONS 112125592a31fSmrg 112135592a31fSmrg# XORG_INSTALL() 112145592a31fSmrg# ---------------- 112155592a31fSmrg# Minimum version: 1.4.0 112165592a31fSmrg# 112175592a31fSmrg# Defines the variable INSTALL_CMD as the command to copy 11218b40a6198Smrg# INSTALL from $prefix/share/util-macros. 112195592a31fSmrg# 112205592a31fSmrgAC_DEFUN([XORG_INSTALL], [ 112215592a31fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11222b40a6198Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11223b40a6198SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 112245592a31fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 112255592a31fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11226b40a6198Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 112275592a31fSmrgAC_SUBST([INSTALL_CMD]) 112285592a31fSmrg]) # XORG_INSTALL 1122950f2e948Smrgdnl Copyright 2005 Red Hat, Inc 1123050f2e948Smrgdnl 1123150f2e948Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1123250f2e948Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1123350f2e948Smrgdnl the above copyright notice appear in all copies and that both that 1123450f2e948Smrgdnl copyright notice and this permission notice appear in supporting 1123550f2e948Smrgdnl documentation. 1123650f2e948Smrgdnl 1123750f2e948Smrgdnl The above copyright notice and this permission notice shall be included 1123850f2e948Smrgdnl in all copies or substantial portions of the Software. 1123950f2e948Smrgdnl 1124050f2e948Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1124150f2e948Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1124250f2e948Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1124350f2e948Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1124450f2e948Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1124550f2e948Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1124650f2e948Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1124750f2e948Smrgdnl 1124850f2e948Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1124950f2e948Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1125050f2e948Smrgdnl other dealings in this Software without prior written authorization 1125150f2e948Smrgdnl from the copyright holders. 1125250f2e948Smrgdnl 1125350f2e948Smrg 1125450f2e948Smrg# XORG_RELEASE_VERSION 1125550f2e948Smrg# -------------------- 11256b40a6198Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11257c97b1c41Smrg 1125850f2e948SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1125950f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1126050f2e948Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1126150f2e948Smrg [Major version of this package]) 1126250f2e948Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1126350f2e948Smrg if test "x$PVM" = "x"; then 1126450f2e948Smrg PVM="0" 1126550f2e948Smrg fi 1126650f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1126750f2e948Smrg [$PVM], 1126850f2e948Smrg [Minor version of this package]) 1126950f2e948Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1127050f2e948Smrg if test "x$PVP" = "x"; then 1127150f2e948Smrg PVP="0" 1127250f2e948Smrg fi 1127350f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1127450f2e948Smrg [$PVP], 1127550f2e948Smrg [Patch version of this package]) 1127650f2e948Smrg]) 1127750f2e948Smrg 1127850f2e948Smrg# XORG_CHANGELOG() 1127950f2e948Smrg# ---------------- 1128050f2e948Smrg# Minimum version: 1.2.0 1128150f2e948Smrg# 1128250f2e948Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1128350f2e948Smrg# ChangeLog from git. 1128450f2e948Smrg# 1128550f2e948Smrg# 1128650f2e948SmrgAC_DEFUN([XORG_CHANGELOG], [ 112875592a31fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 112885592a31fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 112895592a31fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1129050f2e948Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1129150f2e948SmrgAC_SUBST([CHANGELOG_CMD]) 1129250f2e948Smrg]) # XORG_CHANGELOG 1129350f2e948Smrg 112945592a31fSmrgdnl Copyright 2005 Red Hat, Inc 112955592a31fSmrgdnl 112965592a31fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 112975592a31fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 112985592a31fSmrgdnl the above copyright notice appear in all copies and that both that 112995592a31fSmrgdnl copyright notice and this permission notice appear in supporting 113005592a31fSmrgdnl documentation. 113015592a31fSmrgdnl 113025592a31fSmrgdnl The above copyright notice and this permission notice shall be included 113035592a31fSmrgdnl in all copies or substantial portions of the Software. 113045592a31fSmrgdnl 113055592a31fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 113065592a31fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 113075592a31fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 113085592a31fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 113095592a31fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 113105592a31fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 113115592a31fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 113125592a31fSmrgdnl 113135592a31fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 113145592a31fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 113155592a31fSmrgdnl other dealings in this Software without prior written authorization 113165592a31fSmrgdnl from the copyright holders. 113175592a31fSmrgdnl 113185592a31fSmrg 11319c97b1c41Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 113205592a31fSmrg# -------------------------- 11321c97b1c41Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11322c97b1c41Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 113235592a31fSmrg 113245592a31fSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11325b40a6198Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 113265592a31fSmrg SAVE_CFLAGS="$CFLAGS" 11327b40a6198Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 113285592a31fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 113295592a31fSmrg#include "xorg-server.h" 113305592a31fSmrg#if !defined $1 113315592a31fSmrg#error $1 not defined 113325592a31fSmrg#endif 113335592a31fSmrg ]])], 113345592a31fSmrg [_EXT_CHECK=yes], 113355592a31fSmrg [_EXT_CHECK=no]) 113365592a31fSmrg CFLAGS="$SAVE_CFLAGS" 113375592a31fSmrg AC_MSG_CHECKING([if $1 is defined]) 113385592a31fSmrg AC_MSG_RESULT([$_EXT_CHECK]) 113395592a31fSmrg if test "$_EXT_CHECK" != no; then 113405592a31fSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 113415592a31fSmrg fi 113425592a31fSmrg]) 113435592a31fSmrg 11344f2408745Smrg# Copyright (C) 2002-2017 Free Software Foundation, Inc. 1134545bc899bSmrg# 1134645bc899bSmrg# This file is free software; the Free Software Foundation 1134745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1134845bc899bSmrg# with or without modifications, as long as this notice is preserved. 1134945bc899bSmrg 1135045bc899bSmrg# AM_AUTOMAKE_VERSION(VERSION) 1135145bc899bSmrg# ---------------------------- 1135245bc899bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1135345bc899bSmrg# generated from the m4 files accompanying Automake X.Y. 1135450f2e948Smrg# (This private macro should not be called outside this file.) 1135550f2e948SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1135657ba8e8bSmrg[am__api_version='1.15' 1135750f2e948Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1135850f2e948Smrgdnl require some minimum version. Point them to the right macro. 11359f2408745Smrgm4_if([$1], [1.15.1], [], 1136050f2e948Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1136150f2e948Smrg]) 1136250f2e948Smrg 1136350f2e948Smrg# _AM_AUTOCONF_VERSION(VERSION) 1136450f2e948Smrg# ----------------------------- 1136550f2e948Smrg# aclocal traces this macro to find the Autoconf version. 1136650f2e948Smrg# This is a private macro too. Using m4_define simplifies 1136750f2e948Smrg# the logic in aclocal, which can simply ignore this definition. 1136850f2e948Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1136945bc899bSmrg 1137045bc899bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1137145bc899bSmrg# ------------------------------- 1137250f2e948Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1137350f2e948Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1137445bc899bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11375f2408745Smrg[AM_AUTOMAKE_VERSION([1.15.1])dnl 1137650f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1137750f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1137850f2e948Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1137945bc899bSmrg 1138045bc899bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1138145bc899bSmrg 11382f2408745Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1138345bc899bSmrg# 1138445bc899bSmrg# This file is free software; the Free Software Foundation 1138545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1138645bc899bSmrg# with or without modifications, as long as this notice is preserved. 1138745bc899bSmrg 1138845bc899bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11389c97b1c41Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11390c97b1c41Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1139145bc899bSmrg# 1139245bc899bSmrg# Of course, Automake must honor this variable whenever it calls a 1139345bc899bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 1139445bc899bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1139545bc899bSmrg# depending on how configure is run. This is pretty annoying, since 1139645bc899bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1139745bc899bSmrg# source directory, any form will work fine, but in subdirectories a 1139845bc899bSmrg# relative path needs to be adjusted first. 1139945bc899bSmrg# 1140045bc899bSmrg# $ac_aux_dir/missing 1140145bc899bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 1140245bc899bSmrg# $top_srcdir/$ac_aux_dir/missing 1140345bc899bSmrg# fails if $ac_aux_dir is absolute, 1140445bc899bSmrg# fails when called from a subdirectory in a VPATH build with 1140545bc899bSmrg# a relative $ac_aux_dir 1140645bc899bSmrg# 1140745bc899bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1140845bc899bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 11409c97b1c41Smrg# harmless because $srcdir is '.', but things will broke when you 1141045bc899bSmrg# start a VPATH build or use an absolute $srcdir. 1141145bc899bSmrg# 1141245bc899bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1141345bc899bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1141445bc899bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1141545bc899bSmrg# and then we would define $MISSING as 1141645bc899bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 1141745bc899bSmrg# This will work as long as MISSING is not called from configure, because 1141845bc899bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 1141945bc899bSmrg# However there are other variables, like CC, which are often used in 1142045bc899bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1142145bc899bSmrg# 1142245bc899bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1142345bc899bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1142445bc899bSmrg# configured tree to be moved without reconfiguration. 1142545bc899bSmrg 1142645bc899bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1142757ba8e8bSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1142857ba8e8bSmrg# Expand $ac_aux_dir to an absolute path. 1142957ba8e8bSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1143045bc899bSmrg]) 1143145bc899bSmrg 1143245bc899bSmrg# AM_CONDITIONAL -*- Autoconf -*- 1143345bc899bSmrg 11434f2408745Smrg# Copyright (C) 1997-2017 Free Software Foundation, Inc. 1143545bc899bSmrg# 1143645bc899bSmrg# This file is free software; the Free Software Foundation 1143745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1143845bc899bSmrg# with or without modifications, as long as this notice is preserved. 1143945bc899bSmrg 1144045bc899bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1144145bc899bSmrg# ------------------------------------- 1144245bc899bSmrg# Define a conditional. 1144345bc899bSmrgAC_DEFUN([AM_CONDITIONAL], 11444c97b1c41Smrg[AC_PREREQ([2.52])dnl 11445c97b1c41Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11446c97b1c41Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1144750f2e948SmrgAC_SUBST([$1_TRUE])dnl 1144850f2e948SmrgAC_SUBST([$1_FALSE])dnl 1144950f2e948Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1145050f2e948Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 114513a925b30Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1145245bc899bSmrgif $2; then 1145345bc899bSmrg $1_TRUE= 1145445bc899bSmrg $1_FALSE='#' 1145545bc899bSmrgelse 1145645bc899bSmrg $1_TRUE='#' 1145745bc899bSmrg $1_FALSE= 1145845bc899bSmrgfi 1145945bc899bSmrgAC_CONFIG_COMMANDS_PRE( 1146045bc899bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1146145bc899bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1146245bc899bSmrgUsually this means the macro was only invoked conditionally.]]) 1146345bc899bSmrgfi])]) 1146445bc899bSmrg 11465f2408745Smrg# Copyright (C) 1999-2017 Free Software Foundation, Inc. 1146645bc899bSmrg# 1146745bc899bSmrg# This file is free software; the Free Software Foundation 1146845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1146945bc899bSmrg# with or without modifications, as long as this notice is preserved. 1147045bc899bSmrg 1147145bc899bSmrg 11472c97b1c41Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1147345bc899bSmrg# written in clear, in which case automake, when reading aclocal.m4, 1147445bc899bSmrg# will think it sees a *use*, and therefore will trigger all it's 1147545bc899bSmrg# C support machinery. Also note that it means that autoscan, seeing 1147645bc899bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1147745bc899bSmrg 1147845bc899bSmrg 1147945bc899bSmrg# _AM_DEPENDENCIES(NAME) 1148045bc899bSmrg# ---------------------- 1148145bc899bSmrg# See how the compiler implements dependency checking. 11482c97b1c41Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1148345bc899bSmrg# We try a few techniques and use that to set a single cache variable. 1148445bc899bSmrg# 1148545bc899bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1148645bc899bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1148745bc899bSmrg# dependency, and given that the user is not expected to run this macro, 1148845bc899bSmrg# just rely on AC_PROG_CC. 1148945bc899bSmrgAC_DEFUN([_AM_DEPENDENCIES], 1149045bc899bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1149145bc899bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1149245bc899bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1149345bc899bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1149445bc899bSmrg 11495c97b1c41Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11496c97b1c41Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11497c97b1c41Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11498c97b1c41Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11499c97b1c41Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11500c97b1c41Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11501c97b1c41Smrg [depcc="$$1" am_compiler_list=]) 1150245bc899bSmrg 1150345bc899bSmrgAC_CACHE_CHECK([dependency style of $depcc], 1150445bc899bSmrg [am_cv_$1_dependencies_compiler_type], 1150545bc899bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1150645bc899bSmrg # We make a subdir and do the tests there. Otherwise we can end up 1150745bc899bSmrg # making bogus files that we don't know about and never remove. For 1150845bc899bSmrg # instance it was reported that on HP-UX the gcc test will end up 11509c97b1c41Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 11510c97b1c41Smrg # in D". 11511b40a6198Smrg rm -rf conftest.dir 1151245bc899bSmrg mkdir conftest.dir 1151345bc899bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1151445bc899bSmrg # using a relative directory. 1151545bc899bSmrg cp "$am_depcomp" conftest.dir 1151645bc899bSmrg cd conftest.dir 1151745bc899bSmrg # We will build objects and dependencies in a subdirectory because 1151845bc899bSmrg # it helps to detect inapplicable dependency modes. For instance 1151945bc899bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1152045bc899bSmrg # side effect of compilation, but ICC will put the dependencies in 1152145bc899bSmrg # the current directory while Tru64 will put them in the object 1152245bc899bSmrg # directory. 1152345bc899bSmrg mkdir sub 1152445bc899bSmrg 1152545bc899bSmrg am_cv_$1_dependencies_compiler_type=none 1152645bc899bSmrg if test "$am_compiler_list" = ""; then 1152745bc899bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1152845bc899bSmrg fi 115293a925b30Smrg am__universal=false 115303a925b30Smrg m4_case([$1], [CC], 115313a925b30Smrg [case " $depcc " in #( 115323a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 115333a925b30Smrg esac], 115343a925b30Smrg [CXX], 115353a925b30Smrg [case " $depcc " in #( 115363a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 115373a925b30Smrg esac]) 115383a925b30Smrg 1153945bc899bSmrg for depmode in $am_compiler_list; do 1154045bc899bSmrg # Setup a source with many dependencies, because some compilers 1154145bc899bSmrg # like to wrap large dependency lists on column 80 (with \), and 1154245bc899bSmrg # we should not choose a depcomp mode which is confused by this. 1154345bc899bSmrg # 1154445bc899bSmrg # We need to recreate these files for each test, as the compiler may 1154545bc899bSmrg # overwrite some of them when testing with obscure command lines. 1154645bc899bSmrg # This happens at least with the AIX C compiler. 1154745bc899bSmrg : > sub/conftest.c 1154845bc899bSmrg for i in 1 2 3 4 5 6; do 1154945bc899bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 11550c97b1c41Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11551c97b1c41Smrg # Solaris 10 /bin/sh. 11552c97b1c41Smrg echo '/* dummy */' > sub/conftst$i.h 1155345bc899bSmrg done 1155445bc899bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1155545bc899bSmrg 11556c97b1c41Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 115573a925b30Smrg # mode. It turns out that the SunPro C++ compiler does not properly 11558c97b1c41Smrg # handle '-M -o', and we need to detect this. Also, some Intel 11559c97b1c41Smrg # versions had trouble with output in subdirs. 115603a925b30Smrg am__obj=sub/conftest.${OBJEXT-o} 115613a925b30Smrg am__minus_obj="-o $am__obj" 1156245bc899bSmrg case $depmode in 115633a925b30Smrg gcc) 115643a925b30Smrg # This depmode causes a compiler race in universal mode. 115653a925b30Smrg test "$am__universal" = false || continue 115663a925b30Smrg ;; 1156745bc899bSmrg nosideeffect) 11568c97b1c41Smrg # After this tag, mechanisms are not by side-effect, so they'll 11569c97b1c41Smrg # only be used when explicitly requested. 1157045bc899bSmrg if test "x$enable_dependency_tracking" = xyes; then 1157145bc899bSmrg continue 1157245bc899bSmrg else 1157345bc899bSmrg break 1157445bc899bSmrg fi 1157545bc899bSmrg ;; 11576b40a6198Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11577c97b1c41Smrg # This compiler won't grok '-c -o', but also, the minuso test has 115783a925b30Smrg # not run yet. These depmodes are late enough in the game, and 115793a925b30Smrg # so weak that their functioning should not be impacted. 115803a925b30Smrg am__obj=conftest.${OBJEXT-o} 115813a925b30Smrg am__minus_obj= 115823a925b30Smrg ;; 1158345bc899bSmrg none) break ;; 1158445bc899bSmrg esac 1158545bc899bSmrg if depmode=$depmode \ 115863a925b30Smrg source=sub/conftest.c object=$am__obj \ 1158745bc899bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 115883a925b30Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1158945bc899bSmrg >/dev/null 2>conftest.err && 1159050f2e948Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1159145bc899bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 115923a925b30Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1159345bc899bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1159445bc899bSmrg # icc doesn't choke on unknown options, it will just issue warnings 1159545bc899bSmrg # or remarks (even with -Werror). So we grep stderr for any message 1159645bc899bSmrg # that says an option was ignored or not supported. 1159745bc899bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1159845bc899bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 1159945bc899bSmrg # The diagnosis changed in icc 8.0: 1160045bc899bSmrg # icc: Command line remark: option '-MP' not supported 1160145bc899bSmrg if (grep 'ignoring option' conftest.err || 1160245bc899bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1160345bc899bSmrg am_cv_$1_dependencies_compiler_type=$depmode 1160445bc899bSmrg break 1160545bc899bSmrg fi 1160645bc899bSmrg fi 1160745bc899bSmrg done 1160845bc899bSmrg 1160945bc899bSmrg cd .. 1161045bc899bSmrg rm -rf conftest.dir 1161145bc899bSmrgelse 1161245bc899bSmrg am_cv_$1_dependencies_compiler_type=none 1161345bc899bSmrgfi 1161445bc899bSmrg]) 1161545bc899bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1161645bc899bSmrgAM_CONDITIONAL([am__fastdep$1], [ 1161745bc899bSmrg test "x$enable_dependency_tracking" != xno \ 1161845bc899bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1161945bc899bSmrg]) 1162045bc899bSmrg 1162145bc899bSmrg 1162245bc899bSmrg# AM_SET_DEPDIR 1162345bc899bSmrg# ------------- 1162445bc899bSmrg# Choose a directory name for dependency files. 11625c97b1c41Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1162645bc899bSmrgAC_DEFUN([AM_SET_DEPDIR], 1162745bc899bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1162845bc899bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1162945bc899bSmrg]) 1163045bc899bSmrg 1163145bc899bSmrg 1163245bc899bSmrg# AM_DEP_TRACK 1163345bc899bSmrg# ------------ 1163445bc899bSmrgAC_DEFUN([AM_DEP_TRACK], 11635c97b1c41Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11636c97b1c41SmrgAS_HELP_STRING( 11637c97b1c41Smrg [--enable-dependency-tracking], 11638c97b1c41Smrg [do not reject slow dependency extractors]) 11639c97b1c41SmrgAS_HELP_STRING( 11640c97b1c41Smrg [--disable-dependency-tracking], 11641c97b1c41Smrg [speeds up one-time build])]) 1164245bc899bSmrgif test "x$enable_dependency_tracking" != xno; then 1164345bc899bSmrg am_depcomp="$ac_aux_dir/depcomp" 1164445bc899bSmrg AMDEPBACKSLASH='\' 11645b40a6198Smrg am__nodep='_no' 1164645bc899bSmrgfi 1164745bc899bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1164850f2e948SmrgAC_SUBST([AMDEPBACKSLASH])dnl 1164950f2e948Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11650b40a6198SmrgAC_SUBST([am__nodep])dnl 11651b40a6198Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1165245bc899bSmrg]) 1165345bc899bSmrg 1165445bc899bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1165545bc899bSmrg 11656f2408745Smrg# Copyright (C) 1999-2017 Free Software Foundation, Inc. 1165745bc899bSmrg# 1165845bc899bSmrg# This file is free software; the Free Software Foundation 1165945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1166045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1166145bc899bSmrg 1166245bc899bSmrg 1166345bc899bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1166445bc899bSmrg# ------------------------------ 1166545bc899bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 116663a925b30Smrg[{ 11667c97b1c41Smrg # Older Autoconf quotes --file arguments for eval, but not when files 116683a925b30Smrg # are listed without --file. Let's play safe and only enable the eval 116693a925b30Smrg # if we detect the quoting. 116703a925b30Smrg case $CONFIG_FILES in 116713a925b30Smrg *\'*) eval set x "$CONFIG_FILES" ;; 116723a925b30Smrg *) set x $CONFIG_FILES ;; 116733a925b30Smrg esac 116743a925b30Smrg shift 116753a925b30Smrg for mf 116763a925b30Smrg do 116773a925b30Smrg # Strip MF so we end up with the name of the file. 116783a925b30Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 116793a925b30Smrg # Check whether this is an Automake generated Makefile or not. 11680c97b1c41Smrg # We used to match only the files named 'Makefile.in', but 116813a925b30Smrg # some people rename them; so instead we look at the file content. 116823a925b30Smrg # Grep'ing the first line is not enough: some people post-process 116833a925b30Smrg # each Makefile.in and add a new line on top of each file to say so. 116843a925b30Smrg # Grep'ing the whole file is not good either: AIX grep has a line 116853a925b30Smrg # limit of 2048, but all sed's we know have understand at least 4000. 116863a925b30Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 116873a925b30Smrg dirpart=`AS_DIRNAME("$mf")` 116883a925b30Smrg else 116893a925b30Smrg continue 116903a925b30Smrg fi 116913a925b30Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11692c97b1c41Smrg # from the Makefile without running 'make'. 116933a925b30Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 116943a925b30Smrg test -z "$DEPDIR" && continue 116953a925b30Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11696c97b1c41Smrg test -z "$am__include" && continue 116973a925b30Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 116983a925b30Smrg # Find all dependency output files, they are included files with 116993a925b30Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 117003a925b30Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 117013a925b30Smrg # expansion. 117023a925b30Smrg for file in `sed -n " 117033a925b30Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11704c97b1c41Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 117053a925b30Smrg # Make sure the directory exists. 117063a925b30Smrg test -f "$dirpart/$file" && continue 117073a925b30Smrg fdir=`AS_DIRNAME(["$file"])` 117083a925b30Smrg AS_MKDIR_P([$dirpart/$fdir]) 117093a925b30Smrg # echo "creating $dirpart/$file" 117103a925b30Smrg echo '# dummy' > "$dirpart/$file" 117113a925b30Smrg done 1171245bc899bSmrg done 117133a925b30Smrg} 1171445bc899bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1171545bc899bSmrg 1171645bc899bSmrg 1171745bc899bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1171845bc899bSmrg# ----------------------------- 1171945bc899bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 1172045bc899bSmrg# 1172145bc899bSmrg# This code is only required when automatic dependency tracking 11722c97b1c41Smrg# is enabled. FIXME. This creates each '.P' file that we will 1172345bc899bSmrg# need in order to bootstrap the dependency handling code. 1172445bc899bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1172545bc899bSmrg[AC_CONFIG_COMMANDS([depfiles], 1172645bc899bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1172745bc899bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1172845bc899bSmrg]) 1172945bc899bSmrg 1173045bc899bSmrg# Do all the work for Automake. -*- Autoconf -*- 1173145bc899bSmrg 11732f2408745Smrg# Copyright (C) 1996-2017 Free Software Foundation, Inc. 1173345bc899bSmrg# 1173445bc899bSmrg# This file is free software; the Free Software Foundation 1173545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1173645bc899bSmrg# with or without modifications, as long as this notice is preserved. 1173745bc899bSmrg 1173845bc899bSmrg# This macro actually does too much. Some checks are only needed if 1173945bc899bSmrg# your package does certain things. But this isn't really a big deal. 1174045bc899bSmrg 1174157ba8e8bSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1174257ba8e8bSmrgm4_define([AC_PROG_CC], 1174357ba8e8bSmrgm4_defn([AC_PROG_CC]) 1174457ba8e8bSmrg[_AM_PROG_CC_C_O 1174557ba8e8bSmrg]) 1174657ba8e8bSmrg 1174745bc899bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1174845bc899bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 1174945bc899bSmrg# ----------------------------------------------- 1175045bc899bSmrg# The call with PACKAGE and VERSION arguments is the old style 1175145bc899bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1175245bc899bSmrg# and VERSION should now be passed to AC_INIT and removed from 1175345bc899bSmrg# the call to AM_INIT_AUTOMAKE. 1175445bc899bSmrg# We support both call styles for the transition. After 1175545bc899bSmrg# the next Automake release, Autoconf can make the AC_INIT 1175645bc899bSmrg# arguments mandatory, and then we can depend on a new Autoconf 1175745bc899bSmrg# release and drop the old call support. 1175845bc899bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11759c97b1c41Smrg[AC_PREREQ([2.65])dnl 1176045bc899bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1176145bc899bSmrgdnl the ones we care about. 1176245bc899bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1176345bc899bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1176445bc899bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1176550f2e948Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1176650f2e948Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1176750f2e948Smrg # is not polluted with repeated "-I." 1176850f2e948Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1176950f2e948Smrg # test to see if srcdir already configured 1177050f2e948Smrg if test -f $srcdir/config.status; then 1177150f2e948Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1177250f2e948Smrg fi 1177345bc899bSmrgfi 1177445bc899bSmrg 1177545bc899bSmrg# test whether we have cygpath 1177645bc899bSmrgif test -z "$CYGPATH_W"; then 1177745bc899bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 1177845bc899bSmrg CYGPATH_W='cygpath -w' 1177945bc899bSmrg else 1178045bc899bSmrg CYGPATH_W=echo 1178145bc899bSmrg fi 1178245bc899bSmrgfi 1178345bc899bSmrgAC_SUBST([CYGPATH_W]) 1178445bc899bSmrg 1178545bc899bSmrg# Define the identity of the package. 1178645bc899bSmrgdnl Distinguish between old-style and new-style calls. 1178745bc899bSmrgm4_ifval([$2], 11788c97b1c41Smrg[AC_DIAGNOSE([obsolete], 11789c97b1c41Smrg [$0: two- and three-arguments forms are deprecated.]) 11790c97b1c41Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1179145bc899bSmrg AC_SUBST([PACKAGE], [$1])dnl 1179245bc899bSmrg AC_SUBST([VERSION], [$2])], 1179345bc899bSmrg[_AM_SET_OPTIONS([$1])dnl 1179450f2e948Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11795c97b1c41Smrgm4_if( 11796c97b1c41Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11797c97b1c41Smrg [ok:ok],, 1179850f2e948Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1179945bc899bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1180045bc899bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1180145bc899bSmrg 1180245bc899bSmrg_AM_IF_OPTION([no-define],, 11803c97b1c41Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11804c97b1c41Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1180545bc899bSmrg 1180645bc899bSmrg# Some tools Automake needs. 1180745bc899bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1180845bc899bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11809c97b1c41SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11810c97b1c41SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11811c97b1c41SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11812c97b1c41SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11813c97b1c41SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 118143a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 118153a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11816c97b1c41SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11817c97b1c41Smrg# For better backward compatibility. To be removed once Automake 1.9.x 11818c97b1c41Smrg# dies out for good. For more background, see: 11819c97b1c41Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11820c97b1c41Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11821c97b1c41SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1182257ba8e8bSmrg# We need awk for the "check" target (and possibly the TAP driver). The 1182357ba8e8bSmrg# system "awk" is bad on some platforms. 1182445bc899bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 1182545bc899bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1182645bc899bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1182745bc899bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 118283a925b30Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 118293a925b30Smrg [_AM_PROG_TAR([v7])])]) 1183045bc899bSmrg_AM_IF_OPTION([no-dependencies],, 1183145bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11832c97b1c41Smrg [_AM_DEPENDENCIES([CC])], 11833c97b1c41Smrg [m4_define([AC_PROG_CC], 11834c97b1c41Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1183545bc899bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11836c97b1c41Smrg [_AM_DEPENDENCIES([CXX])], 11837c97b1c41Smrg [m4_define([AC_PROG_CXX], 11838c97b1c41Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1183950f2e948SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11840c97b1c41Smrg [_AM_DEPENDENCIES([OBJC])], 11841c97b1c41Smrg [m4_define([AC_PROG_OBJC], 11842c97b1c41Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11843c97b1c41SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11844c97b1c41Smrg [_AM_DEPENDENCIES([OBJCXX])], 11845c97b1c41Smrg [m4_define([AC_PROG_OBJCXX], 11846c97b1c41Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1184745bc899bSmrg]) 11848c97b1c41SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11849c97b1c41Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 11850c97b1c41Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11851c97b1c41Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 118523a925b30SmrgAC_CONFIG_COMMANDS_PRE(dnl 118533a925b30Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 118543a925b30Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1185557ba8e8bSmrg 1185657ba8e8bSmrg# POSIX will say in a future version that running "rm -f" with no argument 1185757ba8e8bSmrg# is OK; and we want to be able to make that assumption in our Makefile 1185857ba8e8bSmrg# recipes. So use an aggressive probe to check that the usage we want is 1185957ba8e8bSmrg# actually supported "in the wild" to an acceptable degree. 1186057ba8e8bSmrg# See automake bug#10828. 1186157ba8e8bSmrg# To make any issue more visible, cause the running configure to be aborted 1186257ba8e8bSmrg# by default if the 'rm' program in use doesn't match our expectations; the 1186357ba8e8bSmrg# user can still override this though. 1186457ba8e8bSmrgif rm -f && rm -fr && rm -rf; then : OK; else 1186557ba8e8bSmrg cat >&2 <<'END' 1186657ba8e8bSmrgOops! 1186757ba8e8bSmrg 1186857ba8e8bSmrgYour 'rm' program seems unable to run without file operands specified 1186957ba8e8bSmrgon the command line, even when the '-f' option is present. This is contrary 1187057ba8e8bSmrgto the behaviour of most rm programs out there, and not conforming with 1187157ba8e8bSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1187257ba8e8bSmrg 1187357ba8e8bSmrgPlease tell bug-automake@gnu.org about your system, including the value 1187457ba8e8bSmrgof your $PATH and any error possibly output before this message. This 1187557ba8e8bSmrgcan help us improve future automake versions. 1187657ba8e8bSmrg 1187757ba8e8bSmrgEND 1187857ba8e8bSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1187957ba8e8bSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 1188057ba8e8bSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1188157ba8e8bSmrg echo >&2 1188257ba8e8bSmrg else 1188357ba8e8bSmrg cat >&2 <<'END' 1188457ba8e8bSmrgAborting the configuration process, to ensure you take notice of the issue. 1188557ba8e8bSmrg 1188657ba8e8bSmrgYou can download and install GNU coreutils to get an 'rm' implementation 1188757ba8e8bSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 1188857ba8e8bSmrg 1188957ba8e8bSmrgIf you want to complete the configuration process using your problematic 1189057ba8e8bSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1189157ba8e8bSmrgto "yes", and re-run configure. 1189257ba8e8bSmrg 1189357ba8e8bSmrgEND 1189457ba8e8bSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1189557ba8e8bSmrg fi 1189657ba8e8bSmrgfi 1189757ba8e8bSmrgdnl The trailing newline in this macro's definition is deliberate, for 1189857ba8e8bSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 1189957ba8e8bSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1190045bc899bSmrg]) 1190145bc899bSmrg 11902c97b1c41Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 119033a925b30Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 119043a925b30Smrgdnl mangled by Autoconf and run in a shell conditional statement. 119053a925b30Smrgm4_define([_AC_COMPILER_EXEEXT], 119063a925b30Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 119073a925b30Smrg 1190845bc899bSmrg# When config.status generates a header, we must update the stamp-h file. 1190945bc899bSmrg# This file resides in the same directory as the config header 1191045bc899bSmrg# that is generated. The stamp files are numbered to have different names. 1191145bc899bSmrg 1191245bc899bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1191345bc899bSmrg# loop where config.status creates the headers, so we can generate 1191445bc899bSmrg# our stamp files there. 1191545bc899bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1191645bc899bSmrg[# Compute $1's index in $config_headers. 1191750f2e948Smrg_am_arg=$1 1191845bc899bSmrg_am_stamp_count=1 1191945bc899bSmrgfor _am_header in $config_headers :; do 1192045bc899bSmrg case $_am_header in 1192150f2e948Smrg $_am_arg | $_am_arg:* ) 1192245bc899bSmrg break ;; 1192345bc899bSmrg * ) 1192445bc899bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1192545bc899bSmrg esac 1192645bc899bSmrgdone 1192750f2e948Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1192845bc899bSmrg 11929f2408745Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1193045bc899bSmrg# 1193145bc899bSmrg# This file is free software; the Free Software Foundation 1193245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1193345bc899bSmrg# with or without modifications, as long as this notice is preserved. 1193445bc899bSmrg 1193545bc899bSmrg# AM_PROG_INSTALL_SH 1193645bc899bSmrg# ------------------ 1193745bc899bSmrg# Define $install_sh. 1193845bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1193945bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1194057ba8e8bSmrgif test x"${install_sh+set}" != xset; then 119413a925b30Smrg case $am_aux_dir in 119423a925b30Smrg *\ * | *\ *) 119433a925b30Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 119443a925b30Smrg *) 119453a925b30Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 119463a925b30Smrg esac 119473a925b30Smrgfi 11948c97b1c41SmrgAC_SUBST([install_sh])]) 1194945bc899bSmrg 11950f2408745Smrg# Copyright (C) 2003-2017 Free Software Foundation, Inc. 1195145bc899bSmrg# 1195245bc899bSmrg# This file is free software; the Free Software Foundation 1195345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1195445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1195545bc899bSmrg 1195645bc899bSmrg# Check whether the underlying file-system supports filenames 1195745bc899bSmrg# with a leading dot. For instance MS-DOS doesn't. 1195845bc899bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 1195945bc899bSmrg[rm -rf .tst 2>/dev/null 1196045bc899bSmrgmkdir .tst 2>/dev/null 1196145bc899bSmrgif test -d .tst; then 1196245bc899bSmrg am__leading_dot=. 1196345bc899bSmrgelse 1196445bc899bSmrg am__leading_dot=_ 1196545bc899bSmrgfi 1196645bc899bSmrgrmdir .tst 2>/dev/null 1196745bc899bSmrgAC_SUBST([am__leading_dot])]) 1196845bc899bSmrg 1196945bc899bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1197045bc899bSmrg 11971f2408745Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1197245bc899bSmrg# 1197345bc899bSmrg# This file is free software; the Free Software Foundation 1197445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1197545bc899bSmrg# with or without modifications, as long as this notice is preserved. 1197645bc899bSmrg 1197745bc899bSmrg# AM_MAKE_INCLUDE() 1197845bc899bSmrg# ----------------- 1197945bc899bSmrg# Check to see how make treats includes. 1198045bc899bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 1198145bc899bSmrg[am_make=${MAKE-make} 1198245bc899bSmrgcat > confinc << 'END' 1198345bc899bSmrgam__doit: 119843a925b30Smrg @echo this is the am__doit target 1198545bc899bSmrg.PHONY: am__doit 1198645bc899bSmrgEND 1198745bc899bSmrg# If we don't find an include directive, just comment out the code. 1198845bc899bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1198945bc899bSmrgam__include="#" 1199045bc899bSmrgam__quote= 1199145bc899bSmrg_am_result=none 1199245bc899bSmrg# First try GNU make style include. 1199345bc899bSmrgecho "include confinc" > confmf 11994c97b1c41Smrg# Ignore all kinds of additional output from 'make'. 119953a925b30Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 119963a925b30Smrg*the\ am__doit\ target*) 119973a925b30Smrg am__include=include 119983a925b30Smrg am__quote= 119993a925b30Smrg _am_result=GNU 120003a925b30Smrg ;; 120013a925b30Smrgesac 1200245bc899bSmrg# Now try BSD make style include. 1200345bc899bSmrgif test "$am__include" = "#"; then 1200445bc899bSmrg echo '.include "confinc"' > confmf 120053a925b30Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 120063a925b30Smrg *the\ am__doit\ target*) 120073a925b30Smrg am__include=.include 120083a925b30Smrg am__quote="\"" 120093a925b30Smrg _am_result=BSD 120103a925b30Smrg ;; 120113a925b30Smrg esac 1201245bc899bSmrgfi 1201345bc899bSmrgAC_SUBST([am__include]) 1201445bc899bSmrgAC_SUBST([am__quote]) 1201545bc899bSmrgAC_MSG_RESULT([$_am_result]) 1201645bc899bSmrgrm -f confinc confmf 1201745bc899bSmrg]) 1201845bc899bSmrg 1201945bc899bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1202045bc899bSmrg 12021f2408745Smrg# Copyright (C) 1997-2017 Free Software Foundation, Inc. 1202245bc899bSmrg# 1202345bc899bSmrg# This file is free software; the Free Software Foundation 1202445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1202545bc899bSmrg# with or without modifications, as long as this notice is preserved. 1202645bc899bSmrg 1202745bc899bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 1202845bc899bSmrg# ------------------------------ 1202945bc899bSmrgAC_DEFUN([AM_MISSING_PROG], 1203045bc899bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1203145bc899bSmrg$1=${$1-"${am_missing_run}$2"} 1203245bc899bSmrgAC_SUBST($1)]) 1203345bc899bSmrg 1203445bc899bSmrg# AM_MISSING_HAS_RUN 1203545bc899bSmrg# ------------------ 12036c97b1c41Smrg# Define MISSING if not defined so far and test if it is modern enough. 12037c97b1c41Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 1203845bc899bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1203945bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1204050f2e948SmrgAC_REQUIRE_AUX_FILE([missing])dnl 120413a925b30Smrgif test x"${MISSING+set}" != xset; then 120423a925b30Smrg case $am_aux_dir in 120433a925b30Smrg *\ * | *\ *) 120443a925b30Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 120453a925b30Smrg *) 120463a925b30Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 120473a925b30Smrg esac 120483a925b30Smrgfi 1204945bc899bSmrg# Use eval to expand $SHELL 12050c97b1c41Smrgif eval "$MISSING --is-lightweight"; then 12051c97b1c41Smrg am_missing_run="$MISSING " 1205245bc899bSmrgelse 1205345bc899bSmrg am_missing_run= 12054c97b1c41Smrg AC_MSG_WARN(['missing' script is too old or missing]) 1205545bc899bSmrgfi 1205645bc899bSmrg]) 1205745bc899bSmrg 1205845bc899bSmrg# Helper functions for option handling. -*- Autoconf -*- 1205945bc899bSmrg 12060f2408745Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1206145bc899bSmrg# 1206245bc899bSmrg# This file is free software; the Free Software Foundation 1206345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1206445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1206545bc899bSmrg 1206645bc899bSmrg# _AM_MANGLE_OPTION(NAME) 1206745bc899bSmrg# ----------------------- 1206845bc899bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 1206945bc899bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1207045bc899bSmrg 1207145bc899bSmrg# _AM_SET_OPTION(NAME) 12072b40a6198Smrg# -------------------- 1207345bc899bSmrg# Set option NAME. Presently that only means defining a flag for this option. 1207445bc899bSmrgAC_DEFUN([_AM_SET_OPTION], 12075c97b1c41Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1207645bc899bSmrg 1207745bc899bSmrg# _AM_SET_OPTIONS(OPTIONS) 12078b40a6198Smrg# ------------------------ 1207945bc899bSmrg# OPTIONS is a space-separated list of Automake options. 1208045bc899bSmrgAC_DEFUN([_AM_SET_OPTIONS], 1208150f2e948Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1208245bc899bSmrg 1208345bc899bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1208445bc899bSmrg# ------------------------------------------- 1208545bc899bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1208645bc899bSmrgAC_DEFUN([_AM_IF_OPTION], 1208745bc899bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1208845bc899bSmrg 12089f2408745Smrg# Copyright (C) 1999-2017 Free Software Foundation, Inc. 1209057ba8e8bSmrg# 1209157ba8e8bSmrg# This file is free software; the Free Software Foundation 1209257ba8e8bSmrg# gives unlimited permission to copy and/or distribute it, 1209357ba8e8bSmrg# with or without modifications, as long as this notice is preserved. 1209457ba8e8bSmrg 1209557ba8e8bSmrg# _AM_PROG_CC_C_O 1209657ba8e8bSmrg# --------------- 1209757ba8e8bSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1209857ba8e8bSmrg# to automatically call this. 1209957ba8e8bSmrgAC_DEFUN([_AM_PROG_CC_C_O], 1210057ba8e8bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1210157ba8e8bSmrgAC_REQUIRE_AUX_FILE([compile])dnl 1210257ba8e8bSmrgAC_LANG_PUSH([C])dnl 1210357ba8e8bSmrgAC_CACHE_CHECK( 1210457ba8e8bSmrg [whether $CC understands -c and -o together], 1210557ba8e8bSmrg [am_cv_prog_cc_c_o], 1210657ba8e8bSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1210757ba8e8bSmrg # Make sure it works both with $CC and with simple cc. 1210857ba8e8bSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 1210957ba8e8bSmrg # compilers refuse to overwrite an existing .o file with -o, 1211057ba8e8bSmrg # though they will create one. 1211157ba8e8bSmrg am_cv_prog_cc_c_o=yes 1211257ba8e8bSmrg for am_i in 1 2; do 1211357ba8e8bSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1211457ba8e8bSmrg && test -f conftest2.$ac_objext; then 1211557ba8e8bSmrg : OK 1211657ba8e8bSmrg else 1211757ba8e8bSmrg am_cv_prog_cc_c_o=no 1211857ba8e8bSmrg break 1211957ba8e8bSmrg fi 1212057ba8e8bSmrg done 1212157ba8e8bSmrg rm -f core conftest* 1212257ba8e8bSmrg unset am_i]) 1212357ba8e8bSmrgif test "$am_cv_prog_cc_c_o" != yes; then 1212457ba8e8bSmrg # Losing compiler, so override with the script. 1212557ba8e8bSmrg # FIXME: It is wrong to rewrite CC. 1212657ba8e8bSmrg # But if we don't then we get into trouble of one sort or another. 1212757ba8e8bSmrg # A longer-term fix would be to have automake use am__CC in this case, 1212857ba8e8bSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1212957ba8e8bSmrg CC="$am_aux_dir/compile $CC" 1213057ba8e8bSmrgfi 1213157ba8e8bSmrgAC_LANG_POP([C])]) 1213257ba8e8bSmrg 1213357ba8e8bSmrg# For backward compatibility. 1213457ba8e8bSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1213557ba8e8bSmrg 12136f2408745Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1213757ba8e8bSmrg# 1213857ba8e8bSmrg# This file is free software; the Free Software Foundation 1213957ba8e8bSmrg# gives unlimited permission to copy and/or distribute it, 1214057ba8e8bSmrg# with or without modifications, as long as this notice is preserved. 1214157ba8e8bSmrg 1214257ba8e8bSmrg# AM_RUN_LOG(COMMAND) 1214357ba8e8bSmrg# ------------------- 1214457ba8e8bSmrg# Run COMMAND, save the exit status in ac_status, and log it. 1214557ba8e8bSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1214657ba8e8bSmrgAC_DEFUN([AM_RUN_LOG], 1214757ba8e8bSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1214857ba8e8bSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1214957ba8e8bSmrg ac_status=$? 1215057ba8e8bSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1215157ba8e8bSmrg (exit $ac_status); }]) 1215257ba8e8bSmrg 1215345bc899bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1215445bc899bSmrg 12155f2408745Smrg# Copyright (C) 1996-2017 Free Software Foundation, Inc. 1215645bc899bSmrg# 1215745bc899bSmrg# This file is free software; the Free Software Foundation 1215845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1215945bc899bSmrg# with or without modifications, as long as this notice is preserved. 1216045bc899bSmrg 1216145bc899bSmrg# AM_SANITY_CHECK 1216245bc899bSmrg# --------------- 1216345bc899bSmrgAC_DEFUN([AM_SANITY_CHECK], 1216445bc899bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 121653a925b30Smrg# Reject unsafe characters in $srcdir or the absolute working directory 121663a925b30Smrg# name. Accept space and tab only in the latter. 121673a925b30Smrgam_lf=' 121683a925b30Smrg' 121693a925b30Smrgcase `pwd` in 121703a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 121713a925b30Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 121723a925b30Smrgesac 121733a925b30Smrgcase $srcdir in 121743a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12175c97b1c41Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 121763a925b30Smrgesac 121773a925b30Smrg 12178c97b1c41Smrg# Do 'set' in a subshell so we don't clobber the current shell's 1217945bc899bSmrg# arguments. Must try -L first in case configure is actually a 1218045bc899bSmrg# symlink; some systems play weird games with the mod time of symlinks 1218145bc899bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 1218245bc899bSmrg# directory). 1218345bc899bSmrgif ( 12184c97b1c41Smrg am_has_slept=no 12185c97b1c41Smrg for am_try in 1 2; do 12186c97b1c41Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 12187c97b1c41Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12188c97b1c41Smrg if test "$[*]" = "X"; then 12189c97b1c41Smrg # -L didn't work. 12190c97b1c41Smrg set X `ls -t "$srcdir/configure" conftest.file` 12191c97b1c41Smrg fi 12192c97b1c41Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12193c97b1c41Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12194c97b1c41Smrg 12195c97b1c41Smrg # If neither matched, then we have a broken ls. This can happen 12196c97b1c41Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12197c97b1c41Smrg # broken ls alias from the environment. This has actually 12198c97b1c41Smrg # happened. Such a system could not be considered "sane". 12199c97b1c41Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12200c97b1c41Smrg alias in your environment]) 12201c97b1c41Smrg fi 12202c97b1c41Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 12203c97b1c41Smrg break 12204c97b1c41Smrg fi 12205c97b1c41Smrg # Just in case. 12206c97b1c41Smrg sleep 1 12207c97b1c41Smrg am_has_slept=yes 12208c97b1c41Smrg done 1220945bc899bSmrg test "$[2]" = conftest.file 1221045bc899bSmrg ) 1221145bc899bSmrgthen 1221245bc899bSmrg # Ok. 1221345bc899bSmrg : 1221445bc899bSmrgelse 1221545bc899bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 1221645bc899bSmrgCheck your system clock]) 1221745bc899bSmrgfi 12218c97b1c41SmrgAC_MSG_RESULT([yes]) 12219c97b1c41Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 12220c97b1c41Smrg# generated files are strictly newer. 12221c97b1c41Smrgam_sleep_pid= 12222c97b1c41Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 12223c97b1c41Smrg ( sleep 1 ) & 12224c97b1c41Smrg am_sleep_pid=$! 12225c97b1c41Smrgfi 12226c97b1c41SmrgAC_CONFIG_COMMANDS_PRE( 12227c97b1c41Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 12228c97b1c41Smrg if test -n "$am_sleep_pid"; then 12229c97b1c41Smrg # Hide warnings about reused PIDs. 12230c97b1c41Smrg wait $am_sleep_pid 2>/dev/null 12231c97b1c41Smrg fi 12232c97b1c41Smrg AC_MSG_RESULT([done])]) 12233c97b1c41Smrgrm -f conftest.file 12234c97b1c41Smrg]) 1223545bc899bSmrg 12236f2408745Smrg# Copyright (C) 2009-2017 Free Software Foundation, Inc. 122375592a31fSmrg# 122385592a31fSmrg# This file is free software; the Free Software Foundation 122395592a31fSmrg# gives unlimited permission to copy and/or distribute it, 122405592a31fSmrg# with or without modifications, as long as this notice is preserved. 122415592a31fSmrg 122425592a31fSmrg# AM_SILENT_RULES([DEFAULT]) 122435592a31fSmrg# -------------------------- 122445592a31fSmrg# Enable less verbose build rules; with the default set to DEFAULT 12245c97b1c41Smrg# ("yes" being less verbose, "no" or empty being verbose). 122465592a31fSmrgAC_DEFUN([AM_SILENT_RULES], 12247c97b1c41Smrg[AC_ARG_ENABLE([silent-rules], [dnl 12248c97b1c41SmrgAS_HELP_STRING( 12249c97b1c41Smrg [--enable-silent-rules], 12250c97b1c41Smrg [less verbose build output (undo: "make V=1")]) 12251c97b1c41SmrgAS_HELP_STRING( 12252c97b1c41Smrg [--disable-silent-rules], 12253c97b1c41Smrg [verbose build output (undo: "make V=0")])dnl 12254c97b1c41Smrg]) 12255c97b1c41Smrgcase $enable_silent_rules in @%:@ ((( 12256c97b1c41Smrg yes) AM_DEFAULT_VERBOSITY=0;; 12257c97b1c41Smrg no) AM_DEFAULT_VERBOSITY=1;; 12258c97b1c41Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 122595592a31fSmrgesac 12260b40a6198Smrgdnl 12261c97b1c41Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12262b40a6198Smrgdnl do not support nested variable expansions. 12263b40a6198Smrgdnl See automake bug#9928 and bug#10237. 12264b40a6198Smrgam_make=${MAKE-make} 12265b40a6198SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12266b40a6198Smrg [am_cv_make_support_nested_variables], 12267b40a6198Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12268b40a6198SmrgBAR0=false 12269b40a6198SmrgBAR1=true 12270b40a6198SmrgV=1 12271b40a6198Smrgam__doit: 12272b40a6198Smrg @$(TRUE) 12273b40a6198Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12274b40a6198Smrg am_cv_make_support_nested_variables=yes 12275b40a6198Smrgelse 12276b40a6198Smrg am_cv_make_support_nested_variables=no 12277b40a6198Smrgfi]) 12278b40a6198Smrgif test $am_cv_make_support_nested_variables = yes; then 12279c97b1c41Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12280b40a6198Smrg AM_V='$(V)' 12281b40a6198Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12282b40a6198Smrgelse 12283b40a6198Smrg AM_V=$AM_DEFAULT_VERBOSITY 12284b40a6198Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12285b40a6198Smrgfi 12286b40a6198SmrgAC_SUBST([AM_V])dnl 12287b40a6198SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12288b40a6198SmrgAC_SUBST([AM_DEFAULT_V])dnl 12289b40a6198SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 122905592a31fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 122915592a31fSmrgAM_BACKSLASH='\' 122925592a31fSmrgAC_SUBST([AM_BACKSLASH])dnl 122935592a31fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 122945592a31fSmrg]) 122955592a31fSmrg 12296f2408745Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1229745bc899bSmrg# 1229845bc899bSmrg# This file is free software; the Free Software Foundation 1229945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1230045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1230145bc899bSmrg 1230245bc899bSmrg# AM_PROG_INSTALL_STRIP 1230345bc899bSmrg# --------------------- 12304c97b1c41Smrg# One issue with vendor 'install' (even GNU) is that you can't 1230545bc899bSmrg# specify the program used to strip binaries. This is especially 1230645bc899bSmrg# annoying in cross-compiling environments, where the build's strip 1230745bc899bSmrg# is unlikely to handle the host's binaries. 1230845bc899bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12309c97b1c41Smrg# always use install-sh in "make install-strip", and initialize 1231045bc899bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 1231145bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1231245bc899bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12313c97b1c41Smrg# Installed binaries are usually stripped using 'strip' when the user 12314c97b1c41Smrg# run "make install-strip". However 'strip' might not be the right 1231545bc899bSmrg# tool to use in cross-compilation environments, therefore Automake 12316c97b1c41Smrg# will honor the 'STRIP' environment variable to overrule this program. 12317c97b1c41Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1231845bc899bSmrgif test "$cross_compiling" != no; then 1231945bc899bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 1232045bc899bSmrgfi 1232150f2e948SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1232245bc899bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1232345bc899bSmrg 12324f2408745Smrg# Copyright (C) 2006-2017 Free Software Foundation, Inc. 1232550f2e948Smrg# 1232650f2e948Smrg# This file is free software; the Free Software Foundation 1232750f2e948Smrg# gives unlimited permission to copy and/or distribute it, 1232850f2e948Smrg# with or without modifications, as long as this notice is preserved. 1232950f2e948Smrg 1233050f2e948Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1233150f2e948Smrg# --------------------------- 1233250f2e948Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1233350f2e948Smrg# This macro is traced by Automake. 1233450f2e948SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1233550f2e948Smrg 123363a925b30Smrg# AM_SUBST_NOTMAKE(VARIABLE) 12337b40a6198Smrg# -------------------------- 123383a925b30Smrg# Public sister of _AM_SUBST_NOTMAKE. 123393a925b30SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 123403a925b30Smrg 1234145bc899bSmrg# Check how to create a tarball. -*- Autoconf -*- 1234245bc899bSmrg 12343f2408745Smrg# Copyright (C) 2004-2017 Free Software Foundation, Inc. 1234445bc899bSmrg# 1234545bc899bSmrg# This file is free software; the Free Software Foundation 1234645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1234745bc899bSmrg# with or without modifications, as long as this notice is preserved. 1234845bc899bSmrg 1234945bc899bSmrg# _AM_PROG_TAR(FORMAT) 1235045bc899bSmrg# -------------------- 1235145bc899bSmrg# Check how to create a tarball in format FORMAT. 12352c97b1c41Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1235345bc899bSmrg# 1235445bc899bSmrg# Substitute a variable $(am__tar) that is a command 1235545bc899bSmrg# writing to stdout a FORMAT-tarball containing the directory 1235645bc899bSmrg# $tardir. 1235745bc899bSmrg# tardir=directory && $(am__tar) > result.tar 1235845bc899bSmrg# 1235945bc899bSmrg# Substitute a variable $(am__untar) that extract such 1236045bc899bSmrg# a tarball read from stdin. 1236145bc899bSmrg# $(am__untar) < result.tar 12362c97b1c41Smrg# 1236345bc899bSmrgAC_DEFUN([_AM_PROG_TAR], 12364b40a6198Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12365b40a6198Smrg# in the wild :-( We should find a proper way to deprecate it ... 12366b40a6198SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 12367c97b1c41Smrg 12368c97b1c41Smrg# We'll loop over all known methods to create a tar archive until one works. 1236945bc899bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1237045bc899bSmrg 12371c97b1c41Smrgm4_if([$1], [v7], 12372c97b1c41Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12373c97b1c41Smrg 12374c97b1c41Smrg [m4_case([$1], 12375c97b1c41Smrg [ustar], 12376c97b1c41Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12377c97b1c41Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 12378c97b1c41Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12379c97b1c41Smrg # and bug#13588). 12380c97b1c41Smrg am_max_uid=2097151 # 2^21 - 1 12381c97b1c41Smrg am_max_gid=$am_max_uid 12382c97b1c41Smrg # The $UID and $GID variables are not portable, so we need to resort 12383c97b1c41Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12384c97b1c41Smrg # below are definitely unexpected, so allow the users to see them 12385c97b1c41Smrg # (that is, avoid stderr redirection). 12386c97b1c41Smrg am_uid=`id -u || echo unknown` 12387c97b1c41Smrg am_gid=`id -g || echo unknown` 12388c97b1c41Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12389c97b1c41Smrg if test $am_uid -le $am_max_uid; then 12390c97b1c41Smrg AC_MSG_RESULT([yes]) 12391c97b1c41Smrg else 12392c97b1c41Smrg AC_MSG_RESULT([no]) 12393c97b1c41Smrg _am_tools=none 12394c97b1c41Smrg fi 12395c97b1c41Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12396c97b1c41Smrg if test $am_gid -le $am_max_gid; then 12397c97b1c41Smrg AC_MSG_RESULT([yes]) 12398c97b1c41Smrg else 12399c97b1c41Smrg AC_MSG_RESULT([no]) 12400c97b1c41Smrg _am_tools=none 12401c97b1c41Smrg fi], 1240245bc899bSmrg 12403c97b1c41Smrg [pax], 12404c97b1c41Smrg [], 12405c97b1c41Smrg 12406c97b1c41Smrg [m4_fatal([Unknown tar format])]) 12407c97b1c41Smrg 12408c97b1c41Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 12409c97b1c41Smrg 12410c97b1c41Smrg # Go ahead even if we have the value already cached. We do so because we 12411c97b1c41Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 12412c97b1c41Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12413c97b1c41Smrg 12414c97b1c41Smrg for _am_tool in $_am_tools; do 12415c97b1c41Smrg case $_am_tool in 12416c97b1c41Smrg gnutar) 12417c97b1c41Smrg for _am_tar in tar gnutar gtar; do 12418c97b1c41Smrg AM_RUN_LOG([$_am_tar --version]) && break 12419c97b1c41Smrg done 12420c97b1c41Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12421c97b1c41Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12422c97b1c41Smrg am__untar="$_am_tar -xf -" 12423c97b1c41Smrg ;; 12424c97b1c41Smrg plaintar) 12425c97b1c41Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 12426c97b1c41Smrg # ustar tarball either. 12427c97b1c41Smrg (tar --version) >/dev/null 2>&1 && continue 12428c97b1c41Smrg am__tar='tar chf - "$$tardir"' 12429c97b1c41Smrg am__tar_='tar chf - "$tardir"' 12430c97b1c41Smrg am__untar='tar xf -' 12431c97b1c41Smrg ;; 12432c97b1c41Smrg pax) 12433c97b1c41Smrg am__tar='pax -L -x $1 -w "$$tardir"' 12434c97b1c41Smrg am__tar_='pax -L -x $1 -w "$tardir"' 12435c97b1c41Smrg am__untar='pax -r' 12436c97b1c41Smrg ;; 12437c97b1c41Smrg cpio) 12438c97b1c41Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12439c97b1c41Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12440c97b1c41Smrg am__untar='cpio -i -H $1 -d' 12441c97b1c41Smrg ;; 12442c97b1c41Smrg none) 12443c97b1c41Smrg am__tar=false 12444c97b1c41Smrg am__tar_=false 12445c97b1c41Smrg am__untar=false 12446c97b1c41Smrg ;; 12447c97b1c41Smrg esac 12448c97b1c41Smrg 12449c97b1c41Smrg # If the value was cached, stop now. We just wanted to have am__tar 12450c97b1c41Smrg # and am__untar set. 12451c97b1c41Smrg test -n "${am_cv_prog_tar_$1}" && break 12452c97b1c41Smrg 12453c97b1c41Smrg # tar/untar a dummy directory, and stop if the command works. 12454c97b1c41Smrg rm -rf conftest.dir 12455c97b1c41Smrg mkdir conftest.dir 12456c97b1c41Smrg echo GrepMe > conftest.dir/file 12457c97b1c41Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12458c97b1c41Smrg rm -rf conftest.dir 12459c97b1c41Smrg if test -s conftest.tar; then 12460c97b1c41Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 12461c97b1c41Smrg AM_RUN_LOG([cat conftest.dir/file]) 12462c97b1c41Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12463c97b1c41Smrg fi 12464c97b1c41Smrg done 1246545bc899bSmrg rm -rf conftest.dir 1246645bc899bSmrg 12467c97b1c41Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12468c97b1c41Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12469c97b1c41Smrg 1247045bc899bSmrgAC_SUBST([am__tar]) 1247145bc899bSmrgAC_SUBST([am__untar]) 1247245bc899bSmrg]) # _AM_PROG_TAR 1247345bc899bSmrg 12474