114210e8eSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 214210e8eSmrg 314210e8eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4c35d236eSmrg 5c35d236eSmrg# This file is free software; the Free Software Foundation 6c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 7c35d236eSmrg# with or without modifications, as long as this notice is preserved. 8c35d236eSmrg 9c35d236eSmrg# This program is distributed in the hope that it will be useful, 10c35d236eSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c35d236eSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c35d236eSmrg# PARTICULAR PURPOSE. 13c35d236eSmrg 1414210e8eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 154f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 164f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1714210e8eSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1814210e8eSmrg[m4_warning([this file was generated for autoconf 2.69. 194f6cd06fSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 204f6cd06fSmrgIf you have problems, you may need to regenerate the build system entirely. 2114210e8eSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 224f6cd06fSmrg 23c35d236eSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 241fb744b4Smrg# 2514210e8eSmrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 261fb744b4Smrg# Written by Gordon Matzigkeit, 1996 271fb744b4Smrg# 281fb744b4Smrg# This file is free software; the Free Software Foundation gives 291fb744b4Smrg# unlimited permission to copy and/or distribute it, with or without 301fb744b4Smrg# modifications, as long as this notice is preserved. 311fb744b4Smrg 321fb744b4Smrgm4_define([_LT_COPYING], [dnl 3314210e8eSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 3414210e8eSmrg# This is free software; see the source for copying conditions. There is NO 3514210e8eSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3614210e8eSmrg 3714210e8eSmrg# GNU Libtool is free software; you can redistribute it and/or modify 3814210e8eSmrg# it under the terms of the GNU General Public License as published by 3914210e8eSmrg# the Free Software Foundation; either version 2 of of the License, or 4014210e8eSmrg# (at your option) any later version. 411fb744b4Smrg# 4214210e8eSmrg# As a special exception to the GNU General Public License, if you 4314210e8eSmrg# distribute this file as part of a program or library that is built 4414210e8eSmrg# using GNU Libtool, you may include this file under the same 4514210e8eSmrg# distribution terms that you use for the rest of that program. 461fb744b4Smrg# 4714210e8eSmrg# GNU Libtool is distributed in the hope that it will be useful, but 4814210e8eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 491fb744b4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 501fb744b4Smrg# GNU General Public License for more details. 511fb744b4Smrg# 521fb744b4Smrg# You should have received a copy of the GNU General Public License 5314210e8eSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 541fb744b4Smrg]) 55c35d236eSmrg 5614210e8eSmrg# serial 58 LT_INIT 57c35d236eSmrg 58c35d236eSmrg 591fb744b4Smrg# LT_PREREQ(VERSION) 601fb744b4Smrg# ------------------ 611fb744b4Smrg# Complain and exit if this libtool version is less that VERSION. 621fb744b4Smrgm4_defun([LT_PREREQ], 631fb744b4Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 641fb744b4Smrg [m4_default([$3], 651fb744b4Smrg [m4_fatal([Libtool version $1 or higher is required], 661fb744b4Smrg 63)])], 671fb744b4Smrg [$2])]) 68f55e6a01Smrg 69f55e6a01Smrg 701fb744b4Smrg# _LT_CHECK_BUILDDIR 711fb744b4Smrg# ------------------ 721fb744b4Smrg# Complain if the absolute build directory name contains unusual characters 731fb744b4Smrgm4_defun([_LT_CHECK_BUILDDIR], 741fb744b4Smrg[case `pwd` in 751fb744b4Smrg *\ * | *\ *) 761fb744b4Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 771fb744b4Smrgesac 781fb744b4Smrg]) 791fb744b4Smrg 801fb744b4Smrg 811fb744b4Smrg# LT_INIT([OPTIONS]) 821fb744b4Smrg# ------------------ 831fb744b4SmrgAC_DEFUN([LT_INIT], 8414210e8eSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 851fb744b4SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 861fb744b4SmrgAC_BEFORE([$0], [LT_LANG])dnl 871fb744b4SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 881fb744b4SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 891fb744b4Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 901fb744b4Smrg 911fb744b4Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 921fb744b4Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 931fb744b4Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 941fb744b4Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 951fb744b4Smrgdnl unless we require an AC_DEFUNed macro: 961fb744b4SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 971fb744b4SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 981fb744b4SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 991fb744b4SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1001fb744b4Smrgm4_require([_LT_PROG_LTMAIN])dnl 1011fb744b4Smrg 1021fb744b4Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1031fb744b4Smrg 1041fb744b4Smrgdnl Parse OPTIONS 1051fb744b4Smrg_LT_SET_OPTIONS([$0], [$1]) 106c35d236eSmrg 107c35d236eSmrg# This can be used to rebuild libtool when needed 10814210e8eSmrgLIBTOOL_DEPS=$ltmain 109c35d236eSmrg 110c35d236eSmrg# Always use our own libtool. 111c35d236eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112c35d236eSmrgAC_SUBST(LIBTOOL)dnl 113c35d236eSmrg 1141fb744b4Smrg_LT_SETUP 115f55e6a01Smrg 1161fb744b4Smrg# Only expand once: 1171fb744b4Smrgm4_define([LT_INIT]) 1181fb744b4Smrg])# LT_INIT 119f55e6a01Smrg 1201fb744b4Smrg# Old names: 1211fb744b4SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1221fb744b4SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1231fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 1241fb744b4Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1251fb744b4Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1261fb744b4Smrg 1271fb744b4Smrg 12814210e8eSmrg# _LT_PREPARE_CC_BASENAME 12914210e8eSmrg# ----------------------- 13014210e8eSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 13114210e8eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 13214210e8eSmrgfunc_cc_basename () 13314210e8eSmrg{ 13414210e8eSmrg for cc_temp in @S|@*""; do 13514210e8eSmrg case $cc_temp in 13614210e8eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 13714210e8eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 13814210e8eSmrg \-*) ;; 13914210e8eSmrg *) break;; 14014210e8eSmrg esac 14114210e8eSmrg done 14214210e8eSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 14314210e8eSmrg} 14414210e8eSmrg])# _LT_PREPARE_CC_BASENAME 14514210e8eSmrg 14614210e8eSmrg 1471fb744b4Smrg# _LT_CC_BASENAME(CC) 1481fb744b4Smrg# ------------------- 14914210e8eSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 15014210e8eSmrg# but that macro is also expanded into generated libtool script, which 15114210e8eSmrg# arranges for $SED and $ECHO to be set by different means. 1521fb744b4Smrgm4_defun([_LT_CC_BASENAME], 15314210e8eSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 15414210e8eSmrgAC_REQUIRE([_LT_DECL_SED])dnl 15514210e8eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 15614210e8eSmrgfunc_cc_basename $1 15714210e8eSmrgcc_basename=$func_cc_basename_result 1581fb744b4Smrg]) 1591fb744b4Smrg 1601fb744b4Smrg 1611fb744b4Smrg# _LT_FILEUTILS_DEFAULTS 1621fb744b4Smrg# ---------------------- 1631fb744b4Smrg# It is okay to use these file commands and assume they have been set 16414210e8eSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1651fb744b4Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1661fb744b4Smrg[: ${CP="cp -f"} 1671fb744b4Smrg: ${MV="mv -f"} 1681fb744b4Smrg: ${RM="rm -f"} 1691fb744b4Smrg])# _LT_FILEUTILS_DEFAULTS 1701fb744b4Smrg 1711fb744b4Smrg 1721fb744b4Smrg# _LT_SETUP 1731fb744b4Smrg# --------- 1741fb744b4Smrgm4_defun([_LT_SETUP], 1751fb744b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176c35d236eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1771fb744b4SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1781fb744b4SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179518bcf38Smrg 1801fb744b4Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1811fb744b4Smrgdnl 1821fb744b4Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1831fb744b4Smrg_LT_DECL([], [host], [0])dnl 1841fb744b4Smrg_LT_DECL([], [host_os], [0])dnl 1851fb744b4Smrgdnl 1861fb744b4Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1871fb744b4Smrg_LT_DECL([], [build], [0])dnl 1881fb744b4Smrg_LT_DECL([], [build_os], [0])dnl 1891fb744b4Smrgdnl 1901fb744b4SmrgAC_REQUIRE([AC_PROG_CC])dnl 1911fb744b4SmrgAC_REQUIRE([LT_PATH_LD])dnl 1921fb744b4SmrgAC_REQUIRE([LT_PATH_NM])dnl 1931fb744b4Smrgdnl 194c35d236eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1951fb744b4Smrgtest -z "$LN_S" && LN_S="ln -s" 1961fb744b4Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197f55e6a01Smrgdnl 1981fb744b4SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1991fb744b4Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2001fb744b4Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2011fb744b4Smrgdnl 2021fb744b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2031fb744b4Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2041fb744b4Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2051fb744b4Smrgm4_require([_LT_CMD_RELOAD])dnl 2061fb744b4Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2071fb744b4Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2081fb744b4Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2091fb744b4Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2101fb744b4Smrgm4_require([_LT_WITH_SYSROOT])dnl 21114210e8eSmrgm4_require([_LT_CMD_TRUNCATE])dnl 2121fb744b4Smrg 2131fb744b4Smrg_LT_CONFIG_LIBTOOL_INIT([ 21414210e8eSmrg# See if we are running on zsh, and set the options that allow our 2151fb744b4Smrg# commands through without removal of \ escapes INIT. 21614210e8eSmrgif test -n "\${ZSH_VERSION+set}"; then 2171fb744b4Smrg setopt NO_GLOB_SUBST 2181fb744b4Smrgfi 2191fb744b4Smrg]) 22014210e8eSmrgif test -n "${ZSH_VERSION+set}"; then 2211fb744b4Smrg setopt NO_GLOB_SUBST 2221fb744b4Smrgfi 223f55e6a01Smrg 2241fb744b4Smrg_LT_CHECK_OBJDIR 2251fb744b4Smrg 2261fb744b4Smrgm4_require([_LT_TAG_COMPILER])dnl 227c35d236eSmrg 228c35d236eSmrgcase $host_os in 229c35d236eSmrgaix3*) 230c35d236eSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231c35d236eSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232c35d236eSmrg # vanish in a puff of smoke. 23314210e8eSmrg if test set != "${COLLECT_NAMES+set}"; then 234c35d236eSmrg COLLECT_NAMES= 235c35d236eSmrg export COLLECT_NAMES 236c35d236eSmrg fi 237c35d236eSmrg ;; 238c35d236eSmrgesac 239c35d236eSmrg 240c35d236eSmrg# Global variables: 2411fb744b4Smrgofile=libtool 242c35d236eSmrgcan_build_shared=yes 243c35d236eSmrg 24414210e8eSmrg# All known linkers require a '.a' archive for static linking (except MSVC, 245c35d236eSmrg# which needs '.lib'). 246c35d236eSmrglibext=a 247c35d236eSmrg 24814210e8eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249518bcf38Smrg 25014210e8eSmrgold_CC=$CC 25114210e8eSmrgold_CFLAGS=$CFLAGS 252c35d236eSmrg 253c35d236eSmrg# Set sane defaults for various variables 254c35d236eSmrgtest -z "$CC" && CC=cc 255c35d236eSmrgtest -z "$LTCC" && LTCC=$CC 256c35d236eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257c35d236eSmrgtest -z "$LD" && LD=ld 258c35d236eSmrgtest -z "$ac_objext" && ac_objext=o 259c35d236eSmrg 260c35d236eSmrg_LT_CC_BASENAME([$compiler]) 261c35d236eSmrg 262c35d236eSmrg# Only perform the check for file, if the check method requires it 2631fb744b4Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264c35d236eSmrgcase $deplibs_check_method in 265c35d236eSmrgfile_magic*) 266c35d236eSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2671fb744b4Smrg _LT_PATH_MAGIC 268c35d236eSmrg fi 269c35d236eSmrg ;; 270c35d236eSmrgesac 271c35d236eSmrg 2721fb744b4Smrg# Use C for the default configuration in the libtool script 2731fb744b4SmrgLT_SUPPORTED_TAG([CC]) 2741fb744b4Smrg_LT_LANG_C_CONFIG 2751fb744b4Smrg_LT_LANG_DEFAULT_CONFIG 2761fb744b4Smrg_LT_CONFIG_COMMANDS 2771fb744b4Smrg])# _LT_SETUP 278f55e6a01Smrg 279f55e6a01Smrg 2801fb744b4Smrg# _LT_PREPARE_SED_QUOTE_VARS 2811fb744b4Smrg# -------------------------- 2821fb744b4Smrg# Define a few sed substitution that help us do robust quoting. 2831fb744b4Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2841fb744b4Smrg[# Backslashify metacharacters that are still active within 2851fb744b4Smrg# double-quoted strings. 2861fb744b4Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287f55e6a01Smrg 2881fb744b4Smrg# Same as above, but do not quote variable references. 2891fb744b4Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290f55e6a01Smrg 2911fb744b4Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2921fb744b4Smrg# double_quote_subst'ed string. 2931fb744b4Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294f55e6a01Smrg 2951fb744b4Smrg# Sed substitution to delay expansion of an escaped single quote. 2961fb744b4Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297f55e6a01Smrg 2981fb744b4Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2991fb744b4Smrgno_glob_subst='s/\*/\\\*/g' 3001fb744b4Smrg]) 301c35d236eSmrg 3021fb744b4Smrg# _LT_PROG_LTMAIN 3031fb744b4Smrg# --------------- 30414210e8eSmrg# Note that this code is called both from 'configure', and 'config.status' 3051fb744b4Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 30614210e8eSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3071fb744b4Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3081fb744b4Smrgm4_defun([_LT_PROG_LTMAIN], 3091fb744b4Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3101fb744b4Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 31114210e8eSmrgltmain=$ac_aux_dir/ltmain.sh 3121fb744b4Smrg])# _LT_PROG_LTMAIN 313c35d236eSmrg 314c35d236eSmrg 315518bcf38Smrg 3161fb744b4Smrg# So that we can recreate a full libtool script including additional 3171fb744b4Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 31814210e8eSmrg# in macros and then make a single call at the end using the 'libtool' 3191fb744b4Smrg# label. 320518bcf38Smrg 321c35d236eSmrg 3221fb744b4Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3231fb744b4Smrg# ---------------------------------------- 3241fb744b4Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3251fb744b4Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3261fb744b4Smrg[m4_ifval([$1], 3271fb744b4Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3281fb744b4Smrg [$1 3291fb744b4Smrg])])]) 330c35d236eSmrg 3311fb744b4Smrg# Initialize. 3321fb744b4Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333c35d236eSmrg 334c35d236eSmrg 3351fb744b4Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3361fb744b4Smrg# ------------------------------ 3371fb744b4Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3381fb744b4Smrgm4_define([_LT_CONFIG_LIBTOOL], 3391fb744b4Smrg[m4_ifval([$1], 3401fb744b4Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3411fb744b4Smrg [$1 3421fb744b4Smrg])])]) 3431fb744b4Smrg 3441fb744b4Smrg# Initialize. 3451fb744b4Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3461fb744b4Smrg 3471fb744b4Smrg 3481fb744b4Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3491fb744b4Smrg# ----------------------------------------------------- 3501fb744b4Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3511fb744b4Smrg[_LT_CONFIG_LIBTOOL([$1]) 3521fb744b4Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3531fb744b4Smrg]) 354c35d236eSmrg 3554f6cd06fSmrg 3561fb744b4Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3571fb744b4Smrg# ----------------------------- 3581fb744b4Smrg# Add leading comment marks to the start of each line, and a trailing 3591fb744b4Smrg# full-stop to the whole comment if one is not present already. 3601fb744b4Smrgm4_define([_LT_FORMAT_COMMENT], 3611fb744b4Smrg[m4_ifval([$1], [ 3621fb744b4Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3631fb744b4Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3641fb744b4Smrg)]) 3651fb744b4Smrg 3661fb744b4Smrg 3671fb744b4Smrg 3681fb744b4Smrg 3691fb744b4Smrg 3701fb744b4Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3711fb744b4Smrg# ------------------------------------------------------------------- 3721fb744b4Smrg# CONFIGNAME is the name given to the value in the libtool script. 3731fb744b4Smrg# VARNAME is the (base) name used in the configure script. 3741fb744b4Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3751fb744b4Smrg# VARNAME. Any other value will be used directly. 3761fb744b4Smrgm4_define([_LT_DECL], 3771fb744b4Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3781fb744b4Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3791fb744b4Smrg [m4_ifval([$1], [$1], [$2])]) 3801fb744b4Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3811fb744b4Smrg m4_ifval([$4], 3821fb744b4Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3831fb744b4Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3841fb744b4Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3854f6cd06fSmrg]) 386c35d236eSmrg 387c35d236eSmrg 3881fb744b4Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3891fb744b4Smrg# -------------------------------------------------------- 3901fb744b4Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391c35d236eSmrg 392c35d236eSmrg 3931fb744b4Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3941fb744b4Smrg# ------------------------------------------------ 3951fb744b4Smrgm4_define([lt_decl_tag_varnames], 3961fb744b4Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 397c35d236eSmrg 398c35d236eSmrg 3991fb744b4Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4001fb744b4Smrg# --------------------------------------------------------- 4011fb744b4Smrgm4_define([_lt_decl_filter], 4021fb744b4Smrg[m4_case([$#], 4031fb744b4Smrg [0], [m4_fatal([$0: too few arguments: $#])], 4041fb744b4Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4051fb744b4Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4061fb744b4Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4071fb744b4Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4081fb744b4Smrg]) 409c35d236eSmrg 410c35d236eSmrg 4111fb744b4Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4121fb744b4Smrg# -------------------------------------------------- 4131fb744b4Smrgm4_define([lt_decl_quote_varnames], 4141fb744b4Smrg[_lt_decl_filter([value], [1], $@)]) 415c35d236eSmrg 416c35d236eSmrg 4171fb744b4Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4181fb744b4Smrg# --------------------------------------------------- 4191fb744b4Smrgm4_define([lt_decl_dquote_varnames], 4201fb744b4Smrg[_lt_decl_filter([value], [2], $@)]) 421c35d236eSmrg 422c35d236eSmrg 4231fb744b4Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4241fb744b4Smrg# --------------------------------------------------- 4251fb744b4Smrgm4_define([lt_decl_varnames_tagged], 4261fb744b4Smrg[m4_assert([$# <= 2])dnl 4271fb744b4Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4281fb744b4Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4291fb744b4Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4301fb744b4Smrgm4_define([_lt_decl_varnames_tagged], 4311fb744b4Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432c35d236eSmrg 433518bcf38Smrg 4341fb744b4Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4351fb744b4Smrg# ------------------------------------------------ 4361fb744b4Smrgm4_define([lt_decl_all_varnames], 4371fb744b4Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4381fb744b4Smrg m4_if([$2], [], 4391fb744b4Smrg m4_quote(lt_decl_varnames), 4401fb744b4Smrg m4_quote(m4_shift($@))))[]dnl 4411fb744b4Smrg]) 4421fb744b4Smrgm4_define([_lt_decl_all_varnames], 4431fb744b4Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4441fb744b4Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4451fb744b4Smrg]) 446c35d236eSmrg 447c35d236eSmrg 4481fb744b4Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4491fb744b4Smrg# ------------------------------------ 45014210e8eSmrg# Quote a variable value, and forward it to 'config.status' so that its 45114210e8eSmrg# declaration there will have the same value as in 'configure'. VARNAME 4521fb744b4Smrg# must have a single quote delimited value for this to work. 4531fb744b4Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4541fb744b4Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455c35d236eSmrg 456c35d236eSmrg 4571fb744b4Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4581fb744b4Smrg# ------------------------------ 4591fb744b4Smrg# We delimit libtool config variables with single quotes, so when 4601fb744b4Smrg# we write them to config.status, we have to be sure to quote all 4611fb744b4Smrg# embedded single quotes properly. In configure, this macro expands 4621fb744b4Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4631fb744b4Smrg# 4641fb744b4Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4651fb744b4Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4661fb744b4Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4671fb744b4Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468c35d236eSmrg 4691fb744b4Smrg 4701fb744b4Smrg# _LT_LIBTOOL_TAGS 4711fb744b4Smrg# ---------------- 4721fb744b4Smrg# Output comment and list of tags supported by the script 4731fb744b4Smrgm4_defun([_LT_LIBTOOL_TAGS], 4741fb744b4Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 47514210e8eSmrgavailable_tags='_LT_TAGS'dnl 4761fb744b4Smrg]) 4771fb744b4Smrg 4781fb744b4Smrg 4791fb744b4Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4801fb744b4Smrg# ----------------------------------- 4811fb744b4Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4821fb744b4Smrg# expand to a commented shell variable setting: 4831fb744b4Smrg# 4841fb744b4Smrg# # Some comment about what VAR is for. 4851fb744b4Smrg# visible_name=$lt_internal_name 4861fb744b4Smrgm4_define([_LT_LIBTOOL_DECLARE], 4871fb744b4Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4881fb744b4Smrg [description])))[]dnl 4891fb744b4Smrgm4_pushdef([_libtool_name], 4901fb744b4Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4911fb744b4Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4921fb744b4Smrg [0], [_libtool_name=[$]$1], 4931fb744b4Smrg [1], [_libtool_name=$lt_[]$1], 4941fb744b4Smrg [2], [_libtool_name=$lt_[]$1], 4951fb744b4Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4961fb744b4Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4971fb744b4Smrg]) 4981fb744b4Smrg 4991fb744b4Smrg 5001fb744b4Smrg# _LT_LIBTOOL_CONFIG_VARS 5011fb744b4Smrg# ----------------------- 5021fb744b4Smrg# Produce commented declarations of non-tagged libtool config variables 50314210e8eSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5041fb744b4Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5051fb744b4Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5061fb744b4Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5071fb744b4Smrg[m4_foreach([_lt_var], 5081fb744b4Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5091fb744b4Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5101fb744b4Smrg 5111fb744b4Smrg 5121fb744b4Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5131fb744b4Smrg# ------------------------- 5141fb744b4Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5151fb744b4Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5161fb744b4Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5171fb744b4Smrg 5181fb744b4Smrg 5191fb744b4Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5201fb744b4Smrg# ------------------------------ 5211fb744b4Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5221fb744b4Smrg 5231fb744b4Smrg 5241fb744b4Smrg# _LT_CONFIG_COMMANDS 5251fb744b4Smrg# ------------------- 5261fb744b4Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5271fb744b4Smrg# variables for single and double quote escaping we saved from calls 5281fb744b4Smrg# to _LT_DECL, we can put quote escaped variables declarations 52914210e8eSmrg# into 'config.status', and then the shell code to quote escape them in 53014210e8eSmrg# for loops in 'config.status'. Finally, any additional code accumulated 5311fb744b4Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5321fb744b4Smrgm4_defun([_LT_CONFIG_COMMANDS], 5331fb744b4Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5341fb744b4Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5351fb744b4Smrg dnl instead of duplicating it all over again into config.status, 5361fb744b4Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5371fb744b4Smrg dnl needs to know what name is stored there: 5381fb744b4Smrg [AC_CONFIG_COMMANDS([libtool], 5391fb744b4Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5401fb744b4Smrg dnl If the libtool generation code is destined for config.status, 5411fb744b4Smrg dnl expand the accumulated commands and init code now: 5421fb744b4Smrg [AC_CONFIG_COMMANDS([libtool], 5431fb744b4Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5441fb744b4Smrg])#_LT_CONFIG_COMMANDS 5451fb744b4Smrg 5461fb744b4Smrg 5471fb744b4Smrg# Initialize. 5481fb744b4Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5491fb744b4Smrg[ 5501fb744b4Smrg 5511fb744b4Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5521fb744b4Smrg# if CDPATH is set. 5531fb744b4Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5541fb744b4Smrg 5551fb744b4Smrgsed_quote_subst='$sed_quote_subst' 5561fb744b4Smrgdouble_quote_subst='$double_quote_subst' 5571fb744b4Smrgdelay_variable_subst='$delay_variable_subst' 5581fb744b4Smrg_LT_CONFIG_STATUS_DECLARATIONS 5591fb744b4SmrgLTCC='$LTCC' 5601fb744b4SmrgLTCFLAGS='$LTCFLAGS' 5611fb744b4Smrgcompiler='$compiler_DEFAULT' 5621fb744b4Smrg 5631fb744b4Smrg# A function that is used when there is no print builtin or printf. 5641fb744b4Smrgfunc_fallback_echo () 5651fb744b4Smrg{ 5661fb744b4Smrg eval 'cat <<_LTECHO_EOF 5671fb744b4Smrg\$[]1 5681fb744b4Smrg_LTECHO_EOF' 5691fb744b4Smrg} 5701fb744b4Smrg 5711fb744b4Smrg# Quote evaled strings. 5721fb744b4Smrgfor var in lt_decl_all_varnames([[ \ 5731fb744b4Smrg]], lt_decl_quote_varnames); do 5741fb744b4Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5751fb744b4Smrg *[[\\\\\\\`\\"\\\$]]*) 57614210e8eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577518bcf38Smrg ;; 5781fb744b4Smrg *) 5791fb744b4Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580518bcf38Smrg ;; 581518bcf38Smrg esac 5821fb744b4Smrgdone 583c35d236eSmrg 5841fb744b4Smrg# Double-quote double-evaled strings. 5851fb744b4Smrgfor var in lt_decl_all_varnames([[ \ 5861fb744b4Smrg]], lt_decl_dquote_varnames); do 5871fb744b4Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5881fb744b4Smrg *[[\\\\\\\`\\"\\\$]]*) 58914210e8eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590518bcf38Smrg ;; 5911fb744b4Smrg *) 5921fb744b4Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593518bcf38Smrg ;; 594c35d236eSmrg esac 5951fb744b4Smrgdone 596c35d236eSmrg 5971fb744b4Smrg_LT_OUTPUT_LIBTOOL_INIT 5981fb744b4Smrg]) 599518bcf38Smrg 6001fb744b4Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 6011fb744b4Smrg# ------------------------------------ 6021fb744b4Smrg# Generate a child script FILE with all initialization necessary to 6031fb744b4Smrg# reuse the environment learned by the parent script, and make the 6041fb744b4Smrg# file executable. If COMMENT is supplied, it is inserted after the 60514210e8eSmrg# '#!' sequence but before initialization text begins. After this 6061fb744b4Smrg# macro, additional text can be appended to FILE to form the body of 6071fb744b4Smrg# the child script. The macro ends with non-zero status if the 6081fb744b4Smrg# file could not be fully written (such as if the disk is full). 6091fb744b4Smrgm4_ifdef([AS_INIT_GENERATED], 6101fb744b4Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6111fb744b4Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6121fb744b4Smrg[m4_require([AS_PREPARE])]dnl 6131fb744b4Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6141fb744b4Smrg[lt_write_fail=0 6151fb744b4Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6161fb744b4Smrg#! $SHELL 6171fb744b4Smrg# Generated by $as_me. 6181fb744b4Smrg$2 6191fb744b4SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6201fb744b4Smrgexport SHELL 6211fb744b4Smrg_ASEOF 6221fb744b4Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6231fb744b4SmrgAS_SHELL_SANITIZE 6241fb744b4Smrg_AS_PREPARE 6251fb744b4Smrgexec AS_MESSAGE_FD>&1 6261fb744b4Smrg_ASEOF 62714210e8eSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6281fb744b4Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6291fb744b4Smrg 6301fb744b4Smrg# LT_OUTPUT 6311fb744b4Smrg# --------- 6321fb744b4Smrg# This macro allows early generation of the libtool script (before 6331fb744b4Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6341fb744b4Smrg# tests. 6351fb744b4SmrgAC_DEFUN([LT_OUTPUT], 6361fb744b4Smrg[: ${CONFIG_LT=./config.lt} 6371fb744b4SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6381fb744b4Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6391fb744b4Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6401fb744b4Smrg 6411fb744b4Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6421fb744b4Smrglt_cl_silent=false 6431fb744b4Smrgexec AS_MESSAGE_LOG_FD>>config.log 6441fb744b4Smrg{ 6451fb744b4Smrg echo 6461fb744b4Smrg AS_BOX([Running $as_me.]) 6471fb744b4Smrg} >&AS_MESSAGE_LOG_FD 648c35d236eSmrg 6491fb744b4Smrglt_cl_help="\ 65014210e8eSmrg'$as_me' creates a local libtool stub from the current configuration, 6511fb744b4Smrgfor use in further configure time tests before the real libtool is 6521fb744b4Smrggenerated. 653f55e6a01Smrg 6541fb744b4SmrgUsage: $[0] [[OPTIONS]] 655c35d236eSmrg 6561fb744b4Smrg -h, --help print this help, then exit 6571fb744b4Smrg -V, --version print version number, then exit 6581fb744b4Smrg -q, --quiet do not print progress messages 6591fb744b4Smrg -d, --debug don't remove temporary files 660c35d236eSmrg 6611fb744b4SmrgReport bugs to <bug-libtool@gnu.org>." 662c35d236eSmrg 6631fb744b4Smrglt_cl_version="\ 6641fb744b4Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6651fb744b4Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6661fb744b4Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667c35d236eSmrg 6681fb744b4SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6691fb744b4SmrgThis config.lt script is free software; the Free Software Foundation 6701fb744b4Smrggives unlimited permision to copy, distribute and modify it." 671f55e6a01Smrg 67214210e8eSmrgwhile test 0 != $[#] 6731fb744b4Smrgdo 6741fb744b4Smrg case $[1] in 6751fb744b4Smrg --version | --v* | -V ) 6761fb744b4Smrg echo "$lt_cl_version"; exit 0 ;; 6771fb744b4Smrg --help | --h* | -h ) 6781fb744b4Smrg echo "$lt_cl_help"; exit 0 ;; 6791fb744b4Smrg --debug | --d* | -d ) 6801fb744b4Smrg debug=: ;; 6811fb744b4Smrg --quiet | --q* | --silent | --s* | -q ) 6821fb744b4Smrg lt_cl_silent=: ;; 6831fb744b4Smrg 6841fb744b4Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 68514210e8eSmrgTry '$[0] --help' for more information.]) ;; 6861fb744b4Smrg 6871fb744b4Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 68814210e8eSmrgTry '$[0] --help' for more information.]) ;; 6891fb744b4Smrg esac 6901fb744b4Smrg shift 6911fb744b4Smrgdone 692c35d236eSmrg 6931fb744b4Smrgif $lt_cl_silent; then 6941fb744b4Smrg exec AS_MESSAGE_FD>/dev/null 695c35d236eSmrgfi 6961fb744b4Smrg_LTEOF 6971fb744b4Smrg 6981fb744b4Smrgcat >>"$CONFIG_LT" <<_LTEOF 6991fb744b4Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7001fb744b4Smrg_LTEOF 7011fb744b4Smrg 7021fb744b4Smrgcat >>"$CONFIG_LT" <<\_LTEOF 7031fb744b4SmrgAC_MSG_NOTICE([creating $ofile]) 7041fb744b4Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 7051fb744b4SmrgAS_EXIT(0) 7061fb744b4Smrg_LTEOF 7071fb744b4Smrgchmod +x "$CONFIG_LT" 7081fb744b4Smrg 7091fb744b4Smrg# configure is writing to config.log, but config.lt does its own redirection, 7101fb744b4Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7111fb744b4Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7121fb744b4Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7131fb744b4Smrglt_cl_success=: 71414210e8eSmrgtest yes = "$silent" && 7151fb744b4Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7161fb744b4Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7171fb744b4Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7181fb744b4Smrgexec AS_MESSAGE_LOG_FD>>config.log 7191fb744b4Smrg$lt_cl_success || AS_EXIT(1) 7201fb744b4Smrg])# LT_OUTPUT 7211fb744b4Smrg 7221fb744b4Smrg 7231fb744b4Smrg# _LT_CONFIG(TAG) 7241fb744b4Smrg# --------------- 7251fb744b4Smrg# If TAG is the built-in tag, create an initial libtool script with a 7261fb744b4Smrg# default configuration from the untagged config vars. Otherwise add code 7271fb744b4Smrg# to config.status for appending the configuration named by TAG from the 7281fb744b4Smrg# matching tagged config vars. 7291fb744b4Smrgm4_defun([_LT_CONFIG], 7301fb744b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7311fb744b4Smrg_LT_CONFIG_SAVE_COMMANDS([ 7321fb744b4Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7331fb744b4Smrg m4_if(_LT_TAG, [C], [ 73414210e8eSmrg # See if we are running on zsh, and set the options that allow our 7351fb744b4Smrg # commands through without removal of \ escapes. 73614210e8eSmrg if test -n "${ZSH_VERSION+set}"; then 7371fb744b4Smrg setopt NO_GLOB_SUBST 7381fb744b4Smrg fi 739c35d236eSmrg 74014210e8eSmrg cfgfile=${ofile}T 7411fb744b4Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7421fb744b4Smrg $RM "$cfgfile" 743c35d236eSmrg 7441fb744b4Smrg cat <<_LT_EOF >> "$cfgfile" 7451fb744b4Smrg#! $SHELL 74614210e8eSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7471fb744b4Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7481fb744b4Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74914210e8eSmrg 75014210e8eSmrg# Provide generalized library-building support services. 75114210e8eSmrg# Written by Gordon Matzigkeit, 1996 75214210e8eSmrg 7531fb744b4Smrg_LT_COPYING 7541fb744b4Smrg_LT_LIBTOOL_TAGS 755c35d236eSmrg 75614210e8eSmrg# Configured defaults for sys_lib_dlsearch_path munging. 75714210e8eSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 75814210e8eSmrg 7591fb744b4Smrg# ### BEGIN LIBTOOL CONFIG 7601fb744b4Smrg_LT_LIBTOOL_CONFIG_VARS 7611fb744b4Smrg_LT_LIBTOOL_TAG_VARS 7621fb744b4Smrg# ### END LIBTOOL CONFIG 763c35d236eSmrg 76414210e8eSmrg_LT_EOF 76514210e8eSmrg 76614210e8eSmrg cat <<'_LT_EOF' >> "$cfgfile" 76714210e8eSmrg 76814210e8eSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 76914210e8eSmrg 77014210e8eSmrg_LT_PREPARE_MUNGE_PATH_LIST 77114210e8eSmrg_LT_PREPARE_CC_BASENAME 77214210e8eSmrg 77314210e8eSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 77414210e8eSmrg 7751fb744b4Smrg_LT_EOF 776c35d236eSmrg 7771fb744b4Smrg case $host_os in 7781fb744b4Smrg aix3*) 7791fb744b4Smrg cat <<\_LT_EOF >> "$cfgfile" 7801fb744b4Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7811fb744b4Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7821fb744b4Smrg# vanish in a puff of smoke. 78314210e8eSmrgif test set != "${COLLECT_NAMES+set}"; then 7841fb744b4Smrg COLLECT_NAMES= 7851fb744b4Smrg export COLLECT_NAMES 7861fb744b4Smrgfi 7871fb744b4Smrg_LT_EOF 788c35d236eSmrg ;; 7891fb744b4Smrg esac 790c35d236eSmrg 7911fb744b4Smrg _LT_PROG_LTMAIN 792c35d236eSmrg 7931fb744b4Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7941fb744b4Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7951fb744b4Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7961fb744b4Smrg # is reportedly fixed, but why not run on old versions too? 7971fb744b4Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 7981fb744b4Smrg || (rm -f "$cfgfile"; exit 1) 7991fb744b4Smrg 8001fb744b4Smrg mv -f "$cfgfile" "$ofile" || 8011fb744b4Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8021fb744b4Smrg chmod +x "$ofile" 8031fb744b4Smrg], 8041fb744b4Smrg[cat <<_LT_EOF >> "$ofile" 8051fb744b4Smrg 8061fb744b4Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8071fb744b4Smrgdnl in a comment (ie after a #). 8081fb744b4Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8091fb744b4Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8101fb744b4Smrg# ### END LIBTOOL TAG CONFIG: $1 8111fb744b4Smrg_LT_EOF 8121fb744b4Smrg])dnl /m4_if 8131fb744b4Smrg], 8141fb744b4Smrg[m4_if([$1], [], [ 8151fb744b4Smrg PACKAGE='$PACKAGE' 8161fb744b4Smrg VERSION='$VERSION' 8171fb744b4Smrg RM='$RM' 8181fb744b4Smrg ofile='$ofile'], []) 8191fb744b4Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8201fb744b4Smrg])# _LT_CONFIG 821c35d236eSmrg 8221fb744b4Smrg 8231fb744b4Smrg# LT_SUPPORTED_TAG(TAG) 8241fb744b4Smrg# --------------------- 8251fb744b4Smrg# Trace this macro to discover what tags are supported by the libtool 8261fb744b4Smrg# --tag option, using: 8271fb744b4Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8281fb744b4SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8291fb744b4Smrg 8301fb744b4Smrg 8311fb744b4Smrg# C support is built-in for now 8321fb744b4Smrgm4_define([_LT_LANG_C_enabled], []) 8331fb744b4Smrgm4_define([_LT_TAGS], []) 834c35d236eSmrg 835c35d236eSmrg 8361fb744b4Smrg# LT_LANG(LANG) 8371fb744b4Smrg# ------------- 8381fb744b4Smrg# Enable libtool support for the given language if not already enabled. 8391fb744b4SmrgAC_DEFUN([LT_LANG], 8401fb744b4Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8411fb744b4Smrgm4_case([$1], 8421fb744b4Smrg [C], [_LT_LANG(C)], 8431fb744b4Smrg [C++], [_LT_LANG(CXX)], 8441fb744b4Smrg [Go], [_LT_LANG(GO)], 8451fb744b4Smrg [Java], [_LT_LANG(GCJ)], 8461fb744b4Smrg [Fortran 77], [_LT_LANG(F77)], 8471fb744b4Smrg [Fortran], [_LT_LANG(FC)], 8481fb744b4Smrg [Windows Resource], [_LT_LANG(RC)], 8491fb744b4Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8501fb744b4Smrg [_LT_LANG($1)], 8511fb744b4Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8521fb744b4Smrg])# LT_LANG 8531fb744b4Smrg 8541fb744b4Smrg 8551fb744b4Smrg# _LT_LANG(LANGNAME) 856518bcf38Smrg# ------------------ 8571fb744b4Smrgm4_defun([_LT_LANG], 8581fb744b4Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8591fb744b4Smrg [LT_SUPPORTED_TAG([$1])dnl 8601fb744b4Smrg m4_append([_LT_TAGS], [$1 ])dnl 8611fb744b4Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8621fb744b4Smrg _LT_LANG_$1_CONFIG($1)])dnl 8631fb744b4Smrg])# _LT_LANG 864c35d236eSmrg 865c35d236eSmrg 8661fb744b4Smrgm4_ifndef([AC_PROG_GO], [ 8671fb744b4Smrg# NOTE: This macro has been submitted for inclusion into # 8681fb744b4Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8691fb744b4Smrg# a released version of Autoconf we should remove this # 8701fb744b4Smrg# macro and use it instead. # 8711fb744b4Smrgm4_defun([AC_PROG_GO], 8721fb744b4Smrg[AC_LANG_PUSH(Go)dnl 8731fb744b4SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8741fb744b4SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8751fb744b4Smrg_AC_ARG_VAR_LDFLAGS()dnl 8761fb744b4SmrgAC_CHECK_TOOL(GOC, gccgo) 8771fb744b4Smrgif test -z "$GOC"; then 8781fb744b4Smrg if test -n "$ac_tool_prefix"; then 8791fb744b4Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8801fb744b4Smrg fi 8811fb744b4Smrgfi 8821fb744b4Smrgif test -z "$GOC"; then 8831fb744b4Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8841fb744b4Smrgfi 8851fb744b4Smrg])#m4_defun 8861fb744b4Smrg])#m4_ifndef 887c35d236eSmrg 888c35d236eSmrg 8891fb744b4Smrg# _LT_LANG_DEFAULT_CONFIG 8901fb744b4Smrg# ----------------------- 8911fb744b4Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8921fb744b4Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8931fb744b4Smrg [LT_LANG(CXX)], 8941fb744b4Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8951fb744b4Smrg 8961fb744b4SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8971fb744b4Smrg [LT_LANG(F77)], 8981fb744b4Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8991fb744b4Smrg 9001fb744b4SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9011fb744b4Smrg [LT_LANG(FC)], 9021fb744b4Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 9031fb744b4Smrg 9041fb744b4Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9051fb744b4Smrgdnl pulling things in needlessly. 9061fb744b4SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9071fb744b4Smrg [LT_LANG(GCJ)], 9081fb744b4Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9091fb744b4Smrg [LT_LANG(GCJ)], 9101fb744b4Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9111fb744b4Smrg [LT_LANG(GCJ)], 9121fb744b4Smrg [m4_ifdef([AC_PROG_GCJ], 9131fb744b4Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9141fb744b4Smrg m4_ifdef([A][M_PROG_GCJ], 9151fb744b4Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9161fb744b4Smrg m4_ifdef([LT_PROG_GCJ], 9171fb744b4Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9181fb744b4Smrg 9191fb744b4SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9201fb744b4Smrg [LT_LANG(GO)], 9211fb744b4Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9221fb744b4Smrg 9231fb744b4SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9241fb744b4Smrg [LT_LANG(RC)], 9251fb744b4Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9261fb744b4Smrg])# _LT_LANG_DEFAULT_CONFIG 9271fb744b4Smrg 9281fb744b4Smrg# Obsolete macros: 9291fb744b4SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9301fb744b4SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9311fb744b4SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9321fb744b4SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9331fb744b4SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9341fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 9351fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9361fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9371fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9381fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9391fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9401fb744b4Smrg 9411fb744b4Smrg 9421fb744b4Smrg# _LT_TAG_COMPILER 9431fb744b4Smrg# ---------------- 9441fb744b4Smrgm4_defun([_LT_TAG_COMPILER], 9451fb744b4Smrg[AC_REQUIRE([AC_PROG_CC])dnl 946c35d236eSmrg 9471fb744b4Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9481fb744b4Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9491fb744b4Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9501fb744b4Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951c35d236eSmrg 9521fb744b4Smrg# If no C compiler was specified, use CC. 9531fb744b4SmrgLTCC=${LTCC-"$CC"} 954c35d236eSmrg 9551fb744b4Smrg# If no C compiler flags were specified, use CFLAGS. 9561fb744b4SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957518bcf38Smrg 9581fb744b4Smrg# Allow CC to be a program name with arguments. 9591fb744b4Smrgcompiler=$CC 9601fb744b4Smrg])# _LT_TAG_COMPILER 961c35d236eSmrg 962c35d236eSmrg 9631fb744b4Smrg# _LT_COMPILER_BOILERPLATE 9641fb744b4Smrg# ------------------------ 9651fb744b4Smrg# Check for compiler boilerplate output or warnings with 9661fb744b4Smrg# the simple compiler test code. 9671fb744b4Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9681fb744b4Smrg[m4_require([_LT_DECL_SED])dnl 9691fb744b4Smrgac_outfile=conftest.$ac_objext 9701fb744b4Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9711fb744b4Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9721fb744b4Smrg_lt_compiler_boilerplate=`cat conftest.err` 9731fb744b4Smrg$RM conftest* 9741fb744b4Smrg])# _LT_COMPILER_BOILERPLATE 975c35d236eSmrg 976c35d236eSmrg 9771fb744b4Smrg# _LT_LINKER_BOILERPLATE 978518bcf38Smrg# ---------------------- 9791fb744b4Smrg# Check for linker boilerplate output or warnings with 9801fb744b4Smrg# the simple link test code. 9811fb744b4Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9821fb744b4Smrg[m4_require([_LT_DECL_SED])dnl 9831fb744b4Smrgac_outfile=conftest.$ac_objext 9841fb744b4Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9851fb744b4Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9861fb744b4Smrg_lt_linker_boilerplate=`cat conftest.err` 9871fb744b4Smrg$RM -r conftest* 9881fb744b4Smrg])# _LT_LINKER_BOILERPLATE 989c35d236eSmrg 9901fb744b4Smrg# _LT_REQUIRED_DARWIN_CHECKS 9911fb744b4Smrg# ------------------------- 9921fb744b4Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993c35d236eSmrg case $host_os in 9941fb744b4Smrg rhapsody* | darwin*) 9951fb744b4Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9961fb744b4Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9971fb744b4Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9981fb744b4Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9991fb744b4Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10001fb744b4Smrg _LT_DECL([], [DSYMUTIL], [1], 10011fb744b4Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10021fb744b4Smrg _LT_DECL([], [NMEDIT], [1], 10031fb744b4Smrg [Tool to change global to local symbols on Mac OS X]) 10041fb744b4Smrg _LT_DECL([], [LIPO], [1], 10051fb744b4Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 10061fb744b4Smrg _LT_DECL([], [OTOOL], [1], 10071fb744b4Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10081fb744b4Smrg _LT_DECL([], [OTOOL64], [1], 10091fb744b4Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010c35d236eSmrg 10111fb744b4Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10121fb744b4Smrg [lt_cv_apple_cc_single_mod=no 101314210e8eSmrg if test -z "$LT_MULTI_MODULE"; then 10141fb744b4Smrg # By default we will add the -single_module flag. You can override 10151fb744b4Smrg # by either setting the environment variable LT_MULTI_MODULE 10161fb744b4Smrg # non-empty at configure time, or by adding -multi_module to the 10171fb744b4Smrg # link flags. 10181fb744b4Smrg rm -rf libconftest.dylib* 10191fb744b4Smrg echo "int foo(void){return 1;}" > conftest.c 10201fb744b4Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10211fb744b4Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10221fb744b4Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10231fb744b4Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10241fb744b4Smrg _lt_result=$? 10251fb744b4Smrg # If there is a non-empty error log, and "single_module" 10261fb744b4Smrg # appears in it, assume the flag caused a linker warning 10271fb744b4Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10281fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10291fb744b4Smrg # Otherwise, if the output was created with a 0 exit code from 10301fb744b4Smrg # the compiler, it worked. 103114210e8eSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10321fb744b4Smrg lt_cv_apple_cc_single_mod=yes 10331fb744b4Smrg else 10341fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10351fb744b4Smrg fi 10361fb744b4Smrg rm -rf libconftest.dylib* 10371fb744b4Smrg rm -f conftest.* 10381fb744b4Smrg fi]) 1039c35d236eSmrg 10401fb744b4Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10411fb744b4Smrg [lt_cv_ld_exported_symbols_list], 10421fb744b4Smrg [lt_cv_ld_exported_symbols_list=no 10431fb744b4Smrg save_LDFLAGS=$LDFLAGS 10441fb744b4Smrg echo "_main" > conftest.sym 10451fb744b4Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10461fb744b4Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10471fb744b4Smrg [lt_cv_ld_exported_symbols_list=yes], 10481fb744b4Smrg [lt_cv_ld_exported_symbols_list=no]) 104914210e8eSmrg LDFLAGS=$save_LDFLAGS 1050c35d236eSmrg ]) 1051c35d236eSmrg 10521fb744b4Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10531fb744b4Smrg [lt_cv_ld_force_load=no 10541fb744b4Smrg cat > conftest.c << _LT_EOF 10551fb744b4Smrgint forced_loaded() { return 2;} 10561fb744b4Smrg_LT_EOF 10571fb744b4Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10581fb744b4Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10591fb744b4Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10601fb744b4Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10611fb744b4Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10621fb744b4Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10631fb744b4Smrg cat > conftest.c << _LT_EOF 10641fb744b4Smrgint main() { return 0;} 10651fb744b4Smrg_LT_EOF 10661fb744b4Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10671fb744b4Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10681fb744b4Smrg _lt_result=$? 10691fb744b4Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10701fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 107114210e8eSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10721fb744b4Smrg lt_cv_ld_force_load=yes 10731fb744b4Smrg else 10741fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10751fb744b4Smrg fi 10761fb744b4Smrg rm -f conftest.err libconftest.a conftest conftest.c 10771fb744b4Smrg rm -rf conftest.dSYM 10781fb744b4Smrg ]) 10791fb744b4Smrg case $host_os in 10801fb744b4Smrg rhapsody* | darwin1.[[012]]) 108114210e8eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10821fb744b4Smrg darwin1.*) 108314210e8eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10841fb744b4Smrg darwin*) # darwin 5.x on 10851fb744b4Smrg # if running on 10.5 or later, the deployment target defaults 10861fb744b4Smrg # to the OS version, if on x86, and 10.4, the deployment 10871fb744b4Smrg # target defaults to 10.4. Don't you love it? 10881fb744b4Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10891fb744b4Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 109014210e8eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109114210e8eSmrg 10.[[012]][[,.]]*) 109214210e8eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10931fb744b4Smrg 10.*) 109414210e8eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10951fb744b4Smrg esac 10961fb744b4Smrg ;; 10971fb744b4Smrg esac 109814210e8eSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10991fb744b4Smrg _lt_dar_single_mod='$single_module' 11001fb744b4Smrg fi 110114210e8eSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 110214210e8eSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11031fb744b4Smrg else 110414210e8eSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11051fb744b4Smrg fi 110614210e8eSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11071fb744b4Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11081fb744b4Smrg else 11091fb744b4Smrg _lt_dsymutil= 11101fb744b4Smrg fi 1111c35d236eSmrg ;; 1112c35d236eSmrg esac 11131fb744b4Smrg]) 1114c35d236eSmrg 11151fb744b4Smrg 11161fb744b4Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11171fb744b4Smrg# --------------------------------- 11181fb744b4Smrg# Checks for linker and compiler features on darwin 11191fb744b4Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11201fb744b4Smrg[ 11211fb744b4Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11221fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11231fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11241fb744b4Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11251fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 112614210e8eSmrg if test yes = "$lt_cv_ld_force_load"; then 112714210e8eSmrg _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\"`' 11281fb744b4Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11291fb744b4Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130c35d236eSmrg else 11311fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132c35d236eSmrg fi 11331fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 113414210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11351fb744b4Smrg case $cc_basename in 113614210e8eSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11371fb744b4Smrg *) _lt_dar_can_shared=$GCC ;; 11381fb744b4Smrg esac 113914210e8eSmrg if test yes = "$_lt_dar_can_shared"; then 11401fb744b4Smrg output_verbose_link_cmd=func_echo_all 114114210e8eSmrg _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" 114214210e8eSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 114314210e8eSmrg _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" 114414210e8eSmrg _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" 11451fb744b4Smrg m4_if([$1], [CXX], 114614210e8eSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 114714210e8eSmrg _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" 114814210e8eSmrg _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" 11491fb744b4Smrg fi 11501fb744b4Smrg],[]) 11511fb744b4Smrg else 11521fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11531fb744b4Smrg fi 11541fb744b4Smrg]) 1155c35d236eSmrg 11561fb744b4Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11571fb744b4Smrg# ---------------------------------- 11581fb744b4Smrg# Links a minimal program and checks the executable 11591fb744b4Smrg# for the system default hardcoded library path. In most cases, 11601fb744b4Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11611fb744b4Smrg# the location of the communication and MPI libs are included too. 11621fb744b4Smrg# If we don't find anything, use the default library path according 11631fb744b4Smrg# to the aix ld manual. 11641fb744b4Smrg# Store the results from the different compilers for each TAGNAME. 11651fb744b4Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11661fb744b4Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11671fb744b4Smrg[m4_require([_LT_DECL_SED])dnl 116814210e8eSmrgif test set = "${lt_cv_aix_libpath+set}"; then 11691fb744b4Smrg aix_libpath=$lt_cv_aix_libpath 11701fb744b4Smrgelse 11711fb744b4Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11721fb744b4Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11731fb744b4Smrg lt_aix_libpath_sed='[ 11741fb744b4Smrg /Import File Strings/,/^$/ { 11751fb744b4Smrg /^0/ { 11761fb744b4Smrg s/^0 *\([^ ]*\) *$/\1/ 11771fb744b4Smrg p 11781fb744b4Smrg } 11791fb744b4Smrg }]' 11801fb744b4Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11811fb744b4Smrg # Check for a 64-bit object if we didn't find anything. 11821fb744b4Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11831fb744b4Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11841fb744b4Smrg fi],[]) 11851fb744b4Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118614210e8eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11871fb744b4Smrg fi 11881fb744b4Smrg ]) 11891fb744b4Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11901fb744b4Smrgfi 11911fb744b4Smrg])# _LT_SYS_MODULE_PATH_AIX 1192c35d236eSmrg 1193c35d236eSmrg 11941fb744b4Smrg# _LT_SHELL_INIT(ARG) 11951fb744b4Smrg# ------------------- 11961fb744b4Smrgm4_define([_LT_SHELL_INIT], 11971fb744b4Smrg[m4_divert_text([M4SH-INIT], [$1 11981fb744b4Smrg])])# _LT_SHELL_INIT 1199c35d236eSmrg 12001fb744b4Smrg 12011fb744b4Smrg 12021fb744b4Smrg# _LT_PROG_ECHO_BACKSLASH 12031fb744b4Smrg# ----------------------- 12041fb744b4Smrg# Find how we can fake an echo command that does not interpret backslash. 12051fb744b4Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 120614210e8eSmrg# of the generated configure script that will find a shell with a builtin 120714210e8eSmrg# printf (that we can use as an echo command). 12081fb744b4Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12091fb744b4Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12101fb744b4SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12111fb744b4SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12121fb744b4Smrg 12131fb744b4SmrgAC_MSG_CHECKING([how to print strings]) 12141fb744b4Smrg# Test print first, because it will be a builtin if present. 12151fb744b4Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12161fb744b4Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12171fb744b4Smrg ECHO='print -r --' 12181fb744b4Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12191fb744b4Smrg ECHO='printf %s\n' 12201fb744b4Smrgelse 12211fb744b4Smrg # Use this function as a fallback that always works. 12221fb744b4Smrg func_fallback_echo () 12231fb744b4Smrg { 12241fb744b4Smrg eval 'cat <<_LTECHO_EOF 12251fb744b4Smrg$[]1 12261fb744b4Smrg_LTECHO_EOF' 12271fb744b4Smrg } 12281fb744b4Smrg ECHO='func_fallback_echo' 12291fb744b4Smrgfi 12301fb744b4Smrg 12311fb744b4Smrg# func_echo_all arg... 12321fb744b4Smrg# Invoke $ECHO with all args, space-separated. 12331fb744b4Smrgfunc_echo_all () 12341fb744b4Smrg{ 123514210e8eSmrg $ECHO "$*" 12361fb744b4Smrg} 12371fb744b4Smrg 123814210e8eSmrgcase $ECHO in 12391fb744b4Smrg printf*) AC_MSG_RESULT([printf]) ;; 12401fb744b4Smrg print*) AC_MSG_RESULT([print -r]) ;; 12411fb744b4Smrg *) AC_MSG_RESULT([cat]) ;; 12421fb744b4Smrgesac 12431fb744b4Smrg 12441fb744b4Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12451fb744b4Smrg[_AS_DETECT_SUGGESTED([ 12461fb744b4Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12471fb744b4Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12481fb744b4Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12491fb744b4Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12501fb744b4Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12511fb744b4Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12521fb744b4Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12531fb744b4Smrg 12541fb744b4Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12551fb744b4Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12561fb744b4Smrg])# _LT_PROG_ECHO_BACKSLASH 12571fb744b4Smrg 12581fb744b4Smrg 12591fb744b4Smrg# _LT_WITH_SYSROOT 12601fb744b4Smrg# ---------------- 12611fb744b4SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12621fb744b4Smrg[AC_MSG_CHECKING([for sysroot]) 12631fb744b4SmrgAC_ARG_WITH([sysroot], 126414210e8eSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 126514210e8eSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 126614210e8eSmrg if not specified).])], 12671fb744b4Smrg[], [with_sysroot=no]) 12681fb744b4Smrg 12691fb744b4Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12701fb744b4Smrgdnl in case the user passed a directory name. 12711fb744b4Smrglt_sysroot= 127214210e8eSmrgcase $with_sysroot in #( 12731fb744b4Smrg yes) 127414210e8eSmrg if test yes = "$GCC"; then 12751fb744b4Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12761fb744b4Smrg fi 12771fb744b4Smrg ;; #( 12781fb744b4Smrg /*) 12791fb744b4Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12801fb744b4Smrg ;; #( 12811fb744b4Smrg no|'') 12821fb744b4Smrg ;; #( 12831fb744b4Smrg *) 128414210e8eSmrg AC_MSG_RESULT([$with_sysroot]) 12851fb744b4Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12861fb744b4Smrg ;; 12871fb744b4Smrgesac 12881fb744b4Smrg 12891fb744b4Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12901fb744b4Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 129114210e8eSmrg[dependent libraries, and where our libraries should be installed.])]) 12921fb744b4Smrg 12931fb744b4Smrg# _LT_ENABLE_LOCK 12941fb744b4Smrg# --------------- 12951fb744b4Smrgm4_defun([_LT_ENABLE_LOCK], 12961fb744b4Smrg[AC_ARG_ENABLE([libtool-lock], 12971fb744b4Smrg [AS_HELP_STRING([--disable-libtool-lock], 12981fb744b4Smrg [avoid locking (might break parallel builds)])]) 129914210e8eSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 13001fb744b4Smrg 13011fb744b4Smrg# Some flags need to be propagated to the compiler or linker for good 13021fb744b4Smrg# libtool support. 13031fb744b4Smrgcase $host in 13041fb744b4Smrgia64-*-hpux*) 130514210e8eSmrg # Find out what ABI is being produced by ac_compile, and set mode 130614210e8eSmrg # options accordingly. 13071fb744b4Smrg echo 'int i;' > conftest.$ac_ext 13081fb744b4Smrg if AC_TRY_EVAL(ac_compile); then 13091fb744b4Smrg case `/usr/bin/file conftest.$ac_objext` in 13101fb744b4Smrg *ELF-32*) 131114210e8eSmrg HPUX_IA64_MODE=32 13121fb744b4Smrg ;; 13131fb744b4Smrg *ELF-64*) 131414210e8eSmrg HPUX_IA64_MODE=64 13151fb744b4Smrg ;; 13161fb744b4Smrg esac 13171fb744b4Smrg fi 13181fb744b4Smrg rm -rf conftest* 13191fb744b4Smrg ;; 13201fb744b4Smrg*-*-irix6*) 132114210e8eSmrg # Find out what ABI is being produced by ac_compile, and set linker 132214210e8eSmrg # options accordingly. 13231fb744b4Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13241fb744b4Smrg if AC_TRY_EVAL(ac_compile); then 132514210e8eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 13261fb744b4Smrg case `/usr/bin/file conftest.$ac_objext` in 13271fb744b4Smrg *32-bit*) 13281fb744b4Smrg LD="${LD-ld} -melf32bsmip" 13291fb744b4Smrg ;; 13301fb744b4Smrg *N32*) 13311fb744b4Smrg LD="${LD-ld} -melf32bmipn32" 13321fb744b4Smrg ;; 13331fb744b4Smrg *64-bit*) 13341fb744b4Smrg LD="${LD-ld} -melf64bmip" 13351fb744b4Smrg ;; 13361fb744b4Smrg esac 13371fb744b4Smrg else 13381fb744b4Smrg case `/usr/bin/file conftest.$ac_objext` in 13391fb744b4Smrg *32-bit*) 13401fb744b4Smrg LD="${LD-ld} -32" 13411fb744b4Smrg ;; 13421fb744b4Smrg *N32*) 13431fb744b4Smrg LD="${LD-ld} -n32" 13441fb744b4Smrg ;; 13451fb744b4Smrg *64-bit*) 13461fb744b4Smrg LD="${LD-ld} -64" 13471fb744b4Smrg ;; 13481fb744b4Smrg esac 1349c35d236eSmrg fi 13501fb744b4Smrg fi 13511fb744b4Smrg rm -rf conftest* 13521fb744b4Smrg ;; 1353c35d236eSmrg 135414210e8eSmrgmips64*-*linux*) 135514210e8eSmrg # Find out what ABI is being produced by ac_compile, and set linker 135614210e8eSmrg # options accordingly. 135714210e8eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 135814210e8eSmrg if AC_TRY_EVAL(ac_compile); then 135914210e8eSmrg emul=elf 136014210e8eSmrg case `/usr/bin/file conftest.$ac_objext` in 136114210e8eSmrg *32-bit*) 136214210e8eSmrg emul="${emul}32" 136314210e8eSmrg ;; 136414210e8eSmrg *64-bit*) 136514210e8eSmrg emul="${emul}64" 136614210e8eSmrg ;; 136714210e8eSmrg esac 136814210e8eSmrg case `/usr/bin/file conftest.$ac_objext` in 136914210e8eSmrg *MSB*) 137014210e8eSmrg emul="${emul}btsmip" 137114210e8eSmrg ;; 137214210e8eSmrg *LSB*) 137314210e8eSmrg emul="${emul}ltsmip" 137414210e8eSmrg ;; 137514210e8eSmrg esac 137614210e8eSmrg case `/usr/bin/file conftest.$ac_objext` in 137714210e8eSmrg *N32*) 137814210e8eSmrg emul="${emul}n32" 137914210e8eSmrg ;; 138014210e8eSmrg esac 138114210e8eSmrg LD="${LD-ld} -m $emul" 138214210e8eSmrg fi 138314210e8eSmrg rm -rf conftest* 138414210e8eSmrg ;; 138514210e8eSmrg 138614210e8eSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13871fb744b4Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 138814210e8eSmrg # Find out what ABI is being produced by ac_compile, and set linker 138914210e8eSmrg # options accordingly. Note that the listed cases only cover the 139014210e8eSmrg # situations where additional linker options are needed (such as when 139114210e8eSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 139214210e8eSmrg # vice versa); the common cases where no linker options are needed do 139314210e8eSmrg # not appear in the list. 13941fb744b4Smrg echo 'int i;' > conftest.$ac_ext 13951fb744b4Smrg if AC_TRY_EVAL(ac_compile); then 13961fb744b4Smrg case `/usr/bin/file conftest.o` in 13971fb744b4Smrg *32-bit*) 13981fb744b4Smrg case $host in 13991fb744b4Smrg x86_64-*kfreebsd*-gnu) 14001fb744b4Smrg LD="${LD-ld} -m elf_i386_fbsd" 14011fb744b4Smrg ;; 14021fb744b4Smrg x86_64-*linux*) 140314210e8eSmrg case `/usr/bin/file conftest.o` in 140414210e8eSmrg *x86-64*) 140514210e8eSmrg LD="${LD-ld} -m elf32_x86_64" 140614210e8eSmrg ;; 140714210e8eSmrg *) 140814210e8eSmrg LD="${LD-ld} -m elf_i386" 140914210e8eSmrg ;; 141014210e8eSmrg esac 141114210e8eSmrg ;; 141214210e8eSmrg powerpc64le-*linux*) 141314210e8eSmrg LD="${LD-ld} -m elf32lppclinux" 14141fb744b4Smrg ;; 141514210e8eSmrg powerpc64-*linux*) 14161fb744b4Smrg LD="${LD-ld} -m elf32ppclinux" 14171fb744b4Smrg ;; 14181fb744b4Smrg s390x-*linux*) 14191fb744b4Smrg LD="${LD-ld} -m elf_s390" 14201fb744b4Smrg ;; 14211fb744b4Smrg sparc64-*linux*) 14221fb744b4Smrg LD="${LD-ld} -m elf32_sparc" 14231fb744b4Smrg ;; 14241fb744b4Smrg esac 14251fb744b4Smrg ;; 14261fb744b4Smrg *64-bit*) 14271fb744b4Smrg case $host in 14281fb744b4Smrg x86_64-*kfreebsd*-gnu) 14291fb744b4Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14301fb744b4Smrg ;; 14311fb744b4Smrg x86_64-*linux*) 14321fb744b4Smrg LD="${LD-ld} -m elf_x86_64" 14331fb744b4Smrg ;; 143414210e8eSmrg powerpcle-*linux*) 143514210e8eSmrg LD="${LD-ld} -m elf64lppc" 143614210e8eSmrg ;; 143714210e8eSmrg powerpc-*linux*) 14381fb744b4Smrg LD="${LD-ld} -m elf64ppc" 14391fb744b4Smrg ;; 14401fb744b4Smrg s390*-*linux*|s390*-*tpf*) 14411fb744b4Smrg LD="${LD-ld} -m elf64_s390" 14421fb744b4Smrg ;; 14431fb744b4Smrg sparc*-*linux*) 14441fb744b4Smrg LD="${LD-ld} -m elf64_sparc" 14451fb744b4Smrg ;; 14461fb744b4Smrg esac 14471fb744b4Smrg ;; 14481fb744b4Smrg esac 14491fb744b4Smrg fi 14501fb744b4Smrg rm -rf conftest* 14511fb744b4Smrg ;; 1452c35d236eSmrg 14531fb744b4Smrg*-*-sco3.2v5*) 14541fb744b4Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 145514210e8eSmrg SAVE_CFLAGS=$CFLAGS 14561fb744b4Smrg CFLAGS="$CFLAGS -belf" 14571fb744b4Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14581fb744b4Smrg [AC_LANG_PUSH(C) 14591fb744b4Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14601fb744b4Smrg AC_LANG_POP]) 146114210e8eSmrg if test yes != "$lt_cv_cc_needs_belf"; then 14621fb744b4Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 146314210e8eSmrg CFLAGS=$SAVE_CFLAGS 14641fb744b4Smrg fi 14651fb744b4Smrg ;; 14661fb744b4Smrg*-*solaris*) 146714210e8eSmrg # Find out what ABI is being produced by ac_compile, and set linker 146814210e8eSmrg # options accordingly. 14691fb744b4Smrg echo 'int i;' > conftest.$ac_ext 14701fb744b4Smrg if AC_TRY_EVAL(ac_compile); then 14711fb744b4Smrg case `/usr/bin/file conftest.o` in 14721fb744b4Smrg *64-bit*) 14731fb744b4Smrg case $lt_cv_prog_gnu_ld in 14741fb744b4Smrg yes*) 14751fb744b4Smrg case $host in 147614210e8eSmrg i?86-*-solaris*|x86_64-*-solaris*) 14771fb744b4Smrg LD="${LD-ld} -m elf_x86_64" 14781fb744b4Smrg ;; 14791fb744b4Smrg sparc*-*-solaris*) 14801fb744b4Smrg LD="${LD-ld} -m elf64_sparc" 14811fb744b4Smrg ;; 14821fb744b4Smrg esac 14831fb744b4Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14841fb744b4Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 148514210e8eSmrg LD=${LD-ld}_sol2 14861fb744b4Smrg fi 14871fb744b4Smrg ;; 14881fb744b4Smrg *) 14891fb744b4Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14901fb744b4Smrg LD="${LD-ld} -64" 14911fb744b4Smrg fi 14921fb744b4Smrg ;; 14931fb744b4Smrg esac 14941fb744b4Smrg ;; 14951fb744b4Smrg esac 14961fb744b4Smrg fi 14971fb744b4Smrg rm -rf conftest* 14981fb744b4Smrg ;; 14991fb744b4Smrgesac 1500c35d236eSmrg 150114210e8eSmrgneed_locks=$enable_libtool_lock 15021fb744b4Smrg])# _LT_ENABLE_LOCK 15031fb744b4Smrg 15041fb744b4Smrg 15051fb744b4Smrg# _LT_PROG_AR 15061fb744b4Smrg# ----------- 15071fb744b4Smrgm4_defun([_LT_PROG_AR], 15081fb744b4Smrg[AC_CHECK_TOOLS(AR, [ar], false) 15091fb744b4Smrg: ${AR=ar} 15101fb744b4Smrg: ${AR_FLAGS=cru} 15111fb744b4Smrg_LT_DECL([], [AR], [1], [The archiver]) 15121fb744b4Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 15131fb744b4Smrg 15141fb744b4SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15151fb744b4Smrg [lt_cv_ar_at_file=no 15161fb744b4Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15171fb744b4Smrg [echo conftest.$ac_objext > conftest.lst 15181fb744b4Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15191fb744b4Smrg AC_TRY_EVAL([lt_ar_try]) 152014210e8eSmrg if test 0 -eq "$ac_status"; then 15211fb744b4Smrg # Ensure the archiver fails upon bogus file names. 15221fb744b4Smrg rm -f conftest.$ac_objext libconftest.a 15231fb744b4Smrg AC_TRY_EVAL([lt_ar_try]) 152414210e8eSmrg if test 0 -ne "$ac_status"; then 15251fb744b4Smrg lt_cv_ar_at_file=@ 15261fb744b4Smrg fi 15271fb744b4Smrg fi 15281fb744b4Smrg rm -f conftest.* libconftest.a 15291fb744b4Smrg ]) 15301fb744b4Smrg ]) 15311fb744b4Smrg 153214210e8eSmrgif test no = "$lt_cv_ar_at_file"; then 15331fb744b4Smrg archiver_list_spec= 15341fb744b4Smrgelse 15351fb744b4Smrg archiver_list_spec=$lt_cv_ar_at_file 15361fb744b4Smrgfi 15371fb744b4Smrg_LT_DECL([], [archiver_list_spec], [1], 15381fb744b4Smrg [How to feed a file listing to the archiver]) 15391fb744b4Smrg])# _LT_PROG_AR 15401fb744b4Smrg 15411fb744b4Smrg 15421fb744b4Smrg# _LT_CMD_OLD_ARCHIVE 15431fb744b4Smrg# ------------------- 15441fb744b4Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15451fb744b4Smrg[_LT_PROG_AR 15461fb744b4Smrg 15471fb744b4SmrgAC_CHECK_TOOL(STRIP, strip, :) 15481fb744b4Smrgtest -z "$STRIP" && STRIP=: 15491fb744b4Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15501fb744b4Smrg 15511fb744b4SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15521fb744b4Smrgtest -z "$RANLIB" && RANLIB=: 15531fb744b4Smrg_LT_DECL([], [RANLIB], [1], 15541fb744b4Smrg [Commands used to install an old-style archive]) 15551fb744b4Smrg 15561fb744b4Smrg# Determine commands to create old-style static archives. 15571fb744b4Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15581fb744b4Smrgold_postinstall_cmds='chmod 644 $oldlib' 15591fb744b4Smrgold_postuninstall_cmds= 15601fb744b4Smrg 15611fb744b4Smrgif test -n "$RANLIB"; then 15621fb744b4Smrg case $host_os in 156314210e8eSmrg bitrig* | openbsd*) 15641fb744b4Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15651fb744b4Smrg ;; 15661fb744b4Smrg *) 15671fb744b4Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15681fb744b4Smrg ;; 1569c35d236eSmrg esac 15701fb744b4Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571c35d236eSmrgfi 15721fb744b4Smrg 15731fb744b4Smrgcase $host_os in 15741fb744b4Smrg darwin*) 15751fb744b4Smrg lock_old_archive_extraction=yes ;; 15761fb744b4Smrg *) 15771fb744b4Smrg lock_old_archive_extraction=no ;; 15781fb744b4Smrgesac 15791fb744b4Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15801fb744b4Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15811fb744b4Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15821fb744b4Smrg [Commands used to build an old-style archive]) 15831fb744b4Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15841fb744b4Smrg [Whether to use a lock for old archive extraction]) 15851fb744b4Smrg])# _LT_CMD_OLD_ARCHIVE 1586c35d236eSmrg 1587f55e6a01Smrg 15881fb744b4Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15891fb744b4Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15901fb744b4Smrg# ---------------------------------------------------------------- 15911fb744b4Smrg# Check whether the given compiler option works 15921fb744b4SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15931fb744b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15941fb744b4Smrgm4_require([_LT_DECL_SED])dnl 15951fb744b4SmrgAC_CACHE_CHECK([$1], [$2], 15961fb744b4Smrg [$2=no 15971fb744b4Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15984f6cd06fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159914210e8eSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600c35d236eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1601c35d236eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1602c35d236eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1603c35d236eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16041fb744b4Smrg # The option is referenced via a variable to avoid confusing sed. 1605c35d236eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1606c35d236eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607c35d236eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608c35d236eSmrg -e 's:$: $lt_compiler_flag:'` 16091fb744b4Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16101fb744b4Smrg (eval "$lt_compile" 2>conftest.err) 1611c35d236eSmrg ac_status=$? 16121fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16131fb744b4Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16141fb744b4Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615c35d236eSmrg # The compiler can only warn and ignore the option if not recognized 16161fb744b4Smrg # So say no if there are warnings other than the usual output. 16171fb744b4Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16181fb744b4Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16191fb744b4Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16201fb744b4Smrg $2=yes 1621c35d236eSmrg fi 1622c35d236eSmrg fi 16231fb744b4Smrg $RM conftest* 1624c35d236eSmrg]) 1625c35d236eSmrg 162614210e8eSmrgif test yes = "[$]$2"; then 16271fb744b4Smrg m4_if([$5], , :, [$5]) 1628c35d236eSmrgelse 16291fb744b4Smrg m4_if([$6], , :, [$6]) 1630c35d236eSmrgfi 16311fb744b4Smrg])# _LT_COMPILER_OPTION 1632c35d236eSmrg 16331fb744b4Smrg# Old name: 16341fb744b4SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16351fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 16361fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637c35d236eSmrg 16381fb744b4Smrg 16391fb744b4Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16401fb744b4Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16411fb744b4Smrg# ---------------------------------------------------- 16421fb744b4Smrg# Check whether the given linker option works 16431fb744b4SmrgAC_DEFUN([_LT_LINKER_OPTION], 16441fb744b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16451fb744b4Smrgm4_require([_LT_DECL_SED])dnl 16461fb744b4SmrgAC_CACHE_CHECK([$1], [$2], 16471fb744b4Smrg [$2=no 164814210e8eSmrg save_LDFLAGS=$LDFLAGS 16491fb744b4Smrg LDFLAGS="$LDFLAGS $3" 16501fb744b4Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16511fb744b4Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16521fb744b4Smrg # The linker can only warn and ignore the option if not recognized 16531fb744b4Smrg # So say no if there are warnings 16541fb744b4Smrg if test -s conftest.err; then 16551fb744b4Smrg # Append any errors to the config.log. 16561fb744b4Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16571fb744b4Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16581fb744b4Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16591fb744b4Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16601fb744b4Smrg $2=yes 16611fb744b4Smrg fi 16621fb744b4Smrg else 16631fb744b4Smrg $2=yes 16641fb744b4Smrg fi 16651fb744b4Smrg fi 16661fb744b4Smrg $RM -r conftest* 166714210e8eSmrg LDFLAGS=$save_LDFLAGS 16681fb744b4Smrg]) 16691fb744b4Smrg 167014210e8eSmrgif test yes = "[$]$2"; then 16711fb744b4Smrg m4_if([$4], , :, [$4]) 16721fb744b4Smrgelse 16731fb744b4Smrg m4_if([$5], , :, [$5]) 16741fb744b4Smrgfi 16751fb744b4Smrg])# _LT_LINKER_OPTION 16761fb744b4Smrg 16771fb744b4Smrg# Old name: 16781fb744b4SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16791fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 16801fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16811fb744b4Smrg 16821fb744b4Smrg 16831fb744b4Smrg# LT_CMD_MAX_LEN 16841fb744b4Smrg#--------------- 16851fb744b4SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16861fb744b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16871fb744b4Smrg# find the maximum length of command line arguments 16881fb744b4SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16891fb744b4SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16901fb744b4Smrg i=0 169114210e8eSmrg teststring=ABCD 16921fb744b4Smrg 16931fb744b4Smrg case $build_os in 16941fb744b4Smrg msdosdjgpp*) 16951fb744b4Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16961fb744b4Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16971fb744b4Smrg # during glob expansion). Even if it were fixed, the result of this 16981fb744b4Smrg # check would be larger than it should be. 16991fb744b4Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17001fb744b4Smrg ;; 17011fb744b4Smrg 17021fb744b4Smrg gnu*) 17031fb744b4Smrg # Under GNU Hurd, this test is not required because there is 17041fb744b4Smrg # no limit to the length of command line arguments. 17051fb744b4Smrg # Libtool will interpret -1 as no limit whatsoever 17061fb744b4Smrg lt_cv_sys_max_cmd_len=-1; 17071fb744b4Smrg ;; 17081fb744b4Smrg 17091fb744b4Smrg cygwin* | mingw* | cegcc*) 17101fb744b4Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17111fb744b4Smrg # about 5 minutes as the teststring grows exponentially. 17121fb744b4Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17131fb744b4Smrg # you end up with a "frozen" computer, even though with patience 17141fb744b4Smrg # the test eventually succeeds (with a max line length of 256k). 17151fb744b4Smrg # Instead, let's just punt: use the minimum linelength reported by 17161fb744b4Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17171fb744b4Smrg lt_cv_sys_max_cmd_len=8192; 17181fb744b4Smrg ;; 17191fb744b4Smrg 17201fb744b4Smrg mint*) 17211fb744b4Smrg # On MiNT this can take a long time and run out of memory. 17221fb744b4Smrg lt_cv_sys_max_cmd_len=8192; 17231fb744b4Smrg ;; 17241fb744b4Smrg 17251fb744b4Smrg amigaos*) 17261fb744b4Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17271fb744b4Smrg # So we just punt and use a minimum line length of 8192. 17281fb744b4Smrg lt_cv_sys_max_cmd_len=8192; 17291fb744b4Smrg ;; 17301fb744b4Smrg 173114210e8eSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 17321fb744b4Smrg # This has been around since 386BSD, at least. Likely further. 17331fb744b4Smrg if test -x /sbin/sysctl; then 17341fb744b4Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17351fb744b4Smrg elif test -x /usr/sbin/sysctl; then 17361fb744b4Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17371fb744b4Smrg else 17381fb744b4Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17391fb744b4Smrg fi 17401fb744b4Smrg # And add a safety zone 17411fb744b4Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17421fb744b4Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17431fb744b4Smrg ;; 17441fb744b4Smrg 17451fb744b4Smrg interix*) 17461fb744b4Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17471fb744b4Smrg lt_cv_sys_max_cmd_len=196608 17481fb744b4Smrg ;; 17491fb744b4Smrg 17501fb744b4Smrg os2*) 17511fb744b4Smrg # The test takes a long time on OS/2. 17521fb744b4Smrg lt_cv_sys_max_cmd_len=8192 17531fb744b4Smrg ;; 17541fb744b4Smrg 17551fb744b4Smrg osf*) 17561fb744b4Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17571fb744b4Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17581fb744b4Smrg # nice to cause kernel panics so lets avoid the loop below. 17591fb744b4Smrg # First set a reasonable default. 17601fb744b4Smrg lt_cv_sys_max_cmd_len=16384 17611fb744b4Smrg # 17621fb744b4Smrg if test -x /sbin/sysconfig; then 17631fb744b4Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17641fb744b4Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17651fb744b4Smrg esac 17661fb744b4Smrg fi 17671fb744b4Smrg ;; 17681fb744b4Smrg sco3.2v5*) 17691fb744b4Smrg lt_cv_sys_max_cmd_len=102400 17701fb744b4Smrg ;; 17711fb744b4Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17721fb744b4Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17731fb744b4Smrg if test -n "$kargmax"; then 17741fb744b4Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17751fb744b4Smrg else 17761fb744b4Smrg lt_cv_sys_max_cmd_len=32768 17771fb744b4Smrg fi 17781fb744b4Smrg ;; 17791fb744b4Smrg *) 17801fb744b4Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 178114210e8eSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 178214210e8eSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17831fb744b4Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17841fb744b4Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17851fb744b4Smrg else 17861fb744b4Smrg # Make teststring a little bigger before we do anything with it. 17871fb744b4Smrg # a 1K string should be a reasonable start. 178814210e8eSmrg for i in 1 2 3 4 5 6 7 8; do 17891fb744b4Smrg teststring=$teststring$teststring 17901fb744b4Smrg done 17911fb744b4Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17921fb744b4Smrg # If test is not a shell built-in, we'll probably end up computing a 17931fb744b4Smrg # maximum length that is only half of the actual maximum length, but 17941fb744b4Smrg # we can't tell. 179514210e8eSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17961fb744b4Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179714210e8eSmrg test 17 != "$i" # 1/2 MB should be enough 17981fb744b4Smrg do 17991fb744b4Smrg i=`expr $i + 1` 18001fb744b4Smrg teststring=$teststring$teststring 18011fb744b4Smrg done 18021fb744b4Smrg # Only check the string length outside the loop. 18031fb744b4Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18041fb744b4Smrg teststring= 18051fb744b4Smrg # Add a significant safety factor because C++ compilers can tack on 18061fb744b4Smrg # massive amounts of additional arguments before passing them to the 18071fb744b4Smrg # linker. It appears as though 1/2 is a usable value. 18081fb744b4Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18091fb744b4Smrg fi 18101fb744b4Smrg ;; 18111fb744b4Smrg esac 18121fb744b4Smrg]) 181314210e8eSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 18141fb744b4Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18151fb744b4Smrgelse 18161fb744b4Smrg AC_MSG_RESULT(none) 18171fb744b4Smrgfi 18181fb744b4Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18191fb744b4Smrg_LT_DECL([], [max_cmd_len], [0], 18201fb744b4Smrg [What is the maximum length of a command?]) 18211fb744b4Smrg])# LT_CMD_MAX_LEN 18221fb744b4Smrg 18231fb744b4Smrg# Old name: 18241fb744b4SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18251fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 18261fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18271fb744b4Smrg 18281fb744b4Smrg 18291fb744b4Smrg# _LT_HEADER_DLFCN 18301fb744b4Smrg# ---------------- 18311fb744b4Smrgm4_defun([_LT_HEADER_DLFCN], 18321fb744b4Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18331fb744b4Smrg])# _LT_HEADER_DLFCN 18341fb744b4Smrg 18351fb744b4Smrg 18361fb744b4Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18371fb744b4Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18381fb744b4Smrg# ---------------------------------------------------------------- 18391fb744b4Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18401fb744b4Smrg[m4_require([_LT_HEADER_DLFCN])dnl 184114210e8eSmrgif test yes = "$cross_compiling"; then : 18421fb744b4Smrg [$4] 18431fb744b4Smrgelse 18441fb744b4Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18451fb744b4Smrg lt_status=$lt_dlunknown 18461fb744b4Smrg cat > conftest.$ac_ext <<_LT_EOF 18471fb744b4Smrg[#line $LINENO "configure" 18481fb744b4Smrg#include "confdefs.h" 18491fb744b4Smrg 18501fb744b4Smrg#if HAVE_DLFCN_H 18511fb744b4Smrg#include <dlfcn.h> 18521fb744b4Smrg#endif 18531fb744b4Smrg 18541fb744b4Smrg#include <stdio.h> 18551fb744b4Smrg 18561fb744b4Smrg#ifdef RTLD_GLOBAL 18571fb744b4Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18581fb744b4Smrg#else 18591fb744b4Smrg# ifdef DL_GLOBAL 18601fb744b4Smrg# define LT_DLGLOBAL DL_GLOBAL 18611fb744b4Smrg# else 18621fb744b4Smrg# define LT_DLGLOBAL 0 18631fb744b4Smrg# endif 18641fb744b4Smrg#endif 18651fb744b4Smrg 18661fb744b4Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18671fb744b4Smrg find out it does not work in some platform. */ 18681fb744b4Smrg#ifndef LT_DLLAZY_OR_NOW 18691fb744b4Smrg# ifdef RTLD_LAZY 18701fb744b4Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18711fb744b4Smrg# else 18721fb744b4Smrg# ifdef DL_LAZY 18731fb744b4Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18741fb744b4Smrg# else 18751fb744b4Smrg# ifdef RTLD_NOW 18761fb744b4Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18771fb744b4Smrg# else 18781fb744b4Smrg# ifdef DL_NOW 18791fb744b4Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18801fb744b4Smrg# else 18811fb744b4Smrg# define LT_DLLAZY_OR_NOW 0 18821fb744b4Smrg# endif 18831fb744b4Smrg# endif 18841fb744b4Smrg# endif 18851fb744b4Smrg# endif 18861fb744b4Smrg#endif 18871fb744b4Smrg 188814210e8eSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 18891fb744b4Smrg correspondingly for the symbols needed. */ 189014210e8eSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18911fb744b4Smrgint fnord () __attribute__((visibility("default"))); 18921fb744b4Smrg#endif 18931fb744b4Smrg 18941fb744b4Smrgint fnord () { return 42; } 18951fb744b4Smrgint main () 18961fb744b4Smrg{ 18971fb744b4Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18981fb744b4Smrg int status = $lt_dlunknown; 18991fb744b4Smrg 19001fb744b4Smrg if (self) 19011fb744b4Smrg { 19021fb744b4Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19031fb744b4Smrg else 19041fb744b4Smrg { 19051fb744b4Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19061fb744b4Smrg else puts (dlerror ()); 19071fb744b4Smrg } 19081fb744b4Smrg /* dlclose (self); */ 19091fb744b4Smrg } 19101fb744b4Smrg else 19111fb744b4Smrg puts (dlerror ()); 19121fb744b4Smrg 19131fb744b4Smrg return status; 19141fb744b4Smrg}] 19151fb744b4Smrg_LT_EOF 191614210e8eSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19171fb744b4Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19181fb744b4Smrg lt_status=$? 19191fb744b4Smrg case x$lt_status in 19201fb744b4Smrg x$lt_dlno_uscore) $1 ;; 19211fb744b4Smrg x$lt_dlneed_uscore) $2 ;; 19221fb744b4Smrg x$lt_dlunknown|x*) $3 ;; 19231fb744b4Smrg esac 19241fb744b4Smrg else : 19251fb744b4Smrg # compilation failed 19261fb744b4Smrg $3 19271fb744b4Smrg fi 19281fb744b4Smrgfi 19291fb744b4Smrgrm -fr conftest* 19301fb744b4Smrg])# _LT_TRY_DLOPEN_SELF 19311fb744b4Smrg 19321fb744b4Smrg 19331fb744b4Smrg# LT_SYS_DLOPEN_SELF 19341fb744b4Smrg# ------------------ 19351fb744b4SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19361fb744b4Smrg[m4_require([_LT_HEADER_DLFCN])dnl 193714210e8eSmrgif test yes != "$enable_dlopen"; then 19381fb744b4Smrg enable_dlopen=unknown 19391fb744b4Smrg enable_dlopen_self=unknown 19401fb744b4Smrg enable_dlopen_self_static=unknown 19411fb744b4Smrgelse 19421fb744b4Smrg lt_cv_dlopen=no 19431fb744b4Smrg lt_cv_dlopen_libs= 19441fb744b4Smrg 19451fb744b4Smrg case $host_os in 19461fb744b4Smrg beos*) 194714210e8eSmrg lt_cv_dlopen=load_add_on 19481fb744b4Smrg lt_cv_dlopen_libs= 19491fb744b4Smrg lt_cv_dlopen_self=yes 19501fb744b4Smrg ;; 19511fb744b4Smrg 19521fb744b4Smrg mingw* | pw32* | cegcc*) 195314210e8eSmrg lt_cv_dlopen=LoadLibrary 19541fb744b4Smrg lt_cv_dlopen_libs= 19551fb744b4Smrg ;; 19561fb744b4Smrg 19571fb744b4Smrg cygwin*) 195814210e8eSmrg lt_cv_dlopen=dlopen 19591fb744b4Smrg lt_cv_dlopen_libs= 19601fb744b4Smrg ;; 19611fb744b4Smrg 19621fb744b4Smrg darwin*) 196314210e8eSmrg # if libdl is installed we need to link against it 19641fb744b4Smrg AC_CHECK_LIB([dl], [dlopen], 196514210e8eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196614210e8eSmrg lt_cv_dlopen=dyld 19671fb744b4Smrg lt_cv_dlopen_libs= 19681fb744b4Smrg lt_cv_dlopen_self=yes 19691fb744b4Smrg ]) 19701fb744b4Smrg ;; 19711fb744b4Smrg 197214210e8eSmrg tpf*) 197314210e8eSmrg # Don't try to run any link tests for TPF. We know it's impossible 197414210e8eSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 197514210e8eSmrg lt_cv_dlopen=dlopen 197614210e8eSmrg lt_cv_dlopen_libs= 197714210e8eSmrg lt_cv_dlopen_self=no 197814210e8eSmrg ;; 197914210e8eSmrg 19801fb744b4Smrg *) 19811fb744b4Smrg AC_CHECK_FUNC([shl_load], 198214210e8eSmrg [lt_cv_dlopen=shl_load], 19831fb744b4Smrg [AC_CHECK_LIB([dld], [shl_load], 198414210e8eSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19851fb744b4Smrg [AC_CHECK_FUNC([dlopen], 198614210e8eSmrg [lt_cv_dlopen=dlopen], 19871fb744b4Smrg [AC_CHECK_LIB([dl], [dlopen], 198814210e8eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19891fb744b4Smrg [AC_CHECK_LIB([svld], [dlopen], 199014210e8eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19911fb744b4Smrg [AC_CHECK_LIB([dld], [dld_link], 199214210e8eSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19931fb744b4Smrg ]) 19941fb744b4Smrg ]) 19951fb744b4Smrg ]) 19961fb744b4Smrg ]) 19971fb744b4Smrg ]) 19981fb744b4Smrg ;; 19991fb744b4Smrg esac 20001fb744b4Smrg 200114210e8eSmrg if test no = "$lt_cv_dlopen"; then 20021fb744b4Smrg enable_dlopen=no 200314210e8eSmrg else 200414210e8eSmrg enable_dlopen=yes 20051fb744b4Smrg fi 20061fb744b4Smrg 20071fb744b4Smrg case $lt_cv_dlopen in 20081fb744b4Smrg dlopen) 200914210e8eSmrg save_CPPFLAGS=$CPPFLAGS 201014210e8eSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20111fb744b4Smrg 201214210e8eSmrg save_LDFLAGS=$LDFLAGS 20131fb744b4Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20141fb744b4Smrg 201514210e8eSmrg save_LIBS=$LIBS 20161fb744b4Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20171fb744b4Smrg 20181fb744b4Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20191fb744b4Smrg lt_cv_dlopen_self, [dnl 20201fb744b4Smrg _LT_TRY_DLOPEN_SELF( 20211fb744b4Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20221fb744b4Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20231fb744b4Smrg ]) 20241fb744b4Smrg 202514210e8eSmrg if test yes = "$lt_cv_dlopen_self"; then 20261fb744b4Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20271fb744b4Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20281fb744b4Smrg lt_cv_dlopen_self_static, [dnl 20291fb744b4Smrg _LT_TRY_DLOPEN_SELF( 20301fb744b4Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20311fb744b4Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20321fb744b4Smrg ]) 20331fb744b4Smrg fi 20341fb744b4Smrg 203514210e8eSmrg CPPFLAGS=$save_CPPFLAGS 203614210e8eSmrg LDFLAGS=$save_LDFLAGS 203714210e8eSmrg LIBS=$save_LIBS 20381fb744b4Smrg ;; 20391fb744b4Smrg esac 20401fb744b4Smrg 20411fb744b4Smrg case $lt_cv_dlopen_self in 20421fb744b4Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20431fb744b4Smrg *) enable_dlopen_self=unknown ;; 20441fb744b4Smrg esac 20451fb744b4Smrg 20461fb744b4Smrg case $lt_cv_dlopen_self_static in 20471fb744b4Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20481fb744b4Smrg *) enable_dlopen_self_static=unknown ;; 20491fb744b4Smrg esac 20501fb744b4Smrgfi 20511fb744b4Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20521fb744b4Smrg [Whether dlopen is supported]) 20531fb744b4Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20541fb744b4Smrg [Whether dlopen of programs is supported]) 20551fb744b4Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20561fb744b4Smrg [Whether dlopen of statically linked programs is supported]) 20571fb744b4Smrg])# LT_SYS_DLOPEN_SELF 20581fb744b4Smrg 20591fb744b4Smrg# Old name: 20601fb744b4SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20611fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 20621fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20631fb744b4Smrg 20641fb744b4Smrg 20651fb744b4Smrg# _LT_COMPILER_C_O([TAGNAME]) 20661fb744b4Smrg# --------------------------- 20671fb744b4Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20681fb744b4Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20691fb744b4Smrgm4_defun([_LT_COMPILER_C_O], 20701fb744b4Smrg[m4_require([_LT_DECL_SED])dnl 20711fb744b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20721fb744b4Smrgm4_require([_LT_TAG_COMPILER])dnl 20731fb744b4SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20741fb744b4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20751fb744b4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20761fb744b4Smrg $RM -r conftest 2>/dev/null 20771fb744b4Smrg mkdir conftest 20781fb744b4Smrg cd conftest 20791fb744b4Smrg mkdir out 20801fb744b4Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20811fb744b4Smrg 20821fb744b4Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20831fb744b4Smrg # Insert the option either (1) after the last *FLAGS variable, or 20841fb744b4Smrg # (2) before a word containing "conftest.", or (3) at the end. 20851fb744b4Smrg # Note that $ac_compile itself does not contain backslashes and begins 20861fb744b4Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20871fb744b4Smrg lt_compile=`echo "$ac_compile" | $SED \ 20881fb744b4Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20891fb744b4Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20901fb744b4Smrg -e 's:$: $lt_compiler_flag:'` 20911fb744b4Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20921fb744b4Smrg (eval "$lt_compile" 2>out/conftest.err) 20931fb744b4Smrg ac_status=$? 20941fb744b4Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20951fb744b4Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20961fb744b4Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20971fb744b4Smrg then 20981fb744b4Smrg # The compiler can only warn and ignore the option if not recognized 20991fb744b4Smrg # So say no if there are warnings 21001fb744b4Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21011fb744b4Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21021fb744b4Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21031fb744b4Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21041fb744b4Smrg fi 21051fb744b4Smrg fi 21061fb744b4Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21071fb744b4Smrg $RM conftest* 21081fb744b4Smrg # SGI C++ compiler will create directory out/ii_files/ for 21091fb744b4Smrg # template instantiation 21101fb744b4Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21111fb744b4Smrg $RM out/* && rmdir out 21121fb744b4Smrg cd .. 21131fb744b4Smrg $RM -r conftest 21141fb744b4Smrg $RM conftest* 21151fb744b4Smrg]) 21161fb744b4Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21171fb744b4Smrg [Does compiler simultaneously support -c and -o options?]) 21181fb744b4Smrg])# _LT_COMPILER_C_O 21191fb744b4Smrg 21201fb744b4Smrg 21211fb744b4Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21221fb744b4Smrg# ---------------------------------- 21231fb744b4Smrg# Check to see if we can do hard links to lock some files if needed 21241fb744b4Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21251fb744b4Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21261fb744b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21271fb744b4Smrg_LT_COMPILER_C_O([$1]) 21281fb744b4Smrg 212914210e8eSmrghard_links=nottested 213014210e8eSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21311fb744b4Smrg # do not overwrite the value of need_locks provided by the user 21321fb744b4Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21331fb744b4Smrg hard_links=yes 21341fb744b4Smrg $RM conftest* 21351fb744b4Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21361fb744b4Smrg touch conftest.a 21371fb744b4Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21381fb744b4Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21391fb744b4Smrg AC_MSG_RESULT([$hard_links]) 214014210e8eSmrg if test no = "$hard_links"; then 214114210e8eSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21421fb744b4Smrg need_locks=warn 21431fb744b4Smrg fi 21441fb744b4Smrgelse 21451fb744b4Smrg need_locks=no 21461fb744b4Smrgfi 21471fb744b4Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21481fb744b4Smrg])# _LT_COMPILER_FILE_LOCKS 21491fb744b4Smrg 21501fb744b4Smrg 21511fb744b4Smrg# _LT_CHECK_OBJDIR 21521fb744b4Smrg# ---------------- 21531fb744b4Smrgm4_defun([_LT_CHECK_OBJDIR], 21541fb744b4Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21551fb744b4Smrg[rm -f .libs 2>/dev/null 21561fb744b4Smrgmkdir .libs 2>/dev/null 21571fb744b4Smrgif test -d .libs; then 21581fb744b4Smrg lt_cv_objdir=.libs 21591fb744b4Smrgelse 21601fb744b4Smrg # MS-DOS does not allow filenames that begin with a dot. 21611fb744b4Smrg lt_cv_objdir=_libs 21621fb744b4Smrgfi 2163c35d236eSmrgrmdir .libs 2>/dev/null]) 2164c35d236eSmrgobjdir=$lt_cv_objdir 21651fb744b4Smrg_LT_DECL([], [objdir], [0], 21661fb744b4Smrg [The name of the directory that contains temporary libtool files])dnl 21671fb744b4Smrgm4_pattern_allow([LT_OBJDIR])dnl 216814210e8eSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216914210e8eSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21701fb744b4Smrg])# _LT_CHECK_OBJDIR 2171c35d236eSmrg 2172c35d236eSmrg 21731fb744b4Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21741fb744b4Smrg# -------------------------------------- 2175c35d236eSmrg# Check hardcoding attributes. 21761fb744b4Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177c35d236eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21781fb744b4Smrg_LT_TAGVAR(hardcode_action, $1)= 21791fb744b4Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21801fb744b4Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 218114210e8eSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182c35d236eSmrg 21831fb744b4Smrg # We can hardcode non-existent directories. 218414210e8eSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185c35d236eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186c35d236eSmrg # have to relink, otherwise we might link with an installed library 2187c35d236eSmrg # when we should be linking with a yet-to-be-installed one 218814210e8eSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218914210e8eSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190c35d236eSmrg # Linking always hardcodes the temporary library directory. 21911fb744b4Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2192c35d236eSmrg else 2193c35d236eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21941fb744b4Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195c35d236eSmrg fi 2196c35d236eSmrgelse 2197c35d236eSmrg # We cannot hardcode anything, or else we can only hardcode existing 2198c35d236eSmrg # directories. 21991fb744b4Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2200c35d236eSmrgfi 22011fb744b4SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202c35d236eSmrg 220314210e8eSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220414210e8eSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205c35d236eSmrg # Fast installation is not supported 2206c35d236eSmrg enable_fast_install=no 220714210e8eSmrgelif test yes = "$shlibpath_overrides_runpath" || 220814210e8eSmrg test no = "$enable_shared"; then 2209c35d236eSmrg # Fast installation is not necessary 2210c35d236eSmrg enable_fast_install=needless 2211c35d236eSmrgfi 22121fb744b4Smrg_LT_TAGDECL([], [hardcode_action], [0], 22131fb744b4Smrg [How to hardcode a shared library path into an executable]) 22141fb744b4Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2215c35d236eSmrg 2216c35d236eSmrg 22171fb744b4Smrg# _LT_CMD_STRIPLIB 22181fb744b4Smrg# ---------------- 22191fb744b4Smrgm4_defun([_LT_CMD_STRIPLIB], 22201fb744b4Smrg[m4_require([_LT_DECL_EGREP]) 22211fb744b4Smrgstriplib= 2222c35d236eSmrgold_striplib= 2223c35d236eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22241fb744b4Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225c35d236eSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226c35d236eSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227c35d236eSmrg AC_MSG_RESULT([yes]) 2228c35d236eSmrgelse 2229c35d236eSmrg# FIXME - insert some real tests, host_os isn't really good enough 2230c35d236eSmrg case $host_os in 22311fb744b4Smrg darwin*) 223214210e8eSmrg if test -n "$STRIP"; then 22331fb744b4Smrg striplib="$STRIP -x" 22341fb744b4Smrg old_striplib="$STRIP -S" 22351fb744b4Smrg AC_MSG_RESULT([yes]) 22361fb744b4Smrg else 22371fb744b4Smrg AC_MSG_RESULT([no]) 22381fb744b4Smrg fi 22391fb744b4Smrg ;; 22401fb744b4Smrg *) 22411fb744b4Smrg AC_MSG_RESULT([no]) 22421fb744b4Smrg ;; 22431fb744b4Smrg esac 22441fb744b4Smrgfi 22451fb744b4Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22461fb744b4Smrg_LT_DECL([], [striplib], [1]) 22471fb744b4Smrg])# _LT_CMD_STRIPLIB 22481fb744b4Smrg 22491fb744b4Smrg 225014210e8eSmrg# _LT_PREPARE_MUNGE_PATH_LIST 225114210e8eSmrg# --------------------------- 225214210e8eSmrg# Make sure func_munge_path_list() is defined correctly. 225314210e8eSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 225414210e8eSmrg[[# func_munge_path_list VARIABLE PATH 225514210e8eSmrg# ----------------------------------- 225614210e8eSmrg# VARIABLE is name of variable containing _space_ separated list of 225714210e8eSmrg# directories to be munged by the contents of PATH, which is string 225814210e8eSmrg# having a format: 225914210e8eSmrg# "DIR[:DIR]:" 226014210e8eSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 226114210e8eSmrg# ":DIR[:DIR]" 226214210e8eSmrg# string "DIR[ DIR]" will be appended to VARIABLE 226314210e8eSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 226414210e8eSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 226514210e8eSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 226614210e8eSmrg# "DIR[:DIR]" 226714210e8eSmrg# VARIABLE will be replaced by "DIR[ DIR]" 226814210e8eSmrgfunc_munge_path_list () 226914210e8eSmrg{ 227014210e8eSmrg case x@S|@2 in 227114210e8eSmrg x) 227214210e8eSmrg ;; 227314210e8eSmrg *:) 227414210e8eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 227514210e8eSmrg ;; 227614210e8eSmrg x:*) 227714210e8eSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 227814210e8eSmrg ;; 227914210e8eSmrg *::*) 228014210e8eSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228114210e8eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228214210e8eSmrg ;; 228314210e8eSmrg *) 228414210e8eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 228514210e8eSmrg ;; 228614210e8eSmrg esac 228714210e8eSmrg} 228814210e8eSmrg]])# _LT_PREPARE_PATH_LIST 228914210e8eSmrg 229014210e8eSmrg 22911fb744b4Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22921fb744b4Smrg# ----------------------------- 22931fb744b4Smrg# PORTME Fill in your ld.so characteristics 22941fb744b4Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 22951fb744b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22961fb744b4Smrgm4_require([_LT_DECL_EGREP])dnl 22971fb744b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22981fb744b4Smrgm4_require([_LT_DECL_OBJDUMP])dnl 22991fb744b4Smrgm4_require([_LT_DECL_SED])dnl 23001fb744b4Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230114210e8eSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23021fb744b4SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23031fb744b4Smrgm4_if([$1], 23041fb744b4Smrg [], [ 230514210e8eSmrgif test yes = "$GCC"; then 23064f6cd06fSmrg case $host_os in 230714210e8eSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 230814210e8eSmrg *) lt_awk_arg='/^libraries:/' ;; 23094f6cd06fSmrg esac 23101fb744b4Smrg case $host_os in 231114210e8eSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231214210e8eSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23131fb744b4Smrg esac 23141fb744b4Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23151fb744b4Smrg case $lt_search_path_spec in 23161fb744b4Smrg *\;*) 2317c35d236eSmrg # if the path contains ";" then we assume it to be the separator 2318c35d236eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2319c35d236eSmrg # assumed that no part of a normal pathname contains ";" but that should 2320c35d236eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 23211fb744b4Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23221fb744b4Smrg ;; 23231fb744b4Smrg *) 23241fb744b4Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23251fb744b4Smrg ;; 23261fb744b4Smrg esac 23274f6cd06fSmrg # Ok, now we have the path, separated by spaces, we can step through it 232814210e8eSmrg # and add multilib dir if necessary... 23294f6cd06fSmrg lt_tmp_lt_search_path_spec= 233014210e8eSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233114210e8eSmrg # ...but if some path component already ends with the multilib dir we assume 233214210e8eSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233314210e8eSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 233414210e8eSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 233514210e8eSmrg lt_multi_os_dir= 233614210e8eSmrg ;; 233714210e8eSmrg esac 23384f6cd06fSmrg for lt_sys_path in $lt_search_path_spec; do 233914210e8eSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 234014210e8eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234114210e8eSmrg elif test -n "$lt_multi_os_dir"; then 23424f6cd06fSmrg test -d "$lt_sys_path" && \ 23434f6cd06fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23444f6cd06fSmrg fi 23454f6cd06fSmrg done 23461fb744b4Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 234714210e8eSmrgBEGIN {RS = " "; FS = "/|\n";} { 234814210e8eSmrg lt_foo = ""; 234914210e8eSmrg lt_count = 0; 23504f6cd06fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 23514f6cd06fSmrg if ($lt_i != "" && $lt_i != ".") { 23524f6cd06fSmrg if ($lt_i == "..") { 23534f6cd06fSmrg lt_count++; 23544f6cd06fSmrg } else { 23554f6cd06fSmrg if (lt_count == 0) { 235614210e8eSmrg lt_foo = "/" $lt_i lt_foo; 23574f6cd06fSmrg } else { 23584f6cd06fSmrg lt_count--; 23594f6cd06fSmrg } 23604f6cd06fSmrg } 23614f6cd06fSmrg } 23624f6cd06fSmrg } 23634f6cd06fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23644f6cd06fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23654f6cd06fSmrg}'` 23661fb744b4Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23671fb744b4Smrg # for these hosts. 23681fb744b4Smrg case $host_os in 23691fb744b4Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 237014210e8eSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23711fb744b4Smrg esac 23721fb744b4Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373c35d236eSmrgelse 2374c35d236eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23754f6cd06fSmrgfi]) 23761fb744b4Smrglibrary_names_spec= 23771fb744b4Smrglibname_spec='lib$name' 23781fb744b4Smrgsoname_spec= 237914210e8eSmrgshrext_cmds=.so 23801fb744b4Smrgpostinstall_cmds= 23811fb744b4Smrgpostuninstall_cmds= 23821fb744b4Smrgfinish_cmds= 23831fb744b4Smrgfinish_eval= 23841fb744b4Smrgshlibpath_var= 23851fb744b4Smrgshlibpath_overrides_runpath=unknown 23861fb744b4Smrgversion_type=none 23871fb744b4Smrgdynamic_linker="$host_os ld.so" 23881fb744b4Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2389c35d236eSmrgneed_lib_prefix=unknown 2390c35d236eSmrghardcode_into_libs=no 2391c35d236eSmrg 2392c35d236eSmrg# when you set need_version to no, make sure it does not cause -set_version 2393c35d236eSmrg# flags to be left without arguments 2394c35d236eSmrgneed_version=unknown 2395c35d236eSmrg 239614210e8eSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 239714210e8eSmrg[User-defined run-time library search path.]) 239814210e8eSmrg 2399c35d236eSmrgcase $host_os in 2400c35d236eSmrgaix3*) 24011fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 240214210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403c35d236eSmrg shlibpath_var=LIBPATH 2404c35d236eSmrg 2405c35d236eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 240614210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2407c35d236eSmrg ;; 2408c35d236eSmrg 24094f6cd06fSmrgaix[[4-9]]*) 24101fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2411c35d236eSmrg need_lib_prefix=no 2412c35d236eSmrg need_version=no 2413c35d236eSmrg hardcode_into_libs=yes 241414210e8eSmrg if test ia64 = "$host_cpu"; then 2415c35d236eSmrg # AIX 5 supports IA64 241614210e8eSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2418c35d236eSmrg else 2419c35d236eSmrg # With GCC up to 2.95.x, collect2 would create an import file 2420c35d236eSmrg # for dependence libraries. The import file would start with 242114210e8eSmrg # the line '#! .'. This would cause the generated library to 242214210e8eSmrg # depend on '.', always an invalid library. This was fixed in 2423c35d236eSmrg # development snapshots of GCC prior to 3.0. 2424c35d236eSmrg case $host_os in 2425c35d236eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2426c35d236eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427c35d236eSmrg echo ' yes ' 242814210e8eSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429c35d236eSmrg : 2430c35d236eSmrg else 2431c35d236eSmrg can_build_shared=no 2432c35d236eSmrg fi 2433c35d236eSmrg ;; 2434c35d236eSmrg esac 243514210e8eSmrg # Using Import Files as archive members, it is possible to support 243614210e8eSmrg # filename-based versioning of shared library archives on AIX. While 243714210e8eSmrg # this would work for both with and without runtime linking, it will 243814210e8eSmrg # prevent static linking of such archives. So we do filename-based 243914210e8eSmrg # shared library versioning with .so extension only, which is used 244014210e8eSmrg # when both runtime linking and shared linking is enabled. 244114210e8eSmrg # Unfortunately, runtime linking may impact performance, so we do 244214210e8eSmrg # not want this to be the default eventually. Also, we use the 244314210e8eSmrg # versioned .so libs for executables only if there is the -brtl 244414210e8eSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 244514210e8eSmrg # To allow for filename-based versioning support, we need to create 244614210e8eSmrg # libNAME.so.V as an archive file, containing: 244714210e8eSmrg # *) an Import File, referring to the versioned filename of the 244814210e8eSmrg # archive as well as the shared archive member, telling the 244914210e8eSmrg # bitwidth (32 or 64) of that shared object, and providing the 245014210e8eSmrg # list of exported symbols of that shared object, eventually 245114210e8eSmrg # decorated with the 'weak' keyword 245214210e8eSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245314210e8eSmrg # it being seen by the linker. 245414210e8eSmrg # At run time we better use the real file rather than another symlink, 245514210e8eSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 245614210e8eSmrg 245714210e8eSmrg case $with_aix_soname,$aix_use_runtimelinking in 245814210e8eSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459c35d236eSmrg # soname into executable. Probably we can add versioning support to 2460c35d236eSmrg # collect2, so additional links can be useful in future. 246114210e8eSmrg aix,yes) # traditional libtool 246214210e8eSmrg dynamic_linker='AIX unversionable lib.so' 2463c35d236eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464c35d236eSmrg # instead of lib<name>.a to let people know that these are not 2465c35d236eSmrg # typical AIX shared libraries. 246614210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 246714210e8eSmrg ;; 246814210e8eSmrg aix,no) # traditional AIX only 246914210e8eSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470c35d236eSmrg # We preserve .a as extension for shared libraries through AIX4.2 2471c35d236eSmrg # and later when we are not doing run time linking. 247214210e8eSmrg library_names_spec='$libname$release.a $libname.a' 247314210e8eSmrg soname_spec='$libname$release$shared_ext$major' 247414210e8eSmrg ;; 247514210e8eSmrg svr4,*) # full svr4 only 247614210e8eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 247714210e8eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 247814210e8eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 247914210e8eSmrg shlibpath_overrides_runpath=yes 248014210e8eSmrg ;; 248114210e8eSmrg *,yes) # both, prefer svr4 248214210e8eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248314210e8eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248414210e8eSmrg # unpreferred sharedlib libNAME.a needs extra handling 248514210e8eSmrg 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"' 248614210e8eSmrg 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"' 248714210e8eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 248814210e8eSmrg shlibpath_overrides_runpath=yes 248914210e8eSmrg ;; 249014210e8eSmrg *,no) # both, prefer aix 249114210e8eSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249214210e8eSmrg library_names_spec='$libname$release.a $libname.a' 249314210e8eSmrg soname_spec='$libname$release$shared_ext$major' 249414210e8eSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 249514210e8eSmrg 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)' 249614210e8eSmrg 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"' 249714210e8eSmrg ;; 249814210e8eSmrg esac 2499c35d236eSmrg shlibpath_var=LIBPATH 2500c35d236eSmrg fi 2501c35d236eSmrg ;; 2502c35d236eSmrg 2503c35d236eSmrgamigaos*) 25041fb744b4Smrg case $host_cpu in 25051fb744b4Smrg powerpc) 25061fb744b4Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25071fb744b4Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 250814210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25091fb744b4Smrg ;; 25101fb744b4Smrg m68k) 25111fb744b4Smrg library_names_spec='$libname.ixlibrary $libname.a' 25121fb744b4Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251314210e8eSmrg 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' 25141fb744b4Smrg ;; 25151fb744b4Smrg esac 2516c35d236eSmrg ;; 2517c35d236eSmrg 2518c35d236eSmrgbeos*) 251914210e8eSmrg library_names_spec='$libname$shared_ext' 2520c35d236eSmrg dynamic_linker="$host_os ld.so" 2521c35d236eSmrg shlibpath_var=LIBRARY_PATH 2522c35d236eSmrg ;; 2523c35d236eSmrg 2524c35d236eSmrgbsdi[[45]]*) 25251fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2526c35d236eSmrg need_version=no 252714210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 252814210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2529c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2531c35d236eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532c35d236eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533c35d236eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2534c35d236eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535c35d236eSmrg # libtool to hard-code these into programs 2536c35d236eSmrg ;; 2537c35d236eSmrg 25381fb744b4Smrgcygwin* | mingw* | pw32* | cegcc*) 2539c35d236eSmrg version_type=windows 254014210e8eSmrg shrext_cmds=.dll 2541c35d236eSmrg need_version=no 2542c35d236eSmrg need_lib_prefix=no 2543c35d236eSmrg 25441fb744b4Smrg case $GCC,$cc_basename in 25451fb744b4Smrg yes,*) 25461fb744b4Smrg # gcc 2547c35d236eSmrg library_names_spec='$libname.dll.a' 2548c35d236eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 254914210e8eSmrg postinstall_cmds='base_file=`basename \$file`~ 255014210e8eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551c35d236eSmrg dldir=$destdir/`dirname \$dlpath`~ 2552c35d236eSmrg test -d \$dldir || mkdir -p \$dldir~ 2553c35d236eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 25541fb744b4Smrg chmod a+x \$dldir/$dlname~ 25551fb744b4Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25561fb744b4Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25571fb744b4Smrg fi' 2558c35d236eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559c35d236eSmrg dlpath=$dir/\$dldll~ 25601fb744b4Smrg $RM \$dlpath' 2561c35d236eSmrg shlibpath_overrides_runpath=yes 2562c35d236eSmrg 2563c35d236eSmrg case $host_os in 2564c35d236eSmrg cygwin*) 2565c35d236eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 256614210e8eSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25671fb744b4Smrgm4_if([$1], [],[ 25681fb744b4Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569c35d236eSmrg ;; 25701fb744b4Smrg mingw* | cegcc*) 2571c35d236eSmrg # MinGW DLLs use traditional 'lib' prefix 257214210e8eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573c35d236eSmrg ;; 2574c35d236eSmrg pw32*) 2575c35d236eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 257614210e8eSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577c35d236eSmrg ;; 2578c35d236eSmrg esac 25791fb744b4Smrg dynamic_linker='Win32 ld.exe' 25801fb744b4Smrg ;; 25811fb744b4Smrg 25821fb744b4Smrg *,cl*) 25831fb744b4Smrg # Native MSVC 25841fb744b4Smrg libname_spec='$name' 258514210e8eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258614210e8eSmrg library_names_spec='$libname.dll.lib' 25871fb744b4Smrg 25881fb744b4Smrg case $build_os in 25891fb744b4Smrg mingw*) 25901fb744b4Smrg sys_lib_search_path_spec= 25911fb744b4Smrg lt_save_ifs=$IFS 25921fb744b4Smrg IFS=';' 25931fb744b4Smrg for lt_path in $LIB 25941fb744b4Smrg do 25951fb744b4Smrg IFS=$lt_save_ifs 25961fb744b4Smrg # Let DOS variable expansion print the short 8.3 style file name. 25971fb744b4Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 25981fb744b4Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 25991fb744b4Smrg done 26001fb744b4Smrg IFS=$lt_save_ifs 26011fb744b4Smrg # Convert to MSYS style. 26021fb744b4Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26031fb744b4Smrg ;; 26041fb744b4Smrg cygwin*) 26051fb744b4Smrg # Convert to unix form, then to dos form, then back to unix form 26061fb744b4Smrg # but this time dos style (no spaces!) so that the unix form looks 26071fb744b4Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26081fb744b4Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26091fb744b4Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26101fb744b4Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26111fb744b4Smrg ;; 26121fb744b4Smrg *) 261314210e8eSmrg sys_lib_search_path_spec=$LIB 26141fb744b4Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26151fb744b4Smrg # It is most probably a Windows format PATH. 26161fb744b4Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26171fb744b4Smrg else 26181fb744b4Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26191fb744b4Smrg fi 26201fb744b4Smrg # FIXME: find the short name or the path components, as spaces are 26211fb744b4Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26221fb744b4Smrg ;; 26231fb744b4Smrg esac 26241fb744b4Smrg 26251fb744b4Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 262614210e8eSmrg postinstall_cmds='base_file=`basename \$file`~ 262714210e8eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26281fb744b4Smrg dldir=$destdir/`dirname \$dlpath`~ 26291fb744b4Smrg test -d \$dldir || mkdir -p \$dldir~ 26301fb744b4Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26311fb744b4Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26321fb744b4Smrg dlpath=$dir/\$dldll~ 26331fb744b4Smrg $RM \$dlpath' 26341fb744b4Smrg shlibpath_overrides_runpath=yes 26351fb744b4Smrg dynamic_linker='Win32 link.exe' 2636c35d236eSmrg ;; 2637c35d236eSmrg 2638c35d236eSmrg *) 26391fb744b4Smrg # Assume MSVC wrapper 264014210e8eSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26411fb744b4Smrg dynamic_linker='Win32 ld.exe' 2642c35d236eSmrg ;; 2643c35d236eSmrg esac 2644c35d236eSmrg # FIXME: first we should search . and the directory the executable is in 2645c35d236eSmrg shlibpath_var=PATH 2646c35d236eSmrg ;; 2647c35d236eSmrg 2648c35d236eSmrgdarwin* | rhapsody*) 2649c35d236eSmrg dynamic_linker="$host_os dyld" 2650c35d236eSmrg version_type=darwin 2651c35d236eSmrg need_lib_prefix=no 2652c35d236eSmrg need_version=no 265314210e8eSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 265414210e8eSmrg soname_spec='$libname$release$major$shared_ext' 2655c35d236eSmrg shlibpath_overrides_runpath=yes 2656c35d236eSmrg shlibpath_var=DYLD_LIBRARY_PATH 2657c35d236eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26581fb744b4Smrgm4_if([$1], [],[ 26591fb744b4Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661c35d236eSmrg ;; 2662c35d236eSmrg 2663c35d236eSmrgdgux*) 26641fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2665c35d236eSmrg need_lib_prefix=no 2666c35d236eSmrg need_version=no 266714210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 266814210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2669c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2670c35d236eSmrg ;; 2671c35d236eSmrg 2672c35d236eSmrgfreebsd* | dragonfly*) 2673c35d236eSmrg # DragonFly does not have aout. When/if they implement a new 2674c35d236eSmrg # versioning mechanism, adjust this. 2675c35d236eSmrg if test -x /usr/bin/objformat; then 2676c35d236eSmrg objformat=`/usr/bin/objformat` 2677c35d236eSmrg else 2678c35d236eSmrg case $host_os in 26791fb744b4Smrg freebsd[[23]].*) objformat=aout ;; 2680c35d236eSmrg *) objformat=elf ;; 2681c35d236eSmrg esac 2682c35d236eSmrg fi 268314210e8eSmrg # Handle Gentoo/FreeBSD as it was Linux 268414210e8eSmrg case $host_vendor in 268514210e8eSmrg gentoo) 268614210e8eSmrg version_type=linux ;; 268714210e8eSmrg *) 268814210e8eSmrg version_type=freebsd-$objformat ;; 268914210e8eSmrg esac 269014210e8eSmrg 2691c35d236eSmrg case $version_type in 2692c35d236eSmrg freebsd-elf*) 269314210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 269414210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2695c35d236eSmrg need_version=no 2696c35d236eSmrg need_lib_prefix=no 2697c35d236eSmrg ;; 2698c35d236eSmrg freebsd-*) 269914210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2700c35d236eSmrg need_version=yes 2701c35d236eSmrg ;; 270214210e8eSmrg linux) 270314210e8eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 270414210e8eSmrg soname_spec='${libname}${release}${shared_ext}$major' 270514210e8eSmrg need_lib_prefix=no 270614210e8eSmrg need_version=no 270714210e8eSmrg ;; 2708c35d236eSmrg esac 2709c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2710c35d236eSmrg case $host_os in 27111fb744b4Smrg freebsd2.*) 2712c35d236eSmrg shlibpath_overrides_runpath=yes 2713c35d236eSmrg ;; 2714c35d236eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2715c35d236eSmrg shlibpath_overrides_runpath=yes 2716c35d236eSmrg hardcode_into_libs=yes 2717c35d236eSmrg ;; 2718c35d236eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2719c35d236eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2720c35d236eSmrg shlibpath_overrides_runpath=no 2721c35d236eSmrg hardcode_into_libs=yes 2722c35d236eSmrg ;; 27234f6cd06fSmrg *) # from 4.6 on, and DragonFly 2724c35d236eSmrg shlibpath_overrides_runpath=yes 2725c35d236eSmrg hardcode_into_libs=yes 2726c35d236eSmrg ;; 2727c35d236eSmrg esac 2728c35d236eSmrg ;; 2729c35d236eSmrg 27301fb744b4Smrghaiku*) 27311fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 27321fb744b4Smrg need_lib_prefix=no 27331fb744b4Smrg need_version=no 27341fb744b4Smrg dynamic_linker="$host_os runtime_loader" 273514210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 273614210e8eSmrg soname_spec='$libname$release$shared_ext$major' 27371fb744b4Smrg shlibpath_var=LIBRARY_PATH 273814210e8eSmrg shlibpath_overrides_runpath=no 27391fb744b4Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2740c35d236eSmrg hardcode_into_libs=yes 2741c35d236eSmrg ;; 2742c35d236eSmrg 2743c35d236eSmrghpux9* | hpux10* | hpux11*) 2744c35d236eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2745c35d236eSmrg # link against other versions. 2746c35d236eSmrg version_type=sunos 2747c35d236eSmrg need_lib_prefix=no 2748c35d236eSmrg need_version=no 2749c35d236eSmrg case $host_cpu in 2750c35d236eSmrg ia64*) 2751c35d236eSmrg shrext_cmds='.so' 2752c35d236eSmrg hardcode_into_libs=yes 2753c35d236eSmrg dynamic_linker="$host_os dld.so" 2754c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2755c35d236eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 275614210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 275714210e8eSmrg soname_spec='$libname$release$shared_ext$major' 275814210e8eSmrg if test 32 = "$HPUX_IA64_MODE"; then 2759c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 276014210e8eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2761c35d236eSmrg else 2762c35d236eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 276314210e8eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2764c35d236eSmrg fi 2765c35d236eSmrg ;; 27661fb744b4Smrg hppa*64*) 27671fb744b4Smrg shrext_cmds='.sl' 27681fb744b4Smrg hardcode_into_libs=yes 27691fb744b4Smrg dynamic_linker="$host_os dld.sl" 27701fb744b4Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27711fb744b4Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 277214210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 277314210e8eSmrg soname_spec='$libname$release$shared_ext$major' 27741fb744b4Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27751fb744b4Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27761fb744b4Smrg ;; 27771fb744b4Smrg *) 2778c35d236eSmrg shrext_cmds='.sl' 2779c35d236eSmrg dynamic_linker="$host_os dld.sl" 2780c35d236eSmrg shlibpath_var=SHLIB_PATH 2781c35d236eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 278214210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 278314210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2784c35d236eSmrg ;; 2785c35d236eSmrg esac 27861fb744b4Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2787c35d236eSmrg postinstall_cmds='chmod 555 $lib' 27881fb744b4Smrg # or fails outright, so override atomically: 27891fb744b4Smrg install_override_mode=555 2790c35d236eSmrg ;; 2791c35d236eSmrg 27924f6cd06fSmrginterix[[3-9]]*) 27931fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2794c35d236eSmrg need_lib_prefix=no 2795c35d236eSmrg need_version=no 279614210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 279714210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2798c35d236eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2799c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2800c35d236eSmrg shlibpath_overrides_runpath=no 2801c35d236eSmrg hardcode_into_libs=yes 2802c35d236eSmrg ;; 2803c35d236eSmrg 2804c35d236eSmrgirix5* | irix6* | nonstopux*) 2805c35d236eSmrg case $host_os in 2806c35d236eSmrg nonstopux*) version_type=nonstopux ;; 2807c35d236eSmrg *) 280814210e8eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 28091fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2810c35d236eSmrg else 2811c35d236eSmrg version_type=irix 2812c35d236eSmrg fi ;; 2813c35d236eSmrg esac 2814c35d236eSmrg need_lib_prefix=no 2815c35d236eSmrg need_version=no 281614210e8eSmrg soname_spec='$libname$release$shared_ext$major' 281714210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2818c35d236eSmrg case $host_os in 2819c35d236eSmrg irix5* | nonstopux*) 2820c35d236eSmrg libsuff= shlibsuff= 2821c35d236eSmrg ;; 2822c35d236eSmrg *) 2823c35d236eSmrg case $LD in # libtool.m4 will add one of these switches to LD 2824c35d236eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2825c35d236eSmrg libsuff= shlibsuff= libmagic=32-bit;; 2826c35d236eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2827c35d236eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2828c35d236eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2829c35d236eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2830c35d236eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2831c35d236eSmrg esac 2832c35d236eSmrg ;; 2833c35d236eSmrg esac 2834c35d236eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2835c35d236eSmrg shlibpath_overrides_runpath=no 283614210e8eSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 283714210e8eSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2838c35d236eSmrg hardcode_into_libs=yes 2839c35d236eSmrg ;; 2840c35d236eSmrg 2841c35d236eSmrg# No shared lib support for Linux oldld, aout, or coff. 2842c35d236eSmrglinux*oldld* | linux*aout* | linux*coff*) 2843c35d236eSmrg dynamic_linker=no 2844c35d236eSmrg ;; 2845c35d236eSmrg 284614210e8eSmrglinux*android*) 284714210e8eSmrg version_type=none # Android doesn't support versioned libraries. 284814210e8eSmrg need_lib_prefix=no 284914210e8eSmrg need_version=no 285014210e8eSmrg library_names_spec='$libname$release$shared_ext' 285114210e8eSmrg soname_spec='$libname$release$shared_ext' 285214210e8eSmrg finish_cmds= 285314210e8eSmrg shlibpath_var=LD_LIBRARY_PATH 285414210e8eSmrg shlibpath_overrides_runpath=yes 285514210e8eSmrg 285614210e8eSmrg # This implies no fast_install, which is unacceptable. 285714210e8eSmrg # Some rework will be needed to allow for fast_install 285814210e8eSmrg # before this can be enabled. 285914210e8eSmrg hardcode_into_libs=yes 286014210e8eSmrg 286114210e8eSmrg dynamic_linker='Android linker' 286214210e8eSmrg # Don't embed -rpath directories since the linker doesn't support them. 286314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 286414210e8eSmrg ;; 286514210e8eSmrg 28661fb744b4Smrg# This must be glibc/ELF. 286714210e8eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28681fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 2869c35d236eSmrg need_lib_prefix=no 2870c35d236eSmrg need_version=no 287114210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 287214210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2873c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2874c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2875c35d236eSmrg shlibpath_overrides_runpath=no 28761fb744b4Smrg 28771fb744b4Smrg # Some binutils ld are patched to set DT_RUNPATH 28781fb744b4Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28791fb744b4Smrg [lt_cv_shlibpath_overrides_runpath=no 28801fb744b4Smrg save_LDFLAGS=$LDFLAGS 28811fb744b4Smrg save_libdir=$libdir 28821fb744b4Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28831fb744b4Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28841fb744b4Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28851fb744b4Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28861fb744b4Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28871fb744b4Smrg LDFLAGS=$save_LDFLAGS 28881fb744b4Smrg libdir=$save_libdir 28891fb744b4Smrg ]) 28901fb744b4Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28911fb744b4Smrg 2892c35d236eSmrg # This implies no fast_install, which is unacceptable. 2893c35d236eSmrg # Some rework will be needed to allow for fast_install 2894c35d236eSmrg # before this can be enabled. 2895c35d236eSmrg hardcode_into_libs=yes 28961fb744b4Smrg 289714210e8eSmrg # Ideally, we could use ldconfig to report *all* directores which are 289814210e8eSmrg # searched for libraries, however this is still not possible. Aside from not 289914210e8eSmrg # being certain /sbin/ldconfig is available, command 290014210e8eSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 290114210e8eSmrg # even though it is searched at run-time. Try to do the best guess by 290214210e8eSmrg # appending ld.so.conf contents (and includes) to the search path. 2903c35d236eSmrg if test -f /etc/ld.so.conf; then 29041fb744b4Smrg 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' ' '` 290514210e8eSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2906c35d236eSmrg fi 2907c35d236eSmrg 2908c35d236eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2909c35d236eSmrg # powerpc, because MkLinux only supported shared libraries with the 2910c35d236eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2911c35d236eSmrg # most powerpc-linux boxes support dynamic linking these days and 2912c35d236eSmrg # people can always --disable-shared, the test was removed, and we 2913c35d236eSmrg # assume the GNU/Linux dynamic linker is in use. 2914c35d236eSmrg dynamic_linker='GNU/Linux ld.so' 2915c35d236eSmrg ;; 2916c35d236eSmrg 2917c35d236eSmrgnetbsd*) 2918c35d236eSmrg version_type=sunos 2919c35d236eSmrg need_lib_prefix=no 2920c35d236eSmrg need_version=no 29211fb744b4Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 292214210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2923c35d236eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2924c35d236eSmrg dynamic_linker='NetBSD (a.out) ld.so' 2925c35d236eSmrg else 292614210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292714210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2928c35d236eSmrg dynamic_linker='NetBSD ld.elf_so' 2929c35d236eSmrg fi 2930c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2931c35d236eSmrg shlibpath_overrides_runpath=yes 2932c35d236eSmrg hardcode_into_libs=yes 2933c35d236eSmrg ;; 2934c35d236eSmrg 2935c35d236eSmrgnewsos6) 29361fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 293714210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2938c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 2939c35d236eSmrg shlibpath_overrides_runpath=yes 2940c35d236eSmrg ;; 2941c35d236eSmrg 29421fb744b4Smrg*nto* | *qnx*) 29431fb744b4Smrg version_type=qnx 2944c35d236eSmrg need_lib_prefix=no 2945c35d236eSmrg need_version=no 294614210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 294714210e8eSmrg soname_spec='$libname$release$shared_ext$major' 2948c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 29491fb744b4Smrg shlibpath_overrides_runpath=no 29501fb744b4Smrg hardcode_into_libs=yes 29511fb744b4Smrg dynamic_linker='ldqnx.so' 2952c35d236eSmrg ;; 2953c35d236eSmrg 295414210e8eSmrgopenbsd* | bitrig*) 2955c35d236eSmrg version_type=sunos 295614210e8eSmrg sys_lib_dlsearch_path_spec=/usr/lib 2957c35d236eSmrg need_lib_prefix=no 295814210e8eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 295914210e8eSmrg need_version=no 2960c35d236eSmrg else 296114210e8eSmrg need_version=yes 2962c35d236eSmrg fi 296314210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 296414210e8eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 296514210e8eSmrg shlibpath_var=LD_LIBRARY_PATH 296614210e8eSmrg shlibpath_overrides_runpath=yes 2967c35d236eSmrg ;; 2968c35d236eSmrg 2969c35d236eSmrgos2*) 2970c35d236eSmrg libname_spec='$name' 297114210e8eSmrg version_type=windows 297214210e8eSmrg shrext_cmds=.dll 297314210e8eSmrg need_version=no 2974c35d236eSmrg need_lib_prefix=no 297514210e8eSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 297614210e8eSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 297714210e8eSmrg v=$($ECHO $release$versuffix | tr -d .-); 297814210e8eSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 297914210e8eSmrg $ECHO $n$v`$shared_ext' 298014210e8eSmrg library_names_spec='${libname}_dll.$libext' 2981c35d236eSmrg dynamic_linker='OS/2 ld.exe' 298214210e8eSmrg shlibpath_var=BEGINLIBPATH 298314210e8eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 298414210e8eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 298514210e8eSmrg postinstall_cmds='base_file=`basename \$file`~ 298614210e8eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 298714210e8eSmrg dldir=$destdir/`dirname \$dlpath`~ 298814210e8eSmrg test -d \$dldir || mkdir -p \$dldir~ 298914210e8eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 299014210e8eSmrg chmod a+x \$dldir/$dlname~ 299114210e8eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 299214210e8eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 299314210e8eSmrg fi' 299414210e8eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 299514210e8eSmrg dlpath=$dir/\$dldll~ 299614210e8eSmrg $RM \$dlpath' 2997c35d236eSmrg ;; 2998c35d236eSmrg 2999c35d236eSmrgosf3* | osf4* | osf5*) 3000c35d236eSmrg version_type=osf 3001c35d236eSmrg need_lib_prefix=no 3002c35d236eSmrg need_version=no 300314210e8eSmrg soname_spec='$libname$release$shared_ext$major' 300414210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3005c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 3006c35d236eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 300714210e8eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3008c35d236eSmrg ;; 3009c35d236eSmrg 30104f6cd06fSmrgrdos*) 30114f6cd06fSmrg dynamic_linker=no 30124f6cd06fSmrg ;; 30134f6cd06fSmrg 3014c35d236eSmrgsolaris*) 30151fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 3016c35d236eSmrg need_lib_prefix=no 3017c35d236eSmrg need_version=no 301814210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 301914210e8eSmrg soname_spec='$libname$release$shared_ext$major' 3020c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 3021c35d236eSmrg shlibpath_overrides_runpath=yes 3022c35d236eSmrg hardcode_into_libs=yes 3023c35d236eSmrg # ldd complains unless libraries are executable 3024c35d236eSmrg postinstall_cmds='chmod +x $lib' 3025c35d236eSmrg ;; 3026c35d236eSmrg 3027c35d236eSmrgsunos4*) 3028c35d236eSmrg version_type=sunos 302914210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3030c35d236eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3031c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 3032c35d236eSmrg shlibpath_overrides_runpath=yes 303314210e8eSmrg if test yes = "$with_gnu_ld"; then 3034c35d236eSmrg need_lib_prefix=no 3035c35d236eSmrg fi 3036c35d236eSmrg need_version=yes 3037c35d236eSmrg ;; 3038c35d236eSmrg 3039c35d236eSmrgsysv4 | sysv4.3*) 30401fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 304114210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 304214210e8eSmrg soname_spec='$libname$release$shared_ext$major' 3043c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 3044c35d236eSmrg case $host_vendor in 3045c35d236eSmrg sni) 3046c35d236eSmrg shlibpath_overrides_runpath=no 3047c35d236eSmrg need_lib_prefix=no 3048c35d236eSmrg runpath_var=LD_RUN_PATH 3049c35d236eSmrg ;; 3050c35d236eSmrg siemens) 3051c35d236eSmrg need_lib_prefix=no 3052c35d236eSmrg ;; 3053c35d236eSmrg motorola) 3054c35d236eSmrg need_lib_prefix=no 3055c35d236eSmrg need_version=no 3056c35d236eSmrg shlibpath_overrides_runpath=no 3057c35d236eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3058c35d236eSmrg ;; 3059c35d236eSmrg esac 3060c35d236eSmrg ;; 3061c35d236eSmrg 3062c35d236eSmrgsysv4*MP*) 306314210e8eSmrg if test -d /usr/nec; then 30641fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 306514210e8eSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 306614210e8eSmrg soname_spec='$libname$shared_ext.$major' 3067c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 3068c35d236eSmrg fi 3069c35d236eSmrg ;; 3070c35d236eSmrg 3071c35d236eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 307214210e8eSmrg version_type=sco 3073c35d236eSmrg need_lib_prefix=no 3074c35d236eSmrg need_version=no 307514210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 307614210e8eSmrg soname_spec='$libname$release$shared_ext$major' 3077c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 30781fb744b4Smrg shlibpath_overrides_runpath=yes 3079c35d236eSmrg hardcode_into_libs=yes 308014210e8eSmrg if test yes = "$with_gnu_ld"; then 3081c35d236eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3082c35d236eSmrg else 3083c35d236eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3084c35d236eSmrg case $host_os in 3085c35d236eSmrg sco3.2v5*) 3086c35d236eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3087c35d236eSmrg ;; 3088c35d236eSmrg esac 3089c35d236eSmrg fi 3090c35d236eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3091c35d236eSmrg ;; 3092c35d236eSmrg 30931fb744b4Smrgtpf*) 30941fb744b4Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30951fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 30961fb744b4Smrg need_lib_prefix=no 30971fb744b4Smrg need_version=no 309814210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30991fb744b4Smrg shlibpath_var=LD_LIBRARY_PATH 31001fb744b4Smrg shlibpath_overrides_runpath=no 31011fb744b4Smrg hardcode_into_libs=yes 31021fb744b4Smrg ;; 31031fb744b4Smrg 3104c35d236eSmrguts4*) 31051fb744b4Smrg version_type=linux # correct to gnu/linux during the next big refactor 310614210e8eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 310714210e8eSmrg soname_spec='$libname$release$shared_ext$major' 3108c35d236eSmrg shlibpath_var=LD_LIBRARY_PATH 3109c35d236eSmrg ;; 3110c35d236eSmrg 3111c35d236eSmrg*) 3112c35d236eSmrg dynamic_linker=no 3113c35d236eSmrg ;; 3114c35d236eSmrgesac 3115c35d236eSmrgAC_MSG_RESULT([$dynamic_linker]) 311614210e8eSmrgtest no = "$dynamic_linker" && can_build_shared=no 3117c35d236eSmrg 3118c35d236eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 311914210e8eSmrgif test yes = "$GCC"; then 3120c35d236eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3121c35d236eSmrgfi 3122518bcf38Smrg 312314210e8eSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 312414210e8eSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31251fb744b4Smrgfi 312614210e8eSmrg 312714210e8eSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 312814210e8eSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3129518bcf38Smrgfi 3130518bcf38Smrg 313114210e8eSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 313214210e8eSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 313314210e8eSmrg 313414210e8eSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 313514210e8eSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 313614210e8eSmrg 313714210e8eSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 313814210e8eSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 313914210e8eSmrg 31401fb744b4Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31411fb744b4Smrg [Variables whose values should be saved in libtool wrapper scripts and 31421fb744b4Smrg restored at link time]) 31431fb744b4Smrg_LT_DECL([], [need_lib_prefix], [0], 31441fb744b4Smrg [Do we need the "lib" prefix for modules?]) 31451fb744b4Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31461fb744b4Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31471fb744b4Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31481fb744b4Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31491fb744b4Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31501fb744b4Smrg [Is shlibpath searched before the hard-coded library search path?]) 31511fb744b4Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31521fb744b4Smrg_LT_DECL([], [library_names_spec], [1], 31531fb744b4Smrg [[List of archive names. First name is the real one, the rest are links. 31541fb744b4Smrg The last name is the one that the linker finds with -lNAME]]) 31551fb744b4Smrg_LT_DECL([], [soname_spec], [1], 31561fb744b4Smrg [[The coded name of the library, if different from the real name]]) 31571fb744b4Smrg_LT_DECL([], [install_override_mode], [1], 31581fb744b4Smrg [Permission mode override for installation of shared libraries]) 31591fb744b4Smrg_LT_DECL([], [postinstall_cmds], [2], 31601fb744b4Smrg [Command to use after installation of a shared archive]) 31611fb744b4Smrg_LT_DECL([], [postuninstall_cmds], [2], 31621fb744b4Smrg [Command to use after uninstallation of a shared archive]) 31631fb744b4Smrg_LT_DECL([], [finish_cmds], [2], 31641fb744b4Smrg [Commands used to finish a libtool library installation in a directory]) 31651fb744b4Smrg_LT_DECL([], [finish_eval], [1], 31661fb744b4Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31671fb744b4Smrg not shown]]) 31681fb744b4Smrg_LT_DECL([], [hardcode_into_libs], [0], 31691fb744b4Smrg [Whether we should hardcode library paths into libraries]) 31701fb744b4Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31711fb744b4Smrg [Compile-time system search path for libraries]) 317214210e8eSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 317314210e8eSmrg [Detected run-time system search path for libraries]) 317414210e8eSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 317514210e8eSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31761fb744b4Smrg])# _LT_SYS_DYNAMIC_LINKER 31771fb744b4Smrg 31781fb744b4Smrg 31791fb744b4Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3180518bcf38Smrg# -------------------------- 318114210e8eSmrg# find a file program that can recognize shared library 31821fb744b4SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31831fb744b4Smrg[m4_require([_LT_DECL_EGREP])dnl 3184518bcf38SmrgAC_MSG_CHECKING([for $1]) 3185518bcf38SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3186518bcf38Smrg[case $MAGIC_CMD in 3187c35d236eSmrg[[\\/*] | ?:[\\/]*]) 318814210e8eSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3189c35d236eSmrg ;; 3190c35d236eSmrg*) 319114210e8eSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 319214210e8eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3193c35d236eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3194c35d236eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3195c35d236eSmrgdnl not every word. This closes a longstanding sh security hole. 31961fb744b4Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3197c35d236eSmrg for ac_dir in $ac_dummy; do 319814210e8eSmrg IFS=$lt_save_ifs 3199c35d236eSmrg test -z "$ac_dir" && ac_dir=. 320014210e8eSmrg if test -f "$ac_dir/$1"; then 320114210e8eSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3202c35d236eSmrg if test -n "$file_magic_test_file"; then 3203c35d236eSmrg case $deplibs_check_method in 3204c35d236eSmrg "file_magic "*) 3205c35d236eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 320614210e8eSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207c35d236eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3208c35d236eSmrg $EGREP "$file_magic_regex" > /dev/null; then 3209c35d236eSmrg : 3210c35d236eSmrg else 32111fb744b4Smrg cat <<_LT_EOF 1>&2 3212c35d236eSmrg 3213c35d236eSmrg*** Warning: the command libtool uses to detect shared libraries, 3214c35d236eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3215c35d236eSmrg*** The result is that libtool may fail to recognize shared libraries 3216c35d236eSmrg*** as such. This will affect the creation of libtool libraries that 3217c35d236eSmrg*** depend on shared libraries, but programs linked with such libtool 3218c35d236eSmrg*** libraries will work regardless of this problem. Nevertheless, you 3219c35d236eSmrg*** may want to report the problem to your system manager and/or to 3220c35d236eSmrg*** bug-libtool@gnu.org 3221c35d236eSmrg 32221fb744b4Smrg_LT_EOF 3223c35d236eSmrg fi ;; 3224c35d236eSmrg esac 3225c35d236eSmrg fi 3226c35d236eSmrg break 3227c35d236eSmrg fi 3228c35d236eSmrg done 322914210e8eSmrg IFS=$lt_save_ifs 323014210e8eSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 3231c35d236eSmrg ;; 3232c35d236eSmrgesac]) 323314210e8eSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3234c35d236eSmrgif test -n "$MAGIC_CMD"; then 3235c35d236eSmrg AC_MSG_RESULT($MAGIC_CMD) 3236c35d236eSmrgelse 3237c35d236eSmrg AC_MSG_RESULT(no) 3238c35d236eSmrgfi 32391fb744b4Smrg_LT_DECL([], [MAGIC_CMD], [0], 32401fb744b4Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32411fb744b4Smrg])# _LT_PATH_TOOL_PREFIX 3242c35d236eSmrg 32431fb744b4Smrg# Old name: 32441fb744b4SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32451fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 32461fb744b4Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3247f55e6a01Smrg 32481fb744b4Smrg 32491fb744b4Smrg# _LT_PATH_MAGIC 32501fb744b4Smrg# -------------- 325114210e8eSmrg# find a file program that can recognize a shared library 32521fb744b4Smrgm4_defun([_LT_PATH_MAGIC], 32531fb744b4Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3254c35d236eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3255c35d236eSmrg if test -n "$ac_tool_prefix"; then 32561fb744b4Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3257c35d236eSmrg else 3258c35d236eSmrg MAGIC_CMD=: 3259c35d236eSmrg fi 3260c35d236eSmrgfi 32611fb744b4Smrg])# _LT_PATH_MAGIC 3262c35d236eSmrg 3263c35d236eSmrg 32641fb744b4Smrg# LT_PATH_LD 3265c35d236eSmrg# ---------- 3266c35d236eSmrg# find the pathname to the GNU or non-GNU linker 32671fb744b4SmrgAC_DEFUN([LT_PATH_LD], 32681fb744b4Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3269518bcf38SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3270518bcf38SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32711fb744b4Smrgm4_require([_LT_DECL_SED])dnl 32721fb744b4Smrgm4_require([_LT_DECL_EGREP])dnl 32731fb744b4Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32741fb744b4Smrg 32751fb744b4SmrgAC_ARG_WITH([gnu-ld], 32761fb744b4Smrg [AS_HELP_STRING([--with-gnu-ld], 32771fb744b4Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 327814210e8eSmrg [test no = "$withval" || with_gnu_ld=yes], 32791fb744b4Smrg [with_gnu_ld=no])dnl 32801fb744b4Smrg 3281c35d236eSmrgac_prog=ld 328214210e8eSmrgif test yes = "$GCC"; then 3283c35d236eSmrg # Check if gcc -print-prog-name=ld gives a path. 3284c35d236eSmrg AC_MSG_CHECKING([for ld used by $CC]) 3285c35d236eSmrg case $host in 3286c35d236eSmrg *-*-mingw*) 328714210e8eSmrg # gcc leaves a trailing carriage return, which upsets mingw 3288c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3289c35d236eSmrg *) 3290c35d236eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3291c35d236eSmrg esac 3292c35d236eSmrg case $ac_prog in 3293c35d236eSmrg # Accept absolute paths. 3294c35d236eSmrg [[\\/]]* | ?:[[\\/]]*) 3295c35d236eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3296c35d236eSmrg # Canonicalize the pathname of ld 32971fb744b4Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32981fb744b4Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32991fb744b4Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3300c35d236eSmrg done 330114210e8eSmrg test -z "$LD" && LD=$ac_prog 3302c35d236eSmrg ;; 3303c35d236eSmrg "") 3304c35d236eSmrg # If it fails, then pretend we aren't using GCC. 3305c35d236eSmrg ac_prog=ld 3306c35d236eSmrg ;; 3307c35d236eSmrg *) 3308c35d236eSmrg # If it is relative, then search for the first ld in PATH. 3309c35d236eSmrg with_gnu_ld=unknown 3310c35d236eSmrg ;; 3311c35d236eSmrg esac 331214210e8eSmrgelif test yes = "$with_gnu_ld"; then 3313c35d236eSmrg AC_MSG_CHECKING([for GNU ld]) 3314c35d236eSmrgelse 3315c35d236eSmrg AC_MSG_CHECKING([for non-GNU ld]) 3316c35d236eSmrgfi 3317c35d236eSmrgAC_CACHE_VAL(lt_cv_path_LD, 3318c35d236eSmrg[if test -z "$LD"; then 331914210e8eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3320c35d236eSmrg for ac_dir in $PATH; do 332114210e8eSmrg IFS=$lt_save_ifs 3322c35d236eSmrg test -z "$ac_dir" && ac_dir=. 3323c35d236eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 332414210e8eSmrg lt_cv_path_LD=$ac_dir/$ac_prog 3325c35d236eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3326c35d236eSmrg # but apparently some variants of GNU ld only accept -v. 3327c35d236eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3328c35d236eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3329c35d236eSmrg *GNU* | *'with BFD'*) 333014210e8eSmrg test no != "$with_gnu_ld" && break 3331c35d236eSmrg ;; 3332c35d236eSmrg *) 333314210e8eSmrg test yes != "$with_gnu_ld" && break 3334c35d236eSmrg ;; 3335c35d236eSmrg esac 3336c35d236eSmrg fi 3337c35d236eSmrg done 333814210e8eSmrg IFS=$lt_save_ifs 3339c35d236eSmrgelse 334014210e8eSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3341c35d236eSmrgfi]) 334214210e8eSmrgLD=$lt_cv_path_LD 3343c35d236eSmrgif test -n "$LD"; then 3344c35d236eSmrg AC_MSG_RESULT($LD) 3345c35d236eSmrgelse 3346c35d236eSmrg AC_MSG_RESULT(no) 3347c35d236eSmrgfi 3348c35d236eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33491fb744b4Smrg_LT_PATH_LD_GNU 33501fb744b4SmrgAC_SUBST([LD]) 3351c35d236eSmrg 33521fb744b4Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33531fb744b4Smrg])# LT_PATH_LD 3354c35d236eSmrg 33551fb744b4Smrg# Old names: 33561fb744b4SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33571fb744b4SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33581fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 33591fb744b4Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33601fb744b4Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33611fb744b4Smrg 33621fb744b4Smrg 33631fb744b4Smrg# _LT_PATH_LD_GNU 33641fb744b4Smrg#- -------------- 33651fb744b4Smrgm4_defun([_LT_PATH_LD_GNU], 33661fb744b4Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3367c35d236eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3368c35d236eSmrgcase `$LD -v 2>&1 </dev/null` in 3369c35d236eSmrg*GNU* | *'with BFD'*) 3370c35d236eSmrg lt_cv_prog_gnu_ld=yes 3371c35d236eSmrg ;; 3372c35d236eSmrg*) 3373c35d236eSmrg lt_cv_prog_gnu_ld=no 3374c35d236eSmrg ;; 3375c35d236eSmrgesac]) 3376c35d236eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33771fb744b4Smrg])# _LT_PATH_LD_GNU 3378c35d236eSmrg 3379c35d236eSmrg 33801fb744b4Smrg# _LT_CMD_RELOAD 33811fb744b4Smrg# -------------- 3382c35d236eSmrg# find reload flag for linker 3383c35d236eSmrg# -- PORTME Some linkers may need a different reload flag. 33841fb744b4Smrgm4_defun([_LT_CMD_RELOAD], 3385c35d236eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3386c35d236eSmrg lt_cv_ld_reload_flag, 3387c35d236eSmrg [lt_cv_ld_reload_flag='-r']) 3388c35d236eSmrgreload_flag=$lt_cv_ld_reload_flag 3389c35d236eSmrgcase $reload_flag in 3390c35d236eSmrg"" | " "*) ;; 3391c35d236eSmrg*) reload_flag=" $reload_flag" ;; 3392c35d236eSmrgesac 3393c35d236eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3394c35d236eSmrgcase $host_os in 33951fb744b4Smrg cygwin* | mingw* | pw32* | cegcc*) 339614210e8eSmrg if test yes != "$GCC"; then 33971fb744b4Smrg reload_cmds=false 33981fb744b4Smrg fi 33991fb744b4Smrg ;; 3400c35d236eSmrg darwin*) 340114210e8eSmrg if test yes = "$GCC"; then 340214210e8eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3403c35d236eSmrg else 3404c35d236eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3405c35d236eSmrg fi 3406c35d236eSmrg ;; 3407c35d236eSmrgesac 34081fb744b4Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34091fb744b4Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34101fb744b4Smrg])# _LT_CMD_RELOAD 3411c35d236eSmrg 3412c35d236eSmrg 341314210e8eSmrg# _LT_PATH_DD 341414210e8eSmrg# ----------- 341514210e8eSmrg# find a working dd 341614210e8eSmrgm4_defun([_LT_PATH_DD], 341714210e8eSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 341814210e8eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 341914210e8eSmrgcat conftest.i conftest.i >conftest2.i 342014210e8eSmrg: ${lt_DD:=$DD} 342114210e8eSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 342214210e8eSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 342314210e8eSmrg cmp -s conftest.i conftest.out \ 342414210e8eSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 342514210e8eSmrgfi]) 342614210e8eSmrgrm -f conftest.i conftest2.i conftest.out]) 342714210e8eSmrg])# _LT_PATH_DD 342814210e8eSmrg 342914210e8eSmrg 343014210e8eSmrg# _LT_CMD_TRUNCATE 343114210e8eSmrg# ---------------- 343214210e8eSmrg# find command to truncate a binary pipe 343314210e8eSmrgm4_defun([_LT_CMD_TRUNCATE], 343414210e8eSmrg[m4_require([_LT_PATH_DD]) 343514210e8eSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 343614210e8eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 343714210e8eSmrgcat conftest.i conftest.i >conftest2.i 343814210e8eSmrglt_cv_truncate_bin= 343914210e8eSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 344014210e8eSmrg cmp -s conftest.i conftest.out \ 344114210e8eSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 344214210e8eSmrgfi 344314210e8eSmrgrm -f conftest.i conftest2.i conftest.out 344414210e8eSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 344514210e8eSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 344614210e8eSmrg [Command to truncate a binary pipe]) 344714210e8eSmrg])# _LT_CMD_TRUNCATE 344814210e8eSmrg 344914210e8eSmrg 34501fb744b4Smrg# _LT_CHECK_MAGIC_METHOD 34511fb744b4Smrg# ---------------------- 3452c35d236eSmrg# how to check for library dependencies 3453c35d236eSmrg# -- PORTME fill in with the dynamic library characteristics 34541fb744b4Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34551fb744b4Smrg[m4_require([_LT_DECL_EGREP]) 34561fb744b4Smrgm4_require([_LT_DECL_OBJDUMP]) 34571fb744b4SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3458c35d236eSmrglt_cv_deplibs_check_method, 3459c35d236eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3460c35d236eSmrglt_cv_file_magic_test_file= 3461c35d236eSmrglt_cv_deplibs_check_method='unknown' 3462c35d236eSmrg# Need to set the preceding variable on all platforms that support 3463c35d236eSmrg# interlibrary dependencies. 3464c35d236eSmrg# 'none' -- dependencies not supported. 346514210e8eSmrg# 'unknown' -- same as none, but documents that we really don't know. 3466c35d236eSmrg# 'pass_all' -- all dependencies passed with no checks. 3467c35d236eSmrg# 'test_compile' -- check by making test program. 3468c35d236eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 346914210e8eSmrg# that responds to the $file_magic_cmd with a given extended regex. 347014210e8eSmrg# If you have 'file' or equivalent on your system and you're not sure 347114210e8eSmrg# whether 'pass_all' will *always* work, you probably want this one. 3472c35d236eSmrg 3473c35d236eSmrgcase $host_os in 34744f6cd06fSmrgaix[[4-9]]*) 3475c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3476c35d236eSmrg ;; 3477c35d236eSmrg 3478c35d236eSmrgbeos*) 3479c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3480c35d236eSmrg ;; 3481c35d236eSmrg 3482c35d236eSmrgbsdi[[45]]*) 3483c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3484c35d236eSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3485c35d236eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3486c35d236eSmrg ;; 3487c35d236eSmrg 3488c35d236eSmrgcygwin*) 3489c35d236eSmrg # func_win32_libid is a shell function defined in ltmain.sh 3490c35d236eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3491c35d236eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3492c35d236eSmrg ;; 3493c35d236eSmrg 3494c35d236eSmrgmingw* | pw32*) 3495c35d236eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 34964f6cd06fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34974f6cd06fSmrg # unless we find 'file', for example because we are cross-compiling. 349814210e8eSmrg if ( file / ) >/dev/null 2>&1; then 34994f6cd06fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35004f6cd06fSmrg lt_cv_file_magic_cmd='func_win32_libid' 35014f6cd06fSmrg else 35021fb744b4Smrg # Keep this pattern in sync with the one in func_win32_libid. 35031fb744b4Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35044f6cd06fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35054f6cd06fSmrg fi 3506c35d236eSmrg ;; 3507c35d236eSmrg 35081fb744b4Smrgcegcc*) 35091fb744b4Smrg # use the weaker test based on 'objdump'. See mingw*. 35101fb744b4Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35111fb744b4Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35121fb744b4Smrg ;; 35131fb744b4Smrg 3514c35d236eSmrgdarwin* | rhapsody*) 3515c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3516c35d236eSmrg ;; 3517c35d236eSmrg 35184f6cd06fSmrgfreebsd* | dragonfly*) 35191fb744b4Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3520c35d236eSmrg case $host_cpu in 3521c35d236eSmrg i*86 ) 3522c35d236eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3523c35d236eSmrg # Let's accept both of them until this is cleared up. 3524c35d236eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3525c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3526c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3527c35d236eSmrg ;; 3528c35d236eSmrg esac 3529c35d236eSmrg else 3530c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3531c35d236eSmrg fi 3532c35d236eSmrg ;; 3533c35d236eSmrg 35341fb744b4Smrghaiku*) 35351fb744b4Smrg lt_cv_deplibs_check_method=pass_all 35361fb744b4Smrg ;; 35371fb744b4Smrg 3538c35d236eSmrghpux10.20* | hpux11*) 3539c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3540c35d236eSmrg case $host_cpu in 3541c35d236eSmrg ia64*) 3542c35d236eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3543c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3544c35d236eSmrg ;; 3545c35d236eSmrg hppa*64*) 35461fb744b4Smrg [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]'] 3547c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3548c35d236eSmrg ;; 3549c35d236eSmrg *) 35501fb744b4Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3551c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3552c35d236eSmrg ;; 3553c35d236eSmrg esac 3554c35d236eSmrg ;; 3555c35d236eSmrg 35564f6cd06fSmrginterix[[3-9]]*) 3557c35d236eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3558c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3559c35d236eSmrg ;; 3560c35d236eSmrg 3561c35d236eSmrgirix5* | irix6* | nonstopux*) 3562c35d236eSmrg case $LD in 3563c35d236eSmrg *-32|*"-32 ") libmagic=32-bit;; 3564c35d236eSmrg *-n32|*"-n32 ") libmagic=N32;; 3565c35d236eSmrg *-64|*"-64 ") libmagic=64-bit;; 3566c35d236eSmrg *) libmagic=never-match;; 3567c35d236eSmrg esac 3568c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3569c35d236eSmrg ;; 3570c35d236eSmrg 35711fb744b4Smrg# This must be glibc/ELF. 357214210e8eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3573c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3574c35d236eSmrg ;; 3575c35d236eSmrg 3576c35d236eSmrgnetbsd*) 35771fb744b4Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3578c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3579c35d236eSmrg else 3580c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3581c35d236eSmrg fi 3582c35d236eSmrg ;; 3583c35d236eSmrg 3584c35d236eSmrgnewos6*) 3585c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3586c35d236eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3587c35d236eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3588c35d236eSmrg ;; 3589c35d236eSmrg 35901fb744b4Smrg*nto* | *qnx*) 35911fb744b4Smrg lt_cv_deplibs_check_method=pass_all 3592c35d236eSmrg ;; 3593c35d236eSmrg 359414210e8eSmrgopenbsd* | bitrig*) 359514210e8eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3596c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3597c35d236eSmrg else 3598c35d236eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3599c35d236eSmrg fi 3600c35d236eSmrg ;; 3601c35d236eSmrg 3602c35d236eSmrgosf3* | osf4* | osf5*) 3603c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3604c35d236eSmrg ;; 3605c35d236eSmrg 36064f6cd06fSmrgrdos*) 36074f6cd06fSmrg lt_cv_deplibs_check_method=pass_all 36084f6cd06fSmrg ;; 36094f6cd06fSmrg 3610c35d236eSmrgsolaris*) 3611c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3612c35d236eSmrg ;; 3613c35d236eSmrg 36141fb744b4Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36151fb744b4Smrg lt_cv_deplibs_check_method=pass_all 36161fb744b4Smrg ;; 36171fb744b4Smrg 3618c35d236eSmrgsysv4 | sysv4.3*) 3619c35d236eSmrg case $host_vendor in 3620c35d236eSmrg motorola) 3621c35d236eSmrg 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]]' 3622c35d236eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3623c35d236eSmrg ;; 3624c35d236eSmrg ncr) 3625c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3626c35d236eSmrg ;; 3627c35d236eSmrg sequent) 3628c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 3629c35d236eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3630c35d236eSmrg ;; 3631c35d236eSmrg sni) 3632c35d236eSmrg lt_cv_file_magic_cmd='/bin/file' 3633c35d236eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3634c35d236eSmrg lt_cv_file_magic_test_file=/lib/libc.so 3635c35d236eSmrg ;; 3636c35d236eSmrg siemens) 3637c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3638c35d236eSmrg ;; 3639c35d236eSmrg pc) 3640c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3641c35d236eSmrg ;; 3642c35d236eSmrg esac 3643c35d236eSmrg ;; 3644c35d236eSmrg 36451fb744b4Smrgtpf*) 3646c35d236eSmrg lt_cv_deplibs_check_method=pass_all 3647c35d236eSmrg ;; 364814210e8eSmrgos2*) 364914210e8eSmrg lt_cv_deplibs_check_method=pass_all 365014210e8eSmrg ;; 3651c35d236eSmrgesac 3652c35d236eSmrg]) 36531fb744b4Smrg 36541fb744b4Smrgfile_magic_glob= 36551fb744b4Smrgwant_nocaseglob=no 36561fb744b4Smrgif test "$build" = "$host"; then 36571fb744b4Smrg case $host_os in 36581fb744b4Smrg mingw* | pw32*) 36591fb744b4Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36601fb744b4Smrg want_nocaseglob=yes 36611fb744b4Smrg else 36621fb744b4Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36631fb744b4Smrg fi 36641fb744b4Smrg ;; 36651fb744b4Smrg esac 36661fb744b4Smrgfi 36671fb744b4Smrg 3668c35d236eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3669c35d236eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3670c35d236eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3671c35d236eSmrg 36721fb744b4Smrg_LT_DECL([], [deplibs_check_method], [1], 36731fb744b4Smrg [Method to check whether dependent libraries are shared objects]) 36741fb744b4Smrg_LT_DECL([], [file_magic_cmd], [1], 36751fb744b4Smrg [Command to use when deplibs_check_method = "file_magic"]) 36761fb744b4Smrg_LT_DECL([], [file_magic_glob], [1], 36771fb744b4Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 36781fb744b4Smrg_LT_DECL([], [want_nocaseglob], [1], 36791fb744b4Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36801fb744b4Smrg])# _LT_CHECK_MAGIC_METHOD 3681c35d236eSmrg 36821fb744b4Smrg 36831fb744b4Smrg# LT_PATH_NM 3684c35d236eSmrg# ---------- 36851fb744b4Smrg# find the pathname to a BSD- or MS-compatible name lister 36861fb744b4SmrgAC_DEFUN([LT_PATH_NM], 36871fb744b4Smrg[AC_REQUIRE([AC_PROG_CC])dnl 36881fb744b4SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3689c35d236eSmrg[if test -n "$NM"; then 3690c35d236eSmrg # Let the user override the test. 369114210e8eSmrg lt_cv_path_NM=$NM 3692c35d236eSmrgelse 369314210e8eSmrg lt_nm_to_check=${ac_tool_prefix}nm 36944f6cd06fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3695c35d236eSmrg lt_nm_to_check="$lt_nm_to_check nm" 3696c35d236eSmrg fi 3697c35d236eSmrg for lt_tmp_nm in $lt_nm_to_check; do 369814210e8eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3699c35d236eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 370014210e8eSmrg IFS=$lt_save_ifs 3701c35d236eSmrg test -z "$ac_dir" && ac_dir=. 370214210e8eSmrg tmp_nm=$ac_dir/$lt_tmp_nm 370314210e8eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3704c35d236eSmrg # Check to see if the nm accepts a BSD-compat flag. 370514210e8eSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3706c35d236eSmrg # nm: unknown option "B" ignored 3707c35d236eSmrg # Tru64's nm complains that /dev/null is an invalid object file 370814210e8eSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 370914210e8eSmrg case $build_os in 371014210e8eSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 371114210e8eSmrg *) lt_bad_file=/dev/null ;; 371214210e8eSmrg esac 371314210e8eSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 371414210e8eSmrg *$lt_bad_file* | *'Invalid file or object type'*) 3715c35d236eSmrg lt_cv_path_NM="$tmp_nm -B" 371614210e8eSmrg break 2 3717c35d236eSmrg ;; 3718c35d236eSmrg *) 3719c35d236eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3720c35d236eSmrg */dev/null*) 3721c35d236eSmrg lt_cv_path_NM="$tmp_nm -p" 372214210e8eSmrg break 2 3723c35d236eSmrg ;; 3724c35d236eSmrg *) 3725c35d236eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3726c35d236eSmrg continue # so that we can try to find one that supports BSD flags 3727c35d236eSmrg ;; 3728c35d236eSmrg esac 3729c35d236eSmrg ;; 3730c35d236eSmrg esac 3731c35d236eSmrg fi 3732c35d236eSmrg done 373314210e8eSmrg IFS=$lt_save_ifs 3734c35d236eSmrg done 37351fb744b4Smrg : ${lt_cv_path_NM=no} 3736c35d236eSmrgfi]) 373714210e8eSmrgif test no != "$lt_cv_path_NM"; then 373814210e8eSmrg NM=$lt_cv_path_NM 37391fb744b4Smrgelse 37401fb744b4Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 37411fb744b4Smrg if test -n "$DUMPBIN"; then : 37421fb744b4Smrg # Let the user override the test. 37431fb744b4Smrg else 37441fb744b4Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 374514210e8eSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 37461fb744b4Smrg *COFF*) 374714210e8eSmrg DUMPBIN="$DUMPBIN -symbols -headers" 37481fb744b4Smrg ;; 37491fb744b4Smrg *) 37501fb744b4Smrg DUMPBIN=: 37511fb744b4Smrg ;; 37521fb744b4Smrg esac 37531fb744b4Smrg fi 37541fb744b4Smrg AC_SUBST([DUMPBIN]) 375514210e8eSmrg if test : != "$DUMPBIN"; then 375614210e8eSmrg NM=$DUMPBIN 37571fb744b4Smrg fi 37581fb744b4Smrgfi 37591fb744b4Smrgtest -z "$NM" && NM=nm 37601fb744b4SmrgAC_SUBST([NM]) 37611fb744b4Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37621fb744b4Smrg 37631fb744b4SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37641fb744b4Smrg [lt_cv_nm_interface="BSD nm" 37651fb744b4Smrg echo "int some_variable = 0;" > conftest.$ac_ext 37661fb744b4Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37671fb744b4Smrg (eval "$ac_compile" 2>conftest.err) 37681fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37691fb744b4Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37701fb744b4Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37711fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37721fb744b4Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37731fb744b4Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37741fb744b4Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37751fb744b4Smrg lt_cv_nm_interface="MS dumpbin" 37761fb744b4Smrg fi 37771fb744b4Smrg rm -f conftest*]) 37781fb744b4Smrg])# LT_PATH_NM 37791fb744b4Smrg 37801fb744b4Smrg# Old names: 37811fb744b4SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37821fb744b4SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37831fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 37841fb744b4Smrgdnl AC_DEFUN([AM_PROG_NM], []) 37851fb744b4Smrgdnl AC_DEFUN([AC_PROG_NM], []) 37861fb744b4Smrg 37871fb744b4Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37881fb744b4Smrg# -------------------------------- 37891fb744b4Smrg# how to determine the name of the shared library 37901fb744b4Smrg# associated with a specific link library. 37911fb744b4Smrg# -- PORTME fill in with the dynamic library characteristics 37921fb744b4Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37931fb744b4Smrg[m4_require([_LT_DECL_EGREP]) 37941fb744b4Smrgm4_require([_LT_DECL_OBJDUMP]) 37951fb744b4Smrgm4_require([_LT_DECL_DLLTOOL]) 37961fb744b4SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 37971fb744b4Smrglt_cv_sharedlib_from_linklib_cmd, 37981fb744b4Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3799c35d236eSmrg 38001fb744b4Smrgcase $host_os in 38011fb744b4Smrgcygwin* | mingw* | pw32* | cegcc*) 380214210e8eSmrg # two different shell functions defined in ltmain.sh; 380314210e8eSmrg # decide which one to use based on capabilities of $DLLTOOL 38041fb744b4Smrg case `$DLLTOOL --help 2>&1` in 38051fb744b4Smrg *--identify-strict*) 38061fb744b4Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38071fb744b4Smrg ;; 38081fb744b4Smrg *) 38091fb744b4Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38101fb744b4Smrg ;; 38111fb744b4Smrg esac 38121fb744b4Smrg ;; 38131fb744b4Smrg*) 38141fb744b4Smrg # fallback: assume linklib IS sharedlib 381514210e8eSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38161fb744b4Smrg ;; 38171fb744b4Smrgesac 38181fb744b4Smrg]) 38191fb744b4Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38201fb744b4Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3821f55e6a01Smrg 38221fb744b4Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38231fb744b4Smrg [Command to associate shared and link libraries]) 38241fb744b4Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38251fb744b4Smrg 38261fb744b4Smrg 38271fb744b4Smrg# _LT_PATH_MANIFEST_TOOL 38281fb744b4Smrg# ---------------------- 38291fb744b4Smrg# locate the manifest tool 38301fb744b4Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38311fb744b4Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38321fb744b4Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38331fb744b4SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38341fb744b4Smrg [lt_cv_path_mainfest_tool=no 38351fb744b4Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38361fb744b4Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38371fb744b4Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38381fb744b4Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38391fb744b4Smrg lt_cv_path_mainfest_tool=yes 38401fb744b4Smrg fi 38411fb744b4Smrg rm -f conftest*]) 384214210e8eSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 38431fb744b4Smrg MANIFEST_TOOL=: 38441fb744b4Smrgfi 38451fb744b4Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38461fb744b4Smrg])# _LT_PATH_MANIFEST_TOOL 38471fb744b4Smrg 38481fb744b4Smrg 384914210e8eSmrg# _LT_DLL_DEF_P([FILE]) 385014210e8eSmrg# --------------------- 385114210e8eSmrg# True iff FILE is a Windows DLL '.def' file. 385214210e8eSmrg# Keep in sync with func_dll_def_p in the libtool script 385314210e8eSmrgAC_DEFUN([_LT_DLL_DEF_P], 385414210e8eSmrg[dnl 385514210e8eSmrg test DEF = "`$SED -n dnl 385614210e8eSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 385714210e8eSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 385814210e8eSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 385914210e8eSmrg -e q dnl Only consider the first "real" line 386014210e8eSmrg $1`" dnl 386114210e8eSmrg])# _LT_DLL_DEF_P 386214210e8eSmrg 386314210e8eSmrg 38641fb744b4Smrg# LT_LIB_M 38651fb744b4Smrg# -------- 3866c35d236eSmrg# check for math library 38671fb744b4SmrgAC_DEFUN([LT_LIB_M], 3868c35d236eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3869c35d236eSmrgLIBM= 3870c35d236eSmrgcase $host in 38711fb744b4Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3872c35d236eSmrg # These system don't have libm, or don't need it 3873c35d236eSmrg ;; 3874c35d236eSmrg*-ncr-sysv4.3*) 387514210e8eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3876c35d236eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3877c35d236eSmrg ;; 3878c35d236eSmrg*) 387914210e8eSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3880c35d236eSmrg ;; 3881c35d236eSmrgesac 38821fb744b4SmrgAC_SUBST([LIBM]) 38831fb744b4Smrg])# LT_LIB_M 3884c35d236eSmrg 38851fb744b4Smrg# Old name: 38861fb744b4SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38871fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 38881fb744b4Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3889c35d236eSmrg 3890c35d236eSmrg 38911fb744b4Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38921fb744b4Smrg# ------------------------------- 38931fb744b4Smrgm4_defun([_LT_COMPILER_NO_RTTI], 38941fb744b4Smrg[m4_require([_LT_TAG_COMPILER])dnl 3895c35d236eSmrg 38961fb744b4Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3897c35d236eSmrg 389814210e8eSmrgif test yes = "$GCC"; then 38991fb744b4Smrg case $cc_basename in 39001fb744b4Smrg nvcc*) 39011fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39021fb744b4Smrg *) 39031fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39041fb744b4Smrg esac 3905c35d236eSmrg 39061fb744b4Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39071fb744b4Smrg lt_cv_prog_compiler_rtti_exceptions, 39081fb744b4Smrg [-fno-rtti -fno-exceptions], [], 39091fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3910518bcf38Smrgfi 39111fb744b4Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39121fb744b4Smrg [Compiler flag to turn off builtin functions]) 39131fb744b4Smrg])# _LT_COMPILER_NO_RTTI 3914c35d236eSmrg 3915c35d236eSmrg 39161fb744b4Smrg# _LT_CMD_GLOBAL_SYMBOLS 39171fb744b4Smrg# ---------------------- 39181fb744b4Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39191fb744b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39201fb744b4SmrgAC_REQUIRE([AC_PROG_CC])dnl 39211fb744b4SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39221fb744b4SmrgAC_REQUIRE([LT_PATH_NM])dnl 39231fb744b4SmrgAC_REQUIRE([LT_PATH_LD])dnl 39241fb744b4Smrgm4_require([_LT_DECL_SED])dnl 39251fb744b4Smrgm4_require([_LT_DECL_EGREP])dnl 39261fb744b4Smrgm4_require([_LT_TAG_COMPILER])dnl 3927518bcf38Smrg 39281fb744b4Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39291fb744b4SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39301fb744b4SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39311fb744b4Smrg[ 39321fb744b4Smrg# These are sane defaults that work on at least a few old systems. 39331fb744b4Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3934518bcf38Smrg 39351fb744b4Smrg# Character class describing NM global symbol codes. 39361fb744b4Smrgsymcode='[[BCDEGRST]]' 3937518bcf38Smrg 39381fb744b4Smrg# Regexp to match symbols that can be accessed directly from C. 39391fb744b4Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3940518bcf38Smrg 39411fb744b4Smrg# Define system-specific variables. 3942518bcf38Smrgcase $host_os in 39431fb744b4Smrgaix*) 39441fb744b4Smrg symcode='[[BCDT]]' 3945518bcf38Smrg ;; 39461fb744b4Smrgcygwin* | mingw* | pw32* | cegcc*) 39471fb744b4Smrg symcode='[[ABCDGISTW]]' 39481fb744b4Smrg ;; 39491fb744b4Smrghpux*) 395014210e8eSmrg if test ia64 = "$host_cpu"; then 39511fb744b4Smrg symcode='[[ABCDEGRST]]' 3952518bcf38Smrg fi 39531fb744b4Smrg ;; 39541fb744b4Smrgirix* | nonstopux*) 39551fb744b4Smrg symcode='[[BCDEGRST]]' 39561fb744b4Smrg ;; 39571fb744b4Smrgosf*) 39581fb744b4Smrg symcode='[[BCDEGQRST]]' 39591fb744b4Smrg ;; 39601fb744b4Smrgsolaris*) 39611fb744b4Smrg symcode='[[BDRT]]' 39621fb744b4Smrg ;; 39631fb744b4Smrgsco3.2v5*) 39641fb744b4Smrg symcode='[[DT]]' 39651fb744b4Smrg ;; 39661fb744b4Smrgsysv4.2uw2*) 39671fb744b4Smrg symcode='[[DT]]' 39681fb744b4Smrg ;; 39691fb744b4Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39701fb744b4Smrg symcode='[[ABDT]]' 39711fb744b4Smrg ;; 39721fb744b4Smrgsysv4) 39731fb744b4Smrg symcode='[[DFNSTU]]' 39741fb744b4Smrg ;; 3975518bcf38Smrgesac 3976518bcf38Smrg 39771fb744b4Smrg# If we're using GNU nm, then use its standard symbol codes. 39781fb744b4Smrgcase `$NM -V 2>&1` in 39791fb744b4Smrg*GNU* | *'with BFD'*) 39801fb744b4Smrg symcode='[[ABCDGIRSTW]]' ;; 39811fb744b4Smrgesac 3982518bcf38Smrg 398314210e8eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 398414210e8eSmrg # Gets list of data symbols to import. 398514210e8eSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 398614210e8eSmrg # Adjust the below global symbol transforms to fixup imported variables. 398714210e8eSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 398814210e8eSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 398914210e8eSmrg lt_c_name_lib_hook="\ 399014210e8eSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 399114210e8eSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 399214210e8eSmrgelse 399314210e8eSmrg # Disable hooks by default. 399414210e8eSmrg lt_cv_sys_global_symbol_to_import= 399514210e8eSmrg lt_cdecl_hook= 399614210e8eSmrg lt_c_name_hook= 399714210e8eSmrg lt_c_name_lib_hook= 399814210e8eSmrgfi 399914210e8eSmrg 40001fb744b4Smrg# Transform an extracted symbol line into a proper C declaration. 40011fb744b4Smrg# Some systems (esp. on ia64) link data and code symbols differently, 40021fb744b4Smrg# so use this general approach. 400314210e8eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 400414210e8eSmrg$lt_cdecl_hook\ 400514210e8eSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 400614210e8eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4007518bcf38Smrg 40081fb744b4Smrg# Transform an extracted symbol line into symbol name and symbol address 400914210e8eSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 401014210e8eSmrg$lt_c_name_hook\ 401114210e8eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401214210e8eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 401314210e8eSmrg 401414210e8eSmrg# Transform an extracted symbol line into symbol name with lib prefix and 401514210e8eSmrg# symbol address. 401614210e8eSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 401714210e8eSmrg$lt_c_name_lib_hook\ 401814210e8eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401914210e8eSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 402014210e8eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4021518bcf38Smrg 40221fb744b4Smrg# Handle CRLF in mingw tool chain 40231fb744b4Smrgopt_cr= 40241fb744b4Smrgcase $build_os in 40251fb744b4Smrgmingw*) 40261fb744b4Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40271fb744b4Smrg ;; 40281fb744b4Smrgesac 4029518bcf38Smrg 40301fb744b4Smrg# Try without a prefix underscore, then with it. 40311fb744b4Smrgfor ac_symprfx in "" "_"; do 4032518bcf38Smrg 40331fb744b4Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40341fb744b4Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4035518bcf38Smrg 40361fb744b4Smrg # Write the raw and C identifiers. 40371fb744b4Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 403814210e8eSmrg # Fake it for dumpbin and say T for any non-static function, 403914210e8eSmrg # D for any global variable and I for any imported variable. 40401fb744b4Smrg # Also find C++ and __fastcall symbols from MSVC++, 40411fb744b4Smrg # which start with @ or ?. 40421fb744b4Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40431fb744b4Smrg" {last_section=section; section=\$ 3};"\ 40441fb744b4Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40451fb744b4Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 404614210e8eSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 404714210e8eSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 404814210e8eSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40491fb744b4Smrg" \$ 0!~/External *\|/{next};"\ 40501fb744b4Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40511fb744b4Smrg" {if(hide[section]) next};"\ 405214210e8eSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 405314210e8eSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 405414210e8eSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 405514210e8eSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40561fb744b4Smrg" ' prfx=^$ac_symprfx]" 40571fb744b4Smrg else 40581fb744b4Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40591fb744b4Smrg fi 40601fb744b4Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4061518bcf38Smrg 40621fb744b4Smrg # Check to see that the pipe works correctly. 40631fb744b4Smrg pipe_works=no 4064518bcf38Smrg 40651fb744b4Smrg rm -f conftest* 40661fb744b4Smrg cat > conftest.$ac_ext <<_LT_EOF 40671fb744b4Smrg#ifdef __cplusplus 40681fb744b4Smrgextern "C" { 40691fb744b4Smrg#endif 40701fb744b4Smrgchar nm_test_var; 40711fb744b4Smrgvoid nm_test_func(void); 40721fb744b4Smrgvoid nm_test_func(void){} 40731fb744b4Smrg#ifdef __cplusplus 40741fb744b4Smrg} 40751fb744b4Smrg#endif 40761fb744b4Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40771fb744b4Smrg_LT_EOF 4078518bcf38Smrg 40791fb744b4Smrg if AC_TRY_EVAL(ac_compile); then 40801fb744b4Smrg # Now try to grab the symbols. 40811fb744b4Smrg nlist=conftest.nm 40821fb744b4Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40831fb744b4Smrg # Try sorting and uniquifying the output. 40841fb744b4Smrg if sort "$nlist" | uniq > "$nlist"T; then 40851fb744b4Smrg mv -f "$nlist"T "$nlist" 40861fb744b4Smrg else 40871fb744b4Smrg rm -f "$nlist"T 40881fb744b4Smrg fi 4089c35d236eSmrg 40901fb744b4Smrg # Make sure that we snagged all the symbols we need. 40911fb744b4Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40921fb744b4Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40931fb744b4Smrg cat <<_LT_EOF > conftest.$ac_ext 40941fb744b4Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 409514210e8eSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 409614210e8eSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 40971fb744b4Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 40981fb744b4Smrg# define LT@&t@_DLSYM_CONST 409914210e8eSmrg#elif defined __osf__ 41001fb744b4Smrg/* This system does not cope well with relocations in const data. */ 41011fb744b4Smrg# define LT@&t@_DLSYM_CONST 41021fb744b4Smrg#else 41031fb744b4Smrg# define LT@&t@_DLSYM_CONST const 41041fb744b4Smrg#endif 4105518bcf38Smrg 41061fb744b4Smrg#ifdef __cplusplus 41071fb744b4Smrgextern "C" { 41081fb744b4Smrg#endif 4109c35d236eSmrg 41101fb744b4Smrg_LT_EOF 41111fb744b4Smrg # Now generate the symbol file. 41121fb744b4Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4113c35d236eSmrg 41141fb744b4Smrg cat <<_LT_EOF >> conftest.$ac_ext 4115c35d236eSmrg 41161fb744b4Smrg/* The mapping between symbol names and symbols. */ 41171fb744b4SmrgLT@&t@_DLSYM_CONST struct { 41181fb744b4Smrg const char *name; 41191fb744b4Smrg void *address; 41201fb744b4Smrg} 41211fb744b4Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41221fb744b4Smrg{ 41231fb744b4Smrg { "@PROGRAM@", (void *) 0 }, 41241fb744b4Smrg_LT_EOF 412514210e8eSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41261fb744b4Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41271fb744b4Smrg {0, (void *) 0} 41281fb744b4Smrg}; 4129c35d236eSmrg 41301fb744b4Smrg/* This works around a problem in FreeBSD linker */ 41311fb744b4Smrg#ifdef FREEBSD_WORKAROUND 41321fb744b4Smrgstatic const void *lt_preloaded_setup() { 41331fb744b4Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41341fb744b4Smrg} 41351fb744b4Smrg#endif 4136c35d236eSmrg 41371fb744b4Smrg#ifdef __cplusplus 41381fb744b4Smrg} 41391fb744b4Smrg#endif 41401fb744b4Smrg_LT_EOF 41411fb744b4Smrg # Now try linking the two files. 41421fb744b4Smrg mv conftest.$ac_objext conftstm.$ac_objext 41431fb744b4Smrg lt_globsym_save_LIBS=$LIBS 41441fb744b4Smrg lt_globsym_save_CFLAGS=$CFLAGS 414514210e8eSmrg LIBS=conftstm.$ac_objext 41461fb744b4Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 414714210e8eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41481fb744b4Smrg pipe_works=yes 41491fb744b4Smrg fi 41501fb744b4Smrg LIBS=$lt_globsym_save_LIBS 41511fb744b4Smrg CFLAGS=$lt_globsym_save_CFLAGS 4152518bcf38Smrg else 41531fb744b4Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4154518bcf38Smrg fi 4155518bcf38Smrg else 41561fb744b4Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4157518bcf38Smrg fi 4158518bcf38Smrg else 41591fb744b4Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4160518bcf38Smrg fi 41611fb744b4Smrg else 41621fb744b4Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41631fb744b4Smrg cat conftest.$ac_ext >&5 41641fb744b4Smrg fi 41651fb744b4Smrg rm -rf conftest* conftst* 4166518bcf38Smrg 41671fb744b4Smrg # Do not use the global_symbol_pipe unless it works. 416814210e8eSmrg if test yes = "$pipe_works"; then 41691fb744b4Smrg break 41701fb744b4Smrg else 41711fb744b4Smrg lt_cv_sys_global_symbol_pipe= 41721fb744b4Smrg fi 41731fb744b4Smrgdone 41741fb744b4Smrg]) 41751fb744b4Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41761fb744b4Smrg lt_cv_sys_global_symbol_to_cdecl= 41771fb744b4Smrgfi 41781fb744b4Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41791fb744b4Smrg AC_MSG_RESULT(failed) 41801fb744b4Smrgelse 41811fb744b4Smrg AC_MSG_RESULT(ok) 41821fb744b4Smrgfi 4183518bcf38Smrg 41841fb744b4Smrg# Response file support. 41851fb744b4Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41861fb744b4Smrg nm_file_list_spec='@' 41871fb744b4Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41881fb744b4Smrg nm_file_list_spec='@' 41891fb744b4Smrgfi 4190518bcf38Smrg 41911fb744b4Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41921fb744b4Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 41931fb744b4Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41941fb744b4Smrg [Transform the output of nm in a proper C declaration]) 419514210e8eSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 419614210e8eSmrg [Transform the output of nm into a list of symbols to manually relocate]) 41971fb744b4Smrg_LT_DECL([global_symbol_to_c_name_address], 41981fb744b4Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41991fb744b4Smrg [Transform the output of nm in a C name address pair]) 42001fb744b4Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42011fb744b4Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42021fb744b4Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 420314210e8eSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 420414210e8eSmrg [The name lister interface]) 42051fb744b4Smrg_LT_DECL([], [nm_file_list_spec], [1], 42061fb744b4Smrg [Specify filename containing input files for $NM]) 42071fb744b4Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 42081fb744b4Smrg 42091fb744b4Smrg 42101fb744b4Smrg# _LT_COMPILER_PIC([TAGNAME]) 42111fb744b4Smrg# --------------------------- 42121fb744b4Smrgm4_defun([_LT_COMPILER_PIC], 42131fb744b4Smrg[m4_require([_LT_TAG_COMPILER])dnl 42141fb744b4Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42151fb744b4Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42161fb744b4Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4217518bcf38Smrg 42181fb744b4Smrgm4_if([$1], [CXX], [ 42191fb744b4Smrg # C++ specific cases for pic, static, wl, etc. 422014210e8eSmrg if test yes = "$GXX"; then 42211fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42221fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42231fb744b4Smrg 42241fb744b4Smrg case $host_os in 42251fb744b4Smrg aix*) 42261fb744b4Smrg # All AIX code is PIC. 422714210e8eSmrg if test ia64 = "$host_cpu"; then 42281fb744b4Smrg # AIX 5 now supports IA64 processor 42291fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4230c35d236eSmrg fi 423114210e8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4232f55e6a01Smrg ;; 4233c35d236eSmrg 42341fb744b4Smrg amigaos*) 4235f55e6a01Smrg case $host_cpu in 42361fb744b4Smrg powerpc) 42371fb744b4Smrg # see comment about AmigaOS4 .so support 42381fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42391fb744b4Smrg ;; 42401fb744b4Smrg m68k) 42411fb744b4Smrg # FIXME: we need at least 68020 code to build shared libraries, but 424214210e8eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 424314210e8eSmrg # like '-m68040'. 42441fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4245f55e6a01Smrg ;; 4246f55e6a01Smrg esac 4247518bcf38Smrg ;; 4248518bcf38Smrg 42491fb744b4Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42501fb744b4Smrg # PIC is the default for these OSes. 42511fb744b4Smrg ;; 42521fb744b4Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42531fb744b4Smrg # This hack is so that the source file can tell whether it is being 42541fb744b4Smrg # built for inclusion in a dll (and should export symbols for example). 42551fb744b4Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42561fb744b4Smrg # (--disable-auto-import) libraries 42571fb744b4Smrg m4_if([$1], [GCJ], [], 42581fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425914210e8eSmrg case $host_os in 426014210e8eSmrg os2*) 426114210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 426214210e8eSmrg ;; 426314210e8eSmrg esac 42641fb744b4Smrg ;; 42651fb744b4Smrg darwin* | rhapsody*) 42661fb744b4Smrg # PIC is the default on this platform 42671fb744b4Smrg # Common symbols not allowed in MH_DYLIB files 42681fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42691fb744b4Smrg ;; 42701fb744b4Smrg *djgpp*) 42711fb744b4Smrg # DJGPP does not support shared libraries at all 42721fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42731fb744b4Smrg ;; 42741fb744b4Smrg haiku*) 42751fb744b4Smrg # PIC is the default for Haiku. 42761fb744b4Smrg # The "-static" flag exists, but is broken. 42771fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42781fb744b4Smrg ;; 42791fb744b4Smrg interix[[3-9]]*) 42801fb744b4Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42811fb744b4Smrg # Instead, we relocate shared libraries at runtime. 42821fb744b4Smrg ;; 42831fb744b4Smrg sysv4*MP*) 42841fb744b4Smrg if test -d /usr/nec; then 42851fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42861fb744b4Smrg fi 42871fb744b4Smrg ;; 42881fb744b4Smrg hpux*) 42891fb744b4Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42901fb744b4Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42911fb744b4Smrg # sets the default TLS model and affects inlining. 42921fb744b4Smrg case $host_cpu in 42931fb744b4Smrg hppa*64*) 4294c35d236eSmrg ;; 4295518bcf38Smrg *) 42961fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4297c35d236eSmrg ;; 42981fb744b4Smrg esac 42991fb744b4Smrg ;; 43001fb744b4Smrg *qnx* | *nto*) 43011fb744b4Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43021fb744b4Smrg # it will coredump. 43031fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43041fb744b4Smrg ;; 43051fb744b4Smrg *) 43061fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43071fb744b4Smrg ;; 43081fb744b4Smrg esac 43091fb744b4Smrg else 43101fb744b4Smrg case $host_os in 43111fb744b4Smrg aix[[4-9]]*) 43121fb744b4Smrg # All AIX code is PIC. 431314210e8eSmrg if test ia64 = "$host_cpu"; then 43141fb744b4Smrg # AIX 5 now supports IA64 processor 43151fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43161fb744b4Smrg else 43171fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43181fb744b4Smrg fi 4319c35d236eSmrg ;; 43201fb744b4Smrg chorus*) 43211fb744b4Smrg case $cc_basename in 43221fb744b4Smrg cxch68*) 43231fb744b4Smrg # Green Hills C++ Compiler 43241fb744b4Smrg # _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" 43251fb744b4Smrg ;; 43261fb744b4Smrg esac 4327c35d236eSmrg ;; 43281fb744b4Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43291fb744b4Smrg # This hack is so that the source file can tell whether it is being 43301fb744b4Smrg # built for inclusion in a dll (and should export symbols for example). 43311fb744b4Smrg m4_if([$1], [GCJ], [], 43321fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333c35d236eSmrg ;; 43341fb744b4Smrg dgux*) 43351fb744b4Smrg case $cc_basename in 43361fb744b4Smrg ec++*) 43371fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43381fb744b4Smrg ;; 43391fb744b4Smrg ghcx*) 43401fb744b4Smrg # Green Hills C++ Compiler 43411fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43421fb744b4Smrg ;; 43431fb744b4Smrg *) 43441fb744b4Smrg ;; 43451fb744b4Smrg esac 4346c35d236eSmrg ;; 43471fb744b4Smrg freebsd* | dragonfly*) 43481fb744b4Smrg # FreeBSD uses GNU C++ 4349c35d236eSmrg ;; 43501fb744b4Smrg hpux9* | hpux10* | hpux11*) 43511fb744b4Smrg case $cc_basename in 43521fb744b4Smrg CC*) 43531fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435414210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 435514210e8eSmrg if test ia64 != "$host_cpu"; then 43561fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43571fb744b4Smrg fi 43581fb744b4Smrg ;; 43591fb744b4Smrg aCC*) 43601fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436114210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43621fb744b4Smrg case $host_cpu in 43631fb744b4Smrg hppa*64*|ia64*) 43641fb744b4Smrg # +Z the default 43651fb744b4Smrg ;; 43661fb744b4Smrg *) 43671fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43681fb744b4Smrg ;; 43691fb744b4Smrg esac 43701fb744b4Smrg ;; 43711fb744b4Smrg *) 43721fb744b4Smrg ;; 43731fb744b4Smrg esac 4374c35d236eSmrg ;; 43751fb744b4Smrg interix*) 43761fb744b4Smrg # This is c89, which is MS Visual C++ (no shared libs) 43771fb744b4Smrg # Anyone wants to do a port? 4378c35d236eSmrg ;; 43791fb744b4Smrg irix5* | irix6* | nonstopux*) 43801fb744b4Smrg case $cc_basename in 43811fb744b4Smrg CC*) 43821fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43831fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43841fb744b4Smrg # CC pic flag -KPIC is the default. 43851fb744b4Smrg ;; 43861fb744b4Smrg *) 43871fb744b4Smrg ;; 43881fb744b4Smrg esac 4389518bcf38Smrg ;; 439014210e8eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43911fb744b4Smrg case $cc_basename in 43921fb744b4Smrg KCC*) 43931fb744b4Smrg # KAI C++ Compiler 43941fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43951fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43961fb744b4Smrg ;; 43971fb744b4Smrg ecpc* ) 439814210e8eSmrg # old Intel C++ for x86_64, which still supported -KPIC. 43991fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44001fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44011fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44021fb744b4Smrg ;; 44031fb744b4Smrg icpc* ) 44041fb744b4Smrg # Intel C++, used to be incompatible with GCC. 44051fb744b4Smrg # ICC 10 doesn't accept -KPIC any more. 44061fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44071fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44081fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44091fb744b4Smrg ;; 44101fb744b4Smrg pgCC* | pgcpp*) 44111fb744b4Smrg # Portland Group C++ compiler 44121fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44131fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44141fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44151fb744b4Smrg ;; 44161fb744b4Smrg cxx*) 44171fb744b4Smrg # Compaq C++ 44181fb744b4Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44191fb744b4Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44201fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44211fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44221fb744b4Smrg ;; 44231fb744b4Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44241fb744b4Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44251fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44261fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44271fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44281fb744b4Smrg ;; 44291fb744b4Smrg *) 44301fb744b4Smrg case `$CC -V 2>&1 | sed 5q` in 44311fb744b4Smrg *Sun\ C*) 44321fb744b4Smrg # Sun C++ 5.9 44331fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44341fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44351fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44361fb744b4Smrg ;; 44371fb744b4Smrg esac 44381fb744b4Smrg ;; 44391fb744b4Smrg esac 4440518bcf38Smrg ;; 44411fb744b4Smrg lynxos*) 4442518bcf38Smrg ;; 44431fb744b4Smrg m88k*) 4444518bcf38Smrg ;; 44451fb744b4Smrg mvs*) 44461fb744b4Smrg case $cc_basename in 44471fb744b4Smrg cxx*) 44481fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44491fb744b4Smrg ;; 4450f55e6a01Smrg *) 4451f55e6a01Smrg ;; 4452f55e6a01Smrg esac 4453c35d236eSmrg ;; 44541fb744b4Smrg netbsd*) 4455c35d236eSmrg ;; 44561fb744b4Smrg *qnx* | *nto*) 44571fb744b4Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44581fb744b4Smrg # it will coredump. 44591fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44601fb744b4Smrg ;; 44611fb744b4Smrg osf3* | osf4* | osf5*) 44621fb744b4Smrg case $cc_basename in 44631fb744b4Smrg KCC*) 44641fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44651fb744b4Smrg ;; 44661fb744b4Smrg RCC*) 44671fb744b4Smrg # Rational C++ 2.4.1 44681fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44691fb744b4Smrg ;; 44701fb744b4Smrg cxx*) 44711fb744b4Smrg # Digital/Compaq C++ 44721fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44731fb744b4Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44741fb744b4Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44751fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44761fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44771fb744b4Smrg ;; 4478518bcf38Smrg *) 4479518bcf38Smrg ;; 44801fb744b4Smrg esac 4481518bcf38Smrg ;; 44821fb744b4Smrg psos*) 4483f55e6a01Smrg ;; 44841fb744b4Smrg solaris*) 44851fb744b4Smrg case $cc_basename in 44861fb744b4Smrg CC* | sunCC*) 44871fb744b4Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44881fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44891fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44901fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44911fb744b4Smrg ;; 44921fb744b4Smrg gcx*) 44931fb744b4Smrg # Green Hills C++ Compiler 44941fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44951fb744b4Smrg ;; 44961fb744b4Smrg *) 44971fb744b4Smrg ;; 44981fb744b4Smrg esac 4499f55e6a01Smrg ;; 45001fb744b4Smrg sunos4*) 45011fb744b4Smrg case $cc_basename in 45021fb744b4Smrg CC*) 45031fb744b4Smrg # Sun C++ 4.x 45041fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45051fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45061fb744b4Smrg ;; 45071fb744b4Smrg lcc*) 45081fb744b4Smrg # Lucid 45091fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45101fb744b4Smrg ;; 45111fb744b4Smrg *) 45121fb744b4Smrg ;; 45131fb744b4Smrg esac 4514f55e6a01Smrg ;; 45151fb744b4Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45161fb744b4Smrg case $cc_basename in 45171fb744b4Smrg CC*) 45181fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45191fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45201fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45211fb744b4Smrg ;; 45221fb744b4Smrg esac 4523f55e6a01Smrg ;; 45241fb744b4Smrg tandem*) 45251fb744b4Smrg case $cc_basename in 45261fb744b4Smrg NCC*) 45271fb744b4Smrg # NonStop-UX NCC 3.20 45281fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45291fb744b4Smrg ;; 45301fb744b4Smrg *) 45311fb744b4Smrg ;; 45321fb744b4Smrg esac 45331fb744b4Smrg ;; 45341fb744b4Smrg vxworks*) 4535f55e6a01Smrg ;; 4536f55e6a01Smrg *) 45371fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4538f55e6a01Smrg ;; 4539518bcf38Smrg esac 45401fb744b4Smrg fi 45411fb744b4Smrg], 45421fb744b4Smrg[ 454314210e8eSmrg if test yes = "$GCC"; then 45441fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45451fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4546c35d236eSmrg 45471fb744b4Smrg case $host_os in 45481fb744b4Smrg aix*) 45491fb744b4Smrg # All AIX code is PIC. 455014210e8eSmrg if test ia64 = "$host_cpu"; then 45511fb744b4Smrg # AIX 5 now supports IA64 processor 45521fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45531fb744b4Smrg fi 455414210e8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45551fb744b4Smrg ;; 4556c35d236eSmrg 45571fb744b4Smrg amigaos*) 45581fb744b4Smrg case $host_cpu in 45591fb744b4Smrg powerpc) 45601fb744b4Smrg # see comment about AmigaOS4 .so support 45611fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45621fb744b4Smrg ;; 45631fb744b4Smrg m68k) 45641fb744b4Smrg # FIXME: we need at least 68020 code to build shared libraries, but 456514210e8eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 456614210e8eSmrg # like '-m68040'. 45671fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45681fb744b4Smrg ;; 45691fb744b4Smrg esac 45701fb744b4Smrg ;; 4571c35d236eSmrg 45721fb744b4Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45731fb744b4Smrg # PIC is the default for these OSes. 45741fb744b4Smrg ;; 4575c35d236eSmrg 45761fb744b4Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45771fb744b4Smrg # This hack is so that the source file can tell whether it is being 45781fb744b4Smrg # built for inclusion in a dll (and should export symbols for example). 45791fb744b4Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45801fb744b4Smrg # (--disable-auto-import) libraries 45811fb744b4Smrg m4_if([$1], [GCJ], [], 45821fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 458314210e8eSmrg case $host_os in 458414210e8eSmrg os2*) 458514210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 458614210e8eSmrg ;; 458714210e8eSmrg esac 45881fb744b4Smrg ;; 4589c35d236eSmrg 45901fb744b4Smrg darwin* | rhapsody*) 45911fb744b4Smrg # PIC is the default on this platform 45921fb744b4Smrg # Common symbols not allowed in MH_DYLIB files 45931fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45941fb744b4Smrg ;; 4595518bcf38Smrg 45961fb744b4Smrg haiku*) 45971fb744b4Smrg # PIC is the default for Haiku. 45981fb744b4Smrg # The "-static" flag exists, but is broken. 45991fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46001fb744b4Smrg ;; 4601c35d236eSmrg 46021fb744b4Smrg hpux*) 46031fb744b4Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46041fb744b4Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46051fb744b4Smrg # sets the default TLS model and affects inlining. 46061fb744b4Smrg case $host_cpu in 46071fb744b4Smrg hppa*64*) 46081fb744b4Smrg # +Z the default 46091fb744b4Smrg ;; 46101fb744b4Smrg *) 46111fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46121fb744b4Smrg ;; 46131fb744b4Smrg esac 46141fb744b4Smrg ;; 4615c35d236eSmrg 46161fb744b4Smrg interix[[3-9]]*) 46171fb744b4Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46181fb744b4Smrg # Instead, we relocate shared libraries at runtime. 46191fb744b4Smrg ;; 4620c35d236eSmrg 46211fb744b4Smrg msdosdjgpp*) 46221fb744b4Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46231fb744b4Smrg # on systems that don't support them. 46241fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46251fb744b4Smrg enable_shared=no 46261fb744b4Smrg ;; 4627c35d236eSmrg 46281fb744b4Smrg *nto* | *qnx*) 46291fb744b4Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46301fb744b4Smrg # it will coredump. 46311fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46321fb744b4Smrg ;; 4633c35d236eSmrg 46341fb744b4Smrg sysv4*MP*) 46351fb744b4Smrg if test -d /usr/nec; then 46361fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46371fb744b4Smrg fi 46381fb744b4Smrg ;; 4639518bcf38Smrg 46401fb744b4Smrg *) 46411fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4642518bcf38Smrg ;; 4643518bcf38Smrg esac 4644c35d236eSmrg 46451fb744b4Smrg case $cc_basename in 46461fb744b4Smrg nvcc*) # Cuda Compiler Driver 2.2 46471fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46481fb744b4Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46491fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46501fb744b4Smrg fi 4651518bcf38Smrg ;; 4652518bcf38Smrg esac 46531fb744b4Smrg else 46541fb744b4Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46551fb744b4Smrg case $host_os in 46561fb744b4Smrg aix*) 46571fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 465814210e8eSmrg if test ia64 = "$host_cpu"; then 46591fb744b4Smrg # AIX 5 now supports IA64 processor 46601fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46611fb744b4Smrg else 46621fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46631fb744b4Smrg fi 46641fb744b4Smrg ;; 4665518bcf38Smrg 466614210e8eSmrg darwin* | rhapsody*) 466714210e8eSmrg # PIC is the default on this platform 466814210e8eSmrg # Common symbols not allowed in MH_DYLIB files 466914210e8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 467014210e8eSmrg case $cc_basename in 467114210e8eSmrg nagfor*) 467214210e8eSmrg # NAG Fortran compiler 467314210e8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 467414210e8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 467514210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 467614210e8eSmrg ;; 467714210e8eSmrg esac 467814210e8eSmrg ;; 467914210e8eSmrg 46801fb744b4Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46811fb744b4Smrg # This hack is so that the source file can tell whether it is being 46821fb744b4Smrg # built for inclusion in a dll (and should export symbols for example). 46831fb744b4Smrg m4_if([$1], [GCJ], [], 46841fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 468514210e8eSmrg case $host_os in 468614210e8eSmrg os2*) 468714210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 468814210e8eSmrg ;; 468914210e8eSmrg esac 46901fb744b4Smrg ;; 4691c35d236eSmrg 46921fb744b4Smrg hpux9* | hpux10* | hpux11*) 46931fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46941fb744b4Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46951fb744b4Smrg # not for PA HP-UX. 46961fb744b4Smrg case $host_cpu in 46971fb744b4Smrg hppa*64*|ia64*) 46981fb744b4Smrg # +Z the default 46991fb744b4Smrg ;; 47001fb744b4Smrg *) 47011fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47021fb744b4Smrg ;; 47031fb744b4Smrg esac 47041fb744b4Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 470514210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47061fb744b4Smrg ;; 4707c35d236eSmrg 47081fb744b4Smrg irix5* | irix6* | nonstopux*) 47091fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47101fb744b4Smrg # PIC (with -KPIC) is the default. 47111fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47121fb744b4Smrg ;; 4713c35d236eSmrg 471414210e8eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47151fb744b4Smrg case $cc_basename in 471614210e8eSmrg # old Intel for x86_64, which still supported -KPIC. 47171fb744b4Smrg ecc*) 47181fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47191fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47201fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47211fb744b4Smrg ;; 47221fb744b4Smrg # icc used to be incompatible with GCC. 47231fb744b4Smrg # ICC 10 doesn't accept -KPIC any more. 47241fb744b4Smrg icc* | ifort*) 47251fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47261fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47271fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47281fb744b4Smrg ;; 47291fb744b4Smrg # Lahey Fortran 8.1. 47301fb744b4Smrg lf95*) 47311fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47321fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47331fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47341fb744b4Smrg ;; 47351fb744b4Smrg nagfor*) 47361fb744b4Smrg # NAG Fortran compiler 47371fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47381fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47391fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47401fb744b4Smrg ;; 474114210e8eSmrg tcc*) 474214210e8eSmrg # Fabrice Bellard et al's Tiny C Compiler 474314210e8eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474414210e8eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 474514210e8eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 474614210e8eSmrg ;; 47471fb744b4Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47481fb744b4Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47491fb744b4Smrg # which looks to be a dead project) 47501fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47511fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47521fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47531fb744b4Smrg ;; 47541fb744b4Smrg ccc*) 47551fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47561fb744b4Smrg # All Alpha code is PIC. 47571fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47581fb744b4Smrg ;; 47591fb744b4Smrg xl* | bgxl* | bgf* | mpixl*) 47601fb744b4Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47611fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47621fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47631fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47641fb744b4Smrg ;; 47651fb744b4Smrg *) 47661fb744b4Smrg case `$CC -V 2>&1 | sed 5q` in 47671fb744b4Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47681fb744b4Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47691fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47701fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47711fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47721fb744b4Smrg ;; 47731fb744b4Smrg *Sun\ F* | *Sun*Fortran*) 47741fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47751fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47761fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47771fb744b4Smrg ;; 47781fb744b4Smrg *Sun\ C*) 47791fb744b4Smrg # Sun C 5.9 47801fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47811fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47821fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47831fb744b4Smrg ;; 47841fb744b4Smrg *Intel*\ [[CF]]*Compiler*) 47851fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47861fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47871fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47881fb744b4Smrg ;; 47891fb744b4Smrg *Portland\ Group*) 47901fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47911fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47921fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47931fb744b4Smrg ;; 47941fb744b4Smrg esac 47951fb744b4Smrg ;; 47961fb744b4Smrg esac 47971fb744b4Smrg ;; 4798c35d236eSmrg 47991fb744b4Smrg newsos6) 48001fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48011fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48021fb744b4Smrg ;; 4803c35d236eSmrg 48041fb744b4Smrg *nto* | *qnx*) 48051fb744b4Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48061fb744b4Smrg # it will coredump. 48071fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48081fb744b4Smrg ;; 4809c35d236eSmrg 48101fb744b4Smrg osf3* | osf4* | osf5*) 48111fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48121fb744b4Smrg # All OSF/1 code is PIC. 48131fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48141fb744b4Smrg ;; 4815c35d236eSmrg 48161fb744b4Smrg rdos*) 48171fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48181fb744b4Smrg ;; 4819c35d236eSmrg 48201fb744b4Smrg solaris*) 48211fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48221fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48231fb744b4Smrg case $cc_basename in 48241fb744b4Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48251fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48261fb744b4Smrg *) 48271fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48281fb744b4Smrg esac 48291fb744b4Smrg ;; 4830c35d236eSmrg 48311fb744b4Smrg sunos4*) 48321fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48331fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48341fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48351fb744b4Smrg ;; 4836c35d236eSmrg 48371fb744b4Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48381fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48391fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48401fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48411fb744b4Smrg ;; 4842c35d236eSmrg 48431fb744b4Smrg sysv4*MP*) 484414210e8eSmrg if test -d /usr/nec; then 48451fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48461fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48471fb744b4Smrg fi 48481fb744b4Smrg ;; 4849c35d236eSmrg 48501fb744b4Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48511fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48521fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48531fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48541fb744b4Smrg ;; 4855c35d236eSmrg 48561fb744b4Smrg unicos*) 48571fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48581fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48591fb744b4Smrg ;; 4860c35d236eSmrg 48611fb744b4Smrg uts4*) 48621fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48631fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4864f55e6a01Smrg ;; 48651fb744b4Smrg 4866518bcf38Smrg *) 48671fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4868f55e6a01Smrg ;; 4869518bcf38Smrg esac 48701fb744b4Smrg fi 48711fb744b4Smrg]) 48721fb744b4Smrgcase $host_os in 487314210e8eSmrg # For platforms that do not support PIC, -DPIC is meaningless: 48741fb744b4Smrg *djgpp*) 48751fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4876518bcf38Smrg ;; 48771fb744b4Smrg *) 48781fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48791fb744b4Smrg ;; 48801fb744b4Smrgesac 4881c35d236eSmrg 48821fb744b4SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48831fb744b4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48841fb744b4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48851fb744b4Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4886c35d236eSmrg 4887518bcf38Smrg# 48881fb744b4Smrg# Check to make sure the PIC flag actually works. 4889518bcf38Smrg# 48901fb744b4Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48911fb744b4Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48921fb744b4Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48931fb744b4Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48941fb744b4Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48951fb744b4Smrg "" | " "*) ;; 48961fb744b4Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48971fb744b4Smrg esac], 48981fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48991fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49001fb744b4Smrgfi 49011fb744b4Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49021fb744b4Smrg [Additional compiler flags for building library objects]) 49031fb744b4Smrg 49041fb744b4Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49051fb744b4Smrg [How to pass a linker flag through the compiler]) 4906518bcf38Smrg# 49071fb744b4Smrg# Check to make sure the static flag actually works. 4908518bcf38Smrg# 49091fb744b4Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49101fb744b4Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49111fb744b4Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49121fb744b4Smrg $lt_tmp_static_flag, 49131fb744b4Smrg [], 49141fb744b4Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49151fb744b4Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49161fb744b4Smrg [Compiler flag to prevent dynamic linking]) 49171fb744b4Smrg])# _LT_COMPILER_PIC 4918c35d236eSmrg 4919c35d236eSmrg 49201fb744b4Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49211fb744b4Smrg# ---------------------------- 49221fb744b4Smrg# See if the linker supports building shared libraries. 49231fb744b4Smrgm4_defun([_LT_LINKER_SHLIBS], 49241fb744b4Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49251fb744b4SmrgAC_REQUIRE([LT_PATH_NM])dnl 49261fb744b4Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49271fb744b4Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49281fb744b4Smrgm4_require([_LT_DECL_EGREP])dnl 49291fb744b4Smrgm4_require([_LT_DECL_SED])dnl 49301fb744b4Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49311fb744b4Smrgm4_require([_LT_TAG_COMPILER])dnl 49321fb744b4SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49331fb744b4Smrgm4_if([$1], [CXX], [ 49341fb744b4Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49351fb744b4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49361fb744b4Smrg case $host_os in 49371fb744b4Smrg aix[[4-9]]*) 49381fb744b4Smrg # If we're using GNU nm, then we don't want the "-C" option. 493914210e8eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 494014210e8eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 494114210e8eSmrg # weak defined symbols like other global defined symbols, whereas 494214210e8eSmrg # GNU nm marks them as "W". 494314210e8eSmrg # While the 'weak' keyword is ignored in the Export File, we need 494414210e8eSmrg # it in the Import File for the 'aix-soname' feature, so we have 494514210e8eSmrg # to replace the "-B" option with "-P" for AIX nm. 49461fb744b4Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 494714210e8eSmrg _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' 49481fb744b4Smrg else 494914210e8eSmrg _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' 49501fb744b4Smrg fi 49511fb744b4Smrg ;; 49521fb744b4Smrg pw32*) 495314210e8eSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49541fb744b4Smrg ;; 49551fb744b4Smrg cygwin* | mingw* | cegcc*) 49561fb744b4Smrg case $cc_basename in 49571fb744b4Smrg cl*) 49581fb744b4Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49591fb744b4Smrg ;; 49601fb744b4Smrg *) 49611fb744b4Smrg _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' 49621fb744b4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49631fb744b4Smrg ;; 49641fb744b4Smrg esac 49651fb744b4Smrg ;; 49661fb744b4Smrg *) 49671fb744b4Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49681fb744b4Smrg ;; 49691fb744b4Smrg esac 49701fb744b4Smrg], [ 49711fb744b4Smrg runpath_var= 49721fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49731fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49741fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)= 49751fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49761fb744b4Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49771fb744b4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49781fb744b4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49791fb744b4Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49801fb744b4Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49811fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49821fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49831fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49841fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49851fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49861fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49871fb744b4Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49881fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49891fb744b4Smrg _LT_TAGVAR(module_cmds, $1)= 49901fb744b4Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 49911fb744b4Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49921fb744b4Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49931fb744b4Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49941fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49951fb744b4Smrg # include_expsyms should be a list of space-separated symbols to be *always* 49961fb744b4Smrg # included in the symbol list 49971fb744b4Smrg _LT_TAGVAR(include_expsyms, $1)= 49981fb744b4Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 499914210e8eSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 500014210e8eSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 500114210e8eSmrg # as well as any symbol that contains 'd'. 50021fb744b4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50031fb744b4Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50041fb744b4Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 50051fb744b4Smrg # the symbol is explicitly referenced. Since portable code cannot 50061fb744b4Smrg # rely on this symbol name, it's probably fine to never include it in 50071fb744b4Smrg # preloaded symbol tables. 50081fb744b4Smrg # Exclude shared library initialization/finalization symbols. 50091fb744b4Smrgdnl Note also adjust exclude_expsyms for C++ above. 50101fb744b4Smrg extract_expsyms_cmds= 5011c35d236eSmrg 50121fb744b4Smrg case $host_os in 50131fb744b4Smrg cygwin* | mingw* | pw32* | cegcc*) 50141fb744b4Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50151fb744b4Smrg # When not using gcc, we currently assume that we are using 50161fb744b4Smrg # Microsoft Visual C++. 501714210e8eSmrg if test yes != "$GCC"; then 50181fb744b4Smrg with_gnu_ld=no 50191fb744b4Smrg fi 50201fb744b4Smrg ;; 50211fb744b4Smrg interix*) 50221fb744b4Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50231fb744b4Smrg with_gnu_ld=yes 50241fb744b4Smrg ;; 502514210e8eSmrg openbsd* | bitrig*) 50261fb744b4Smrg with_gnu_ld=no 50271fb744b4Smrg ;; 50281fb744b4Smrg esac 5029c35d236eSmrg 50301fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5031c35d236eSmrg 50321fb744b4Smrg # On some targets, GNU ld is compatible enough with the native linker 50331fb744b4Smrg # that we're better off using the native interface for both. 50341fb744b4Smrg lt_use_gnu_ld_interface=no 503514210e8eSmrg if test yes = "$with_gnu_ld"; then 50361fb744b4Smrg case $host_os in 50371fb744b4Smrg aix*) 50381fb744b4Smrg # The AIX port of GNU ld has always aspired to compatibility 50391fb744b4Smrg # with the native linker. However, as the warning in the GNU ld 50401fb744b4Smrg # block says, versions before 2.19.5* couldn't really create working 50411fb744b4Smrg # shared libraries, regardless of the interface used. 50421fb744b4Smrg case `$LD -v 2>&1` in 50431fb744b4Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50441fb744b4Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50451fb744b4Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50461fb744b4Smrg *) 50471fb744b4Smrg lt_use_gnu_ld_interface=yes 50481fb744b4Smrg ;; 50491fb744b4Smrg esac 50501fb744b4Smrg ;; 50511fb744b4Smrg *) 50521fb744b4Smrg lt_use_gnu_ld_interface=yes 50531fb744b4Smrg ;; 50541fb744b4Smrg esac 50551fb744b4Smrg fi 5056c35d236eSmrg 505714210e8eSmrg if test yes = "$lt_use_gnu_ld_interface"; then 50581fb744b4Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 505914210e8eSmrg wlarc='$wl' 5060c35d236eSmrg 50611fb744b4Smrg # Set some defaults for GNU ld with shared library support. These 50621fb744b4Smrg # are reset later if shared libraries are not supported. Putting them 50631fb744b4Smrg # here allows them to be overridden if necessary. 50641fb744b4Smrg runpath_var=LD_RUN_PATH 506514210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 506614210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50671fb744b4Smrg # ancient GNU ld didn't support --whole-archive et. al. 50681fb744b4Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 506914210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50701fb744b4Smrg else 50711fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50721fb744b4Smrg fi 50731fb744b4Smrg supports_anon_versioning=no 507414210e8eSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50751fb744b4Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50761fb744b4Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50771fb744b4Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50781fb744b4Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50791fb744b4Smrg *\ 2.11.*) ;; # other 2.11 versions 50801fb744b4Smrg *) supports_anon_versioning=yes ;; 50811fb744b4Smrg esac 5082c35d236eSmrg 50831fb744b4Smrg # See if GNU ld supports shared libraries. 50841fb744b4Smrg case $host_os in 50851fb744b4Smrg aix[[3-9]]*) 50861fb744b4Smrg # On AIX/PPC, the GNU linker is very broken 508714210e8eSmrg if test ia64 != "$host_cpu"; then 50881fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50891fb744b4Smrg cat <<_LT_EOF 1>&2 5090c35d236eSmrg 50911fb744b4Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50921fb744b4Smrg*** to be unable to reliably create shared libraries on AIX. 50931fb744b4Smrg*** Therefore, libtool is disabling shared libraries support. If you 50941fb744b4Smrg*** really care for shared libraries, you may want to install binutils 50951fb744b4Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50961fb744b4Smrg*** You will then need to restart the configuration process. 5097c35d236eSmrg 50981fb744b4Smrg_LT_EOF 50991fb744b4Smrg fi 51001fb744b4Smrg ;; 5101c35d236eSmrg 51021fb744b4Smrg amigaos*) 51031fb744b4Smrg case $host_cpu in 51041fb744b4Smrg powerpc) 51051fb744b4Smrg # see comment about AmigaOS4 .so support 510614210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51071fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51081fb744b4Smrg ;; 51091fb744b4Smrg m68k) 51101fb744b4Smrg _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)' 51111fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51121fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51131fb744b4Smrg ;; 51141fb744b4Smrg esac 51151fb744b4Smrg ;; 5116c35d236eSmrg 51171fb744b4Smrg beos*) 51181fb744b4Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51191fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51201fb744b4Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51211fb744b4Smrg # support --undefined. This deserves some investigation. FIXME 512214210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51231fb744b4Smrg else 51241fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51251fb744b4Smrg fi 51261fb744b4Smrg ;; 5127c35d236eSmrg 51281fb744b4Smrg cygwin* | mingw* | pw32* | cegcc*) 51291fb744b4Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51301fb744b4Smrg # as there is no search path for DLLs. 51311fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 513214210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51331fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51341fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51351fb744b4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51361fb744b4Smrg _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' 51371fb744b4Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51381fb744b4Smrg 51391fb744b4Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 514014210e8eSmrg _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' 514114210e8eSmrg # If the export-symbols file already is a .def file, use it as 514214210e8eSmrg # is; otherwise, prepend EXPORTS... 514314210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 514414210e8eSmrg cp $export_symbols $output_objdir/$soname.def; 514514210e8eSmrg else 514614210e8eSmrg echo EXPORTS > $output_objdir/$soname.def; 514714210e8eSmrg cat $export_symbols >> $output_objdir/$soname.def; 514814210e8eSmrg fi~ 514914210e8eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51501fb744b4Smrg else 51511fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51521fb744b4Smrg fi 51531fb744b4Smrg ;; 5154c35d236eSmrg 51551fb744b4Smrg haiku*) 515614210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51571fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51581fb744b4Smrg ;; 5159c35d236eSmrg 516014210e8eSmrg os2*) 516114210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 516214210e8eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 516314210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 516414210e8eSmrg shrext_cmds=.dll 516514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 516614210e8eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 516714210e8eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 516814210e8eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 516914210e8eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 517014210e8eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517114210e8eSmrg emximp -o $lib $output_objdir/$libname.def' 517214210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517314210e8eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 517414210e8eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 517514210e8eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 517614210e8eSmrg prefix_cmds="$SED"~ 517714210e8eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 517814210e8eSmrg prefix_cmds="$prefix_cmds -e 1d"; 517914210e8eSmrg fi~ 518014210e8eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 518114210e8eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 518214210e8eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 518314210e8eSmrg emximp -o $lib $output_objdir/$libname.def' 518414210e8eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 518514210e8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 518614210e8eSmrg ;; 518714210e8eSmrg 51881fb744b4Smrg interix[[3-9]]*) 51891fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51901fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 519114210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 519214210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51931fb744b4Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51941fb744b4Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51951fb744b4Smrg # default) and relocated if they conflict, which is a slow very memory 51961fb744b4Smrg # consuming and fragmenting process. To avoid this, we pick a random, 51971fb744b4Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51981fb744b4Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 519914210e8eSmrg _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' 520014210e8eSmrg _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' 52011fb744b4Smrg ;; 5202c35d236eSmrg 52031fb744b4Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52041fb744b4Smrg tmp_diet=no 520514210e8eSmrg if test linux-dietlibc = "$host_os"; then 52061fb744b4Smrg case $cc_basename in 52071fb744b4Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52081fb744b4Smrg esac 52091fb744b4Smrg fi 52101fb744b4Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 521114210e8eSmrg && test no = "$tmp_diet" 52121fb744b4Smrg then 52131fb744b4Smrg tmp_addflag=' $pic_flag' 52141fb744b4Smrg tmp_sharedflag='-shared' 52151fb744b4Smrg case $cc_basename,$host_cpu in 52161fb744b4Smrg pgcc*) # Portland Group C compiler 521714210e8eSmrg _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' 52181fb744b4Smrg tmp_addflag=' $pic_flag' 52191fb744b4Smrg ;; 52201fb744b4Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52211fb744b4Smrg # Portland Group f77 and f90 compilers 522214210e8eSmrg _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' 52231fb744b4Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52241fb744b4Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52251fb744b4Smrg tmp_addflag=' -i_dynamic' ;; 52261fb744b4Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52271fb744b4Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52281fb744b4Smrg ifc* | ifort*) # Intel Fortran compiler 52291fb744b4Smrg tmp_addflag=' -nofor_main' ;; 52301fb744b4Smrg lf95*) # Lahey Fortran 8.1 52311fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52321fb744b4Smrg tmp_sharedflag='--shared' ;; 523314210e8eSmrg nagfor*) # NAGFOR 5.3 523414210e8eSmrg tmp_sharedflag='-Wl,-shared' ;; 52351fb744b4Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52361fb744b4Smrg tmp_sharedflag='-qmkshrobj' 52371fb744b4Smrg tmp_addflag= ;; 52381fb744b4Smrg nvcc*) # Cuda Compiler Driver 2.2 523914210e8eSmrg _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' 52401fb744b4Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52411fb744b4Smrg ;; 52421fb744b4Smrg esac 52431fb744b4Smrg case `$CC -V 2>&1 | sed 5q` in 52441fb744b4Smrg *Sun\ C*) # Sun C 5.9 524514210e8eSmrg _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' 52461fb744b4Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52471fb744b4Smrg tmp_sharedflag='-G' ;; 52481fb744b4Smrg *Sun\ F*) # Sun Fortran 8.3 52491fb744b4Smrg tmp_sharedflag='-G' ;; 52501fb744b4Smrg esac 525114210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5252c35d236eSmrg 525314210e8eSmrg if test yes = "$supports_anon_versioning"; then 52541fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 525514210e8eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 525614210e8eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 525714210e8eSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52581fb744b4Smrg fi 52594f6cd06fSmrg 52601fb744b4Smrg case $cc_basename in 526114210e8eSmrg tcc*) 526214210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 526314210e8eSmrg ;; 52641fb744b4Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52651fb744b4Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52661fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 526714210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52681fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 526914210e8eSmrg if test yes = "$supports_anon_versioning"; then 52701fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 527114210e8eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 527214210e8eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 527314210e8eSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52741fb744b4Smrg fi 52751fb744b4Smrg ;; 52761fb744b4Smrg esac 52771fb744b4Smrg else 52781fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52791fb744b4Smrg fi 52801fb744b4Smrg ;; 5281c35d236eSmrg 52821fb744b4Smrg netbsd*) 52831fb744b4Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52841fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52851fb744b4Smrg wlarc= 52861fb744b4Smrg else 528714210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 528814210e8eSmrg _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' 52891fb744b4Smrg fi 52901fb744b4Smrg ;; 5291c35d236eSmrg 52921fb744b4Smrg solaris*) 52931fb744b4Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52941fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52951fb744b4Smrg cat <<_LT_EOF 1>&2 5296c35d236eSmrg 52971fb744b4Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52981fb744b4Smrg*** create shared libraries on Solaris systems. Therefore, libtool 52991fb744b4Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53001fb744b4Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 53011fb744b4Smrg*** your PATH or compiler configuration so that the native linker is 53021fb744b4Smrg*** used, and then restart. 5303c35d236eSmrg 53041fb744b4Smrg_LT_EOF 53051fb744b4Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 530614210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 530714210e8eSmrg _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' 53081fb744b4Smrg else 53091fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53101fb744b4Smrg fi 53111fb744b4Smrg ;; 5312c35d236eSmrg 53131fb744b4Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53141fb744b4Smrg case `$LD -v 2>&1` in 53151fb744b4Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53161fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53171fb744b4Smrg cat <<_LT_EOF 1>&2 5318c35d236eSmrg 531914210e8eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53201fb744b4Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53211fb744b4Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53221fb744b4Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53231fb744b4Smrg*** your PATH or compiler configuration so that the native linker is 53241fb744b4Smrg*** used, and then restart. 5325c35d236eSmrg 53261fb744b4Smrg_LT_EOF 53271fb744b4Smrg ;; 53281fb744b4Smrg *) 53291fb744b4Smrg # For security reasons, it is highly recommended that you always 53301fb744b4Smrg # use absolute paths for naming shared libraries, and exclude the 53311fb744b4Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53321fb744b4Smrg # requires that you compile everything twice, which is a pain. 53331fb744b4Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 533414210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 533514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 533614210e8eSmrg _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' 53371fb744b4Smrg else 53381fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53391fb744b4Smrg fi 53401fb744b4Smrg ;; 53411fb744b4Smrg esac 53421fb744b4Smrg ;; 5343c35d236eSmrg 53441fb744b4Smrg sunos4*) 53451fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53461fb744b4Smrg wlarc= 53471fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53481fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53491fb744b4Smrg ;; 5350c35d236eSmrg 53511fb744b4Smrg *) 53521fb744b4Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 535314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 535414210e8eSmrg _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' 53551fb744b4Smrg else 53561fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53571fb744b4Smrg fi 53581fb744b4Smrg ;; 53591fb744b4Smrg esac 5360c35d236eSmrg 536114210e8eSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53621fb744b4Smrg runpath_var= 53631fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53641fb744b4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53651fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53661fb744b4Smrg fi 53671fb744b4Smrg else 53681fb744b4Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53691fb744b4Smrg case $host_os in 53701fb744b4Smrg aix3*) 53711fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53721fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53731fb744b4Smrg _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' 53741fb744b4Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53751fb744b4Smrg # are no directories specified by -L. 53761fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 537714210e8eSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53781fb744b4Smrg # Neither direct hardcoding nor static linking is supported with a 53791fb744b4Smrg # broken collect2. 53801fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53811fb744b4Smrg fi 53821fb744b4Smrg ;; 5383c35d236eSmrg 53841fb744b4Smrg aix[[4-9]]*) 538514210e8eSmrg if test ia64 = "$host_cpu"; then 53861fb744b4Smrg # On IA64, the linker does run time linking by default, so we don't 53871fb744b4Smrg # have to do anything special. 53881fb744b4Smrg aix_use_runtimelinking=no 53891fb744b4Smrg exp_sym_flag='-Bexport' 539014210e8eSmrg no_entry_flag= 53911fb744b4Smrg else 53921fb744b4Smrg # If we're using GNU nm, then we don't want the "-C" option. 539314210e8eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 539414210e8eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 539514210e8eSmrg # weak defined symbols like other global defined symbols, whereas 539614210e8eSmrg # GNU nm marks them as "W". 539714210e8eSmrg # While the 'weak' keyword is ignored in the Export File, we need 539814210e8eSmrg # it in the Import File for the 'aix-soname' feature, so we have 539914210e8eSmrg # to replace the "-B" option with "-P" for AIX nm. 54001fb744b4Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 540114210e8eSmrg _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' 54021fb744b4Smrg else 540314210e8eSmrg _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' 54041fb744b4Smrg fi 54051fb744b4Smrg aix_use_runtimelinking=no 5406c35d236eSmrg 54071fb744b4Smrg # Test if we are trying to use run time linking or normal 54081fb744b4Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 540914210e8eSmrg # have runtime linking enabled, and use it for executables. 541014210e8eSmrg # For shared libraries, we enable/disable runtime linking 541114210e8eSmrg # depending on the kind of the shared library created - 541214210e8eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 541314210e8eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 541414210e8eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 541514210e8eSmrg # lib.a static archive 541614210e8eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 541714210e8eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 541814210e8eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 541914210e8eSmrg # lib.a(lib.so.V) shared, rtl:no 542014210e8eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 542114210e8eSmrg # lib.a static archive 54221fb744b4Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54231fb744b4Smrg for ld_flag in $LDFLAGS; do 542414210e8eSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54251fb744b4Smrg aix_use_runtimelinking=yes 54261fb744b4Smrg break 54271fb744b4Smrg fi 54281fb744b4Smrg done 542914210e8eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 543014210e8eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 543114210e8eSmrg # so we don't have lib.a shared libs to link our executables. 543214210e8eSmrg # We have to force runtime linking in this case. 543314210e8eSmrg aix_use_runtimelinking=yes 543414210e8eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 543514210e8eSmrg fi 54361fb744b4Smrg ;; 54371fb744b4Smrg esac 5438c35d236eSmrg 54391fb744b4Smrg exp_sym_flag='-bexport' 54401fb744b4Smrg no_entry_flag='-bnoentry' 54411fb744b4Smrg fi 5442c35d236eSmrg 54431fb744b4Smrg # When large executables or shared objects are built, AIX ld can 54441fb744b4Smrg # have problems creating the table of contents. If linking a library 54451fb744b4Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54461fb744b4Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54471fb744b4Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5448c35d236eSmrg 54491fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='' 54501fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54511fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54521fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54531fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 545414210e8eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 545514210e8eSmrg case $with_aix_soname,$aix_use_runtimelinking in 545614210e8eSmrg aix,*) ;; # traditional, no import file 545714210e8eSmrg svr4,* | *,yes) # use import file 545814210e8eSmrg # The Import File defines what to hardcode. 545914210e8eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 546014210e8eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 546114210e8eSmrg ;; 546214210e8eSmrg esac 5463c35d236eSmrg 546414210e8eSmrg if test yes = "$GCC"; then 54651fb744b4Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54661fb744b4Smrg # We only want to do this on AIX 4.2 and lower, the check 54671fb744b4Smrg # below for broken collect2 doesn't work under 4.3+ 546814210e8eSmrg collect2name=`$CC -print-prog-name=collect2` 54691fb744b4Smrg if test -f "$collect2name" && 54701fb744b4Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54711fb744b4Smrg then 54721fb744b4Smrg # We have reworked collect2 54731fb744b4Smrg : 54741fb744b4Smrg else 54751fb744b4Smrg # We have old collect2 54761fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54771fb744b4Smrg # It fails to find uninstalled libraries when the uninstalled 54781fb744b4Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54791fb744b4Smrg # to unsupported forces relinking 54801fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54811fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54821fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54831fb744b4Smrg fi 54841fb744b4Smrg ;; 54851fb744b4Smrg esac 54861fb744b4Smrg shared_flag='-shared' 548714210e8eSmrg if test yes = "$aix_use_runtimelinking"; then 548814210e8eSmrg shared_flag="$shared_flag "'$wl-G' 54891fb744b4Smrg fi 549014210e8eSmrg # Need to ensure runtime linking is disabled for the traditional 549114210e8eSmrg # shared library, or the linker may eventually find shared libraries 549214210e8eSmrg # /with/ Import File - we do not want to mix them. 549314210e8eSmrg shared_flag_aix='-shared' 549414210e8eSmrg shared_flag_svr4='-shared $wl-G' 54951fb744b4Smrg else 54961fb744b4Smrg # not using gcc 549714210e8eSmrg if test ia64 = "$host_cpu"; then 54981fb744b4Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54991fb744b4Smrg # chokes on -Wl,-G. The following line is correct: 55001fb744b4Smrg shared_flag='-G' 55011fb744b4Smrg else 550214210e8eSmrg if test yes = "$aix_use_runtimelinking"; then 550314210e8eSmrg shared_flag='$wl-G' 55041fb744b4Smrg else 550514210e8eSmrg shared_flag='$wl-bM:SRE' 55061fb744b4Smrg fi 550714210e8eSmrg shared_flag_aix='$wl-bM:SRE' 550814210e8eSmrg shared_flag_svr4='$wl-G' 55091fb744b4Smrg fi 55101fb744b4Smrg fi 5511c35d236eSmrg 551214210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55131fb744b4Smrg # It seems that -bexpall does not export symbols beginning with 55141fb744b4Smrg # underscore (_), so it is better to generate a list of symbols to export. 55151fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 551614210e8eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55171fb744b4Smrg # Warning - without using the other runtime loading flags (-brtl), 55181fb744b4Smrg # -berok will link without error, but may produce a broken library. 55191fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55201fb744b4Smrg # Determine the default libpath from the value encoded in an 55211fb744b4Smrg # empty executable. 55221fb744b4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 552314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 552414210e8eSmrg _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 55251fb744b4Smrg else 552614210e8eSmrg if test ia64 = "$host_cpu"; then 552714210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55281fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 552914210e8eSmrg _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" 55301fb744b4Smrg else 55311fb744b4Smrg # Determine the default libpath from the value encoded in an 55321fb744b4Smrg # empty executable. 55331fb744b4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 553414210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55351fb744b4Smrg # Warning - without using the other run time loading flags, 55361fb744b4Smrg # -berok will link without error, but may produce a broken library. 553714210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 553814210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 553914210e8eSmrg if test yes = "$with_gnu_ld"; then 55401fb744b4Smrg # We only use this code for GNU lds that support --whole-archive. 554114210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55421fb744b4Smrg else 55431fb744b4Smrg # Exported symbols can be pulled into shared objects from archives 55441fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55451fb744b4Smrg fi 55461fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 554714210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 554814210e8eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 554914210e8eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 555014210e8eSmrg if test svr4 != "$with_aix_soname"; then 555114210e8eSmrg # This is similar to how AIX traditionally builds its shared libraries. 555214210e8eSmrg _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' 555314210e8eSmrg fi 555414210e8eSmrg if test aix != "$with_aix_soname"; then 555514210e8eSmrg _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' 555614210e8eSmrg else 555714210e8eSmrg # used by -dlpreopen to get the symbols 555814210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 555914210e8eSmrg fi 556014210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55611fb744b4Smrg fi 55621fb744b4Smrg fi 55631fb744b4Smrg ;; 5564c35d236eSmrg 55651fb744b4Smrg amigaos*) 55661fb744b4Smrg case $host_cpu in 55671fb744b4Smrg powerpc) 55681fb744b4Smrg # see comment about AmigaOS4 .so support 556914210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55701fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55711fb744b4Smrg ;; 55721fb744b4Smrg m68k) 55731fb744b4Smrg _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)' 55741fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55751fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55761fb744b4Smrg ;; 55771fb744b4Smrg esac 55781fb744b4Smrg ;; 5579c35d236eSmrg 55801fb744b4Smrg bsdi[[45]]*) 55811fb744b4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55821fb744b4Smrg ;; 5583c35d236eSmrg 55841fb744b4Smrg cygwin* | mingw* | pw32* | cegcc*) 55851fb744b4Smrg # When not using gcc, we currently assume that we are using 55861fb744b4Smrg # Microsoft Visual C++. 55871fb744b4Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55881fb744b4Smrg # no search path for DLLs. 55891fb744b4Smrg case $cc_basename in 55901fb744b4Smrg cl*) 55911fb744b4Smrg # Native MSVC 55921fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55931fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55941fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55951fb744b4Smrg _LT_TAGVAR(file_list_spec, $1)='@' 55961fb744b4Smrg # Tell ltmain to make .lib files, not .a files. 55971fb744b4Smrg libext=lib 55981fb744b4Smrg # Tell ltmain to make .dll files, not .so files. 559914210e8eSmrg shrext_cmds=.dll 56001fb744b4Smrg # FIXME: Setting linknames here is a bad hack. 560114210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 560214210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 560314210e8eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 560414210e8eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 560514210e8eSmrg else 560614210e8eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 560714210e8eSmrg fi~ 560814210e8eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 560914210e8eSmrg linknames=' 56101fb744b4Smrg # The linker will not automatically build a static lib if we build a DLL. 56111fb744b4Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56121fb744b4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56131fb744b4Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56141fb744b4Smrg _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' 56151fb744b4Smrg # Don't use ranlib 56161fb744b4Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56171fb744b4Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 561814210e8eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 561914210e8eSmrg case $lt_outputfile in 562014210e8eSmrg *.exe|*.EXE) ;; 562114210e8eSmrg *) 562214210e8eSmrg lt_outputfile=$lt_outputfile.exe 562314210e8eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 562414210e8eSmrg ;; 562514210e8eSmrg esac~ 562614210e8eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 562714210e8eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 562814210e8eSmrg $RM "$lt_outputfile.manifest"; 562914210e8eSmrg fi' 56301fb744b4Smrg ;; 56311fb744b4Smrg *) 56321fb744b4Smrg # Assume MSVC wrapper 56331fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56341fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56351fb744b4Smrg # Tell ltmain to make .lib files, not .a files. 56361fb744b4Smrg libext=lib 56371fb744b4Smrg # Tell ltmain to make .dll files, not .so files. 563814210e8eSmrg shrext_cmds=.dll 56391fb744b4Smrg # FIXME: Setting linknames here is a bad hack. 56401fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56411fb744b4Smrg # The linker will automatically build a .lib file if we build a DLL. 56421fb744b4Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56431fb744b4Smrg # FIXME: Should let the user specify the lib program. 56441fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56451fb744b4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56461fb744b4Smrg ;; 56471fb744b4Smrg esac 56481fb744b4Smrg ;; 5649c35d236eSmrg 56501fb744b4Smrg darwin* | rhapsody*) 56511fb744b4Smrg _LT_DARWIN_LINKER_FEATURES($1) 56521fb744b4Smrg ;; 5653c35d236eSmrg 56541fb744b4Smrg dgux*) 56551fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56561fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56571fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56581fb744b4Smrg ;; 5659c35d236eSmrg 56601fb744b4Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56611fb744b4Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56621fb744b4Smrg # does not break anything, and helps significantly (at the cost of a little 56631fb744b4Smrg # extra space). 56641fb744b4Smrg freebsd2.2*) 56651fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56661fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56671fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56681fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56691fb744b4Smrg ;; 5670c35d236eSmrg 56711fb744b4Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56721fb744b4Smrg freebsd2.*) 56731fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56741fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56751fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56761fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56771fb744b4Smrg ;; 5678c35d236eSmrg 56791fb744b4Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56801fb744b4Smrg freebsd* | dragonfly*) 56811fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56821fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56831fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56841fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56851fb744b4Smrg ;; 5686c35d236eSmrg 56871fb744b4Smrg hpux9*) 568814210e8eSmrg if test yes = "$GCC"; then 568914210e8eSmrg _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' 56901fb744b4Smrg else 569114210e8eSmrg _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' 56921fb744b4Smrg fi 569314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56941fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56951fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5696c35d236eSmrg 56971fb744b4Smrg # hardcode_minus_L: Not really in the search PATH, 56981fb744b4Smrg # but as the default location of the library. 56991fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 570014210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57011fb744b4Smrg ;; 5702c35d236eSmrg 57031fb744b4Smrg hpux10*) 570414210e8eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 570514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57061fb744b4Smrg else 57071fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57081fb744b4Smrg fi 570914210e8eSmrg if test no = "$with_gnu_ld"; then 571014210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57111fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57121fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57131fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 571414210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57151fb744b4Smrg # hardcode_minus_L: Not really in the search PATH, 57161fb744b4Smrg # but as the default location of the library. 57171fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57181fb744b4Smrg fi 57191fb744b4Smrg ;; 5720c35d236eSmrg 57211fb744b4Smrg hpux11*) 572214210e8eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57231fb744b4Smrg case $host_cpu in 57241fb744b4Smrg hppa*64*) 572514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57261fb744b4Smrg ;; 57271fb744b4Smrg ia64*) 572814210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57291fb744b4Smrg ;; 57301fb744b4Smrg *) 573114210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57321fb744b4Smrg ;; 57331fb744b4Smrg esac 57341fb744b4Smrg else 57351fb744b4Smrg case $host_cpu in 57361fb744b4Smrg hppa*64*) 573714210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57381fb744b4Smrg ;; 57391fb744b4Smrg ia64*) 574014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57411fb744b4Smrg ;; 57421fb744b4Smrg *) 57431fb744b4Smrg m4_if($1, [], [ 57441fb744b4Smrg # Older versions of the 11.00 compiler do not understand -b yet 57451fb744b4Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57461fb744b4Smrg _LT_LINKER_OPTION([if $CC understands -b], 57471fb744b4Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 574814210e8eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57491fb744b4Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 575014210e8eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57511fb744b4Smrg ;; 57521fb744b4Smrg esac 57531fb744b4Smrg fi 575414210e8eSmrg if test no = "$with_gnu_ld"; then 575514210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57561fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5757c35d236eSmrg 57581fb744b4Smrg case $host_cpu in 57591fb744b4Smrg hppa*64*|ia64*) 57601fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57611fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57621fb744b4Smrg ;; 57631fb744b4Smrg *) 57641fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57651fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 576614210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5767c35d236eSmrg 57681fb744b4Smrg # hardcode_minus_L: Not really in the search PATH, 57691fb744b4Smrg # but as the default location of the library. 57701fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57711fb744b4Smrg ;; 57721fb744b4Smrg esac 57731fb744b4Smrg fi 57741fb744b4Smrg ;; 5775c35d236eSmrg 57761fb744b4Smrg irix5* | irix6* | nonstopux*) 577714210e8eSmrg if test yes = "$GCC"; then 577814210e8eSmrg _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' 57791fb744b4Smrg # Try to use the -exported_symbol ld option, if it does not 57801fb744b4Smrg # work, assume that -exports_file does not work either and 57811fb744b4Smrg # implicitly export all symbols. 57821fb744b4Smrg # This should be the same for all languages, so no per-tag cache variable. 57831fb744b4Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57841fb744b4Smrg [lt_cv_irix_exported_symbol], 578514210e8eSmrg [save_LDFLAGS=$LDFLAGS 578614210e8eSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57871fb744b4Smrg AC_LINK_IFELSE( 57881fb744b4Smrg [AC_LANG_SOURCE( 57891fb744b4Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57901fb744b4Smrg [C++], [[int foo (void) { return 0; }]], 57911fb744b4Smrg [Fortran 77], [[ 57921fb744b4Smrg subroutine foo 57931fb744b4Smrg end]], 57941fb744b4Smrg [Fortran], [[ 57951fb744b4Smrg subroutine foo 57961fb744b4Smrg end]])])], 57971fb744b4Smrg [lt_cv_irix_exported_symbol=yes], 57981fb744b4Smrg [lt_cv_irix_exported_symbol=no]) 579914210e8eSmrg LDFLAGS=$save_LDFLAGS]) 580014210e8eSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 580114210e8eSmrg _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' 58021fb744b4Smrg fi 58031fb744b4Smrg else 580414210e8eSmrg _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' 580514210e8eSmrg _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' 58061fb744b4Smrg fi 58071fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 580814210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58091fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58101fb744b4Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58111fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58121fb744b4Smrg ;; 5813c35d236eSmrg 581414210e8eSmrg linux*) 581514210e8eSmrg case $cc_basename in 581614210e8eSmrg tcc*) 581714210e8eSmrg # Fabrice Bellard et al's Tiny C Compiler 581814210e8eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 581914210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 582014210e8eSmrg ;; 582114210e8eSmrg esac 582214210e8eSmrg ;; 582314210e8eSmrg 58241fb744b4Smrg netbsd*) 58251fb744b4Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58261fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58271fb744b4Smrg else 58281fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58291fb744b4Smrg fi 58301fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58311fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58321fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58331fb744b4Smrg ;; 5834c35d236eSmrg 58351fb744b4Smrg newsos6) 58361fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58371fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583814210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58391fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58401fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58411fb744b4Smrg ;; 5842c35d236eSmrg 58431fb744b4Smrg *nto* | *qnx*) 58441fb744b4Smrg ;; 5845c35d236eSmrg 584614210e8eSmrg openbsd* | bitrig*) 58471fb744b4Smrg if test -f /usr/libexec/ld.so; then 58481fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58491fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58501fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 585114210e8eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58521fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585314210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 585414210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 585514210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58561fb744b4Smrg else 585714210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585814210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58591fb744b4Smrg fi 58601fb744b4Smrg else 58611fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58621fb744b4Smrg fi 58631fb744b4Smrg ;; 5864c35d236eSmrg 58651fb744b4Smrg os2*) 58661fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58671fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58681fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 586914210e8eSmrg shrext_cmds=.dll 587014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587114210e8eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587214210e8eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 587314210e8eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 587414210e8eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 587514210e8eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 587614210e8eSmrg emximp -o $lib $output_objdir/$libname.def' 587714210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587814210e8eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587914210e8eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 588014210e8eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 588114210e8eSmrg prefix_cmds="$SED"~ 588214210e8eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 588314210e8eSmrg prefix_cmds="$prefix_cmds -e 1d"; 588414210e8eSmrg fi~ 588514210e8eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 588614210e8eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 588714210e8eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 588814210e8eSmrg emximp -o $lib $output_objdir/$libname.def' 588914210e8eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 589014210e8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58911fb744b4Smrg ;; 5892c35d236eSmrg 58931fb744b4Smrg osf3*) 589414210e8eSmrg if test yes = "$GCC"; then 589514210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 589614210e8eSmrg _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' 58971fb744b4Smrg else 58981fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 589914210e8eSmrg _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' 59001fb744b4Smrg fi 59011fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 590214210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59031fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59041fb744b4Smrg ;; 5905c35d236eSmrg 59061fb744b4Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 590714210e8eSmrg if test yes = "$GCC"; then 590814210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 590914210e8eSmrg _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' 591014210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59111fb744b4Smrg else 59121fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 591314210e8eSmrg _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' 59141fb744b4Smrg _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~ 591514210e8eSmrg $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' 5916c35d236eSmrg 59171fb744b4Smrg # Both c and cxx compiler support -rpath directly 59181fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59191fb744b4Smrg fi 59201fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59211fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59221fb744b4Smrg ;; 5923c35d236eSmrg 59241fb744b4Smrg solaris*) 59251fb744b4Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 592614210e8eSmrg if test yes = "$GCC"; then 592714210e8eSmrg wlarc='$wl' 592814210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59291fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593014210e8eSmrg $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' 59311fb744b4Smrg else 59321fb744b4Smrg case `$CC -V 2>&1` in 59331fb744b4Smrg *"Compilers 5.0"*) 59341fb744b4Smrg wlarc='' 593514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59361fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593714210e8eSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59381fb744b4Smrg ;; 59391fb744b4Smrg *) 594014210e8eSmrg wlarc='$wl' 594114210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59421fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 594314210e8eSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59441fb744b4Smrg ;; 59451fb744b4Smrg esac 59461fb744b4Smrg fi 59471fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59481fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59491fb744b4Smrg case $host_os in 59501fb744b4Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59511fb744b4Smrg *) 59521fb744b4Smrg # The compiler driver will combine and reorder linker options, 595314210e8eSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59541fb744b4Smrg # but is careful enough not to reorder. 59551fb744b4Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 595614210e8eSmrg if test yes = "$GCC"; then 595714210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59581fb744b4Smrg else 59591fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59601fb744b4Smrg fi 59611fb744b4Smrg ;; 59621fb744b4Smrg esac 59631fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59641fb744b4Smrg ;; 5965c35d236eSmrg 59661fb744b4Smrg sunos4*) 596714210e8eSmrg if test sequent = "$host_vendor"; then 59681fb744b4Smrg # Use $CC to link under sequent, because it throws in some extra .o 59691fb744b4Smrg # files that make .init and .fini sections work. 597014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59711fb744b4Smrg else 59721fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59731fb744b4Smrg fi 59741fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59751fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59761fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59771fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59781fb744b4Smrg ;; 5979c35d236eSmrg 59801fb744b4Smrg sysv4) 59811fb744b4Smrg case $host_vendor in 59821fb744b4Smrg sni) 59831fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59841fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59851fb744b4Smrg ;; 59861fb744b4Smrg siemens) 59871fb744b4Smrg ## LD is ld it makes a PLAMLIB 59881fb744b4Smrg ## CC just makes a GrossModule. 59891fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59901fb744b4Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59911fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59921fb744b4Smrg ;; 59931fb744b4Smrg motorola) 59941fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59951fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59961fb744b4Smrg ;; 59971fb744b4Smrg esac 59981fb744b4Smrg runpath_var='LD_RUN_PATH' 59991fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60001fb744b4Smrg ;; 6001c35d236eSmrg 60021fb744b4Smrg sysv4.3*) 60031fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60041fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60051fb744b4Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60061fb744b4Smrg ;; 6007c35d236eSmrg 60081fb744b4Smrg sysv4*MP*) 60091fb744b4Smrg if test -d /usr/nec; then 60101fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60111fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60121fb744b4Smrg runpath_var=LD_RUN_PATH 60131fb744b4Smrg hardcode_runpath_var=yes 60141fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60151fb744b4Smrg fi 60161fb744b4Smrg ;; 6017c35d236eSmrg 60181fb744b4Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 601914210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60201fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60211fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60221fb744b4Smrg runpath_var='LD_RUN_PATH' 6023c35d236eSmrg 602414210e8eSmrg if test yes = "$GCC"; then 602514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602614210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60271fb744b4Smrg else 602814210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602914210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60301fb744b4Smrg fi 60311fb744b4Smrg ;; 6032c35d236eSmrg 60331fb744b4Smrg sysv5* | sco3.2v5* | sco5v6*) 603414210e8eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 60351fb744b4Smrg # link with -lc, and that would cause any symbols used from libc to 60361fb744b4Smrg # always be unresolved, which means just about no library would 60371fb744b4Smrg # ever link correctly. If we're not using GNU ld we use -z text 60381fb744b4Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60391fb744b4Smrg # as -z defs. 604014210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 604114210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60421fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60431fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 604414210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60451fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60461fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604714210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60481fb744b4Smrg runpath_var='LD_RUN_PATH' 6049c35d236eSmrg 605014210e8eSmrg if test yes = "$GCC"; then 605114210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605214210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60531fb744b4Smrg else 605414210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605514210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60561fb744b4Smrg fi 60571fb744b4Smrg ;; 6058c35d236eSmrg 60591fb744b4Smrg uts4*) 60601fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60611fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60621fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60631fb744b4Smrg ;; 6064c35d236eSmrg 60651fb744b4Smrg *) 60661fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60671fb744b4Smrg ;; 60681fb744b4Smrg esac 6069c35d236eSmrg 607014210e8eSmrg if test sni = "$host_vendor"; then 60711fb744b4Smrg case $host in 60721fb744b4Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 607314210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60741fb744b4Smrg ;; 60751fb744b4Smrg esac 60761fb744b4Smrg fi 60771fb744b4Smrg fi 60781fb744b4Smrg]) 60791fb744b4SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 608014210e8eSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6081c35d236eSmrg 60821fb744b4Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6083c35d236eSmrg 60841fb744b4Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60851fb744b4Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60861fb744b4Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 60871fb744b4Smrg [The commands to extract the exported symbol list from a shared archive]) 6088c35d236eSmrg 60891fb744b4Smrg# 60901fb744b4Smrg# Do we need to explicitly link libc? 60911fb744b4Smrg# 60921fb744b4Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60931fb744b4Smrgx|xyes) 60941fb744b4Smrg # Assume -lc should be added 60951fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6096c35d236eSmrg 609714210e8eSmrg if test yes,yes = "$GCC,$enable_shared"; then 60981fb744b4Smrg case $_LT_TAGVAR(archive_cmds, $1) in 60991fb744b4Smrg *'~'*) 61001fb744b4Smrg # FIXME: we may have to deal with multi-command sequences. 61011fb744b4Smrg ;; 61021fb744b4Smrg '$CC '*) 61031fb744b4Smrg # Test whether the compiler implicitly links with -lc since on some 61041fb744b4Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61051fb744b4Smrg # to ld, don't add -lc before -lgcc. 61061fb744b4Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61071fb744b4Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61081fb744b4Smrg [$RM conftest* 61091fb744b4Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61101fb744b4Smrg 61111fb744b4Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61121fb744b4Smrg soname=conftest 61131fb744b4Smrg lib=conftest 61141fb744b4Smrg libobjs=conftest.$ac_objext 61151fb744b4Smrg deplibs= 61161fb744b4Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61171fb744b4Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61181fb744b4Smrg compiler_flags=-v 61191fb744b4Smrg linker_flags=-v 61201fb744b4Smrg verstring= 61211fb744b4Smrg output_objdir=. 61221fb744b4Smrg libname=conftest 61231fb744b4Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61241fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61251fb744b4Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61261fb744b4Smrg then 61271fb744b4Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61281fb744b4Smrg else 61291fb744b4Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61301fb744b4Smrg fi 61311fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61321fb744b4Smrg else 61331fb744b4Smrg cat conftest.err 1>&5 61341fb744b4Smrg fi 61351fb744b4Smrg $RM conftest* 61361fb744b4Smrg ]) 61371fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61381fb744b4Smrg ;; 61391fb744b4Smrg esac 61401fb744b4Smrg fi 61411fb744b4Smrg ;; 61421fb744b4Smrgesac 6143c35d236eSmrg 61441fb744b4Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61451fb744b4Smrg [Whether or not to add -lc for building shared libraries]) 61461fb744b4Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61471fb744b4Smrg [enable_shared_with_static_runtimes], [0], 61481fb744b4Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61491fb744b4Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61501fb744b4Smrg [Compiler flag to allow reflexive dlopens]) 61511fb744b4Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61521fb744b4Smrg [Compiler flag to generate shared objects directly from archives]) 61531fb744b4Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61541fb744b4Smrg [Whether the compiler copes with passing no objects directly]) 61551fb744b4Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61561fb744b4Smrg [Create an old-style archive from a shared archive]) 61571fb744b4Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61581fb744b4Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61591fb744b4Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61601fb744b4Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61611fb744b4Smrg_LT_TAGDECL([], [module_cmds], [2], 61621fb744b4Smrg [Commands used to build a loadable module if different from building 61631fb744b4Smrg a shared archive.]) 61641fb744b4Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61651fb744b4Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61661fb744b4Smrg [Whether we are building with GNU ld or not]) 61671fb744b4Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61681fb744b4Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61691fb744b4Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61701fb744b4Smrg [Flag that enforces no undefined symbols]) 61711fb744b4Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61721fb744b4Smrg [Flag to hardcode $libdir into a binary during linking. 61731fb744b4Smrg This must work even if $libdir does not exist]) 61741fb744b4Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61751fb744b4Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61761fb744b4Smrg_LT_TAGDECL([], [hardcode_direct], [0], 617714210e8eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61781fb744b4Smrg DIR into the resulting binary]) 61791fb744b4Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 618014210e8eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61811fb744b4Smrg DIR into the resulting binary and the resulting library dependency is 618214210e8eSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61831fb744b4Smrg library is relocated]) 61841fb744b4Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61851fb744b4Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61861fb744b4Smrg into the resulting binary]) 61871fb744b4Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61881fb744b4Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61891fb744b4Smrg into the resulting binary]) 61901fb744b4Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 61911fb744b4Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 61921fb744b4Smrg into the library and all subsequent libraries and executables linked 61931fb744b4Smrg against it]) 61941fb744b4Smrg_LT_TAGDECL([], [inherit_rpath], [0], 61951fb744b4Smrg [Set to yes if linker adds runtime paths of dependent libraries 61961fb744b4Smrg to runtime path list]) 61971fb744b4Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 61981fb744b4Smrg [Whether libtool must link a program against all its dependency libraries]) 61991fb744b4Smrg_LT_TAGDECL([], [always_export_symbols], [0], 62001fb744b4Smrg [Set to "yes" if exported symbols are required]) 62011fb744b4Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62021fb744b4Smrg [The commands to list exported symbols]) 62031fb744b4Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 62041fb744b4Smrg [Symbols that should not be listed in the preloaded symbols]) 62051fb744b4Smrg_LT_TAGDECL([], [include_expsyms], [1], 62061fb744b4Smrg [Symbols that must always be exported]) 62071fb744b4Smrg_LT_TAGDECL([], [prelink_cmds], [2], 62081fb744b4Smrg [Commands necessary for linking programs (against libraries) with templates]) 62091fb744b4Smrg_LT_TAGDECL([], [postlink_cmds], [2], 62101fb744b4Smrg [Commands necessary for finishing linking programs]) 62111fb744b4Smrg_LT_TAGDECL([], [file_list_spec], [1], 62121fb744b4Smrg [Specify filename containing input files]) 62131fb744b4Smrgdnl FIXME: Not yet implemented 62141fb744b4Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62151fb744b4Smrgdnl [Compiler flag to generate thread safe objects]) 62161fb744b4Smrg])# _LT_LINKER_SHLIBS 62171fb744b4Smrg 62181fb744b4Smrg 62191fb744b4Smrg# _LT_LANG_C_CONFIG([TAG]) 62201fb744b4Smrg# ------------------------ 62211fb744b4Smrg# Ensure that the configuration variables for a C compiler are suitably 62221fb744b4Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 622314210e8eSmrg# the compiler configuration to 'libtool'. 62241fb744b4Smrgm4_defun([_LT_LANG_C_CONFIG], 62251fb744b4Smrg[m4_require([_LT_DECL_EGREP])dnl 622614210e8eSmrglt_save_CC=$CC 62271fb744b4SmrgAC_LANG_PUSH(C) 6228c35d236eSmrg 62291fb744b4Smrg# Source file extension for C test sources. 62301fb744b4Smrgac_ext=c 6231c35d236eSmrg 62321fb744b4Smrg# Object file extension for compiled C test sources. 62331fb744b4Smrgobjext=o 62341fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 6235c35d236eSmrg 62361fb744b4Smrg# Code to be used in simple compile tests 62371fb744b4Smrglt_simple_compile_test_code="int some_variable = 0;" 6238f55e6a01Smrg 62391fb744b4Smrg# Code to be used in simple link tests 62401fb744b4Smrglt_simple_link_test_code='int main(){return(0);}' 6241f55e6a01Smrg 62421fb744b4Smrg_LT_TAG_COMPILER 62431fb744b4Smrg# Save the default compiler, since it gets overwritten when the other 62441fb744b4Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62451fb744b4Smrgcompiler_DEFAULT=$CC 6246f55e6a01Smrg 62471fb744b4Smrg# save warnings/boilerplate of simple test code 62481fb744b4Smrg_LT_COMPILER_BOILERPLATE 62491fb744b4Smrg_LT_LINKER_BOILERPLATE 6250f55e6a01Smrg 62511fb744b4Smrgif test -n "$compiler"; then 62521fb744b4Smrg _LT_COMPILER_NO_RTTI($1) 62531fb744b4Smrg _LT_COMPILER_PIC($1) 62541fb744b4Smrg _LT_COMPILER_C_O($1) 62551fb744b4Smrg _LT_COMPILER_FILE_LOCKS($1) 62561fb744b4Smrg _LT_LINKER_SHLIBS($1) 62571fb744b4Smrg _LT_SYS_DYNAMIC_LINKER($1) 62581fb744b4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62591fb744b4Smrg LT_SYS_DLOPEN_SELF 62601fb744b4Smrg _LT_CMD_STRIPLIB 62611fb744b4Smrg 626214210e8eSmrg # Report what library types will actually be built 62631fb744b4Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62641fb744b4Smrg AC_MSG_RESULT([$can_build_shared]) 62651fb744b4Smrg 62661fb744b4Smrg AC_MSG_CHECKING([whether to build shared libraries]) 626714210e8eSmrg test no = "$can_build_shared" && enable_shared=no 62681fb744b4Smrg 62691fb744b4Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62701fb744b4Smrg # are all built from PIC. 6271518bcf38Smrg case $host_os in 6272518bcf38Smrg aix3*) 627314210e8eSmrg test yes = "$enable_shared" && enable_static=no 62741fb744b4Smrg if test -n "$RANLIB"; then 62751fb744b4Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62761fb744b4Smrg postinstall_cmds='$RANLIB $lib' 62771fb744b4Smrg fi 62781fb744b4Smrg ;; 6279f55e6a01Smrg 62801fb744b4Smrg aix[[4-9]]*) 628114210e8eSmrg if test ia64 != "$host_cpu"; then 628214210e8eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 628314210e8eSmrg yes,aix,yes) ;; # shared object as lib.so file only 628414210e8eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 628514210e8eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 628614210e8eSmrg esac 62871fb744b4Smrg fi 6288518bcf38Smrg ;; 6289518bcf38Smrg esac 62901fb744b4Smrg AC_MSG_RESULT([$enable_shared]) 6291f55e6a01Smrg 62921fb744b4Smrg AC_MSG_CHECKING([whether to build static libraries]) 62931fb744b4Smrg # Make sure either enable_shared or enable_static is yes. 629414210e8eSmrg test yes = "$enable_shared" || enable_static=yes 62951fb744b4Smrg AC_MSG_RESULT([$enable_static]) 6296c35d236eSmrg 62971fb744b4Smrg _LT_CONFIG($1) 6298f55e6a01Smrgfi 62991fb744b4SmrgAC_LANG_POP 630014210e8eSmrgCC=$lt_save_CC 63011fb744b4Smrg])# _LT_LANG_C_CONFIG 6302f55e6a01Smrg 6303f55e6a01Smrg 63041fb744b4Smrg# _LT_LANG_CXX_CONFIG([TAG]) 63051fb744b4Smrg# -------------------------- 63061fb744b4Smrg# Ensure that the configuration variables for a C++ compiler are suitably 63071fb744b4Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 630814210e8eSmrg# the compiler configuration to 'libtool'. 63091fb744b4Smrgm4_defun([_LT_LANG_CXX_CONFIG], 63101fb744b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63111fb744b4Smrgm4_require([_LT_DECL_EGREP])dnl 63121fb744b4Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 631314210e8eSmrgif test -n "$CXX" && ( test no != "$CXX" && 631414210e8eSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 631514210e8eSmrg (test g++ != "$CXX"))); then 63161fb744b4Smrg AC_PROG_CXXCPP 63171fb744b4Smrgelse 63181fb744b4Smrg _lt_caught_CXX_error=yes 63191fb744b4Smrgfi 6320f55e6a01Smrg 63211fb744b4SmrgAC_LANG_PUSH(C++) 63221fb744b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63231fb744b4Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63241fb744b4Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63251fb744b4Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63261fb744b4Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63271fb744b4Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63281fb744b4Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63291fb744b4Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63301fb744b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63311fb744b4Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63321fb744b4Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63331fb744b4Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63341fb744b4Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63351fb744b4Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63361fb744b4Smrg_LT_TAGVAR(module_cmds, $1)= 63371fb744b4Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63381fb744b4Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63391fb744b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63401fb744b4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63411fb744b4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63421fb744b4Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63431fb744b4Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63441fb744b4Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345f55e6a01Smrg 63461fb744b4Smrg# Source file extension for C++ test sources. 63471fb744b4Smrgac_ext=cpp 6348c35d236eSmrg 63491fb744b4Smrg# Object file extension for compiled C++ test sources. 63501fb744b4Smrgobjext=o 63511fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 63521fb744b4Smrg 63531fb744b4Smrg# No sense in running all these tests if we already determined that 63541fb744b4Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63551fb744b4Smrg# are currently assumed to apply to all compilers on this platform, 63561fb744b4Smrg# and will be corrupted by setting them based on a non-working compiler. 635714210e8eSmrgif test yes != "$_lt_caught_CXX_error"; then 63581fb744b4Smrg # Code to be used in simple compile tests 63591fb744b4Smrg lt_simple_compile_test_code="int some_variable = 0;" 63601fb744b4Smrg 63611fb744b4Smrg # Code to be used in simple link tests 63621fb744b4Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63631fb744b4Smrg 63641fb744b4Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63651fb744b4Smrg _LT_TAG_COMPILER 63661fb744b4Smrg 63671fb744b4Smrg # save warnings/boilerplate of simple test code 63681fb744b4Smrg _LT_COMPILER_BOILERPLATE 63691fb744b4Smrg _LT_LINKER_BOILERPLATE 63701fb744b4Smrg 63711fb744b4Smrg # Allow CC to be a program name with arguments. 63721fb744b4Smrg lt_save_CC=$CC 63731fb744b4Smrg lt_save_CFLAGS=$CFLAGS 63741fb744b4Smrg lt_save_LD=$LD 63751fb744b4Smrg lt_save_GCC=$GCC 63761fb744b4Smrg GCC=$GXX 63771fb744b4Smrg lt_save_with_gnu_ld=$with_gnu_ld 63781fb744b4Smrg lt_save_path_LD=$lt_cv_path_LD 63791fb744b4Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63801fb744b4Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63811fb744b4Smrg else 63821fb744b4Smrg $as_unset lt_cv_prog_gnu_ld 63831fb744b4Smrg fi 63841fb744b4Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 63851fb744b4Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63861fb744b4Smrg else 63871fb744b4Smrg $as_unset lt_cv_path_LD 63881fb744b4Smrg fi 63891fb744b4Smrg test -z "${LDCXX+set}" || LD=$LDCXX 63901fb744b4Smrg CC=${CXX-"c++"} 63911fb744b4Smrg CFLAGS=$CXXFLAGS 63921fb744b4Smrg compiler=$CC 63931fb744b4Smrg _LT_TAGVAR(compiler, $1)=$CC 63941fb744b4Smrg _LT_CC_BASENAME([$compiler]) 6395f55e6a01Smrg 63961fb744b4Smrg if test -n "$compiler"; then 63971fb744b4Smrg # We don't want -fno-exception when compiling C++ code, so set the 63981fb744b4Smrg # no_builtin_flag separately 639914210e8eSmrg if test yes = "$GXX"; then 64001fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64011fb744b4Smrg else 64021fb744b4Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64031fb744b4Smrg fi 6404f55e6a01Smrg 640514210e8eSmrg if test yes = "$GXX"; then 64061fb744b4Smrg # Set up default GNU C++ configuration 6407f55e6a01Smrg 64081fb744b4Smrg LT_PATH_LD 6409f55e6a01Smrg 64101fb744b4Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64111fb744b4Smrg # archiving commands below assume that GNU ld is being used. 641214210e8eSmrg if test yes = "$with_gnu_ld"; then 641314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 641414210e8eSmrg _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' 6415f55e6a01Smrg 641614210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 641714210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6418f55e6a01Smrg 64191fb744b4Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64201fb744b4Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64211fb744b4Smrg # investigate it a little bit more. (MM) 642214210e8eSmrg wlarc='$wl' 6423f55e6a01Smrg 64241fb744b4Smrg # ancient GNU ld didn't support --whole-archive et. al. 64251fb744b4Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64261fb744b4Smrg $GREP 'no-whole-archive' > /dev/null; then 642714210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64281fb744b4Smrg else 64291fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64301fb744b4Smrg fi 6431518bcf38Smrg else 64321fb744b4Smrg with_gnu_ld=no 64331fb744b4Smrg wlarc= 64341fb744b4Smrg 64351fb744b4Smrg # A generic and very simple default shared library creation 64361fb744b4Smrg # command for GNU C++ for the case where it uses the native 64371fb744b4Smrg # linker, instead of GNU ld. If possible, this setting should 64381fb744b4Smrg # overridden to take advantage of the native linker features on 64391fb744b4Smrg # the platform it is being used on. 64401fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6441518bcf38Smrg fi 64421fb744b4Smrg 64431fb744b4Smrg # Commands to make compiler produce verbose output that lists 64441fb744b4Smrg # what "hidden" libraries, object files and flags are used when 64451fb744b4Smrg # linking a shared library. 64461fb744b4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64471fb744b4Smrg 6448518bcf38Smrg else 64491fb744b4Smrg GXX=no 64501fb744b4Smrg with_gnu_ld=no 64511fb744b4Smrg wlarc= 6452518bcf38Smrg fi 6453c35d236eSmrg 64541fb744b4Smrg # PORTME: fill in a description of your system's C++ link characteristics 64551fb744b4Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64561fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64571fb744b4Smrg case $host_os in 64581fb744b4Smrg aix3*) 64591fb744b4Smrg # FIXME: insert proper C++ library support 64601fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64611fb744b4Smrg ;; 64621fb744b4Smrg aix[[4-9]]*) 646314210e8eSmrg if test ia64 = "$host_cpu"; then 64641fb744b4Smrg # On IA64, the linker does run time linking by default, so we don't 64651fb744b4Smrg # have to do anything special. 64661fb744b4Smrg aix_use_runtimelinking=no 64671fb744b4Smrg exp_sym_flag='-Bexport' 646814210e8eSmrg no_entry_flag= 64691fb744b4Smrg else 64701fb744b4Smrg aix_use_runtimelinking=no 64711fb744b4Smrg 64721fb744b4Smrg # Test if we are trying to use run time linking or normal 64731fb744b4Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 647414210e8eSmrg # have runtime linking enabled, and use it for executables. 647514210e8eSmrg # For shared libraries, we enable/disable runtime linking 647614210e8eSmrg # depending on the kind of the shared library created - 647714210e8eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 647814210e8eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 647914210e8eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 648014210e8eSmrg # lib.a static archive 648114210e8eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 648214210e8eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 648314210e8eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 648414210e8eSmrg # lib.a(lib.so.V) shared, rtl:no 648514210e8eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 648614210e8eSmrg # lib.a static archive 64871fb744b4Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64881fb744b4Smrg for ld_flag in $LDFLAGS; do 64891fb744b4Smrg case $ld_flag in 64901fb744b4Smrg *-brtl*) 64911fb744b4Smrg aix_use_runtimelinking=yes 64921fb744b4Smrg break 64931fb744b4Smrg ;; 64941fb744b4Smrg esac 64951fb744b4Smrg done 649614210e8eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 649714210e8eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 649814210e8eSmrg # so we don't have lib.a shared libs to link our executables. 649914210e8eSmrg # We have to force runtime linking in this case. 650014210e8eSmrg aix_use_runtimelinking=yes 650114210e8eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 650214210e8eSmrg fi 65031fb744b4Smrg ;; 65041fb744b4Smrg esac 6505c35d236eSmrg 65061fb744b4Smrg exp_sym_flag='-bexport' 65071fb744b4Smrg no_entry_flag='-bnoentry' 65081fb744b4Smrg fi 6509c35d236eSmrg 65101fb744b4Smrg # When large executables or shared objects are built, AIX ld can 65111fb744b4Smrg # have problems creating the table of contents. If linking a library 65121fb744b4Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65131fb744b4Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65141fb744b4Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65151fb744b4Smrg 65161fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='' 65171fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65181fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65191fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65201fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 652114210e8eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 652214210e8eSmrg case $with_aix_soname,$aix_use_runtimelinking in 652314210e8eSmrg aix,*) ;; # no import file 652414210e8eSmrg svr4,* | *,yes) # use import file 652514210e8eSmrg # The Import File defines what to hardcode. 652614210e8eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 652714210e8eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 652814210e8eSmrg ;; 652914210e8eSmrg esac 65301fb744b4Smrg 653114210e8eSmrg if test yes = "$GXX"; then 65321fb744b4Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65331fb744b4Smrg # We only want to do this on AIX 4.2 and lower, the check 65341fb744b4Smrg # below for broken collect2 doesn't work under 4.3+ 653514210e8eSmrg collect2name=`$CC -print-prog-name=collect2` 65361fb744b4Smrg if test -f "$collect2name" && 65371fb744b4Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65381fb744b4Smrg then 65391fb744b4Smrg # We have reworked collect2 65401fb744b4Smrg : 65411fb744b4Smrg else 65421fb744b4Smrg # We have old collect2 65431fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65441fb744b4Smrg # It fails to find uninstalled libraries when the uninstalled 65451fb744b4Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65461fb744b4Smrg # to unsupported forces relinking 65471fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65481fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65491fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65501fb744b4Smrg fi 65511fb744b4Smrg esac 65521fb744b4Smrg shared_flag='-shared' 655314210e8eSmrg if test yes = "$aix_use_runtimelinking"; then 655414210e8eSmrg shared_flag=$shared_flag' $wl-G' 65551fb744b4Smrg fi 655614210e8eSmrg # Need to ensure runtime linking is disabled for the traditional 655714210e8eSmrg # shared library, or the linker may eventually find shared libraries 655814210e8eSmrg # /with/ Import File - we do not want to mix them. 655914210e8eSmrg shared_flag_aix='-shared' 656014210e8eSmrg shared_flag_svr4='-shared $wl-G' 65611fb744b4Smrg else 65621fb744b4Smrg # not using gcc 656314210e8eSmrg if test ia64 = "$host_cpu"; then 65641fb744b4Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65651fb744b4Smrg # chokes on -Wl,-G. The following line is correct: 65661fb744b4Smrg shared_flag='-G' 65671fb744b4Smrg else 656814210e8eSmrg if test yes = "$aix_use_runtimelinking"; then 656914210e8eSmrg shared_flag='$wl-G' 65701fb744b4Smrg else 657114210e8eSmrg shared_flag='$wl-bM:SRE' 65721fb744b4Smrg fi 657314210e8eSmrg shared_flag_aix='$wl-bM:SRE' 657414210e8eSmrg shared_flag_svr4='$wl-G' 65751fb744b4Smrg fi 65761fb744b4Smrg fi 6577c35d236eSmrg 657814210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65791fb744b4Smrg # It seems that -bexpall does not export symbols beginning with 65801fb744b4Smrg # underscore (_), so it is better to generate a list of symbols to 65811fb744b4Smrg # export. 65821fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 658314210e8eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65841fb744b4Smrg # Warning - without using the other runtime loading flags (-brtl), 65851fb744b4Smrg # -berok will link without error, but may produce a broken library. 658614210e8eSmrg # The "-G" linker flag allows undefined symbols. 658714210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65881fb744b4Smrg # Determine the default libpath from the value encoded in an empty 65891fb744b4Smrg # executable. 65901fb744b4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 659114210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65921fb744b4Smrg 659314210e8eSmrg _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 65941fb744b4Smrg else 659514210e8eSmrg if test ia64 = "$host_cpu"; then 659614210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65971fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 659814210e8eSmrg _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" 65991fb744b4Smrg else 66001fb744b4Smrg # Determine the default libpath from the value encoded in an 66011fb744b4Smrg # empty executable. 66021fb744b4Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 660314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66041fb744b4Smrg # Warning - without using the other run time loading flags, 66051fb744b4Smrg # -berok will link without error, but may produce a broken library. 660614210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 660714210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 660814210e8eSmrg if test yes = "$with_gnu_ld"; then 66091fb744b4Smrg # We only use this code for GNU lds that support --whole-archive. 661014210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66111fb744b4Smrg else 66121fb744b4Smrg # Exported symbols can be pulled into shared objects from archives 66131fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66141fb744b4Smrg fi 66151fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 661614210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 661714210e8eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 661814210e8eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 661914210e8eSmrg if test svr4 != "$with_aix_soname"; then 662014210e8eSmrg # This is similar to how AIX traditionally builds its shared 662114210e8eSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 662214210e8eSmrg _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' 662314210e8eSmrg fi 662414210e8eSmrg if test aix != "$with_aix_soname"; then 662514210e8eSmrg _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' 662614210e8eSmrg else 662714210e8eSmrg # used by -dlpreopen to get the symbols 662814210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 662914210e8eSmrg fi 663014210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66311fb744b4Smrg fi 66321fb744b4Smrg fi 66331fb744b4Smrg ;; 6634c35d236eSmrg 66351fb744b4Smrg beos*) 66361fb744b4Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66371fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66381fb744b4Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66391fb744b4Smrg # support --undefined. This deserves some investigation. FIXME 664014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6641518bcf38Smrg else 66421fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6643518bcf38Smrg fi 6644518bcf38Smrg ;; 66451fb744b4Smrg 6646518bcf38Smrg chorus*) 66471fb744b4Smrg case $cc_basename in 66481fb744b4Smrg *) 66491fb744b4Smrg # FIXME: insert proper C++ library support 66501fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66511fb744b4Smrg ;; 66521fb744b4Smrg esac 66531fb744b4Smrg ;; 66541fb744b4Smrg 66551fb744b4Smrg cygwin* | mingw* | pw32* | cegcc*) 66561fb744b4Smrg case $GXX,$cc_basename in 66571fb744b4Smrg ,cl* | no,cl*) 66581fb744b4Smrg # Native MSVC 66591fb744b4Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66601fb744b4Smrg # no search path for DLLs. 66611fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66621fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66631fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 66641fb744b4Smrg _LT_TAGVAR(file_list_spec, $1)='@' 66651fb744b4Smrg # Tell ltmain to make .lib files, not .a files. 66661fb744b4Smrg libext=lib 66671fb744b4Smrg # Tell ltmain to make .dll files, not .so files. 666814210e8eSmrg shrext_cmds=.dll 66691fb744b4Smrg # FIXME: Setting linknames here is a bad hack. 667014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 667114210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 667214210e8eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 667314210e8eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 667414210e8eSmrg else 667514210e8eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 667614210e8eSmrg fi~ 667714210e8eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 667814210e8eSmrg linknames=' 66791fb744b4Smrg # The linker will not automatically build a static lib if we build a DLL. 66801fb744b4Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66811fb744b4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66821fb744b4Smrg # Don't use ranlib 66831fb744b4Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66841fb744b4Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 668514210e8eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 668614210e8eSmrg case $lt_outputfile in 668714210e8eSmrg *.exe|*.EXE) ;; 668814210e8eSmrg *) 668914210e8eSmrg lt_outputfile=$lt_outputfile.exe 669014210e8eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 669114210e8eSmrg ;; 669214210e8eSmrg esac~ 669314210e8eSmrg func_to_tool_file "$lt_outputfile"~ 669414210e8eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 669514210e8eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 669614210e8eSmrg $RM "$lt_outputfile.manifest"; 669714210e8eSmrg fi' 66981fb744b4Smrg ;; 66991fb744b4Smrg *) 67001fb744b4Smrg # g++ 67011fb744b4Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67021fb744b4Smrg # as there is no search path for DLLs. 67031fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 670414210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67051fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67061fb744b4Smrg _LT_TAGVAR(always_export_symbols, $1)=no 67071fb744b4Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67081fb744b4Smrg 67091fb744b4Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 671014210e8eSmrg _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' 671114210e8eSmrg # If the export-symbols file already is a .def file, use it as 671214210e8eSmrg # is; otherwise, prepend EXPORTS... 671314210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 671414210e8eSmrg cp $export_symbols $output_objdir/$soname.def; 671514210e8eSmrg else 671614210e8eSmrg echo EXPORTS > $output_objdir/$soname.def; 671714210e8eSmrg cat $export_symbols >> $output_objdir/$soname.def; 671814210e8eSmrg fi~ 671914210e8eSmrg $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' 67201fb744b4Smrg else 67211fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67221fb744b4Smrg fi 6723518bcf38Smrg ;; 6724518bcf38Smrg esac 6725518bcf38Smrg ;; 67261fb744b4Smrg darwin* | rhapsody*) 67271fb744b4Smrg _LT_DARWIN_LINKER_FEATURES($1) 67281fb744b4Smrg ;; 67291fb744b4Smrg 673014210e8eSmrg os2*) 673114210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 673214210e8eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 673314210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 673414210e8eSmrg shrext_cmds=.dll 673514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 673614210e8eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 673714210e8eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 673814210e8eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 673914210e8eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 674014210e8eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 674114210e8eSmrg emximp -o $lib $output_objdir/$libname.def' 674214210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674314210e8eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674414210e8eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 674514210e8eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 674614210e8eSmrg prefix_cmds="$SED"~ 674714210e8eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 674814210e8eSmrg prefix_cmds="$prefix_cmds -e 1d"; 674914210e8eSmrg fi~ 675014210e8eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 675114210e8eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 675214210e8eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 675314210e8eSmrg emximp -o $lib $output_objdir/$libname.def' 675414210e8eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 675514210e8eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 675614210e8eSmrg ;; 675714210e8eSmrg 6758518bcf38Smrg dgux*) 67591fb744b4Smrg case $cc_basename in 67601fb744b4Smrg ec++*) 67611fb744b4Smrg # FIXME: insert proper C++ library support 67621fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6763518bcf38Smrg ;; 67641fb744b4Smrg ghcx*) 6765518bcf38Smrg # Green Hills C++ Compiler 67661fb744b4Smrg # FIXME: insert proper C++ library support 67671fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6768518bcf38Smrg ;; 67691fb744b4Smrg *) 67701fb744b4Smrg # FIXME: insert proper C++ library support 67711fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6772518bcf38Smrg ;; 67731fb744b4Smrg esac 67741fb744b4Smrg ;; 67751fb744b4Smrg 67761fb744b4Smrg freebsd2.*) 67771fb744b4Smrg # C++ shared libraries reported to be fairly broken before 67781fb744b4Smrg # switch to ELF 67791fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67801fb744b4Smrg ;; 67811fb744b4Smrg 67821fb744b4Smrg freebsd-elf*) 67831fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67841fb744b4Smrg ;; 67851fb744b4Smrg 6786518bcf38Smrg freebsd* | dragonfly*) 67871fb744b4Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67881fb744b4Smrg # conventions 67891fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 67901fb744b4Smrg ;; 67911fb744b4Smrg 67921fb744b4Smrg haiku*) 679314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67941fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67951fb744b4Smrg ;; 67961fb744b4Smrg 67971fb744b4Smrg hpux9*) 679814210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67991fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 680014210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68011fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68021fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68031fb744b4Smrg # but as the default 68041fb744b4Smrg # location of the library. 68051fb744b4Smrg 68061fb744b4Smrg case $cc_basename in 68071fb744b4Smrg CC*) 68081fb744b4Smrg # FIXME: insert proper C++ library support 68091fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68101fb744b4Smrg ;; 68111fb744b4Smrg aCC*) 681214210e8eSmrg _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' 68131fb744b4Smrg # Commands to make compiler produce verbose output that lists 68141fb744b4Smrg # what "hidden" libraries, object files and flags are used when 68151fb744b4Smrg # linking a shared library. 68161fb744b4Smrg # 68171fb744b4Smrg # There doesn't appear to be a way to prevent this compiler from 68181fb744b4Smrg # explicitly linking system object files so we need to strip them 68191fb744b4Smrg # from the output so that they don't get included in the library 68201fb744b4Smrg # dependencies. 682114210e8eSmrg 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"' 68221fb744b4Smrg ;; 68231fb744b4Smrg *) 682414210e8eSmrg if test yes = "$GXX"; then 682514210e8eSmrg _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' 68261fb744b4Smrg else 68271fb744b4Smrg # FIXME: insert proper C++ library support 68281fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68291fb744b4Smrg fi 68301fb744b4Smrg ;; 68311fb744b4Smrg esac 68321fb744b4Smrg ;; 68331fb744b4Smrg 68341fb744b4Smrg hpux10*|hpux11*) 683514210e8eSmrg if test no = "$with_gnu_ld"; then 683614210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68371fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68381fb744b4Smrg 68391fb744b4Smrg case $host_cpu in 68401fb744b4Smrg hppa*64*|ia64*) 68411fb744b4Smrg ;; 68421fb744b4Smrg *) 684314210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68441fb744b4Smrg ;; 68451fb744b4Smrg esac 68461fb744b4Smrg fi 68471fb744b4Smrg case $host_cpu in 68481fb744b4Smrg hppa*64*|ia64*) 68491fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68501fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68511fb744b4Smrg ;; 68521fb744b4Smrg *) 68531fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68541fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68551fb744b4Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68561fb744b4Smrg # but as the default 68571fb744b4Smrg # location of the library. 68581fb744b4Smrg ;; 68591fb744b4Smrg esac 68601fb744b4Smrg 68611fb744b4Smrg case $cc_basename in 68621fb744b4Smrg CC*) 68631fb744b4Smrg # FIXME: insert proper C++ library support 68641fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6865518bcf38Smrg ;; 68661fb744b4Smrg aCC*) 6867518bcf38Smrg case $host_cpu in 68681fb744b4Smrg hppa*64*) 686914210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68701fb744b4Smrg ;; 68711fb744b4Smrg ia64*) 687214210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68731fb744b4Smrg ;; 68741fb744b4Smrg *) 687514210e8eSmrg _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' 68761fb744b4Smrg ;; 6877518bcf38Smrg esac 68781fb744b4Smrg # Commands to make compiler produce verbose output that lists 68791fb744b4Smrg # what "hidden" libraries, object files and flags are used when 68801fb744b4Smrg # linking a shared library. 68811fb744b4Smrg # 68821fb744b4Smrg # There doesn't appear to be a way to prevent this compiler from 68831fb744b4Smrg # explicitly linking system object files so we need to strip them 68841fb744b4Smrg # from the output so that they don't get included in the library 68851fb744b4Smrg # dependencies. 688614210e8eSmrg 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"' 6887518bcf38Smrg ;; 68881fb744b4Smrg *) 688914210e8eSmrg if test yes = "$GXX"; then 689014210e8eSmrg if test no = "$with_gnu_ld"; then 68911fb744b4Smrg case $host_cpu in 68921fb744b4Smrg hppa*64*) 689314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68941fb744b4Smrg ;; 68951fb744b4Smrg ia64*) 689614210e8eSmrg _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' 68971fb744b4Smrg ;; 68981fb744b4Smrg *) 689914210e8eSmrg _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' 69001fb744b4Smrg ;; 69011fb744b4Smrg esac 69021fb744b4Smrg fi 69031fb744b4Smrg else 69041fb744b4Smrg # FIXME: insert proper C++ library support 69051fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69061fb744b4Smrg fi 6907518bcf38Smrg ;; 69081fb744b4Smrg esac 69091fb744b4Smrg ;; 69101fb744b4Smrg 69111fb744b4Smrg interix[[3-9]]*) 69121fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69131fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 691414210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 691514210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69161fb744b4Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69171fb744b4Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69181fb744b4Smrg # default) and relocated if they conflict, which is a slow very memory 69191fb744b4Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69201fb744b4Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69211fb744b4Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 692214210e8eSmrg _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' 692314210e8eSmrg _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' 6924518bcf38Smrg ;; 69251fb744b4Smrg irix5* | irix6*) 69261fb744b4Smrg case $cc_basename in 69271fb744b4Smrg CC*) 69281fb744b4Smrg # SGI C++ 692914210e8eSmrg _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' 69301fb744b4Smrg 69311fb744b4Smrg # Archives containing C++ object files must be created using 69321fb744b4Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69331fb744b4Smrg # necessary to make sure instantiated templates are included 69341fb744b4Smrg # in the archive. 69351fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936518bcf38Smrg ;; 69371fb744b4Smrg *) 693814210e8eSmrg if test yes = "$GXX"; then 693914210e8eSmrg if test no = "$with_gnu_ld"; then 694014210e8eSmrg _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' 69411fb744b4Smrg else 694214210e8eSmrg _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' 69431fb744b4Smrg fi 69441fb744b4Smrg fi 69451fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6946518bcf38Smrg ;; 69471fb744b4Smrg esac 694814210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69491fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69501fb744b4Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69511fb744b4Smrg ;; 69521fb744b4Smrg 695314210e8eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69541fb744b4Smrg case $cc_basename in 69551fb744b4Smrg KCC*) 69561fb744b4Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69571fb744b4Smrg 69581fb744b4Smrg # KCC will only create a shared library if the output file 69591fb744b4Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69601fb744b4Smrg # to its proper name (with version) after linking. 696114210e8eSmrg _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' 696214210e8eSmrg _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' 69631fb744b4Smrg # Commands to make compiler produce verbose output that lists 69641fb744b4Smrg # what "hidden" libraries, object files and flags are used when 69651fb744b4Smrg # linking a shared library. 69661fb744b4Smrg # 69671fb744b4Smrg # There doesn't appear to be a way to prevent this compiler from 69681fb744b4Smrg # explicitly linking system object files so we need to strip them 69691fb744b4Smrg # from the output so that they don't get included in the library 69701fb744b4Smrg # dependencies. 697114210e8eSmrg 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"' 69721fb744b4Smrg 697314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 697414210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69751fb744b4Smrg 69761fb744b4Smrg # Archives containing C++ object files must be created using 69771fb744b4Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69781fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979518bcf38Smrg ;; 69801fb744b4Smrg icpc* | ecpc* ) 6981518bcf38Smrg # Intel C++ 69821fb744b4Smrg with_gnu_ld=yes 69831fb744b4Smrg # version 8.0 and above of icpc choke on multiply defined symbols 69841fb744b4Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69851fb744b4Smrg # earlier do not add the objects themselves. 69861fb744b4Smrg case `$CC -V 2>&1` in 69871fb744b4Smrg *"Version 7."*) 698814210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 698914210e8eSmrg _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' 69901fb744b4Smrg ;; 69911fb744b4Smrg *) # Version 8.0 or newer 69921fb744b4Smrg tmp_idyn= 69931fb744b4Smrg case $host_cpu in 69941fb744b4Smrg ia64*) tmp_idyn=' -i_dynamic';; 69951fb744b4Smrg esac 699614210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 699714210e8eSmrg _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' 69981fb744b4Smrg ;; 69991fb744b4Smrg esac 70001fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 700114210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 700214210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 700314210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004518bcf38Smrg ;; 70051fb744b4Smrg pgCC* | pgcpp*) 70061fb744b4Smrg # Portland Group C++ compiler 70071fb744b4Smrg case `$CC -V` in 70081fb744b4Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70091fb744b4Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 701014210e8eSmrg rm -rf $tpldir~ 701114210e8eSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 701214210e8eSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70131fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 701414210e8eSmrg rm -rf $tpldir~ 701514210e8eSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 701614210e8eSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 701714210e8eSmrg $RANLIB $oldlib' 70181fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 701914210e8eSmrg rm -rf $tpldir~ 702014210e8eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702114210e8eSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70221fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 702314210e8eSmrg rm -rf $tpldir~ 702414210e8eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702514210e8eSmrg $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' 70261fb744b4Smrg ;; 70271fb744b4Smrg *) # Version 6 and above use weak symbols 702814210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702914210e8eSmrg _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' 70301fb744b4Smrg ;; 70311fb744b4Smrg esac 70321fb744b4Smrg 703314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 703414210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 703514210e8eSmrg _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' 70361fb744b4Smrg ;; 7037518bcf38Smrg cxx*) 7038518bcf38Smrg # Compaq C++ 703914210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 704014210e8eSmrg _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' 70411fb744b4Smrg 70421fb744b4Smrg runpath_var=LD_RUN_PATH 70431fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70441fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70451fb744b4Smrg 70461fb744b4Smrg # Commands to make compiler produce verbose output that lists 70471fb744b4Smrg # what "hidden" libraries, object files and flags are used when 70481fb744b4Smrg # linking a shared library. 70491fb744b4Smrg # 70501fb744b4Smrg # There doesn't appear to be a way to prevent this compiler from 70511fb744b4Smrg # explicitly linking system object files so we need to strip them 70521fb744b4Smrg # from the output so that they don't get included in the library 70531fb744b4Smrg # dependencies. 705414210e8eSmrg 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' 70551fb744b4Smrg ;; 70561fb744b4Smrg xl* | mpixl* | bgxl*) 70571fb744b4Smrg # IBM XL 8.0 on PPC, with GNU ld 705814210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 705914210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 706014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 706114210e8eSmrg if test yes = "$supports_anon_versioning"; then 70621fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 706314210e8eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 706414210e8eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 706514210e8eSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70661fb744b4Smrg fi 7067518bcf38Smrg ;; 7068518bcf38Smrg *) 7069518bcf38Smrg case `$CC -V 2>&1 | sed 5q` in 7070518bcf38Smrg *Sun\ C*) 7071518bcf38Smrg # Sun C++ 5.9 70721fb744b4Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 707314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 707414210e8eSmrg _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' 70751fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 707614210e8eSmrg _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' 70771fb744b4Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70781fb744b4Smrg 70791fb744b4Smrg # Not sure whether something based on 70801fb744b4Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70811fb744b4Smrg # would be better. 70821fb744b4Smrg output_verbose_link_cmd='func_echo_all' 70831fb744b4Smrg 70841fb744b4Smrg # Archives containing C++ object files must be created using 70851fb744b4Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70861fb744b4Smrg # necessary to make sure instantiated templates are included 70871fb744b4Smrg # in the archive. 70881fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089518bcf38Smrg ;; 7090518bcf38Smrg esac 7091518bcf38Smrg ;; 7092518bcf38Smrg esac 7093518bcf38Smrg ;; 70941fb744b4Smrg 7095518bcf38Smrg lynxos*) 70961fb744b4Smrg # FIXME: insert proper C++ library support 70971fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7098518bcf38Smrg ;; 70991fb744b4Smrg 7100518bcf38Smrg m88k*) 71011fb744b4Smrg # FIXME: insert proper C++ library support 71021fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7103518bcf38Smrg ;; 71041fb744b4Smrg 7105518bcf38Smrg mvs*) 71061fb744b4Smrg case $cc_basename in 71071fb744b4Smrg cxx*) 71081fb744b4Smrg # FIXME: insert proper C++ library support 71091fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7110518bcf38Smrg ;; 7111518bcf38Smrg *) 71121fb744b4Smrg # FIXME: insert proper C++ library support 71131fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7114518bcf38Smrg ;; 7115518bcf38Smrg esac 7116518bcf38Smrg ;; 71171fb744b4Smrg 7118518bcf38Smrg netbsd*) 71191fb744b4Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71201fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71211fb744b4Smrg wlarc= 71221fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71231fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71241fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71251fb744b4Smrg fi 71261fb744b4Smrg # Workaround some broken pre-1.5 toolchains 71271fb744b4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71281fb744b4Smrg ;; 71291fb744b4Smrg 71301fb744b4Smrg *nto* | *qnx*) 71311fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71321fb744b4Smrg ;; 71331fb744b4Smrg 713414210e8eSmrg openbsd* | bitrig*) 71351fb744b4Smrg if test -f /usr/libexec/ld.so; then 71361fb744b4Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71371fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71381fb744b4Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71391fb744b4Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 714014210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 714114210e8eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 714214210e8eSmrg _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' 714314210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 714414210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71451fb744b4Smrg fi 71461fb744b4Smrg output_verbose_link_cmd=func_echo_all 71471fb744b4Smrg else 71481fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71491fb744b4Smrg fi 7150518bcf38Smrg ;; 71511fb744b4Smrg 7152518bcf38Smrg osf3* | osf4* | osf5*) 71531fb744b4Smrg case $cc_basename in 71541fb744b4Smrg KCC*) 71551fb744b4Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71561fb744b4Smrg 71571fb744b4Smrg # KCC will only create a shared library if the output file 71581fb744b4Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71591fb744b4Smrg # to its proper name (with version) after linking. 716014210e8eSmrg _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' 71611fb744b4Smrg 716214210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71631fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71641fb744b4Smrg 71651fb744b4Smrg # Archives containing C++ object files must be created using 71661fb744b4Smrg # the KAI C++ compiler. 71671fb744b4Smrg case $host in 71681fb744b4Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71691fb744b4Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71701fb744b4Smrg esac 7171518bcf38Smrg ;; 71721fb744b4Smrg RCC*) 7173518bcf38Smrg # Rational C++ 2.4.1 71741fb744b4Smrg # FIXME: insert proper C++ library support 71751fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7176518bcf38Smrg ;; 71771fb744b4Smrg cxx*) 71781fb744b4Smrg case $host in 71791fb744b4Smrg osf3*) 718014210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 718114210e8eSmrg _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' 718214210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71831fb744b4Smrg ;; 71841fb744b4Smrg *) 71851fb744b4Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 718614210e8eSmrg _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' 71871fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 718814210e8eSmrg echo "-hidden">> $lib.exp~ 718914210e8eSmrg $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~ 719014210e8eSmrg $RM $lib.exp' 71911fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71921fb744b4Smrg ;; 71931fb744b4Smrg esac 71941fb744b4Smrg 71951fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71961fb744b4Smrg 71971fb744b4Smrg # Commands to make compiler produce verbose output that lists 71981fb744b4Smrg # what "hidden" libraries, object files and flags are used when 71991fb744b4Smrg # linking a shared library. 72001fb744b4Smrg # 72011fb744b4Smrg # There doesn't appear to be a way to prevent this compiler from 72021fb744b4Smrg # explicitly linking system object files so we need to strip them 72031fb744b4Smrg # from the output so that they don't get included in the library 72041fb744b4Smrg # dependencies. 720514210e8eSmrg 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"' 7206518bcf38Smrg ;; 7207518bcf38Smrg *) 720814210e8eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 720914210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72101fb744b4Smrg case $host in 72111fb744b4Smrg osf3*) 721214210e8eSmrg _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' 72131fb744b4Smrg ;; 72141fb744b4Smrg *) 721514210e8eSmrg _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' 72161fb744b4Smrg ;; 72171fb744b4Smrg esac 72181fb744b4Smrg 721914210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72201fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72211fb744b4Smrg 72221fb744b4Smrg # Commands to make compiler produce verbose output that lists 72231fb744b4Smrg # what "hidden" libraries, object files and flags are used when 72241fb744b4Smrg # linking a shared library. 72251fb744b4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72261fb744b4Smrg 72271fb744b4Smrg else 72281fb744b4Smrg # FIXME: insert proper C++ library support 72291fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72301fb744b4Smrg fi 7231518bcf38Smrg ;; 72321fb744b4Smrg esac 72331fb744b4Smrg ;; 72341fb744b4Smrg 7235518bcf38Smrg psos*) 72361fb744b4Smrg # FIXME: insert proper C++ library support 72371fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72381fb744b4Smrg ;; 72391fb744b4Smrg 7240518bcf38Smrg sunos4*) 72411fb744b4Smrg case $cc_basename in 72421fb744b4Smrg CC*) 7243518bcf38Smrg # Sun C++ 4.x 72441fb744b4Smrg # FIXME: insert proper C++ library support 72451fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7246518bcf38Smrg ;; 72471fb744b4Smrg lcc*) 7248518bcf38Smrg # Lucid 72491fb744b4Smrg # FIXME: insert proper C++ library support 72501fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7251518bcf38Smrg ;; 72521fb744b4Smrg *) 72531fb744b4Smrg # FIXME: insert proper C++ library support 72541fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7255518bcf38Smrg ;; 72561fb744b4Smrg esac 72571fb744b4Smrg ;; 7258c35d236eSmrg 72591fb744b4Smrg solaris*) 72601fb744b4Smrg case $cc_basename in 72611fb744b4Smrg CC* | sunCC*) 72621fb744b4Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72631fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72641fb744b4Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 726514210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72661fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 726714210e8eSmrg $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' 72681fb744b4Smrg 72691fb744b4Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72701fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72711fb744b4Smrg case $host_os in 72721fb744b4Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72731fb744b4Smrg *) 72741fb744b4Smrg # The compiler driver will combine and reorder linker options, 727514210e8eSmrg # but understands '-z linker_flag'. 72761fb744b4Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72771fb744b4Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72781fb744b4Smrg ;; 72791fb744b4Smrg esac 72801fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7281c35d236eSmrg 72821fb744b4Smrg output_verbose_link_cmd='func_echo_all' 7283c35d236eSmrg 72841fb744b4Smrg # Archives containing C++ object files must be created using 72851fb744b4Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72861fb744b4Smrg # necessary to make sure instantiated templates are included 72871fb744b4Smrg # in the archive. 72881fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72891fb744b4Smrg ;; 72901fb744b4Smrg gcx*) 72911fb744b4Smrg # Green Hills C++ Compiler 729214210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7293c35d236eSmrg 72941fb744b4Smrg # The C++ compiler must be used to create the archive. 72951fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72961fb744b4Smrg ;; 72971fb744b4Smrg *) 72981fb744b4Smrg # GNU C++ compiler with Solaris linker 729914210e8eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 730014210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73011fb744b4Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 730214210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73031fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 730414210e8eSmrg $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' 73051fb744b4Smrg 73061fb744b4Smrg # Commands to make compiler produce verbose output that lists 73071fb744b4Smrg # what "hidden" libraries, object files and flags are used when 73081fb744b4Smrg # linking a shared library. 73091fb744b4Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73101fb744b4Smrg else 731114210e8eSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73121fb744b4Smrg # platform. 731314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73141fb744b4Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 731514210e8eSmrg $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' 73161fb744b4Smrg 73171fb744b4Smrg # Commands to make compiler produce verbose output that lists 73181fb744b4Smrg # what "hidden" libraries, object files and flags are used when 73191fb744b4Smrg # linking a shared library. 73201fb744b4Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73211fb744b4Smrg fi 73221fb744b4Smrg 732314210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73241fb744b4Smrg case $host_os in 73251fb744b4Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73261fb744b4Smrg *) 732714210e8eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73281fb744b4Smrg ;; 73291fb744b4Smrg esac 73301fb744b4Smrg fi 73311fb744b4Smrg ;; 73321fb744b4Smrg esac 73331fb744b4Smrg ;; 7334c35d236eSmrg 73351fb744b4Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 733614210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73371fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73381fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73391fb744b4Smrg runpath_var='LD_RUN_PATH' 7340c35d236eSmrg 7341518bcf38Smrg case $cc_basename in 73421fb744b4Smrg CC*) 734314210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734414210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345518bcf38Smrg ;; 73461fb744b4Smrg *) 734714210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734814210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349518bcf38Smrg ;; 7350518bcf38Smrg esac 7351518bcf38Smrg ;; 7352c35d236eSmrg 73531fb744b4Smrg sysv5* | sco3.2v5* | sco5v6*) 735414210e8eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 73551fb744b4Smrg # link with -lc, and that would cause any symbols used from libc to 73561fb744b4Smrg # always be unresolved, which means just about no library would 73571fb744b4Smrg # ever link correctly. If we're not using GNU ld we use -z text 73581fb744b4Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73591fb744b4Smrg # as -z defs. 736014210e8eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 736114210e8eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73621fb744b4Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73631fb744b4Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 736414210e8eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73651fb744b4Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73661fb744b4Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 736714210e8eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73681fb744b4Smrg runpath_var='LD_RUN_PATH' 7369c35d236eSmrg 73701fb744b4Smrg case $cc_basename in 73711fb744b4Smrg CC*) 737214210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737314210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73741fb744b4Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 737514210e8eSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73761fb744b4Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 737714210e8eSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 73781fb744b4Smrg ;; 73791fb744b4Smrg *) 738014210e8eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738114210e8eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73821fb744b4Smrg ;; 73831fb744b4Smrg esac 7384518bcf38Smrg ;; 73854f6cd06fSmrg 73861fb744b4Smrg tandem*) 73871fb744b4Smrg case $cc_basename in 73881fb744b4Smrg NCC*) 73891fb744b4Smrg # NonStop-UX NCC 3.20 73901fb744b4Smrg # FIXME: insert proper C++ library support 73911fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73921fb744b4Smrg ;; 73931fb744b4Smrg *) 73941fb744b4Smrg # FIXME: insert proper C++ library support 73951fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73961fb744b4Smrg ;; 73971fb744b4Smrg esac 73981fb744b4Smrg ;; 7399c35d236eSmrg 74001fb744b4Smrg vxworks*) 74011fb744b4Smrg # FIXME: insert proper C++ library support 74021fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74031fb744b4Smrg ;; 7404c35d236eSmrg 74051fb744b4Smrg *) 74061fb744b4Smrg # FIXME: insert proper C++ library support 74071fb744b4Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74081fb744b4Smrg ;; 74091fb744b4Smrg esac 7410c35d236eSmrg 74111fb744b4Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 741214210e8eSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74131fb744b4Smrg 741414210e8eSmrg _LT_TAGVAR(GCC, $1)=$GXX 741514210e8eSmrg _LT_TAGVAR(LD, $1)=$LD 74161fb744b4Smrg 74171fb744b4Smrg ## CAVEAT EMPTOR: 74181fb744b4Smrg ## There is no encapsulation within the following macros, do not change 74191fb744b4Smrg ## the running order or otherwise move them around unless you know exactly 74201fb744b4Smrg ## what you are doing... 74211fb744b4Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74221fb744b4Smrg _LT_COMPILER_PIC($1) 74231fb744b4Smrg _LT_COMPILER_C_O($1) 74241fb744b4Smrg _LT_COMPILER_FILE_LOCKS($1) 74251fb744b4Smrg _LT_LINKER_SHLIBS($1) 74261fb744b4Smrg _LT_SYS_DYNAMIC_LINKER($1) 74271fb744b4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74281fb744b4Smrg 74291fb744b4Smrg _LT_CONFIG($1) 74301fb744b4Smrg fi # test -n "$compiler" 74311fb744b4Smrg 74321fb744b4Smrg CC=$lt_save_CC 74331fb744b4Smrg CFLAGS=$lt_save_CFLAGS 74341fb744b4Smrg LDCXX=$LD 74351fb744b4Smrg LD=$lt_save_LD 74361fb744b4Smrg GCC=$lt_save_GCC 74371fb744b4Smrg with_gnu_ld=$lt_save_with_gnu_ld 74381fb744b4Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74391fb744b4Smrg lt_cv_path_LD=$lt_save_path_LD 74401fb744b4Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74411fb744b4Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 744214210e8eSmrgfi # test yes != "$_lt_caught_CXX_error" 7443c35d236eSmrg 74441fb744b4SmrgAC_LANG_POP 74451fb744b4Smrg])# _LT_LANG_CXX_CONFIG 7446c35d236eSmrg 7447c35d236eSmrg 74481fb744b4Smrg# _LT_FUNC_STRIPNAME_CNF 74491fb744b4Smrg# ---------------------- 74501fb744b4Smrg# func_stripname_cnf prefix suffix name 74511fb744b4Smrg# strip PREFIX and SUFFIX off of NAME. 74521fb744b4Smrg# PREFIX and SUFFIX must not contain globbing or regex special 74531fb744b4Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74541fb744b4Smrg# dot (in which case that matches only a dot). 74551fb744b4Smrg# 74561fb744b4Smrg# This function is identical to the (non-XSI) version of func_stripname, 74571fb744b4Smrg# except this one can be used by m4 code that may be executed by configure, 74581fb744b4Smrg# rather than the libtool script. 74591fb744b4Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74601fb744b4SmrgAC_REQUIRE([_LT_DECL_SED]) 74611fb744b4SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74621fb744b4Smrgfunc_stripname_cnf () 74631fb744b4Smrg{ 746414210e8eSmrg case @S|@2 in 746514210e8eSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 746614210e8eSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74671fb744b4Smrg esac 74681fb744b4Smrg} # func_stripname_cnf 74691fb744b4Smrg])# _LT_FUNC_STRIPNAME_CNF 7470c35d236eSmrg 747114210e8eSmrg 74721fb744b4Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74731fb744b4Smrg# --------------------------------- 74741fb744b4Smrg# Figure out "hidden" library dependencies from verbose 74751fb744b4Smrg# compiler output when linking a shared library. 74761fb744b4Smrg# Parse the compiler output and extract the necessary 74771fb744b4Smrg# objects, libraries and library flags. 74781fb744b4Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74791fb744b4Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74801fb744b4SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74811fb744b4Smrg# Dependencies to place before and after the object being linked: 74821fb744b4Smrg_LT_TAGVAR(predep_objects, $1)= 74831fb744b4Smrg_LT_TAGVAR(postdep_objects, $1)= 74841fb744b4Smrg_LT_TAGVAR(predeps, $1)= 74851fb744b4Smrg_LT_TAGVAR(postdeps, $1)= 74861fb744b4Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 74871fb744b4Smrg 74881fb744b4Smrgdnl we can't use the lt_simple_compile_test_code here, 74891fb744b4Smrgdnl because it contains code intended for an executable, 74901fb744b4Smrgdnl not a library. It's possible we should let each 74911fb744b4Smrgdnl tag define a new lt_????_link_test_code variable, 74921fb744b4Smrgdnl but it's only used here... 74931fb744b4Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74941fb744b4Smrgint a; 74951fb744b4Smrgvoid foo (void) { a = 0; } 74961fb744b4Smrg_LT_EOF 74971fb744b4Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74981fb744b4Smrgclass Foo 74991fb744b4Smrg{ 75001fb744b4Smrgpublic: 75011fb744b4Smrg Foo (void) { a = 0; } 75021fb744b4Smrgprivate: 75031fb744b4Smrg int a; 75041fb744b4Smrg}; 75051fb744b4Smrg_LT_EOF 75061fb744b4Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75071fb744b4Smrg subroutine foo 75081fb744b4Smrg implicit none 75091fb744b4Smrg integer*4 a 75101fb744b4Smrg a=0 75111fb744b4Smrg return 75121fb744b4Smrg end 75131fb744b4Smrg_LT_EOF 75141fb744b4Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75151fb744b4Smrg subroutine foo 75161fb744b4Smrg implicit none 75171fb744b4Smrg integer a 75181fb744b4Smrg a=0 75191fb744b4Smrg return 75201fb744b4Smrg end 75211fb744b4Smrg_LT_EOF 75221fb744b4Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75231fb744b4Smrgpublic class foo { 75241fb744b4Smrg private int a; 75251fb744b4Smrg public void bar (void) { 75261fb744b4Smrg a = 0; 75271fb744b4Smrg } 75281fb744b4Smrg}; 75291fb744b4Smrg_LT_EOF 75301fb744b4Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75311fb744b4Smrgpackage foo 75321fb744b4Smrgfunc foo() { 75331fb744b4Smrg} 75341fb744b4Smrg_LT_EOF 7535c35d236eSmrg]) 7536c35d236eSmrg 75371fb744b4Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 75381fb744b4Smrgcase "$CC $CFLAGS " in #( 75391fb744b4Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75401fb744b4Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75411fb744b4Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7542c35d236eSmrgesac 7543c35d236eSmrg 75441fb744b4Smrgdnl Parse the compiler output and extract the necessary 75451fb744b4Smrgdnl objects, libraries and library flags. 75461fb744b4Smrgif AC_TRY_EVAL(ac_compile); then 75471fb744b4Smrg # Parse the compiler output and extract the necessary 75481fb744b4Smrg # objects, libraries and library flags. 7549f55e6a01Smrg 75501fb744b4Smrg # Sentinel used to keep track of whether or not we are before 75511fb744b4Smrg # the conftest object file. 75521fb744b4Smrg pre_test_object_deps_done=no 7553f55e6a01Smrg 75541fb744b4Smrg for p in `eval "$output_verbose_link_cmd"`; do 755514210e8eSmrg case $prev$p in 7556c35d236eSmrg 75571fb744b4Smrg -L* | -R* | -l*) 75581fb744b4Smrg # Some compilers place space between "-{L,R}" and the path. 75591fb744b4Smrg # Remove the space. 756014210e8eSmrg if test x-L = "$p" || 756114210e8eSmrg test x-R = "$p"; then 75621fb744b4Smrg prev=$p 75631fb744b4Smrg continue 75641fb744b4Smrg fi 7565c35d236eSmrg 75661fb744b4Smrg # Expand the sysroot to ease extracting the directories later. 75671fb744b4Smrg if test -z "$prev"; then 75681fb744b4Smrg case $p in 75691fb744b4Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75701fb744b4Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75711fb744b4Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75721fb744b4Smrg esac 75731fb744b4Smrg fi 75741fb744b4Smrg case $p in 75751fb744b4Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75761fb744b4Smrg esac 757714210e8eSmrg if test no = "$pre_test_object_deps_done"; then 757814210e8eSmrg case $prev in 75791fb744b4Smrg -L | -R) 75801fb744b4Smrg # Internal compiler library paths should come after those 75811fb744b4Smrg # provided the user. The postdeps already come after the 75821fb744b4Smrg # user supplied libs so there is no need to process them. 75831fb744b4Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 758414210e8eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75851fb744b4Smrg else 758614210e8eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75871fb744b4Smrg fi 75881fb744b4Smrg ;; 75891fb744b4Smrg # The "-l" case would never come before the object being 75901fb744b4Smrg # linked, so don't bother handling this case. 75911fb744b4Smrg esac 75921fb744b4Smrg else 75931fb744b4Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 759414210e8eSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 75951fb744b4Smrg else 759614210e8eSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75971fb744b4Smrg fi 75981fb744b4Smrg fi 75991fb744b4Smrg prev= 76001fb744b4Smrg ;; 7601c35d236eSmrg 76021fb744b4Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 76031fb744b4Smrg *.$objext) 76041fb744b4Smrg # This assumes that the test object file only shows up 76051fb744b4Smrg # once in the compiler output. 76061fb744b4Smrg if test "$p" = "conftest.$objext"; then 76071fb744b4Smrg pre_test_object_deps_done=yes 76081fb744b4Smrg continue 76091fb744b4Smrg fi 7610c35d236eSmrg 761114210e8eSmrg if test no = "$pre_test_object_deps_done"; then 76121fb744b4Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 761314210e8eSmrg _LT_TAGVAR(predep_objects, $1)=$p 76141fb744b4Smrg else 76151fb744b4Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76161fb744b4Smrg fi 76171fb744b4Smrg else 76181fb744b4Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 761914210e8eSmrg _LT_TAGVAR(postdep_objects, $1)=$p 76201fb744b4Smrg else 76211fb744b4Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76221fb744b4Smrg fi 76231fb744b4Smrg fi 76241fb744b4Smrg ;; 7625c35d236eSmrg 76261fb744b4Smrg *) ;; # Ignore the rest. 7627c35d236eSmrg 76281fb744b4Smrg esac 76291fb744b4Smrg done 7630c35d236eSmrg 76311fb744b4Smrg # Clean up. 76321fb744b4Smrg rm -f a.out a.exe 76331fb744b4Smrgelse 76341fb744b4Smrg echo "libtool.m4: error: problem compiling $1 test program" 76351fb744b4Smrgfi 7636c35d236eSmrg 76371fb744b4Smrg$RM -f confest.$objext 76381fb744b4SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7639c35d236eSmrg 76401fb744b4Smrg# PORTME: override above test on systems where it is broken 76411fb744b4Smrgm4_if([$1], [CXX], 76421fb744b4Smrg[case $host_os in 76431fb744b4Smrginterix[[3-9]]*) 76441fb744b4Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76451fb744b4Smrg # hack all around it, let's just trust "g++" to DTRT. 76461fb744b4Smrg _LT_TAGVAR(predep_objects,$1)= 76471fb744b4Smrg _LT_TAGVAR(postdep_objects,$1)= 76481fb744b4Smrg _LT_TAGVAR(postdeps,$1)= 76491fb744b4Smrg ;; 76501fb744b4Smrgesac 76511fb744b4Smrg]) 7652c35d236eSmrg 76531fb744b4Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76541fb744b4Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76551fb744b4Smrgesac 76561fb744b4Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76571fb744b4Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 765814210e8eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76591fb744b4Smrgfi 76601fb744b4Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76611fb744b4Smrg [The directories searched by this compiler when creating a shared library]) 76621fb744b4Smrg_LT_TAGDECL([], [predep_objects], [1], 76631fb744b4Smrg [Dependencies to place before and after the objects being linked to 76641fb744b4Smrg create a shared library]) 76651fb744b4Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76661fb744b4Smrg_LT_TAGDECL([], [predeps], [1]) 76671fb744b4Smrg_LT_TAGDECL([], [postdeps], [1]) 76681fb744b4Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76691fb744b4Smrg [The library search path used internally by the compiler when linking 76701fb744b4Smrg a shared library]) 76711fb744b4Smrg])# _LT_SYS_HIDDEN_LIBDEPS 76721fb744b4Smrg 76731fb744b4Smrg 76741fb744b4Smrg# _LT_LANG_F77_CONFIG([TAG]) 76751fb744b4Smrg# -------------------------- 76761fb744b4Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76771fb744b4Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 767814210e8eSmrg# to write the compiler configuration to 'libtool'. 76791fb744b4Smrgm4_defun([_LT_LANG_F77_CONFIG], 76801fb744b4Smrg[AC_LANG_PUSH(Fortran 77) 768114210e8eSmrgif test -z "$F77" || test no = "$F77"; then 76821fb744b4Smrg _lt_disable_F77=yes 76831fb744b4Smrgfi 7684c35d236eSmrg 76851fb744b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76861fb744b4Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 76871fb744b4Smrg_LT_TAGVAR(always_export_symbols, $1)=no 76881fb744b4Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76891fb744b4Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76901fb744b4Smrg_LT_TAGVAR(hardcode_direct, $1)=no 76911fb744b4Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76921fb744b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76931fb744b4Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76941fb744b4Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76951fb744b4Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 76961fb744b4Smrg_LT_TAGVAR(inherit_rpath, $1)=no 76971fb744b4Smrg_LT_TAGVAR(module_cmds, $1)= 76981fb744b4Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 76991fb744b4Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77001fb744b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77011fb744b4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77021fb744b4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77031fb744b4Smrg_LT_TAGVAR(no_undefined_flag, $1)= 77041fb744b4Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77051fb744b4Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7706c35d236eSmrg 77071fb744b4Smrg# Source file extension for f77 test sources. 77081fb744b4Smrgac_ext=f 7709c35d236eSmrg 77101fb744b4Smrg# Object file extension for compiled f77 test sources. 77111fb744b4Smrgobjext=o 77121fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 77131fb744b4Smrg 77141fb744b4Smrg# No sense in running all these tests if we already determined that 77151fb744b4Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77161fb744b4Smrg# are currently assumed to apply to all compilers on this platform, 77171fb744b4Smrg# and will be corrupted by setting them based on a non-working compiler. 771814210e8eSmrgif test yes != "$_lt_disable_F77"; then 77191fb744b4Smrg # Code to be used in simple compile tests 77201fb744b4Smrg lt_simple_compile_test_code="\ 77211fb744b4Smrg subroutine t 77221fb744b4Smrg return 77231fb744b4Smrg end 77241fb744b4Smrg" 7725c35d236eSmrg 77261fb744b4Smrg # Code to be used in simple link tests 77271fb744b4Smrg lt_simple_link_test_code="\ 77281fb744b4Smrg program t 77291fb744b4Smrg end 77301fb744b4Smrg" 7731c35d236eSmrg 77321fb744b4Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77331fb744b4Smrg _LT_TAG_COMPILER 77341fb744b4Smrg 77351fb744b4Smrg # save warnings/boilerplate of simple test code 77361fb744b4Smrg _LT_COMPILER_BOILERPLATE 77371fb744b4Smrg _LT_LINKER_BOILERPLATE 77381fb744b4Smrg 77391fb744b4Smrg # Allow CC to be a program name with arguments. 774014210e8eSmrg lt_save_CC=$CC 77411fb744b4Smrg lt_save_GCC=$GCC 77421fb744b4Smrg lt_save_CFLAGS=$CFLAGS 77431fb744b4Smrg CC=${F77-"f77"} 77441fb744b4Smrg CFLAGS=$FFLAGS 77451fb744b4Smrg compiler=$CC 77461fb744b4Smrg _LT_TAGVAR(compiler, $1)=$CC 77471fb744b4Smrg _LT_CC_BASENAME([$compiler]) 77481fb744b4Smrg GCC=$G77 77491fb744b4Smrg if test -n "$compiler"; then 77501fb744b4Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77511fb744b4Smrg AC_MSG_RESULT([$can_build_shared]) 7752c35d236eSmrg 77531fb744b4Smrg AC_MSG_CHECKING([whether to build shared libraries]) 775414210e8eSmrg test no = "$can_build_shared" && enable_shared=no 7755c35d236eSmrg 77561fb744b4Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77571fb744b4Smrg # are all built from PIC. 7758518bcf38Smrg case $host_os in 77591fb744b4Smrg aix3*) 776014210e8eSmrg test yes = "$enable_shared" && enable_static=no 77611fb744b4Smrg if test -n "$RANLIB"; then 77621fb744b4Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77631fb744b4Smrg postinstall_cmds='$RANLIB $lib' 77641fb744b4Smrg fi 77651fb744b4Smrg ;; 77661fb744b4Smrg aix[[4-9]]*) 776714210e8eSmrg if test ia64 != "$host_cpu"; then 776814210e8eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 776914210e8eSmrg yes,aix,yes) ;; # shared object as lib.so file only 777014210e8eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 777114210e8eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 777214210e8eSmrg esac 7773518bcf38Smrg fi 77741fb744b4Smrg ;; 77751fb744b4Smrg esac 77761fb744b4Smrg AC_MSG_RESULT([$enable_shared]) 77771fb744b4Smrg 77781fb744b4Smrg AC_MSG_CHECKING([whether to build static libraries]) 77791fb744b4Smrg # Make sure either enable_shared or enable_static is yes. 778014210e8eSmrg test yes = "$enable_shared" || enable_static=yes 77811fb744b4Smrg AC_MSG_RESULT([$enable_static]) 77821fb744b4Smrg 778314210e8eSmrg _LT_TAGVAR(GCC, $1)=$G77 778414210e8eSmrg _LT_TAGVAR(LD, $1)=$LD 77851fb744b4Smrg 77861fb744b4Smrg ## CAVEAT EMPTOR: 77871fb744b4Smrg ## There is no encapsulation within the following macros, do not change 77881fb744b4Smrg ## the running order or otherwise move them around unless you know exactly 77891fb744b4Smrg ## what you are doing... 77901fb744b4Smrg _LT_COMPILER_PIC($1) 77911fb744b4Smrg _LT_COMPILER_C_O($1) 77921fb744b4Smrg _LT_COMPILER_FILE_LOCKS($1) 77931fb744b4Smrg _LT_LINKER_SHLIBS($1) 77941fb744b4Smrg _LT_SYS_DYNAMIC_LINKER($1) 77951fb744b4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 77961fb744b4Smrg 77971fb744b4Smrg _LT_CONFIG($1) 77981fb744b4Smrg fi # test -n "$compiler" 77991fb744b4Smrg 78001fb744b4Smrg GCC=$lt_save_GCC 780114210e8eSmrg CC=$lt_save_CC 780214210e8eSmrg CFLAGS=$lt_save_CFLAGS 780314210e8eSmrgfi # test yes != "$_lt_disable_F77" 7804c35d236eSmrg 78051fb744b4SmrgAC_LANG_POP 78061fb744b4Smrg])# _LT_LANG_F77_CONFIG 7807c35d236eSmrg 7808f55e6a01Smrg 78091fb744b4Smrg# _LT_LANG_FC_CONFIG([TAG]) 78101fb744b4Smrg# ------------------------- 78111fb744b4Smrg# Ensure that the configuration variables for a Fortran compiler are 78121fb744b4Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 781314210e8eSmrg# to write the compiler configuration to 'libtool'. 78141fb744b4Smrgm4_defun([_LT_LANG_FC_CONFIG], 78151fb744b4Smrg[AC_LANG_PUSH(Fortran) 78161fb744b4Smrg 781714210e8eSmrgif test -z "$FC" || test no = "$FC"; then 78181fb744b4Smrg _lt_disable_FC=yes 78191fb744b4Smrgfi 7820f55e6a01Smrg 78211fb744b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78221fb744b4Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78231fb744b4Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78241fb744b4Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78251fb744b4Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78261fb744b4Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78271fb744b4Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78281fb744b4Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78291fb744b4Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78301fb744b4Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78311fb744b4Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78321fb744b4Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78331fb744b4Smrg_LT_TAGVAR(module_cmds, $1)= 78341fb744b4Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78351fb744b4Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78361fb744b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78371fb744b4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78381fb744b4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78391fb744b4Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78401fb744b4Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78411fb744b4Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78421fb744b4Smrg 78431fb744b4Smrg# Source file extension for fc test sources. 78441fb744b4Smrgac_ext=${ac_fc_srcext-f} 78451fb744b4Smrg 78461fb744b4Smrg# Object file extension for compiled fc test sources. 78471fb744b4Smrgobjext=o 78481fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 78491fb744b4Smrg 78501fb744b4Smrg# No sense in running all these tests if we already determined that 78511fb744b4Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78521fb744b4Smrg# are currently assumed to apply to all compilers on this platform, 78531fb744b4Smrg# and will be corrupted by setting them based on a non-working compiler. 785414210e8eSmrgif test yes != "$_lt_disable_FC"; then 78551fb744b4Smrg # Code to be used in simple compile tests 78561fb744b4Smrg lt_simple_compile_test_code="\ 78571fb744b4Smrg subroutine t 78581fb744b4Smrg return 78591fb744b4Smrg end 78601fb744b4Smrg" 7861f55e6a01Smrg 78621fb744b4Smrg # Code to be used in simple link tests 78631fb744b4Smrg lt_simple_link_test_code="\ 78641fb744b4Smrg program t 78651fb744b4Smrg end 78661fb744b4Smrg" 7867f55e6a01Smrg 78681fb744b4Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78691fb744b4Smrg _LT_TAG_COMPILER 78701fb744b4Smrg 78711fb744b4Smrg # save warnings/boilerplate of simple test code 78721fb744b4Smrg _LT_COMPILER_BOILERPLATE 78731fb744b4Smrg _LT_LINKER_BOILERPLATE 78741fb744b4Smrg 78751fb744b4Smrg # Allow CC to be a program name with arguments. 787614210e8eSmrg lt_save_CC=$CC 78771fb744b4Smrg lt_save_GCC=$GCC 78781fb744b4Smrg lt_save_CFLAGS=$CFLAGS 78791fb744b4Smrg CC=${FC-"f95"} 78801fb744b4Smrg CFLAGS=$FCFLAGS 78811fb744b4Smrg compiler=$CC 78821fb744b4Smrg GCC=$ac_cv_fc_compiler_gnu 78831fb744b4Smrg 78841fb744b4Smrg _LT_TAGVAR(compiler, $1)=$CC 78851fb744b4Smrg _LT_CC_BASENAME([$compiler]) 78861fb744b4Smrg 78871fb744b4Smrg if test -n "$compiler"; then 78881fb744b4Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78891fb744b4Smrg AC_MSG_RESULT([$can_build_shared]) 78901fb744b4Smrg 78911fb744b4Smrg AC_MSG_CHECKING([whether to build shared libraries]) 789214210e8eSmrg test no = "$can_build_shared" && enable_shared=no 78931fb744b4Smrg 78941fb744b4Smrg # On AIX, shared libraries and static libraries use the same namespace, and 78951fb744b4Smrg # are all built from PIC. 78961fb744b4Smrg case $host_os in 78971fb744b4Smrg aix3*) 789814210e8eSmrg test yes = "$enable_shared" && enable_static=no 78991fb744b4Smrg if test -n "$RANLIB"; then 79001fb744b4Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79011fb744b4Smrg postinstall_cmds='$RANLIB $lib' 79021fb744b4Smrg fi 79031fb744b4Smrg ;; 79041fb744b4Smrg aix[[4-9]]*) 790514210e8eSmrg if test ia64 != "$host_cpu"; then 790614210e8eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 790714210e8eSmrg yes,aix,yes) ;; # shared object as lib.so file only 790814210e8eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 790914210e8eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 791014210e8eSmrg esac 7911518bcf38Smrg fi 79121fb744b4Smrg ;; 79131fb744b4Smrg esac 79141fb744b4Smrg AC_MSG_RESULT([$enable_shared]) 79151fb744b4Smrg 79161fb744b4Smrg AC_MSG_CHECKING([whether to build static libraries]) 79171fb744b4Smrg # Make sure either enable_shared or enable_static is yes. 791814210e8eSmrg test yes = "$enable_shared" || enable_static=yes 79191fb744b4Smrg AC_MSG_RESULT([$enable_static]) 79201fb744b4Smrg 792114210e8eSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 792214210e8eSmrg _LT_TAGVAR(LD, $1)=$LD 79231fb744b4Smrg 79241fb744b4Smrg ## CAVEAT EMPTOR: 79251fb744b4Smrg ## There is no encapsulation within the following macros, do not change 79261fb744b4Smrg ## the running order or otherwise move them around unless you know exactly 79271fb744b4Smrg ## what you are doing... 79281fb744b4Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79291fb744b4Smrg _LT_COMPILER_PIC($1) 79301fb744b4Smrg _LT_COMPILER_C_O($1) 79311fb744b4Smrg _LT_COMPILER_FILE_LOCKS($1) 79321fb744b4Smrg _LT_LINKER_SHLIBS($1) 79331fb744b4Smrg _LT_SYS_DYNAMIC_LINKER($1) 79341fb744b4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79351fb744b4Smrg 79361fb744b4Smrg _LT_CONFIG($1) 79371fb744b4Smrg fi # test -n "$compiler" 79381fb744b4Smrg 79391fb744b4Smrg GCC=$lt_save_GCC 79401fb744b4Smrg CC=$lt_save_CC 79411fb744b4Smrg CFLAGS=$lt_save_CFLAGS 794214210e8eSmrgfi # test yes != "$_lt_disable_FC" 7943c35d236eSmrg 79441fb744b4SmrgAC_LANG_POP 79451fb744b4Smrg])# _LT_LANG_FC_CONFIG 7946c35d236eSmrg 7947c35d236eSmrg 79481fb744b4Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79491fb744b4Smrg# -------------------------- 79501fb744b4Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79511fb744b4Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 795214210e8eSmrg# to write the compiler configuration to 'libtool'. 79531fb744b4Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79541fb744b4Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79551fb744b4SmrgAC_LANG_SAVE 7956c35d236eSmrg 79571fb744b4Smrg# Source file extension for Java test sources. 79581fb744b4Smrgac_ext=java 7959c35d236eSmrg 79601fb744b4Smrg# Object file extension for compiled Java test sources. 79611fb744b4Smrgobjext=o 79621fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 7963c35d236eSmrg 79641fb744b4Smrg# Code to be used in simple compile tests 79651fb744b4Smrglt_simple_compile_test_code="class foo {}" 7966c35d236eSmrg 79671fb744b4Smrg# Code to be used in simple link tests 79681fb744b4Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79691fb744b4Smrg 79701fb744b4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79711fb744b4Smrg_LT_TAG_COMPILER 79721fb744b4Smrg 79731fb744b4Smrg# save warnings/boilerplate of simple test code 79741fb744b4Smrg_LT_COMPILER_BOILERPLATE 79751fb744b4Smrg_LT_LINKER_BOILERPLATE 79761fb744b4Smrg 79771fb744b4Smrg# Allow CC to be a program name with arguments. 79781fb744b4Smrglt_save_CC=$CC 79791fb744b4Smrglt_save_CFLAGS=$CFLAGS 79801fb744b4Smrglt_save_GCC=$GCC 79811fb744b4SmrgGCC=yes 79821fb744b4SmrgCC=${GCJ-"gcj"} 79831fb744b4SmrgCFLAGS=$GCJFLAGS 79841fb744b4Smrgcompiler=$CC 79851fb744b4Smrg_LT_TAGVAR(compiler, $1)=$CC 798614210e8eSmrg_LT_TAGVAR(LD, $1)=$LD 79871fb744b4Smrg_LT_CC_BASENAME([$compiler]) 7988c35d236eSmrg 79891fb744b4Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 79901fb744b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7991c35d236eSmrg 79921fb744b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79931fb744b4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 79941fb744b4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7995c35d236eSmrg 79961fb744b4Smrgif test -n "$compiler"; then 79971fb744b4Smrg _LT_COMPILER_NO_RTTI($1) 79981fb744b4Smrg _LT_COMPILER_PIC($1) 79991fb744b4Smrg _LT_COMPILER_C_O($1) 80001fb744b4Smrg _LT_COMPILER_FILE_LOCKS($1) 80011fb744b4Smrg _LT_LINKER_SHLIBS($1) 80021fb744b4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8003c35d236eSmrg 80041fb744b4Smrg _LT_CONFIG($1) 80051fb744b4Smrgfi 8006c35d236eSmrg 80071fb744b4SmrgAC_LANG_RESTORE 8008c35d236eSmrg 80091fb744b4SmrgGCC=$lt_save_GCC 80101fb744b4SmrgCC=$lt_save_CC 80111fb744b4SmrgCFLAGS=$lt_save_CFLAGS 80121fb744b4Smrg])# _LT_LANG_GCJ_CONFIG 8013c35d236eSmrg 8014c35d236eSmrg 80151fb744b4Smrg# _LT_LANG_GO_CONFIG([TAG]) 80161fb744b4Smrg# -------------------------- 80171fb744b4Smrg# Ensure that the configuration variables for the GNU Go compiler 80181fb744b4Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 801914210e8eSmrg# to write the compiler configuration to 'libtool'. 80201fb744b4Smrgm4_defun([_LT_LANG_GO_CONFIG], 80211fb744b4Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80221fb744b4SmrgAC_LANG_SAVE 8023c35d236eSmrg 80241fb744b4Smrg# Source file extension for Go test sources. 80251fb744b4Smrgac_ext=go 8026c35d236eSmrg 80271fb744b4Smrg# Object file extension for compiled Go test sources. 80281fb744b4Smrgobjext=o 80291fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 8030c35d236eSmrg 80311fb744b4Smrg# Code to be used in simple compile tests 80321fb744b4Smrglt_simple_compile_test_code="package main; func main() { }" 8033c35d236eSmrg 80341fb744b4Smrg# Code to be used in simple link tests 80351fb744b4Smrglt_simple_link_test_code='package main; func main() { }' 8036c35d236eSmrg 80371fb744b4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80381fb744b4Smrg_LT_TAG_COMPILER 8039c35d236eSmrg 80401fb744b4Smrg# save warnings/boilerplate of simple test code 80411fb744b4Smrg_LT_COMPILER_BOILERPLATE 80421fb744b4Smrg_LT_LINKER_BOILERPLATE 8043c35d236eSmrg 80441fb744b4Smrg# Allow CC to be a program name with arguments. 80451fb744b4Smrglt_save_CC=$CC 80461fb744b4Smrglt_save_CFLAGS=$CFLAGS 80471fb744b4Smrglt_save_GCC=$GCC 80481fb744b4SmrgGCC=yes 80491fb744b4SmrgCC=${GOC-"gccgo"} 80501fb744b4SmrgCFLAGS=$GOFLAGS 80511fb744b4Smrgcompiler=$CC 80521fb744b4Smrg_LT_TAGVAR(compiler, $1)=$CC 805314210e8eSmrg_LT_TAGVAR(LD, $1)=$LD 80541fb744b4Smrg_LT_CC_BASENAME([$compiler]) 8055c35d236eSmrg 80561fb744b4Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 80571fb744b4Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8058c35d236eSmrg 80591fb744b4Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80601fb744b4Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80611fb744b4Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8062c35d236eSmrg 80631fb744b4Smrgif test -n "$compiler"; then 80641fb744b4Smrg _LT_COMPILER_NO_RTTI($1) 80651fb744b4Smrg _LT_COMPILER_PIC($1) 80661fb744b4Smrg _LT_COMPILER_C_O($1) 80671fb744b4Smrg _LT_COMPILER_FILE_LOCKS($1) 80681fb744b4Smrg _LT_LINKER_SHLIBS($1) 80691fb744b4Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8070f55e6a01Smrg 80711fb744b4Smrg _LT_CONFIG($1) 80721fb744b4Smrgfi 8073c35d236eSmrg 80741fb744b4SmrgAC_LANG_RESTORE 8075c35d236eSmrg 80761fb744b4SmrgGCC=$lt_save_GCC 80771fb744b4SmrgCC=$lt_save_CC 80781fb744b4SmrgCFLAGS=$lt_save_CFLAGS 80791fb744b4Smrg])# _LT_LANG_GO_CONFIG 8080c35d236eSmrg 8081c35d236eSmrg 80821fb744b4Smrg# _LT_LANG_RC_CONFIG([TAG]) 80831fb744b4Smrg# ------------------------- 80841fb744b4Smrg# Ensure that the configuration variables for the Windows resource compiler 80851fb744b4Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 808614210e8eSmrg# to write the compiler configuration to 'libtool'. 80871fb744b4Smrgm4_defun([_LT_LANG_RC_CONFIG], 80881fb744b4Smrg[AC_REQUIRE([LT_PROG_RC])dnl 80891fb744b4SmrgAC_LANG_SAVE 8090c35d236eSmrg 80911fb744b4Smrg# Source file extension for RC test sources. 80921fb744b4Smrgac_ext=rc 8093c35d236eSmrg 80941fb744b4Smrg# Object file extension for compiled RC test sources. 80951fb744b4Smrgobjext=o 80961fb744b4Smrg_LT_TAGVAR(objext, $1)=$objext 8097c35d236eSmrg 80981fb744b4Smrg# Code to be used in simple compile tests 80991fb744b4Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8100c35d236eSmrg 81011fb744b4Smrg# Code to be used in simple link tests 810214210e8eSmrglt_simple_link_test_code=$lt_simple_compile_test_code 8103c35d236eSmrg 81041fb744b4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81051fb744b4Smrg_LT_TAG_COMPILER 8106f55e6a01Smrg 81071fb744b4Smrg# save warnings/boilerplate of simple test code 81081fb744b4Smrg_LT_COMPILER_BOILERPLATE 81091fb744b4Smrg_LT_LINKER_BOILERPLATE 8110c35d236eSmrg 81111fb744b4Smrg# Allow CC to be a program name with arguments. 811214210e8eSmrglt_save_CC=$CC 81131fb744b4Smrglt_save_CFLAGS=$CFLAGS 81141fb744b4Smrglt_save_GCC=$GCC 81151fb744b4SmrgGCC= 81161fb744b4SmrgCC=${RC-"windres"} 81171fb744b4SmrgCFLAGS= 81181fb744b4Smrgcompiler=$CC 81191fb744b4Smrg_LT_TAGVAR(compiler, $1)=$CC 81201fb744b4Smrg_LT_CC_BASENAME([$compiler]) 81211fb744b4Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8122c35d236eSmrg 81231fb744b4Smrgif test -n "$compiler"; then 81241fb744b4Smrg : 81251fb744b4Smrg _LT_CONFIG($1) 81261fb744b4Smrgfi 81271fb744b4Smrg 81281fb744b4SmrgGCC=$lt_save_GCC 81291fb744b4SmrgAC_LANG_RESTORE 81301fb744b4SmrgCC=$lt_save_CC 81311fb744b4SmrgCFLAGS=$lt_save_CFLAGS 81321fb744b4Smrg])# _LT_LANG_RC_CONFIG 8133c35d236eSmrg 8134c35d236eSmrg 81351fb744b4Smrg# LT_PROG_GCJ 81361fb744b4Smrg# ----------- 81371fb744b4SmrgAC_DEFUN([LT_PROG_GCJ], 81381fb744b4Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81391fb744b4Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81401fb744b4Smrg [AC_CHECK_TOOL(GCJ, gcj,) 814114210e8eSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81421fb744b4Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81431fb744b4Smrg]) 81441fb744b4Smrg 81451fb744b4Smrg# Old name: 81461fb744b4SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81471fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 81481fb744b4Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8149c35d236eSmrg 8150c35d236eSmrg 81511fb744b4Smrg# LT_PROG_GO 81521fb744b4Smrg# ---------- 81531fb744b4SmrgAC_DEFUN([LT_PROG_GO], 81541fb744b4Smrg[AC_CHECK_TOOL(GOC, gccgo,) 81551fb744b4Smrg]) 8156c35d236eSmrg 8157c35d236eSmrg 81581fb744b4Smrg# LT_PROG_RC 81591fb744b4Smrg# ---------- 81601fb744b4SmrgAC_DEFUN([LT_PROG_RC], 81611fb744b4Smrg[AC_CHECK_TOOL(RC, windres,) 8162518bcf38Smrg]) 8163c35d236eSmrg 81641fb744b4Smrg# Old name: 81651fb744b4SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81661fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 81671fb744b4Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81681fb744b4Smrg 81691fb744b4Smrg 81701fb744b4Smrg# _LT_DECL_EGREP 81711fb744b4Smrg# -------------- 81721fb744b4Smrg# If we don't have a new enough Autoconf to choose the best grep 81731fb744b4Smrg# available, choose the one first in the user's PATH. 81741fb744b4Smrgm4_defun([_LT_DECL_EGREP], 81751fb744b4Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81761fb744b4SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81771fb744b4Smrgtest -z "$GREP" && GREP=grep 81781fb744b4Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81791fb744b4Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81801fb744b4Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81811fb744b4Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81821fb744b4SmrgAC_SUBST([GREP]) 8183c35d236eSmrg]) 8184c35d236eSmrg 81854f6cd06fSmrg 81861fb744b4Smrg# _LT_DECL_OBJDUMP 81871fb744b4Smrg# -------------- 81881fb744b4Smrg# If we don't have a new enough Autoconf to choose the best objdump 81891fb744b4Smrg# available, choose the one first in the user's PATH. 81901fb744b4Smrgm4_defun([_LT_DECL_OBJDUMP], 81911fb744b4Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81921fb744b4Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81931fb744b4Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81941fb744b4SmrgAC_SUBST([OBJDUMP]) 81951fb744b4Smrg]) 81964f6cd06fSmrg 81971fb744b4Smrg# _LT_DECL_DLLTOOL 8198518bcf38Smrg# ---------------- 81991fb744b4Smrg# Ensure DLLTOOL variable is set. 82001fb744b4Smrgm4_defun([_LT_DECL_DLLTOOL], 82011fb744b4Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82021fb744b4Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82031fb744b4Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82041fb744b4SmrgAC_SUBST([DLLTOOL]) 82051fb744b4Smrg]) 82064f6cd06fSmrg 82071fb744b4Smrg# _LT_DECL_SED 82081fb744b4Smrg# ------------ 82091fb744b4Smrg# Check for a fully-functional sed program, that truncates 82101fb744b4Smrg# as few characters as possible. Prefer GNU sed if found. 82111fb744b4Smrgm4_defun([_LT_DECL_SED], 82121fb744b4Smrg[AC_PROG_SED 82131fb744b4Smrgtest -z "$SED" && SED=sed 82141fb744b4SmrgXsed="$SED -e 1s/^X//" 82151fb744b4Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82161fb744b4Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82171fb744b4Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82181fb744b4Smrg])# _LT_DECL_SED 82194f6cd06fSmrg 82201fb744b4Smrgm4_ifndef([AC_PROG_SED], [ 8221518bcf38Smrg# NOTE: This macro has been submitted for inclusion into # 8222518bcf38Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8223518bcf38Smrg# a released version of Autoconf we should remove this # 82241fb744b4Smrg# macro and use it instead. # 82251fb744b4Smrg 82261fb744b4Smrgm4_defun([AC_PROG_SED], 8227518bcf38Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8228518bcf38SmrgAC_CACHE_VAL(lt_cv_path_SED, 8229518bcf38Smrg[# Loop through the user's path and test for sed and gsed. 8230518bcf38Smrg# Then use that list of sed's as ones to test for truncation. 8231518bcf38Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8232518bcf38Smrgfor as_dir in $PATH 8233518bcf38Smrgdo 8234518bcf38Smrg IFS=$as_save_IFS 8235518bcf38Smrg test -z "$as_dir" && as_dir=. 8236518bcf38Smrg for lt_ac_prog in sed gsed; do 8237518bcf38Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82381fb744b4Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8239518bcf38Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8240518bcf38Smrg fi 8241518bcf38Smrg done 8242518bcf38Smrg done 8243518bcf38Smrgdone 8244518bcf38SmrgIFS=$as_save_IFS 8245518bcf38Smrglt_ac_max=0 8246518bcf38Smrglt_ac_count=0 8247518bcf38Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8248518bcf38Smrg# along with /bin/sed that truncates output. 8249518bcf38Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 825014210e8eSmrg test ! -f "$lt_ac_sed" && continue 8251518bcf38Smrg cat /dev/null > conftest.in 8252518bcf38Smrg lt_ac_count=0 8253518bcf38Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8254518bcf38Smrg # Check for GNU sed and select it if it is found. 8255518bcf38Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8256518bcf38Smrg lt_cv_path_SED=$lt_ac_sed 8257518bcf38Smrg break 8258518bcf38Smrg fi 8259518bcf38Smrg while true; do 8260518bcf38Smrg cat conftest.in conftest.in >conftest.tmp 8261518bcf38Smrg mv conftest.tmp conftest.in 8262518bcf38Smrg cp conftest.in conftest.nl 8263518bcf38Smrg echo >>conftest.nl 8264518bcf38Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8265518bcf38Smrg cmp -s conftest.out conftest.nl || break 8266518bcf38Smrg # 10000 chars as input seems more than enough 826714210e8eSmrg test 10 -lt "$lt_ac_count" && break 8268518bcf38Smrg lt_ac_count=`expr $lt_ac_count + 1` 826914210e8eSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8270518bcf38Smrg lt_ac_max=$lt_ac_count 8271518bcf38Smrg lt_cv_path_SED=$lt_ac_sed 8272518bcf38Smrg fi 8273518bcf38Smrg done 8274518bcf38Smrgdone 8275518bcf38Smrg]) 8276518bcf38SmrgSED=$lt_cv_path_SED 8277518bcf38SmrgAC_SUBST([SED]) 8278518bcf38SmrgAC_MSG_RESULT([$SED]) 82791fb744b4Smrg])#AC_PROG_SED 82801fb744b4Smrg])#m4_ifndef 82811fb744b4Smrg 82821fb744b4Smrg# Old name: 82831fb744b4SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82841fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 82851fb744b4Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 82861fb744b4Smrg 82871fb744b4Smrg 82881fb744b4Smrg# _LT_CHECK_SHELL_FEATURES 82891fb744b4Smrg# ------------------------ 82901fb744b4Smrg# Find out whether the shell is Bourne or XSI compatible, 82911fb744b4Smrg# or has some other useful features. 82921fb744b4Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 829314210e8eSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82941fb744b4Smrg lt_unset=unset 82951fb744b4Smrgelse 82961fb744b4Smrg lt_unset=false 82971fb744b4Smrgfi 82981fb744b4Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82991fb744b4Smrg 83001fb744b4Smrg# test EBCDIC or ASCII 83011fb744b4Smrgcase `echo X|tr X '\101'` in 83021fb744b4Smrg A) # ASCII based system 83031fb744b4Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83041fb744b4Smrg lt_SP2NL='tr \040 \012' 83051fb744b4Smrg lt_NL2SP='tr \015\012 \040\040' 83061fb744b4Smrg ;; 83071fb744b4Smrg *) # EBCDIC based system 83081fb744b4Smrg lt_SP2NL='tr \100 \n' 83091fb744b4Smrg lt_NL2SP='tr \r\n \100\100' 83101fb744b4Smrg ;; 83111fb744b4Smrgesac 83121fb744b4Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83131fb744b4Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83141fb744b4Smrg])# _LT_CHECK_SHELL_FEATURES 83151fb744b4Smrg 83161fb744b4Smrg 83171fb744b4Smrg# _LT_PATH_CONVERSION_FUNCTIONS 83181fb744b4Smrg# ----------------------------- 831914210e8eSmrg# Determine what file name conversion functions should be used by 83201fb744b4Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83211fb744b4Smrg# for certain cross-compile configurations and native mingw. 83221fb744b4Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83231fb744b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83241fb744b4SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83251fb744b4SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83261fb744b4SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83271fb744b4Smrg[case $host in 83281fb744b4Smrg *-*-mingw* ) 83291fb744b4Smrg case $build in 83301fb744b4Smrg *-*-mingw* ) # actually msys 83311fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83321fb744b4Smrg ;; 83331fb744b4Smrg *-*-cygwin* ) 83341fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83351fb744b4Smrg ;; 83361fb744b4Smrg * ) # otherwise, assume *nix 83371fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83381fb744b4Smrg ;; 83391fb744b4Smrg esac 83401fb744b4Smrg ;; 83411fb744b4Smrg *-*-cygwin* ) 83421fb744b4Smrg case $build in 83431fb744b4Smrg *-*-mingw* ) # actually msys 83441fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83451fb744b4Smrg ;; 83461fb744b4Smrg *-*-cygwin* ) 83471fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83481fb744b4Smrg ;; 83491fb744b4Smrg * ) # otherwise, assume *nix 83501fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83511fb744b4Smrg ;; 83521fb744b4Smrg esac 83531fb744b4Smrg ;; 83541fb744b4Smrg * ) # unhandled hosts (and "normal" native builds) 83551fb744b4Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 83561fb744b4Smrg ;; 83571fb744b4Smrgesac 83581fb744b4Smrg]) 83591fb744b4Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 83601fb744b4SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83611fb744b4Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83621fb744b4Smrg [0], [convert $build file names to $host format])dnl 83631fb744b4Smrg 83641fb744b4SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83651fb744b4SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83661fb744b4Smrg[#assume ordinary cross tools, or native build. 83671fb744b4Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 83681fb744b4Smrgcase $host in 83691fb744b4Smrg *-*-mingw* ) 83701fb744b4Smrg case $build in 83711fb744b4Smrg *-*-mingw* ) # actually msys 83721fb744b4Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 83731fb744b4Smrg ;; 83741fb744b4Smrg esac 83751fb744b4Smrg ;; 83761fb744b4Smrgesac 83771fb744b4Smrg]) 83781fb744b4Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 83791fb744b4SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 83801fb744b4Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 83811fb744b4Smrg [0], [convert $build files to toolchain format])dnl 83821fb744b4Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 83831fb744b4Smrg 83841fb744b4Smrg# Helper functions for option handling. -*- Autoconf -*- 83851fb744b4Smrg# 838614210e8eSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 838714210e8eSmrg# Foundation, Inc. 83881fb744b4Smrg# Written by Gary V. Vaughan, 2004 83891fb744b4Smrg# 83901fb744b4Smrg# This file is free software; the Free Software Foundation gives 83911fb744b4Smrg# unlimited permission to copy and/or distribute it, with or without 83921fb744b4Smrg# modifications, as long as this notice is preserved. 83931fb744b4Smrg 839414210e8eSmrg# serial 8 ltoptions.m4 83951fb744b4Smrg 83961fb744b4Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83971fb744b4SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 83981fb744b4Smrg 83991fb744b4Smrg 84001fb744b4Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 84011fb744b4Smrg# ------------------------------------------ 84021fb744b4Smrgm4_define([_LT_MANGLE_OPTION], 84031fb744b4Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 84041fb744b4Smrg 84051fb744b4Smrg 84061fb744b4Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 84071fb744b4Smrg# --------------------------------------- 84081fb744b4Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 84091fb744b4Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84101fb744b4Smrg# saved as a flag. 84111fb744b4Smrgm4_define([_LT_SET_OPTION], 84121fb744b4Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84131fb744b4Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84141fb744b4Smrg _LT_MANGLE_DEFUN([$1], [$2]), 841514210e8eSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84161fb744b4Smrg]) 84171fb744b4Smrg 84181fb744b4Smrg 84191fb744b4Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84201fb744b4Smrg# ------------------------------------------------------------ 84211fb744b4Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84221fb744b4Smrgm4_define([_LT_IF_OPTION], 84231fb744b4Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 84241fb744b4Smrg 84251fb744b4Smrg 84261fb744b4Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84271fb744b4Smrg# ------------------------------------------------------- 84281fb744b4Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84291fb744b4Smrg# are set. 84301fb744b4Smrgm4_define([_LT_UNLESS_OPTIONS], 84311fb744b4Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84321fb744b4Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84331fb744b4Smrg [m4_define([$0_found])])])[]dnl 84341fb744b4Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84351fb744b4Smrg])[]dnl 84361fb744b4Smrg]) 84371fb744b4Smrg 84381fb744b4Smrg 84391fb744b4Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84401fb744b4Smrg# ---------------------------------------- 84411fb744b4Smrg# OPTION-LIST is a space-separated list of Libtool options associated 84421fb744b4Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84431fb744b4Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84441fb744b4Smrg# the unknown option and exit. 84451fb744b4Smrgm4_defun([_LT_SET_OPTIONS], 84461fb744b4Smrg[# Set options 84471fb744b4Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84481fb744b4Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 84491fb744b4Smrg 84501fb744b4Smrgm4_if([$1],[LT_INIT],[ 84511fb744b4Smrg dnl 84521fb744b4Smrg dnl Simply set some default values (i.e off) if boolean options were not 84531fb744b4Smrg dnl specified: 84541fb744b4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84551fb744b4Smrg ]) 84561fb744b4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84571fb744b4Smrg ]) 84581fb744b4Smrg dnl 84591fb744b4Smrg dnl If no reference was made to various pairs of opposing options, then 84601fb744b4Smrg dnl we run the default mode handler for the pair. For example, if neither 846114210e8eSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84621fb744b4Smrg dnl archives by default: 84631fb744b4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 84641fb744b4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 84651fb744b4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 84661fb744b4Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 846714210e8eSmrg [_LT_ENABLE_FAST_INSTALL]) 846814210e8eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 846914210e8eSmrg [_LT_WITH_AIX_SONAME([aix])]) 84701fb744b4Smrg ]) 84711fb744b4Smrg])# _LT_SET_OPTIONS 84721fb744b4Smrg 84731fb744b4Smrg 84741fb744b4Smrg 84751fb744b4Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 84761fb744b4Smrg# ----------------------------------------- 84771fb744b4Smrgm4_define([_LT_MANGLE_DEFUN], 84781fb744b4Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 84791fb744b4Smrg 84801fb744b4Smrg 84811fb744b4Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 84821fb744b4Smrg# ----------------------------------------------- 84831fb744b4Smrgm4_define([LT_OPTION_DEFINE], 84841fb744b4Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 84851fb744b4Smrg])# LT_OPTION_DEFINE 84861fb744b4Smrg 84871fb744b4Smrg 84881fb744b4Smrg# dlopen 84891fb744b4Smrg# ------ 84901fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84911fb744b4Smrg]) 84921fb744b4Smrg 84931fb744b4SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 84941fb744b4Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 84951fb744b4SmrgAC_DIAGNOSE([obsolete], 84961fb744b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 849714210e8eSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 84981fb744b4Smrg]) 84991fb744b4Smrg 85001fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 85011fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 85021fb744b4Smrg 85031fb744b4Smrg 85041fb744b4Smrg# win32-dll 85051fb744b4Smrg# --------- 85061fb744b4Smrg# Declare package support for building win32 dll's. 85071fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 85081fb744b4Smrg[enable_win32_dll=yes 85091fb744b4Smrg 85101fb744b4Smrgcase $host in 85111fb744b4Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85121fb744b4Smrg AC_CHECK_TOOL(AS, as, false) 85131fb744b4Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85141fb744b4Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85151fb744b4Smrg ;; 85161fb744b4Smrgesac 85171fb744b4Smrg 85181fb744b4Smrgtest -z "$AS" && AS=as 85191fb744b4Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 85201fb744b4Smrg 85211fb744b4Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85221fb744b4Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 85231fb744b4Smrg 85241fb744b4Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85251fb744b4Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85261fb744b4Smrg])# win32-dll 85271fb744b4Smrg 85281fb744b4SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85291fb744b4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85301fb744b4Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85311fb744b4SmrgAC_DIAGNOSE([obsolete], 85321fb744b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 853314210e8eSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85341fb744b4Smrg]) 85351fb744b4Smrg 85361fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 85371fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 85381fb744b4Smrg 85391fb744b4Smrg 85401fb744b4Smrg# _LT_ENABLE_SHARED([DEFAULT]) 85411fb744b4Smrg# ---------------------------- 854214210e8eSmrg# implement the --enable-shared flag, and supports the 'shared' and 854314210e8eSmrg# 'disable-shared' LT_INIT options. 854414210e8eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85451fb744b4Smrgm4_define([_LT_ENABLE_SHARED], 85461fb744b4Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85471fb744b4SmrgAC_ARG_ENABLE([shared], 85481fb744b4Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85491fb744b4Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85501fb744b4Smrg [p=${PACKAGE-default} 85511fb744b4Smrg case $enableval in 85521fb744b4Smrg yes) enable_shared=yes ;; 85531fb744b4Smrg no) enable_shared=no ;; 85541fb744b4Smrg *) 85551fb744b4Smrg enable_shared=no 85561fb744b4Smrg # Look at the argument we got. We use all the common list separators. 855714210e8eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85581fb744b4Smrg for pkg in $enableval; do 855914210e8eSmrg IFS=$lt_save_ifs 85601fb744b4Smrg if test "X$pkg" = "X$p"; then 85611fb744b4Smrg enable_shared=yes 85621fb744b4Smrg fi 85631fb744b4Smrg done 856414210e8eSmrg IFS=$lt_save_ifs 85651fb744b4Smrg ;; 85661fb744b4Smrg esac], 85671fb744b4Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 85681fb744b4Smrg 85691fb744b4Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 85701fb744b4Smrg [Whether or not to build shared libraries]) 85711fb744b4Smrg])# _LT_ENABLE_SHARED 85721fb744b4Smrg 85731fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 85741fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 85751fb744b4Smrg 85761fb744b4Smrg# Old names: 85771fb744b4SmrgAC_DEFUN([AC_ENABLE_SHARED], 85781fb744b4Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 85791fb744b4Smrg]) 85801fb744b4Smrg 85811fb744b4SmrgAC_DEFUN([AC_DISABLE_SHARED], 85821fb744b4Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 85831fb744b4Smrg]) 85841fb744b4Smrg 85851fb744b4SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 85861fb744b4SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 85871fb744b4Smrg 85881fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 85891fb744b4Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 85901fb744b4Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 85911fb744b4Smrg 85921fb744b4Smrg 85931fb744b4Smrg 85941fb744b4Smrg# _LT_ENABLE_STATIC([DEFAULT]) 85951fb744b4Smrg# ---------------------------- 859614210e8eSmrg# implement the --enable-static flag, and support the 'static' and 859714210e8eSmrg# 'disable-static' LT_INIT options. 859814210e8eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85991fb744b4Smrgm4_define([_LT_ENABLE_STATIC], 86001fb744b4Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 86011fb744b4SmrgAC_ARG_ENABLE([static], 86021fb744b4Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 86031fb744b4Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 86041fb744b4Smrg [p=${PACKAGE-default} 86051fb744b4Smrg case $enableval in 86061fb744b4Smrg yes) enable_static=yes ;; 86071fb744b4Smrg no) enable_static=no ;; 86081fb744b4Smrg *) 86091fb744b4Smrg enable_static=no 86101fb744b4Smrg # Look at the argument we got. We use all the common list separators. 861114210e8eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86121fb744b4Smrg for pkg in $enableval; do 861314210e8eSmrg IFS=$lt_save_ifs 86141fb744b4Smrg if test "X$pkg" = "X$p"; then 86151fb744b4Smrg enable_static=yes 86161fb744b4Smrg fi 86171fb744b4Smrg done 861814210e8eSmrg IFS=$lt_save_ifs 86191fb744b4Smrg ;; 86201fb744b4Smrg esac], 86211fb744b4Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 86221fb744b4Smrg 86231fb744b4Smrg _LT_DECL([build_old_libs], [enable_static], [0], 86241fb744b4Smrg [Whether or not to build static libraries]) 86251fb744b4Smrg])# _LT_ENABLE_STATIC 86261fb744b4Smrg 86271fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86281fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 86291fb744b4Smrg 86301fb744b4Smrg# Old names: 86311fb744b4SmrgAC_DEFUN([AC_ENABLE_STATIC], 86321fb744b4Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86331fb744b4Smrg]) 86341fb744b4Smrg 86351fb744b4SmrgAC_DEFUN([AC_DISABLE_STATIC], 86361fb744b4Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86371fb744b4Smrg]) 86381fb744b4Smrg 86391fb744b4SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86401fb744b4SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 86411fb744b4Smrg 86421fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 86431fb744b4Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86441fb744b4Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 86451fb744b4Smrg 86461fb744b4Smrg 86471fb744b4Smrg 86481fb744b4Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86491fb744b4Smrg# ---------------------------------- 865014210e8eSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 865114210e8eSmrg# and 'disable-fast-install' LT_INIT options. 865214210e8eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86531fb744b4Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 86541fb744b4Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86551fb744b4SmrgAC_ARG_ENABLE([fast-install], 86561fb744b4Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86571fb744b4Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86581fb744b4Smrg [p=${PACKAGE-default} 86591fb744b4Smrg case $enableval in 86601fb744b4Smrg yes) enable_fast_install=yes ;; 86611fb744b4Smrg no) enable_fast_install=no ;; 86621fb744b4Smrg *) 86631fb744b4Smrg enable_fast_install=no 86641fb744b4Smrg # Look at the argument we got. We use all the common list separators. 866514210e8eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86661fb744b4Smrg for pkg in $enableval; do 866714210e8eSmrg IFS=$lt_save_ifs 86681fb744b4Smrg if test "X$pkg" = "X$p"; then 86691fb744b4Smrg enable_fast_install=yes 86701fb744b4Smrg fi 86711fb744b4Smrg done 867214210e8eSmrg IFS=$lt_save_ifs 86731fb744b4Smrg ;; 86741fb744b4Smrg esac], 86751fb744b4Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 86761fb744b4Smrg 86771fb744b4Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 86781fb744b4Smrg [Whether or not to optimize for fast installation])dnl 86791fb744b4Smrg])# _LT_ENABLE_FAST_INSTALL 86801fb744b4Smrg 86811fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 86821fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 86831fb744b4Smrg 86841fb744b4Smrg# Old names: 86851fb744b4SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 86861fb744b4Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 86871fb744b4SmrgAC_DIAGNOSE([obsolete], 86881fb744b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 868914210e8eSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 86901fb744b4Smrg]) 86911fb744b4Smrg 86921fb744b4SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 86931fb744b4Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 86941fb744b4SmrgAC_DIAGNOSE([obsolete], 86951fb744b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 869614210e8eSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 86971fb744b4Smrg]) 86981fb744b4Smrg 86991fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 87001fb744b4Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 87011fb744b4Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 87021fb744b4Smrg 87031fb744b4Smrg 870414210e8eSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 870514210e8eSmrg# ---------------------------------- 870614210e8eSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 870714210e8eSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 870814210e8eSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 870914210e8eSmrgm4_define([_LT_WITH_AIX_SONAME], 871014210e8eSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 871114210e8eSmrgshared_archive_member_spec= 871214210e8eSmrgcase $host,$enable_shared in 871314210e8eSmrgpower*-*-aix[[5-9]]*,yes) 871414210e8eSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 871514210e8eSmrg AC_ARG_WITH([aix-soname], 871614210e8eSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 871714210e8eSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 871814210e8eSmrg [case $withval in 871914210e8eSmrg aix|svr4|both) 872014210e8eSmrg ;; 872114210e8eSmrg *) 872214210e8eSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 872314210e8eSmrg ;; 872414210e8eSmrg esac 872514210e8eSmrg lt_cv_with_aix_soname=$with_aix_soname], 872614210e8eSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 872714210e8eSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 872814210e8eSmrg with_aix_soname=$lt_cv_with_aix_soname]) 872914210e8eSmrg AC_MSG_RESULT([$with_aix_soname]) 873014210e8eSmrg if test aix != "$with_aix_soname"; then 873114210e8eSmrg # For the AIX way of multilib, we name the shared archive member 873214210e8eSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 873314210e8eSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 873414210e8eSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 873514210e8eSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 873614210e8eSmrg if test 64 = "${OBJECT_MODE-32}"; then 873714210e8eSmrg shared_archive_member_spec=shr_64 873814210e8eSmrg else 873914210e8eSmrg shared_archive_member_spec=shr 874014210e8eSmrg fi 874114210e8eSmrg fi 874214210e8eSmrg ;; 874314210e8eSmrg*) 874414210e8eSmrg with_aix_soname=aix 874514210e8eSmrg ;; 874614210e8eSmrgesac 874714210e8eSmrg 874814210e8eSmrg_LT_DECL([], [shared_archive_member_spec], [0], 874914210e8eSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 875014210e8eSmrg])# _LT_WITH_AIX_SONAME 875114210e8eSmrg 875214210e8eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 875314210e8eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 875414210e8eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 875514210e8eSmrg 875614210e8eSmrg 87571fb744b4Smrg# _LT_WITH_PIC([MODE]) 87581fb744b4Smrg# -------------------- 875914210e8eSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87601fb744b4Smrg# LT_INIT options. 876114210e8eSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87621fb744b4Smrgm4_define([_LT_WITH_PIC], 87631fb744b4Smrg[AC_ARG_WITH([pic], 87641fb744b4Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 87651fb744b4Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 87661fb744b4Smrg [lt_p=${PACKAGE-default} 87671fb744b4Smrg case $withval in 87681fb744b4Smrg yes|no) pic_mode=$withval ;; 87691fb744b4Smrg *) 87701fb744b4Smrg pic_mode=default 87711fb744b4Smrg # Look at the argument we got. We use all the common list separators. 877214210e8eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 87731fb744b4Smrg for lt_pkg in $withval; do 877414210e8eSmrg IFS=$lt_save_ifs 87751fb744b4Smrg if test "X$lt_pkg" = "X$lt_p"; then 87761fb744b4Smrg pic_mode=yes 87771fb744b4Smrg fi 87781fb744b4Smrg done 877914210e8eSmrg IFS=$lt_save_ifs 87801fb744b4Smrg ;; 87811fb744b4Smrg esac], 878214210e8eSmrg [pic_mode=m4_default([$1], [default])]) 87831fb744b4Smrg 87841fb744b4Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 87851fb744b4Smrg])# _LT_WITH_PIC 87861fb744b4Smrg 87871fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 87881fb744b4SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 87891fb744b4Smrg 87901fb744b4Smrg# Old name: 87911fb744b4SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 87921fb744b4Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 87931fb744b4SmrgAC_DIAGNOSE([obsolete], 87941fb744b4Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 879514210e8eSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 87961fb744b4Smrg]) 87971fb744b4Smrg 87981fb744b4Smrgdnl aclocal-1.4 backwards compatibility: 87991fb744b4Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 88001fb744b4Smrg 88011fb744b4Smrg 88021fb744b4Smrgm4_define([_LTDL_MODE], []) 88031fb744b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 88041fb744b4Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 88051fb744b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 88061fb744b4Smrg [m4_define([_LTDL_MODE], [recursive])]) 88071fb744b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 88081fb744b4Smrg [m4_define([_LTDL_MODE], [subproject])]) 88091fb744b4Smrg 88101fb744b4Smrgm4_define([_LTDL_TYPE], []) 88111fb744b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88121fb744b4Smrg [m4_define([_LTDL_TYPE], [installable])]) 88131fb744b4SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88141fb744b4Smrg [m4_define([_LTDL_TYPE], [convenience])]) 88151fb744b4Smrg 88161fb744b4Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 88171fb744b4Smrg# 881814210e8eSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 881914210e8eSmrg# Foundation, Inc. 88201fb744b4Smrg# Written by Gary V. Vaughan, 2004 88211fb744b4Smrg# 88221fb744b4Smrg# This file is free software; the Free Software Foundation gives 88231fb744b4Smrg# unlimited permission to copy and/or distribute it, with or without 88241fb744b4Smrg# modifications, as long as this notice is preserved. 88251fb744b4Smrg 88261fb744b4Smrg# serial 6 ltsugar.m4 88271fb744b4Smrg 88281fb744b4Smrg# This is to help aclocal find these macros, as it can't see m4_define. 88291fb744b4SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 88301fb744b4Smrg 88311fb744b4Smrg 88321fb744b4Smrg# lt_join(SEP, ARG1, [ARG2...]) 88331fb744b4Smrg# ----------------------------- 88341fb744b4Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88351fb744b4Smrg# associated separator. 88361fb744b4Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88371fb744b4Smrg# versions in m4sugar had bugs. 88381fb744b4Smrgm4_define([lt_join], 88391fb744b4Smrg[m4_if([$#], [1], [], 88401fb744b4Smrg [$#], [2], [[$2]], 88411fb744b4Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88421fb744b4Smrgm4_define([_lt_join], 88431fb744b4Smrg[m4_if([$#$2], [2], [], 88441fb744b4Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88451fb744b4Smrg 88461fb744b4Smrg 88471fb744b4Smrg# lt_car(LIST) 88481fb744b4Smrg# lt_cdr(LIST) 88491fb744b4Smrg# ------------ 88501fb744b4Smrg# Manipulate m4 lists. 88511fb744b4Smrg# These macros are necessary as long as will still need to support 885214210e8eSmrg# Autoconf-2.59, which quotes differently. 88531fb744b4Smrgm4_define([lt_car], [[$1]]) 88541fb744b4Smrgm4_define([lt_cdr], 88551fb744b4Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88561fb744b4Smrg [$#], 1, [], 88571fb744b4Smrg [m4_dquote(m4_shift($@))])]) 88581fb744b4Smrgm4_define([lt_unquote], $1) 88591fb744b4Smrg 88601fb744b4Smrg 88611fb744b4Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88621fb744b4Smrg# ------------------------------------------ 886314210e8eSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 88641fb744b4Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 88651fb744b4Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 88661fb744b4Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 88671fb744b4Smrg# than defined and empty). 88681fb744b4Smrg# 88691fb744b4Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 88701fb744b4Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 88711fb744b4Smrgm4_define([lt_append], 88721fb744b4Smrg[m4_define([$1], 88731fb744b4Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 88741fb744b4Smrg 88751fb744b4Smrg 88761fb744b4Smrg 88771fb744b4Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 88781fb744b4Smrg# ---------------------------------------------------------- 88791fb744b4Smrg# Produce a SEP delimited list of all paired combinations of elements of 88801fb744b4Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 88811fb744b4Smrg# has the form PREFIXmINFIXSUFFIXn. 88821fb744b4Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 88831fb744b4Smrgm4_define([lt_combine], 88841fb744b4Smrg[m4_if(m4_eval([$# > 3]), [1], 88851fb744b4Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 88861fb744b4Smrg[[m4_foreach([_Lt_prefix], [$2], 88871fb744b4Smrg [m4_foreach([_Lt_suffix], 88881fb744b4Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 88891fb744b4Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 88901fb744b4Smrg 88911fb744b4Smrg 88921fb744b4Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 88931fb744b4Smrg# ----------------------------------------------------------------------- 88941fb744b4Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 88951fb744b4Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 88961fb744b4Smrgm4_define([lt_if_append_uniq], 88971fb744b4Smrg[m4_ifdef([$1], 88981fb744b4Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 88991fb744b4Smrg [lt_append([$1], [$2], [$3])$4], 89001fb744b4Smrg [$5])], 89011fb744b4Smrg [lt_append([$1], [$2], [$3])$4])]) 89021fb744b4Smrg 89031fb744b4Smrg 89041fb744b4Smrg# lt_dict_add(DICT, KEY, VALUE) 89051fb744b4Smrg# ----------------------------- 89061fb744b4Smrgm4_define([lt_dict_add], 89071fb744b4Smrg[m4_define([$1($2)], [$3])]) 89081fb744b4Smrg 89091fb744b4Smrg 89101fb744b4Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89111fb744b4Smrg# -------------------------------------------- 89121fb744b4Smrgm4_define([lt_dict_add_subkey], 89131fb744b4Smrg[m4_define([$1($2:$3)], [$4])]) 89141fb744b4Smrg 89151fb744b4Smrg 89161fb744b4Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89171fb744b4Smrg# ---------------------------------- 89181fb744b4Smrgm4_define([lt_dict_fetch], 89191fb744b4Smrg[m4_ifval([$3], 89201fb744b4Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89211fb744b4Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 89221fb744b4Smrg 89231fb744b4Smrg 89241fb744b4Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89251fb744b4Smrg# ----------------------------------------------------------------- 89261fb744b4Smrgm4_define([lt_if_dict_fetch], 89271fb744b4Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89281fb744b4Smrg [$5], 89291fb744b4Smrg [$6])]) 89301fb744b4Smrg 89311fb744b4Smrg 89321fb744b4Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89331fb744b4Smrg# -------------------------------------------------------------- 89341fb744b4Smrgm4_define([lt_dict_filter], 89351fb744b4Smrg[m4_if([$5], [], [], 89361fb744b4Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89371fb744b4Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89381fb744b4Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 89391fb744b4Smrg]) 89401fb744b4Smrg 89411fb744b4Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89421fb744b4Smrg# 894314210e8eSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 89441fb744b4Smrg# Written by Scott James Remnant, 2004 89451fb744b4Smrg# 89461fb744b4Smrg# This file is free software; the Free Software Foundation gives 89471fb744b4Smrg# unlimited permission to copy and/or distribute it, with or without 89481fb744b4Smrg# modifications, as long as this notice is preserved. 89491fb744b4Smrg 89501fb744b4Smrg# @configure_input@ 89511fb744b4Smrg 895214210e8eSmrg# serial 4179 ltversion.m4 89531fb744b4Smrg# This file is part of GNU Libtool 89541fb744b4Smrg 895514210e8eSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 895614210e8eSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 89571fb744b4Smrg 89581fb744b4SmrgAC_DEFUN([LTVERSION_VERSION], 895914210e8eSmrg[macro_version='2.4.6' 896014210e8eSmrgmacro_revision='2.4.6' 89611fb744b4Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89621fb744b4Smrg_LT_DECL(, macro_revision, 0) 8963c35d236eSmrg]) 8964f55e6a01Smrg 89651fb744b4Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 89661fb744b4Smrg# 896714210e8eSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 896814210e8eSmrg# Foundation, Inc. 89691fb744b4Smrg# Written by Scott James Remnant, 2004. 89701fb744b4Smrg# 89711fb744b4Smrg# This file is free software; the Free Software Foundation gives 89721fb744b4Smrg# unlimited permission to copy and/or distribute it, with or without 89731fb744b4Smrg# modifications, as long as this notice is preserved. 89741fb744b4Smrg 89751fb744b4Smrg# serial 5 lt~obsolete.m4 89761fb744b4Smrg 89771fb744b4Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 89781fb744b4Smrg# 897914210e8eSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 89801fb744b4Smrg# which have later been changed to m4_define as they aren't part of the 89811fb744b4Smrg# exported API, or moved to Autoconf or Automake where they belong. 89821fb744b4Smrg# 89831fb744b4Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 89841fb744b4Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 89851fb744b4Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 89861fb744b4Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 89871fb744b4Smrg# and doesn't know about Autoconf macros at all.) 89881fb744b4Smrg# 89891fb744b4Smrg# So we provide this file, which has a silly filename so it's always 89901fb744b4Smrg# included after everything else. This provides aclocal with the 89911fb744b4Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 89921fb744b4Smrg# because those macros already exist, or will be overwritten later. 899314210e8eSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 89941fb744b4Smrg# 89951fb744b4Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 89961fb744b4Smrg# Yes, that means every name once taken will need to remain here until 89971fb744b4Smrg# we give up compatibility with versions before 1.7, at which point 89981fb744b4Smrg# we need to keep only those names which we still refer to. 89991fb744b4Smrg 90001fb744b4Smrg# This is to help aclocal find these macros, as it can't see m4_define. 90011fb744b4SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 90021fb744b4Smrg 90031fb744b4Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 90041fb744b4Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 90051fb744b4Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 90061fb744b4Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 90071fb744b4Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 90081fb744b4Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 90091fb744b4Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90101fb744b4Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90111fb744b4Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90121fb744b4Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90131fb744b4Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90141fb744b4Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90151fb744b4Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90161fb744b4Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90171fb744b4Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90181fb744b4Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90191fb744b4Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90201fb744b4Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90211fb744b4Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90221fb744b4Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90231fb744b4Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90241fb744b4Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90251fb744b4Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90261fb744b4Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90271fb744b4Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90281fb744b4Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90291fb744b4Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90301fb744b4Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90311fb744b4Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90321fb744b4Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90331fb744b4Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90341fb744b4Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90351fb744b4Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90361fb744b4Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90371fb744b4Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90381fb744b4Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90391fb744b4Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90401fb744b4Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90411fb744b4Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90421fb744b4Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90431fb744b4Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90441fb744b4Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90451fb744b4Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90461fb744b4Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90471fb744b4Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90481fb744b4Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90491fb744b4Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90501fb744b4Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90511fb744b4Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90521fb744b4Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90531fb744b4Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90541fb744b4Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90551fb744b4Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90561fb744b4Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90571fb744b4Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90581fb744b4Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90591fb744b4Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90601fb744b4Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90611fb744b4Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90621fb744b4Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 90631fb744b4Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 90641fb744b4Smrg 9065c35d236eSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 90661fb744b4Smrg# serial 1 (pkg-config-0.24) 9067c35d236eSmrg# 9068c35d236eSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9069c35d236eSmrg# 9070c35d236eSmrg# This program is free software; you can redistribute it and/or modify 9071c35d236eSmrg# it under the terms of the GNU General Public License as published by 9072c35d236eSmrg# the Free Software Foundation; either version 2 of the License, or 9073c35d236eSmrg# (at your option) any later version. 9074c35d236eSmrg# 9075c35d236eSmrg# This program is distributed in the hope that it will be useful, but 9076c35d236eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9077c35d236eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9078c35d236eSmrg# General Public License for more details. 9079c35d236eSmrg# 9080c35d236eSmrg# You should have received a copy of the GNU General Public License 9081c35d236eSmrg# along with this program; if not, write to the Free Software 9082c35d236eSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9083c35d236eSmrg# 9084c35d236eSmrg# As a special exception to the GNU General Public License, if you 9085c35d236eSmrg# distribute this file as part of a program that contains a 9086c35d236eSmrg# configuration script generated by Autoconf, you may include it under 9087c35d236eSmrg# the same distribution terms that you use for the rest of that program. 9088c35d236eSmrg 9089c35d236eSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9090c35d236eSmrg# ---------------------------------- 9091c35d236eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9092c35d236eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 909314210e8eSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 909414210e8eSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 90951fb744b4SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 90961fb744b4SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 90971fb744b4SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 90981fb744b4Smrg 9099c35d236eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9100c35d236eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9101c35d236eSmrgfi 9102c35d236eSmrgif test -n "$PKG_CONFIG"; then 9103c35d236eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9104c35d236eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9105c35d236eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9106c35d236eSmrg AC_MSG_RESULT([yes]) 9107c35d236eSmrg else 9108c35d236eSmrg AC_MSG_RESULT([no]) 9109c35d236eSmrg PKG_CONFIG="" 9110c35d236eSmrg fi 9111c35d236eSmrgfi[]dnl 9112c35d236eSmrg])# PKG_PROG_PKG_CONFIG 9113c35d236eSmrg 9114c35d236eSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9115c35d236eSmrg# 9116c35d236eSmrg# Check to see whether a particular set of modules exists. Similar 9117c35d236eSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9118c35d236eSmrg# 91191fb744b4Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91201fb744b4Smrg# only at the first occurence in configure.ac, so if the first place 91211fb744b4Smrg# it's called might be skipped (such as if it is within an "if", you 91221fb744b4Smrg# have to call PKG_CHECK_EXISTS manually 9123c35d236eSmrg# -------------------------------------------------------------- 9124c35d236eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9125c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9126c35d236eSmrgif test -n "$PKG_CONFIG" && \ 9127c35d236eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 91281fb744b4Smrg m4_default([$2], [:]) 9129c35d236eSmrgm4_ifvaln([$3], [else 9130c35d236eSmrg $3])dnl 9131c35d236eSmrgfi]) 9132c35d236eSmrg 9133c35d236eSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9134c35d236eSmrg# --------------------------------------------- 9135c35d236eSmrgm4_define([_PKG_CONFIG], 91364f6cd06fSmrg[if test -n "$$1"; then 91374f6cd06fSmrg pkg_cv_[]$1="$$1" 91384f6cd06fSmrg elif test -n "$PKG_CONFIG"; then 91394f6cd06fSmrg PKG_CHECK_EXISTS([$3], 914014210e8eSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 914114210e8eSmrg test "x$?" != "x0" && pkg_failed=yes ], 91424f6cd06fSmrg [pkg_failed=yes]) 91434f6cd06fSmrg else 91444f6cd06fSmrg pkg_failed=untried 9145c35d236eSmrgfi[]dnl 9146c35d236eSmrg])# _PKG_CONFIG 9147c35d236eSmrg 9148c35d236eSmrg# _PKG_SHORT_ERRORS_SUPPORTED 9149c35d236eSmrg# ----------------------------- 9150c35d236eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9151c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9152c35d236eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9153c35d236eSmrg _pkg_short_errors_supported=yes 9154c35d236eSmrgelse 9155c35d236eSmrg _pkg_short_errors_supported=no 9156c35d236eSmrgfi[]dnl 9157c35d236eSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9158c35d236eSmrg 9159c35d236eSmrg 9160c35d236eSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9161c35d236eSmrg# [ACTION-IF-NOT-FOUND]) 9162c35d236eSmrg# 9163c35d236eSmrg# 9164c35d236eSmrg# Note that if there is a possibility the first call to 9165c35d236eSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9166c35d236eSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9167c35d236eSmrg# 9168c35d236eSmrg# 9169c35d236eSmrg# -------------------------------------------------------------- 9170c35d236eSmrgAC_DEFUN([PKG_CHECK_MODULES], 9171c35d236eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9172c35d236eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9173c35d236eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9174c35d236eSmrg 9175c35d236eSmrgpkg_failed=no 9176c35d236eSmrgAC_MSG_CHECKING([for $1]) 9177c35d236eSmrg 9178c35d236eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9179c35d236eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9180c35d236eSmrg 9181c35d236eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9182c35d236eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9183c35d236eSmrgSee the pkg-config man page for more details.]) 9184c35d236eSmrg 9185c35d236eSmrgif test $pkg_failed = yes; then 91861fb744b4Smrg AC_MSG_RESULT([no]) 9187c35d236eSmrg _PKG_SHORT_ERRORS_SUPPORTED 9188c35d236eSmrg if test $_pkg_short_errors_supported = yes; then 918914210e8eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9190c35d236eSmrg else 919114210e8eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9192c35d236eSmrg fi 9193c35d236eSmrg # Put the nasty error message in config.log where it belongs 9194c35d236eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9195c35d236eSmrg 91961fb744b4Smrg m4_default([$4], [AC_MSG_ERROR( 9197c35d236eSmrg[Package requirements ($2) were not met: 9198c35d236eSmrg 9199c35d236eSmrg$$1_PKG_ERRORS 9200c35d236eSmrg 9201c35d236eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9202c35d236eSmrginstalled software in a non-standard prefix. 9203c35d236eSmrg 920414210e8eSmrg_PKG_TEXT])[]dnl 92051fb744b4Smrg ]) 9206c35d236eSmrgelif test $pkg_failed = untried; then 92071fb744b4Smrg AC_MSG_RESULT([no]) 92081fb744b4Smrg m4_default([$4], [AC_MSG_FAILURE( 9209c35d236eSmrg[The pkg-config script could not be found or is too old. Make sure it 9210c35d236eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9211c35d236eSmrgpath to pkg-config. 9212c35d236eSmrg 9213c35d236eSmrg_PKG_TEXT 9214c35d236eSmrg 921514210e8eSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 92161fb744b4Smrg ]) 9217c35d236eSmrgelse 9218c35d236eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9219c35d236eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9220c35d236eSmrg AC_MSG_RESULT([yes]) 92211fb744b4Smrg $3 9222c35d236eSmrgfi[]dnl 9223c35d236eSmrg])# PKG_CHECK_MODULES 9224c35d236eSmrg 922514210e8eSmrg 922614210e8eSmrg# PKG_INSTALLDIR(DIRECTORY) 922714210e8eSmrg# ------------------------- 922814210e8eSmrg# Substitutes the variable pkgconfigdir as the location where a module 922914210e8eSmrg# should install pkg-config .pc files. By default the directory is 923014210e8eSmrg# $libdir/pkgconfig, but the default can be changed by passing 923114210e8eSmrg# DIRECTORY. The user can override through the --with-pkgconfigdir 923214210e8eSmrg# parameter. 923314210e8eSmrgAC_DEFUN([PKG_INSTALLDIR], 923414210e8eSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 923514210e8eSmrgm4_pushdef([pkg_description], 923614210e8eSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 923714210e8eSmrgAC_ARG_WITH([pkgconfigdir], 923814210e8eSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 923914210e8eSmrg [with_pkgconfigdir=]pkg_default) 924014210e8eSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 924114210e8eSmrgm4_popdef([pkg_default]) 924214210e8eSmrgm4_popdef([pkg_description]) 924314210e8eSmrg]) dnl PKG_INSTALLDIR 924414210e8eSmrg 924514210e8eSmrg 924614210e8eSmrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 924714210e8eSmrg# ------------------------- 924814210e8eSmrg# Substitutes the variable noarch_pkgconfigdir as the location where a 924914210e8eSmrg# module should install arch-independent pkg-config .pc files. By 925014210e8eSmrg# default the directory is $datadir/pkgconfig, but the default can be 925114210e8eSmrg# changed by passing DIRECTORY. The user can override through the 925214210e8eSmrg# --with-noarch-pkgconfigdir parameter. 925314210e8eSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 925414210e8eSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 925514210e8eSmrgm4_pushdef([pkg_description], 925614210e8eSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 925714210e8eSmrgAC_ARG_WITH([noarch-pkgconfigdir], 925814210e8eSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 925914210e8eSmrg [with_noarch_pkgconfigdir=]pkg_default) 926014210e8eSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 926114210e8eSmrgm4_popdef([pkg_default]) 926214210e8eSmrgm4_popdef([pkg_description]) 926314210e8eSmrg]) dnl PKG_NOARCH_INSTALLDIR 926414210e8eSmrg 926514210e8eSmrg 926614210e8eSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 926714210e8eSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 926814210e8eSmrg# ------------------------------------------- 926914210e8eSmrg# Retrieves the value of the pkg-config variable for the given module. 927014210e8eSmrgAC_DEFUN([PKG_CHECK_VAR], 927114210e8eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 927214210e8eSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 927314210e8eSmrg 927414210e8eSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 927514210e8eSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 927614210e8eSmrg 927714210e8eSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 927814210e8eSmrg])# PKG_CHECK_VAR 927914210e8eSmrg 9280f55e6a01Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9281c35d236eSmrgdnl 92821fb744b4Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 928314210e8eSmrgdnl 92844f6cd06fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 92851fb744b4Smrgdnl copy of this software and associated documentation files (the "Software"), 92861fb744b4Smrgdnl to deal in the Software without restriction, including without limitation 92871fb744b4Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 92881fb744b4Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 92891fb744b4Smrgdnl Software is furnished to do so, subject to the following conditions: 92904f6cd06fSmrgdnl 92911fb744b4Smrgdnl The above copyright notice and this permission notice (including the next 92921fb744b4Smrgdnl paragraph) shall be included in all copies or substantial portions of the 92931fb744b4Smrgdnl Software. 92944f6cd06fSmrgdnl 92951fb744b4Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 92961fb744b4Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 92971fb744b4Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 92981fb744b4Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 92991fb744b4Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 93001fb744b4Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 93011fb744b4Smrgdnl DEALINGS IN THE SOFTWARE. 93024f6cd06fSmrg 93034f6cd06fSmrg# XORG_MACROS_VERSION(required-version) 93044f6cd06fSmrg# ------------------------------------- 93054f6cd06fSmrg# Minimum version: 1.1.0 93064f6cd06fSmrg# 93074f6cd06fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 93084f6cd06fSmrg# your configure.ac with the minimum required version, such as: 93094f6cd06fSmrg# XORG_MACROS_VERSION(1.1) 93104f6cd06fSmrg# 93111fb744b4Smrg# To ensure that this macro is defined, also add: 93121fb744b4Smrg# m4_ifndef([XORG_MACROS_VERSION], 93131fb744b4Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 93144f6cd06fSmrg# 93154f6cd06fSmrg# 931614210e8eSmrg# See the "minimum version" comment for each macro you use to see what 93174f6cd06fSmrg# version you require. 93181fb744b4Smrgm4_defun([XORG_MACROS_VERSION],[ 931914210e8eSmrgm4_define([vers_have], [1.19.0]) 93201fb744b4Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 93211fb744b4Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 93221fb744b4Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 93231fb744b4Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 93241fb744b4Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 93251fb744b4Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 93261fb744b4Smrgm4_undefine([vers_have]) 93271fb744b4Smrgm4_undefine([maj_have]) 93281fb744b4Smrgm4_undefine([maj_needed]) 93294f6cd06fSmrg]) # XORG_MACROS_VERSION 9330c35d236eSmrg 9331c35d236eSmrg# XORG_PROG_RAWCPP() 9332c35d236eSmrg# ------------------ 93334f6cd06fSmrg# Minimum version: 1.0.0 93344f6cd06fSmrg# 9335c35d236eSmrg# Find cpp program and necessary flags for use in pre-processing text files 9336c35d236eSmrg# such as man pages and config files 9337c35d236eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9338c35d236eSmrgAC_REQUIRE([AC_PROG_CPP]) 933914210e8eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9340c35d236eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9341c35d236eSmrg 9342c35d236eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9343c35d236eSmrg# which is not the best choice for supporting other OS'es, but covers most 9344c35d236eSmrg# of the ones we need for now. 9345c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 93461fb744b4SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9347c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9348c35d236eSmrg AC_MSG_RESULT([no]) 9349c35d236eSmrgelse 9350c35d236eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9351c35d236eSmrg RAWCPPFLAGS=-undef 9352c35d236eSmrg AC_MSG_RESULT([yes]) 9353f55e6a01Smrg # under Cygwin unix is still defined even with -undef 9354f55e6a01Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9355f55e6a01Smrg RAWCPPFLAGS="-undef -ansi" 9356f55e6a01Smrg AC_MSG_RESULT([yes, with -ansi]) 9357c35d236eSmrg else 9358c35d236eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9359c35d236eSmrg fi 9360c35d236eSmrgfi 9361c35d236eSmrgrm -f conftest.$ac_ext 9362c35d236eSmrg 9363c35d236eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 93641fb744b4SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9365c35d236eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9366c35d236eSmrg AC_MSG_RESULT([no]) 9367c35d236eSmrgelse 9368c35d236eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 936914210e8eSmrg TRADITIONALCPPFLAGS="-traditional" 9370c35d236eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9371c35d236eSmrg AC_MSG_RESULT([yes]) 9372c35d236eSmrg else 9373c35d236eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9374c35d236eSmrg fi 9375c35d236eSmrgfi 9376c35d236eSmrgrm -f conftest.$ac_ext 9377c35d236eSmrgAC_SUBST(RAWCPPFLAGS) 937814210e8eSmrgAC_SUBST(TRADITIONALCPPFLAGS) 9379c35d236eSmrg]) # XORG_PROG_RAWCPP 9380c35d236eSmrg 9381c35d236eSmrg# XORG_MANPAGE_SECTIONS() 9382c35d236eSmrg# ----------------------- 93834f6cd06fSmrg# Minimum version: 1.0.0 93844f6cd06fSmrg# 9385c35d236eSmrg# Determine which sections man pages go in for the different man page types 9386c35d236eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9387c35d236eSmrg# Not sure if there's any better way than just hardcoding by OS name. 9388c35d236eSmrg# Override default settings by setting environment variables 93891fb744b4Smrg# Added MAN_SUBSTS in version 1.8 93901fb744b4Smrg# Added AC_PROG_SED in version 1.8 9391c35d236eSmrg 9392c35d236eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9393c35d236eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 93941fb744b4SmrgAC_REQUIRE([AC_PROG_SED]) 9395c35d236eSmrg 9396c35d236eSmrgif test x$APP_MAN_SUFFIX = x ; then 93974f6cd06fSmrg APP_MAN_SUFFIX=1 9398c35d236eSmrgfi 9399c35d236eSmrgif test x$APP_MAN_DIR = x ; then 94004f6cd06fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9401c35d236eSmrgfi 9402c35d236eSmrg 9403c35d236eSmrgif test x$LIB_MAN_SUFFIX = x ; then 94044f6cd06fSmrg LIB_MAN_SUFFIX=3 9405c35d236eSmrgfi 9406c35d236eSmrgif test x$LIB_MAN_DIR = x ; then 94074f6cd06fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9408c35d236eSmrgfi 9409c35d236eSmrg 9410c35d236eSmrgif test x$FILE_MAN_SUFFIX = x ; then 9411c35d236eSmrg case $host_os in 9412c35d236eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9413c35d236eSmrg *) FILE_MAN_SUFFIX=5 ;; 9414c35d236eSmrg esac 9415c35d236eSmrgfi 9416c35d236eSmrgif test x$FILE_MAN_DIR = x ; then 94174f6cd06fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9418c35d236eSmrgfi 9419c35d236eSmrg 9420c35d236eSmrgif test x$MISC_MAN_SUFFIX = x ; then 9421c35d236eSmrg case $host_os in 9422c35d236eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9423c35d236eSmrg *) MISC_MAN_SUFFIX=7 ;; 9424c35d236eSmrg esac 9425c35d236eSmrgfi 9426c35d236eSmrgif test x$MISC_MAN_DIR = x ; then 94274f6cd06fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9428c35d236eSmrgfi 9429c35d236eSmrg 9430c35d236eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9431c35d236eSmrg case $host_os in 9432c35d236eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9433c35d236eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9434c35d236eSmrg esac 9435c35d236eSmrgfi 9436c35d236eSmrgif test x$DRIVER_MAN_DIR = x ; then 94374f6cd06fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9438c35d236eSmrgfi 9439c35d236eSmrg 9440c35d236eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9441c35d236eSmrg case $host_os in 9442c35d236eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9443c35d236eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9444c35d236eSmrg esac 9445c35d236eSmrgfi 9446c35d236eSmrgif test x$ADMIN_MAN_DIR = x ; then 9447c35d236eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9448c35d236eSmrgfi 9449c35d236eSmrg 9450c35d236eSmrg 9451c35d236eSmrgAC_SUBST([APP_MAN_SUFFIX]) 9452c35d236eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9453c35d236eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9454c35d236eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9455c35d236eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9456c35d236eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9457c35d236eSmrgAC_SUBST([APP_MAN_DIR]) 9458c35d236eSmrgAC_SUBST([LIB_MAN_DIR]) 9459c35d236eSmrgAC_SUBST([FILE_MAN_DIR]) 9460c35d236eSmrgAC_SUBST([MISC_MAN_DIR]) 9461c35d236eSmrgAC_SUBST([DRIVER_MAN_DIR]) 9462c35d236eSmrgAC_SUBST([ADMIN_MAN_DIR]) 94631fb744b4Smrg 94641fb744b4SmrgXORG_MAN_PAGE="X Version 11" 94651fb744b4SmrgAC_SUBST([XORG_MAN_PAGE]) 94661fb744b4SmrgMAN_SUBSTS="\ 94671fb744b4Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 94681fb744b4Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 94691fb744b4Smrg -e 's|__xservername__|Xorg|g' \ 94701fb744b4Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 94711fb744b4Smrg -e 's|__projectroot__|\$(prefix)|g' \ 94721fb744b4Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 94731fb744b4Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 94741fb744b4Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 94751fb744b4Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 94761fb744b4Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 94771fb744b4Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 94781fb744b4Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 94791fb744b4SmrgAC_SUBST([MAN_SUBSTS]) 94801fb744b4Smrg 9481c35d236eSmrg]) # XORG_MANPAGE_SECTIONS 9482c35d236eSmrg 94831fb744b4Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 94841fb744b4Smrg# ------------------------ 94851fb744b4Smrg# Minimum version: 1.7.0 94861fb744b4Smrg# 94871fb744b4Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 94881fb744b4Smrg# provided by xorg-sgml-doctools, if installed. 94891fb744b4SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 94901fb744b4SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 94911fb744b4SmrgXORG_SGML_PATH= 94921fb744b4SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 94931fb744b4Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 94941fb744b4Smrg [m4_ifval([$1],[:], 94951fb744b4Smrg [if test x"$cross_compiling" != x"yes" ; then 94961fb744b4Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 94971fb744b4Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 94981fb744b4Smrg fi]) 94991fb744b4Smrg ]) 95001fb744b4Smrg 95011fb744b4Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 95021fb744b4Smrg# the path and the name of the doc stylesheet 95031fb744b4Smrgif test "x$XORG_SGML_PATH" != "x" ; then 95041fb744b4Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 95051fb744b4Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 95061fb744b4Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 95071fb744b4Smrgelse 95081fb744b4Smrg AC_MSG_RESULT([no]) 95091fb744b4Smrgfi 95101fb744b4Smrg 95111fb744b4SmrgAC_SUBST(XORG_SGML_PATH) 95121fb744b4SmrgAC_SUBST(STYLESHEET_SRCDIR) 95131fb744b4SmrgAC_SUBST(XSL_STYLESHEET) 95141fb744b4SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 95151fb744b4Smrg]) # XORG_CHECK_SGML_DOCTOOLS 95161fb744b4Smrg 9517c35d236eSmrg# XORG_CHECK_LINUXDOC 9518c35d236eSmrg# ------------------- 95194f6cd06fSmrg# Minimum version: 1.0.0 95204f6cd06fSmrg# 9521c35d236eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9522c35d236eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9523c35d236eSmrg# Whether or not the necessary tools and files are found can be checked 9524c35d236eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9525c35d236eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 95261fb744b4SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95271fb744b4SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9528c35d236eSmrg 9529c35d236eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9530c35d236eSmrg 95311fb744b4SmrgAC_MSG_CHECKING([whether to build documentation]) 9532c35d236eSmrg 95331fb744b4Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9534c35d236eSmrg BUILDDOC=yes 9535c35d236eSmrgelse 9536c35d236eSmrg BUILDDOC=no 9537c35d236eSmrgfi 9538c35d236eSmrg 9539c35d236eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9540c35d236eSmrg 9541c35d236eSmrgAC_MSG_RESULT([$BUILDDOC]) 9542c35d236eSmrg 95431fb744b4SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9544c35d236eSmrg 95451fb744b4Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9546c35d236eSmrg BUILDPDFDOC=yes 9547c35d236eSmrgelse 9548c35d236eSmrg BUILDPDFDOC=no 9549c35d236eSmrgfi 9550c35d236eSmrg 9551c35d236eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9552c35d236eSmrg 9553c35d236eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9554c35d236eSmrg 95551fb744b4SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 95564f6cd06fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9557c35d236eSmrgMAKE_PDF="$PS2PDF" 95584f6cd06fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9559c35d236eSmrg 9560c35d236eSmrgAC_SUBST(MAKE_TEXT) 9561c35d236eSmrgAC_SUBST(MAKE_PS) 9562c35d236eSmrgAC_SUBST(MAKE_PDF) 9563c35d236eSmrgAC_SUBST(MAKE_HTML) 9564c35d236eSmrg]) # XORG_CHECK_LINUXDOC 9565c35d236eSmrg 95664f6cd06fSmrg# XORG_CHECK_DOCBOOK 95674f6cd06fSmrg# ------------------- 95684f6cd06fSmrg# Minimum version: 1.0.0 95694f6cd06fSmrg# 95704f6cd06fSmrg# Checks for the ability to build output formats from SGML DocBook source. 95714f6cd06fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 95724f6cd06fSmrg# indicates whether the necessary tools and files are found and, if set, 95734f6cd06fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 95744f6cd06fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 95751fb744b4SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95761fb744b4Smrg 95774f6cd06fSmrgBUILDTXTDOC=no 95784f6cd06fSmrgBUILDPDFDOC=no 95794f6cd06fSmrgBUILDPSDOC=no 95804f6cd06fSmrgBUILDHTMLDOC=no 95814f6cd06fSmrg 95824f6cd06fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 95834f6cd06fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 95844f6cd06fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 95854f6cd06fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 95864f6cd06fSmrg 95871fb744b4SmrgAC_MSG_CHECKING([whether to build text documentation]) 95881fb744b4Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 95894f6cd06fSmrg test x$BUILD_TXTDOC != xno; then 95904f6cd06fSmrg BUILDTXTDOC=yes 95914f6cd06fSmrgfi 95924f6cd06fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 95934f6cd06fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 95944f6cd06fSmrg 95951fb744b4SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 95961fb744b4Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 95971fb744b4Smrg test x$BUILD_PDFDOC != xno; then 95981fb744b4Smrg BUILDPDFDOC=yes 95991fb744b4Smrgfi 96001fb744b4SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 96011fb744b4SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 96021fb744b4Smrg 96031fb744b4SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 96041fb744b4Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 96051fb744b4Smrg test x$BUILD_PSDOC != xno; then 96061fb744b4Smrg BUILDPSDOC=yes 96071fb744b4Smrgfi 96081fb744b4SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 96091fb744b4SmrgAC_MSG_RESULT([$BUILDPSDOC]) 96101fb744b4Smrg 96111fb744b4SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 96121fb744b4Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 96131fb744b4Smrg test x$BUILD_HTMLDOC != xno; then 96141fb744b4Smrg BUILDHTMLDOC=yes 96151fb744b4Smrgfi 96161fb744b4SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 96171fb744b4SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 96181fb744b4Smrg 96191fb744b4SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 96201fb744b4SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 96211fb744b4SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 96221fb744b4SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 96231fb744b4Smrg 96241fb744b4SmrgAC_SUBST(MAKE_TEXT) 96251fb744b4SmrgAC_SUBST(MAKE_PS) 96261fb744b4SmrgAC_SUBST(MAKE_PDF) 96271fb744b4SmrgAC_SUBST(MAKE_HTML) 96281fb744b4Smrg]) # XORG_CHECK_DOCBOOK 96291fb744b4Smrg 96301fb744b4Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 96311fb744b4Smrg# ---------------- 96321fb744b4Smrg# Minimum version: 1.5.0 96331fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96341fb744b4Smrg# 96351fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 96361fb744b4Smrg# not at the appropriate level. This macro enables a module to test for the 96371fb744b4Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96381fb744b4Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 96391fb744b4Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 96401fb744b4Smrg# --with-xmlto assumes 'auto'. 96411fb744b4Smrg# 96421fb744b4Smrg# Interface to module: 96431fb744b4Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 96441fb744b4Smrg# XMLTO: returns the path of the xmlto program found 96451fb744b4Smrg# returns the path set by the user in the environment 96461fb744b4Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 96471fb744b4Smrg# 'no' user instructs the module not to use xmlto 96481fb744b4Smrg# 96491fb744b4Smrg# Added in version 1.10.0 96501fb744b4Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 96511fb744b4Smrg# xmlto for text output requires either lynx, links, or w3m browsers 96521fb744b4Smrg# 96531fb744b4Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 96541fb744b4Smrg# 96551fb744b4SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 96561fb744b4SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 96571fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 96581fb744b4SmrgAC_ARG_WITH(xmlto, 96591fb744b4Smrg AS_HELP_STRING([--with-xmlto], 96601fb744b4Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 96611fb744b4Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 96621fb744b4Smrgm4_undefine([_defopt]) 96631fb744b4Smrg 96641fb744b4Smrgif test "x$use_xmlto" = x"auto"; then 96651fb744b4Smrg AC_PATH_PROG([XMLTO], [xmlto]) 96661fb744b4Smrg if test "x$XMLTO" = "x"; then 96671fb744b4Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 96681fb744b4Smrg have_xmlto=no 96691fb744b4Smrg else 96701fb744b4Smrg have_xmlto=yes 96711fb744b4Smrg fi 96721fb744b4Smrgelif test "x$use_xmlto" = x"yes" ; then 96731fb744b4Smrg AC_PATH_PROG([XMLTO], [xmlto]) 96741fb744b4Smrg if test "x$XMLTO" = "x"; then 96751fb744b4Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 96761fb744b4Smrg fi 96771fb744b4Smrg have_xmlto=yes 96781fb744b4Smrgelif test "x$use_xmlto" = x"no" ; then 96791fb744b4Smrg if test "x$XMLTO" != "x"; then 96801fb744b4Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 96811fb744b4Smrg fi 96821fb744b4Smrg have_xmlto=no 96831fb744b4Smrgelse 96841fb744b4Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 96851fb744b4Smrgfi 96861fb744b4Smrg 96871fb744b4Smrg# Test for a minimum version of xmlto, if provided. 96881fb744b4Smrgm4_ifval([$1], 96891fb744b4Smrg[if test "$have_xmlto" = yes; then 96901fb744b4Smrg # scrape the xmlto version 96911fb744b4Smrg AC_MSG_CHECKING([the xmlto version]) 96921fb744b4Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 96931fb744b4Smrg AC_MSG_RESULT([$xmlto_version]) 96941fb744b4Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 96951fb744b4Smrg [if test "x$use_xmlto" = xauto; then 96961fb744b4Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 96971fb744b4Smrg have_xmlto=no 96981fb744b4Smrg else 96991fb744b4Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 97001fb744b4Smrg fi]) 97011fb744b4Smrgfi]) 97021fb744b4Smrg 97031fb744b4Smrg# Test for the ability of xmlto to generate a text target 97041fb744b4Smrghave_xmlto_text=no 97051fb744b4Smrgcat > conftest.xml << "EOF" 97061fb744b4SmrgEOF 97071fb744b4SmrgAS_IF([test "$have_xmlto" = yes], 97081fb744b4Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 97091fb744b4Smrg [have_xmlto_text=yes], 97101fb744b4Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 97111fb744b4Smrgrm -f conftest.xml 97121fb744b4SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 97131fb744b4SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 97141fb744b4Smrg]) # XORG_WITH_XMLTO 97151fb744b4Smrg 97161fb744b4Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 97171fb744b4Smrg# -------------------------------------------- 97181fb744b4Smrg# Minimum version: 1.12.0 97191fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.12.0 97201fb744b4Smrg# 97211fb744b4Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 97221fb744b4Smrg# XML-based language used for the transformation of XML documents. 97231fb744b4Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 97241fb744b4Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 97251fb744b4Smrg# The XSLT processor is often used as a standalone tool for transformations. 97261fb744b4Smrg# It should not be assumed that this tool is used only to work with documnetation. 97271fb744b4Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 97281fb744b4Smrg# 97291fb744b4Smrg# Interface to module: 97301fb744b4Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 97311fb744b4Smrg# XSLTPROC: returns the path of the xsltproc program found 97321fb744b4Smrg# returns the path set by the user in the environment 97331fb744b4Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 97341fb744b4Smrg# 'no' user instructs the module not to use xsltproc 97351fb744b4Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 97361fb744b4Smrg# 97371fb744b4Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 97381fb744b4Smrg# 97391fb744b4SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 97401fb744b4SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 97411fb744b4Smrg# Preserves the interface, should it be implemented later 97421fb744b4Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 97431fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 97441fb744b4SmrgAC_ARG_WITH(xsltproc, 97451fb744b4Smrg AS_HELP_STRING([--with-xsltproc], 97461fb744b4Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 97471fb744b4Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 97481fb744b4Smrgm4_undefine([_defopt]) 97491fb744b4Smrg 97501fb744b4Smrgif test "x$use_xsltproc" = x"auto"; then 97511fb744b4Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 97521fb744b4Smrg if test "x$XSLTPROC" = "x"; then 97531fb744b4Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 97541fb744b4Smrg have_xsltproc=no 97551fb744b4Smrg else 97561fb744b4Smrg have_xsltproc=yes 97571fb744b4Smrg fi 97581fb744b4Smrgelif test "x$use_xsltproc" = x"yes" ; then 97591fb744b4Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 97601fb744b4Smrg if test "x$XSLTPROC" = "x"; then 97611fb744b4Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 97621fb744b4Smrg fi 97631fb744b4Smrg have_xsltproc=yes 97641fb744b4Smrgelif test "x$use_xsltproc" = x"no" ; then 97651fb744b4Smrg if test "x$XSLTPROC" != "x"; then 97661fb744b4Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 97671fb744b4Smrg fi 97681fb744b4Smrg have_xsltproc=no 97691fb744b4Smrgelse 97701fb744b4Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 97711fb744b4Smrgfi 97721fb744b4Smrg 97731fb744b4SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 97741fb744b4Smrg]) # XORG_WITH_XSLTPROC 97751fb744b4Smrg 97761fb744b4Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 97771fb744b4Smrg# ---------------------------------------- 97781fb744b4Smrg# Minimum version: 1.15.0 97791fb744b4Smrg# 97801fb744b4Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 97811fb744b4Smrg# scanning arbitrary text files, extracting information from those text files, 97821fb744b4Smrg# and printing reports based on that information. 97831fb744b4Smrg# 97841fb744b4Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 97851fb744b4Smrg# 97861fb744b4Smrg# Interface to module: 97871fb744b4Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 97881fb744b4Smrg# PERL: returns the path of the perl program found 97891fb744b4Smrg# returns the path set by the user in the environment 97901fb744b4Smrg# --with-perl: 'yes' user instructs the module to use perl 97911fb744b4Smrg# 'no' user instructs the module not to use perl 97921fb744b4Smrg# have_perl: returns yes if perl found in PATH or no 97931fb744b4Smrg# 97941fb744b4Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 97951fb744b4Smrg# 97961fb744b4SmrgAC_DEFUN([XORG_WITH_PERL],[ 97971fb744b4SmrgAC_ARG_VAR([PERL], [Path to perl command]) 97981fb744b4Smrg# Preserves the interface, should it be implemented later 97991fb744b4Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 98001fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 98011fb744b4SmrgAC_ARG_WITH(perl, 98021fb744b4Smrg AS_HELP_STRING([--with-perl], 98031fb744b4Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 98041fb744b4Smrg [use_perl=$withval], [use_perl=]_defopt) 98051fb744b4Smrgm4_undefine([_defopt]) 98061fb744b4Smrg 98071fb744b4Smrgif test "x$use_perl" = x"auto"; then 98081fb744b4Smrg AC_PATH_PROG([PERL], [perl]) 98091fb744b4Smrg if test "x$PERL" = "x"; then 98101fb744b4Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 98111fb744b4Smrg have_perl=no 98121fb744b4Smrg else 98131fb744b4Smrg have_perl=yes 98141fb744b4Smrg fi 98151fb744b4Smrgelif test "x$use_perl" = x"yes" ; then 98161fb744b4Smrg AC_PATH_PROG([PERL], [perl]) 98171fb744b4Smrg if test "x$PERL" = "x"; then 98181fb744b4Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 98191fb744b4Smrg fi 98201fb744b4Smrg have_perl=yes 98211fb744b4Smrgelif test "x$use_perl" = x"no" ; then 98221fb744b4Smrg if test "x$PERL" != "x"; then 98231fb744b4Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 98241fb744b4Smrg fi 98251fb744b4Smrg have_perl=no 98261fb744b4Smrgelse 98271fb744b4Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 98281fb744b4Smrgfi 98291fb744b4Smrg 98301fb744b4SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 98311fb744b4Smrg]) # XORG_WITH_PERL 98321fb744b4Smrg 98331fb744b4Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 98341fb744b4Smrg# ---------------- 98351fb744b4Smrg# Minimum version: 1.5.0 98361fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 98371fb744b4Smrg# 98381fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 98391fb744b4Smrg# not at the appropriate level. This macro enables a module to test for the 98401fb744b4Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 98411fb744b4Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 98421fb744b4Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 98431fb744b4Smrg# --with-asciidoc assumes 'auto'. 98441fb744b4Smrg# 98451fb744b4Smrg# Interface to module: 98461fb744b4Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 98471fb744b4Smrg# ASCIIDOC: returns the path of the asciidoc program found 98481fb744b4Smrg# returns the path set by the user in the environment 98491fb744b4Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 98501fb744b4Smrg# 'no' user instructs the module not to use asciidoc 98511fb744b4Smrg# 98521fb744b4Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 98531fb744b4Smrg# 98541fb744b4SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 98551fb744b4SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 98561fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 98571fb744b4SmrgAC_ARG_WITH(asciidoc, 98581fb744b4Smrg AS_HELP_STRING([--with-asciidoc], 98591fb744b4Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 98601fb744b4Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 98611fb744b4Smrgm4_undefine([_defopt]) 98621fb744b4Smrg 98631fb744b4Smrgif test "x$use_asciidoc" = x"auto"; then 98641fb744b4Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 98651fb744b4Smrg if test "x$ASCIIDOC" = "x"; then 98661fb744b4Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 98671fb744b4Smrg have_asciidoc=no 98681fb744b4Smrg else 98691fb744b4Smrg have_asciidoc=yes 98701fb744b4Smrg fi 98711fb744b4Smrgelif test "x$use_asciidoc" = x"yes" ; then 98721fb744b4Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 98731fb744b4Smrg if test "x$ASCIIDOC" = "x"; then 98741fb744b4Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 98751fb744b4Smrg fi 98761fb744b4Smrg have_asciidoc=yes 98771fb744b4Smrgelif test "x$use_asciidoc" = x"no" ; then 98781fb744b4Smrg if test "x$ASCIIDOC" != "x"; then 98791fb744b4Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 98801fb744b4Smrg fi 98811fb744b4Smrg have_asciidoc=no 98821fb744b4Smrgelse 98831fb744b4Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 98841fb744b4Smrgfi 98851fb744b4Smrgm4_ifval([$1], 98861fb744b4Smrg[if test "$have_asciidoc" = yes; then 98871fb744b4Smrg # scrape the asciidoc version 98881fb744b4Smrg AC_MSG_CHECKING([the asciidoc version]) 98891fb744b4Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 98901fb744b4Smrg AC_MSG_RESULT([$asciidoc_version]) 98911fb744b4Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 98921fb744b4Smrg [if test "x$use_asciidoc" = xauto; then 98931fb744b4Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 98941fb744b4Smrg have_asciidoc=no 98951fb744b4Smrg else 98961fb744b4Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 98971fb744b4Smrg fi]) 98981fb744b4Smrgfi]) 98991fb744b4SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 99001fb744b4Smrg]) # XORG_WITH_ASCIIDOC 99011fb744b4Smrg 99021fb744b4Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 990314210e8eSmrg# ------------------------------------------- 99041fb744b4Smrg# Minimum version: 1.5.0 99051fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 990614210e8eSmrg# Minimum version for optional DOT checking: 1.18.0 99071fb744b4Smrg# 99081fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 99091fb744b4Smrg# not at the appropriate level. This macro enables a module to test for the 99101fb744b4Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99111fb744b4Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 99121fb744b4Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 99131fb744b4Smrg# --with-doxygen assumes 'auto'. 99141fb744b4Smrg# 99151fb744b4Smrg# Interface to module: 99161fb744b4Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 99171fb744b4Smrg# DOXYGEN: returns the path of the doxygen program found 99181fb744b4Smrg# returns the path set by the user in the environment 99191fb744b4Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 99201fb744b4Smrg# 'no' user instructs the module not to use doxygen 99211fb744b4Smrg# 99221fb744b4Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 99231fb744b4Smrg# 99241fb744b4SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 99251fb744b4SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 992614210e8eSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 99271fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 99281fb744b4SmrgAC_ARG_WITH(doxygen, 99291fb744b4Smrg AS_HELP_STRING([--with-doxygen], 99301fb744b4Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 99311fb744b4Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 99321fb744b4Smrgm4_undefine([_defopt]) 99331fb744b4Smrg 99341fb744b4Smrgif test "x$use_doxygen" = x"auto"; then 99351fb744b4Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99361fb744b4Smrg if test "x$DOXYGEN" = "x"; then 99371fb744b4Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 99381fb744b4Smrg have_doxygen=no 99391fb744b4Smrg else 99401fb744b4Smrg have_doxygen=yes 99411fb744b4Smrg fi 99421fb744b4Smrgelif test "x$use_doxygen" = x"yes" ; then 99431fb744b4Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99441fb744b4Smrg if test "x$DOXYGEN" = "x"; then 99451fb744b4Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 99461fb744b4Smrg fi 99471fb744b4Smrg have_doxygen=yes 99481fb744b4Smrgelif test "x$use_doxygen" = x"no" ; then 99491fb744b4Smrg if test "x$DOXYGEN" != "x"; then 99501fb744b4Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 99511fb744b4Smrg fi 99521fb744b4Smrg have_doxygen=no 99531fb744b4Smrgelse 99541fb744b4Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 99551fb744b4Smrgfi 99561fb744b4Smrgm4_ifval([$1], 99571fb744b4Smrg[if test "$have_doxygen" = yes; then 99581fb744b4Smrg # scrape the doxygen version 99591fb744b4Smrg AC_MSG_CHECKING([the doxygen version]) 99601fb744b4Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 99611fb744b4Smrg AC_MSG_RESULT([$doxygen_version]) 99621fb744b4Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 99631fb744b4Smrg [if test "x$use_doxygen" = xauto; then 99641fb744b4Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 99651fb744b4Smrg have_doxygen=no 99661fb744b4Smrg else 99671fb744b4Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 99681fb744b4Smrg fi]) 99691fb744b4Smrgfi]) 997014210e8eSmrg 997114210e8eSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 997214210e8eSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 997314210e8eSmrgdnl HAVE_DOT = @HAVE_DOT@ 997414210e8eSmrgHAVE_DOT=no 997514210e8eSmrgif test "x$have_doxygen" = "xyes"; then 997614210e8eSmrg AC_PATH_PROG([DOT], [dot]) 997714210e8eSmrg if test "x$DOT" != "x"; then 997814210e8eSmrg HAVE_DOT=yes 997914210e8eSmrg fi 998014210e8eSmrgfi 998114210e8eSmrg 998214210e8eSmrgAC_SUBST([HAVE_DOT]) 998314210e8eSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 99841fb744b4SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 99851fb744b4Smrg]) # XORG_WITH_DOXYGEN 99861fb744b4Smrg 99871fb744b4Smrg# XORG_WITH_GROFF([DEFAULT]) 99881fb744b4Smrg# ---------------- 99891fb744b4Smrg# Minimum version: 1.6.0 99901fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99911fb744b4Smrg# 99921fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 99931fb744b4Smrg# not at the appropriate level. This macro enables a module to test for the 99941fb744b4Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99951fb744b4Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 99961fb744b4Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 99971fb744b4Smrg# --with-groff assumes 'auto'. 99981fb744b4Smrg# 99991fb744b4Smrg# Interface to module: 100001fb744b4Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 100011fb744b4Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 100021fb744b4Smrg# HAVE_GROFF_MS: the -ms macros package 100031fb744b4Smrg# GROFF: returns the path of the groff program found 100041fb744b4Smrg# returns the path set by the user in the environment 100051fb744b4Smrg# --with-groff: 'yes' user instructs the module to use groff 100061fb744b4Smrg# 'no' user instructs the module not to use groff 100071fb744b4Smrg# 100081fb744b4Smrg# Added in version 1.9.0: 100091fb744b4Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 100101fb744b4Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 100111fb744b4Smrg# psselect from the psutils package. 100121fb744b4Smrg# the ghostcript package. Refer to the grohtml man pages 100131fb744b4Smrg# 100141fb744b4Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 100151fb744b4Smrg# 100161fb744b4Smrg# OS and distros often splits groff in a basic and full package, the former 100171fb744b4Smrg# having the groff program and the later having devices, fonts and macros 100181fb744b4Smrg# Checking for the groff executable is not enough. 100191fb744b4Smrg# 100201fb744b4Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 100211fb744b4Smrg# unset HAVE_GROFF or GROFF env variables. 100221fb744b4Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 100231fb744b4Smrg# 100241fb744b4SmrgAC_DEFUN([XORG_WITH_GROFF],[ 100251fb744b4SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 100261fb744b4Smrgm4_define([_defopt], m4_default([$1], [auto])) 100271fb744b4SmrgAC_ARG_WITH(groff, 100281fb744b4Smrg AS_HELP_STRING([--with-groff], 100291fb744b4Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 100301fb744b4Smrg [use_groff=$withval], [use_groff=]_defopt) 100311fb744b4Smrgm4_undefine([_defopt]) 100321fb744b4Smrg 100331fb744b4Smrgif test "x$use_groff" = x"auto"; then 100341fb744b4Smrg AC_PATH_PROG([GROFF], [groff]) 100351fb744b4Smrg if test "x$GROFF" = "x"; then 100361fb744b4Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 100371fb744b4Smrg have_groff=no 100381fb744b4Smrg else 100391fb744b4Smrg have_groff=yes 100401fb744b4Smrg fi 100411fb744b4Smrgelif test "x$use_groff" = x"yes" ; then 100421fb744b4Smrg AC_PATH_PROG([GROFF], [groff]) 100431fb744b4Smrg if test "x$GROFF" = "x"; then 100441fb744b4Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 100451fb744b4Smrg fi 100461fb744b4Smrg have_groff=yes 100471fb744b4Smrgelif test "x$use_groff" = x"no" ; then 100481fb744b4Smrg if test "x$GROFF" != "x"; then 100491fb744b4Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 100501fb744b4Smrg fi 100511fb744b4Smrg have_groff=no 100521fb744b4Smrgelse 100531fb744b4Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 100541fb744b4Smrgfi 100551fb744b4Smrg 100561fb744b4Smrg# We have groff, test for the presence of the macro packages 100571fb744b4Smrgif test "x$have_groff" = x"yes"; then 100581fb744b4Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 100591fb744b4Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 100601fb744b4Smrg groff_ms_works=yes 100611fb744b4Smrg else 100621fb744b4Smrg groff_ms_works=no 100631fb744b4Smrg fi 100641fb744b4Smrg AC_MSG_RESULT([$groff_ms_works]) 100651fb744b4Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 100661fb744b4Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 100671fb744b4Smrg groff_mm_works=yes 100681fb744b4Smrg else 100691fb744b4Smrg groff_mm_works=no 100701fb744b4Smrg fi 100711fb744b4Smrg AC_MSG_RESULT([$groff_mm_works]) 100721fb744b4Smrgfi 100731fb744b4Smrg 100741fb744b4Smrg# We have groff, test for HTML dependencies, one command per package 100751fb744b4Smrgif test "x$have_groff" = x"yes"; then 100761fb744b4Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 100771fb744b4Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 100781fb744b4Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 100791fb744b4Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 100801fb744b4Smrg have_groff_html=yes 100811fb744b4Smrg else 100821fb744b4Smrg have_groff_html=no 100831fb744b4Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 100841fb744b4Smrg fi 100851fb744b4Smrgfi 100861fb744b4Smrg 100871fb744b4Smrg# Set Automake conditionals for Makefiles 100881fb744b4SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 100891fb744b4SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 100901fb744b4SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 100911fb744b4SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 100921fb744b4Smrg]) # XORG_WITH_GROFF 100931fb744b4Smrg 100941fb744b4Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 100951fb744b4Smrg# --------------------------------------- 100961fb744b4Smrg# Minimum version: 1.6.0 100971fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 100981fb744b4Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 100991fb744b4Smrg# 101001fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 101011fb744b4Smrg# not at the appropriate level. This macro enables a module to test for the 101021fb744b4Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101031fb744b4Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 101041fb744b4Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 101051fb744b4Smrg# --with-fop assumes 'auto'. 101061fb744b4Smrg# 101071fb744b4Smrg# Interface to module: 101081fb744b4Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 101091fb744b4Smrg# FOP: returns the path of the fop program found 101101fb744b4Smrg# returns the path set by the user in the environment 101111fb744b4Smrg# --with-fop: 'yes' user instructs the module to use fop 101121fb744b4Smrg# 'no' user instructs the module not to use fop 101131fb744b4Smrg# 101141fb744b4Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 101151fb744b4Smrg# 101161fb744b4SmrgAC_DEFUN([XORG_WITH_FOP],[ 101171fb744b4SmrgAC_ARG_VAR([FOP], [Path to fop command]) 101181fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 101191fb744b4SmrgAC_ARG_WITH(fop, 101201fb744b4Smrg AS_HELP_STRING([--with-fop], 101211fb744b4Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 101221fb744b4Smrg [use_fop=$withval], [use_fop=]_defopt) 101231fb744b4Smrgm4_undefine([_defopt]) 101241fb744b4Smrg 101251fb744b4Smrgif test "x$use_fop" = x"auto"; then 101261fb744b4Smrg AC_PATH_PROG([FOP], [fop]) 101271fb744b4Smrg if test "x$FOP" = "x"; then 101281fb744b4Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 101291fb744b4Smrg have_fop=no 101301fb744b4Smrg else 101311fb744b4Smrg have_fop=yes 101321fb744b4Smrg fi 101331fb744b4Smrgelif test "x$use_fop" = x"yes" ; then 101341fb744b4Smrg AC_PATH_PROG([FOP], [fop]) 101351fb744b4Smrg if test "x$FOP" = "x"; then 101361fb744b4Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 101371fb744b4Smrg fi 101381fb744b4Smrg have_fop=yes 101391fb744b4Smrgelif test "x$use_fop" = x"no" ; then 101401fb744b4Smrg if test "x$FOP" != "x"; then 101411fb744b4Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 101421fb744b4Smrg fi 101431fb744b4Smrg have_fop=no 101441fb744b4Smrgelse 101451fb744b4Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 101461fb744b4Smrgfi 101471fb744b4Smrg 101481fb744b4Smrg# Test for a minimum version of fop, if provided. 101491fb744b4Smrgm4_ifval([$1], 101501fb744b4Smrg[if test "$have_fop" = yes; then 101511fb744b4Smrg # scrape the fop version 101521fb744b4Smrg AC_MSG_CHECKING([for fop minimum version]) 101531fb744b4Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 101541fb744b4Smrg AC_MSG_RESULT([$fop_version]) 101551fb744b4Smrg AS_VERSION_COMPARE([$fop_version], [$1], 101561fb744b4Smrg [if test "x$use_fop" = xauto; then 101571fb744b4Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 101581fb744b4Smrg have_fop=no 101591fb744b4Smrg else 101601fb744b4Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 101611fb744b4Smrg fi]) 101621fb744b4Smrgfi]) 101631fb744b4SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 101641fb744b4Smrg]) # XORG_WITH_FOP 101651fb744b4Smrg 1016614210e8eSmrg# XORG_WITH_M4([MIN-VERSION]) 1016714210e8eSmrg# --------------------------- 1016814210e8eSmrg# Minimum version: 1.19.0 1016914210e8eSmrg# 1017014210e8eSmrg# This macro attempts to locate an m4 macro processor which supports 1017114210e8eSmrg# -I option and is only useful for modules relying on M4 in order to 1017214210e8eSmrg# expand macros in source code files. 1017314210e8eSmrg# 1017414210e8eSmrg# Interface to module: 1017514210e8eSmrg# M4: returns the path of the m4 program found 1017614210e8eSmrg# returns the path set by the user in the environment 1017714210e8eSmrg# 1017814210e8eSmrgAC_DEFUN([XORG_WITH_M4], [ 1017914210e8eSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1018014210e8eSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1018114210e8eSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1018214210e8eSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1018314210e8eSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1018414210e8eSmrg [$PATH:/usr/gnu/bin])]) 1018514210e8eSmrg 1018614210e8eSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1018714210e8eSmrg]) # XORG_WITH_M4 1018814210e8eSmrg 101891fb744b4Smrg# XORG_WITH_PS2PDF([DEFAULT]) 101901fb744b4Smrg# ---------------- 101911fb744b4Smrg# Minimum version: 1.6.0 101921fb744b4Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101931fb744b4Smrg# 101941fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 101951fb744b4Smrg# not at the appropriate level. This macro enables a module to test for the 101961fb744b4Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101971fb744b4Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 101981fb744b4Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 101991fb744b4Smrg# --with-ps2pdf assumes 'auto'. 102001fb744b4Smrg# 102011fb744b4Smrg# Interface to module: 102021fb744b4Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 102031fb744b4Smrg# PS2PDF: returns the path of the ps2pdf program found 102041fb744b4Smrg# returns the path set by the user in the environment 102051fb744b4Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 102061fb744b4Smrg# 'no' user instructs the module not to use ps2pdf 102071fb744b4Smrg# 102081fb744b4Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 102091fb744b4Smrg# 102101fb744b4SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 102111fb744b4SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 102121fb744b4Smrgm4_define([_defopt], m4_default([$1], [auto])) 102131fb744b4SmrgAC_ARG_WITH(ps2pdf, 102141fb744b4Smrg AS_HELP_STRING([--with-ps2pdf], 102151fb744b4Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 102161fb744b4Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 102171fb744b4Smrgm4_undefine([_defopt]) 102181fb744b4Smrg 102191fb744b4Smrgif test "x$use_ps2pdf" = x"auto"; then 102201fb744b4Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102211fb744b4Smrg if test "x$PS2PDF" = "x"; then 102221fb744b4Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 102231fb744b4Smrg have_ps2pdf=no 102241fb744b4Smrg else 102251fb744b4Smrg have_ps2pdf=yes 102261fb744b4Smrg fi 102271fb744b4Smrgelif test "x$use_ps2pdf" = x"yes" ; then 102281fb744b4Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102291fb744b4Smrg if test "x$PS2PDF" = "x"; then 102301fb744b4Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 102311fb744b4Smrg fi 102321fb744b4Smrg have_ps2pdf=yes 102331fb744b4Smrgelif test "x$use_ps2pdf" = x"no" ; then 102341fb744b4Smrg if test "x$PS2PDF" != "x"; then 102351fb744b4Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 102361fb744b4Smrg fi 102371fb744b4Smrg have_ps2pdf=no 102381fb744b4Smrgelse 102391fb744b4Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 102401fb744b4Smrgfi 102411fb744b4SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 102421fb744b4Smrg]) # XORG_WITH_PS2PDF 102431fb744b4Smrg 102441fb744b4Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 102451fb744b4Smrg# ---------------- 102461fb744b4Smrg# Minimum version: 1.6.0 102471fb744b4Smrg# 102481fb744b4Smrg# Documentation tools are not always available on all platforms and sometimes 102491fb744b4Smrg# not at the appropriate level. This macro enables a builder to skip all 102501fb744b4Smrg# documentation targets except traditional man pages. 102511fb744b4Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 102521fb744b4Smrg# maximum flexibilty in controlling documentation building. 102531fb744b4Smrg# Refer to: 102541fb744b4Smrg# XORG_WITH_XMLTO --with-xmlto 102551fb744b4Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 102561fb744b4Smrg# XORG_WITH_DOXYGEN --with-doxygen 102571fb744b4Smrg# XORG_WITH_FOP --with-fop 102581fb744b4Smrg# XORG_WITH_GROFF --with-groff 102591fb744b4Smrg# XORG_WITH_PS2PDF --with-ps2pdf 102601fb744b4Smrg# 102611fb744b4Smrg# Interface to module: 102621fb744b4Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 102631fb744b4Smrg# --enable-docs: 'yes' user instructs the module to generate docs 102641fb744b4Smrg# 'no' user instructs the module not to generate docs 102651fb744b4Smrg# parm1: specify the default value, yes or no. 102661fb744b4Smrg# 102671fb744b4SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 102681fb744b4Smrgm4_define([docs_default], m4_default([$1], [yes])) 102691fb744b4SmrgAC_ARG_ENABLE(docs, 102701fb744b4Smrg AS_HELP_STRING([--enable-docs], 102711fb744b4Smrg [Enable building the documentation (default: ]docs_default[)]), 102721fb744b4Smrg [build_docs=$enableval], [build_docs=]docs_default) 102731fb744b4Smrgm4_undefine([docs_default]) 102741fb744b4SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 102751fb744b4SmrgAC_MSG_CHECKING([whether to build documentation]) 102761fb744b4SmrgAC_MSG_RESULT([$build_docs]) 102771fb744b4Smrg]) # XORG_ENABLE_DOCS 102781fb744b4Smrg 102791fb744b4Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 102801fb744b4Smrg# ---------------- 102811fb744b4Smrg# Minimum version: 1.6.0 102821fb744b4Smrg# 102831fb744b4Smrg# This macro enables a builder to skip all developer documentation. 102841fb744b4Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 102851fb744b4Smrg# maximum flexibilty in controlling documentation building. 102861fb744b4Smrg# Refer to: 102871fb744b4Smrg# XORG_WITH_XMLTO --with-xmlto 102881fb744b4Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 102891fb744b4Smrg# XORG_WITH_DOXYGEN --with-doxygen 102901fb744b4Smrg# XORG_WITH_FOP --with-fop 102911fb744b4Smrg# XORG_WITH_GROFF --with-groff 102921fb744b4Smrg# XORG_WITH_PS2PDF --with-ps2pdf 102931fb744b4Smrg# 102941fb744b4Smrg# Interface to module: 102951fb744b4Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 102961fb744b4Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 102971fb744b4Smrg# 'no' user instructs the module not to generate developer docs 102981fb744b4Smrg# parm1: specify the default value, yes or no. 102991fb744b4Smrg# 103001fb744b4SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 103011fb744b4Smrgm4_define([devel_default], m4_default([$1], [yes])) 103021fb744b4SmrgAC_ARG_ENABLE(devel-docs, 103031fb744b4Smrg AS_HELP_STRING([--enable-devel-docs], 103041fb744b4Smrg [Enable building the developer documentation (default: ]devel_default[)]), 103051fb744b4Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 103061fb744b4Smrgm4_undefine([devel_default]) 103071fb744b4SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 103081fb744b4SmrgAC_MSG_CHECKING([whether to build developer documentation]) 103091fb744b4SmrgAC_MSG_RESULT([$build_devel_docs]) 103101fb744b4Smrg]) # XORG_ENABLE_DEVEL_DOCS 103111fb744b4Smrg 103121fb744b4Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 103131fb744b4Smrg# ---------------- 103141fb744b4Smrg# Minimum version: 1.6.0 103151fb744b4Smrg# 103161fb744b4Smrg# This macro enables a builder to skip all functional specification targets. 103171fb744b4Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 103181fb744b4Smrg# maximum flexibilty in controlling documentation building. 103191fb744b4Smrg# Refer to: 103201fb744b4Smrg# XORG_WITH_XMLTO --with-xmlto 103211fb744b4Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 103221fb744b4Smrg# XORG_WITH_DOXYGEN --with-doxygen 103231fb744b4Smrg# XORG_WITH_FOP --with-fop 103241fb744b4Smrg# XORG_WITH_GROFF --with-groff 103251fb744b4Smrg# XORG_WITH_PS2PDF --with-ps2pdf 103261fb744b4Smrg# 103271fb744b4Smrg# Interface to module: 103281fb744b4Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 103291fb744b4Smrg# --enable-specs: 'yes' user instructs the module to generate specs 103301fb744b4Smrg# 'no' user instructs the module not to generate specs 103311fb744b4Smrg# parm1: specify the default value, yes or no. 103321fb744b4Smrg# 103331fb744b4SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 103341fb744b4Smrgm4_define([spec_default], m4_default([$1], [yes])) 103351fb744b4SmrgAC_ARG_ENABLE(specs, 103361fb744b4Smrg AS_HELP_STRING([--enable-specs], 103371fb744b4Smrg [Enable building the specs (default: ]spec_default[)]), 103381fb744b4Smrg [build_specs=$enableval], [build_specs=]spec_default) 103391fb744b4Smrgm4_undefine([spec_default]) 103401fb744b4SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 103411fb744b4SmrgAC_MSG_CHECKING([whether to build functional specifications]) 103421fb744b4SmrgAC_MSG_RESULT([$build_specs]) 103431fb744b4Smrg]) # XORG_ENABLE_SPECS 103441fb744b4Smrg 103451fb744b4Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 103461fb744b4Smrg# ---------------------------------------------- 103471fb744b4Smrg# Minimum version: 1.13.0 103481fb744b4Smrg# 103491fb744b4Smrg# This macro enables a builder to enable/disable unit testing 103501fb744b4Smrg# It makes no assumption about the test cases implementation 103511fb744b4Smrg# Test cases may or may not use Automake "Support for test suites" 103521fb744b4Smrg# They may or may not use the software utility library GLib 103531fb744b4Smrg# 103541fb744b4Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 103551fb744b4Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 103561fb744b4Smrg# The variable enable_unit_tests is used by other macros in this file. 103571fb744b4Smrg# 103581fb744b4Smrg# Interface to module: 103591fb744b4Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 103601fb744b4Smrg# enable_unit_tests: used in configure.ac for additional configuration 103611fb744b4Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 103621fb744b4Smrg# 'no' user instructs the module not to build tests 103631fb744b4Smrg# parm1: specify the default value, yes or no. 103641fb744b4Smrg# 103651fb744b4SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 103661fb744b4SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 103671fb744b4SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 103681fb744b4SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 103691fb744b4Smrgm4_define([_defopt], m4_default([$1], [auto])) 103701fb744b4SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 103711fb744b4Smrg [Enable building unit test cases (default: ]_defopt[)]), 103721fb744b4Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 103731fb744b4Smrgm4_undefine([_defopt]) 103741fb744b4SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 103751fb744b4SmrgAC_MSG_CHECKING([whether to build unit test cases]) 103761fb744b4SmrgAC_MSG_RESULT([$enable_unit_tests]) 103771fb744b4Smrg]) # XORG_ENABLE_UNIT_TESTS 103781fb744b4Smrg 103791fb744b4Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 103801fb744b4Smrg# ------------------------------------------------------ 103811fb744b4Smrg# Minimum version: 1.17.0 103821fb744b4Smrg# 103831fb744b4Smrg# This macro enables a builder to enable/disable integration testing 103841fb744b4Smrg# It makes no assumption about the test cases' implementation 103851fb744b4Smrg# Test cases may or may not use Automake "Support for test suites" 103861fb744b4Smrg# 103871fb744b4Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 103881fb744b4Smrg# usually requires less dependencies and may be built and run under less 103891fb744b4Smrg# stringent environments than integration tests. 103901fb744b4Smrg# 103911fb744b4Smrg# Interface to module: 103921fb744b4Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 103931fb744b4Smrg# enable_integration_tests: used in configure.ac for additional configuration 103941fb744b4Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 103951fb744b4Smrg# 'no' user instructs the module not to build tests 103961fb744b4Smrg# parm1: specify the default value, yes or no. 103971fb744b4Smrg# 103981fb744b4SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 103991fb744b4SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 104001fb744b4Smrgm4_define([_defopt], m4_default([$1], [auto])) 104011fb744b4SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 104021fb744b4Smrg [Enable building integration test cases (default: ]_defopt[)]), 104031fb744b4Smrg [enable_integration_tests=$enableval], 104041fb744b4Smrg [enable_integration_tests=]_defopt) 104051fb744b4Smrgm4_undefine([_defopt]) 104061fb744b4SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 104071fb744b4Smrg [test "x$enable_integration_tests" != xno]) 104081fb744b4SmrgAC_MSG_CHECKING([whether to build unit test cases]) 104091fb744b4SmrgAC_MSG_RESULT([$enable_integration_tests]) 104101fb744b4Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 104111fb744b4Smrg 104121fb744b4Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 104131fb744b4Smrg# ---------------------------------------- 104141fb744b4Smrg# Minimum version: 1.13.0 104151fb744b4Smrg# 104161fb744b4Smrg# GLib is a library which provides advanced data structures and functions. 104171fb744b4Smrg# This macro enables a module to test for the presence of Glib. 104181fb744b4Smrg# 104191fb744b4Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 104201fb744b4Smrg# Otherwise the value of $enable_unit_tests is blank. 104211fb744b4Smrg# 104221fb744b4Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 104231fb744b4Smrg# test support usually requires less dependencies and may be built and run under 104241fb744b4Smrg# less stringent environments than integration tests. 104251fb744b4Smrg# 104261fb744b4Smrg# Interface to module: 104271fb744b4Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 104281fb744b4Smrg# with_glib: used in configure.ac to know if GLib has been found 104291fb744b4Smrg# --with-glib: 'yes' user instructs the module to use glib 104301fb744b4Smrg# 'no' user instructs the module not to use glib 104311fb744b4Smrg# 104321fb744b4SmrgAC_DEFUN([XORG_WITH_GLIB],[ 104331fb744b4SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 104341fb744b4Smrgm4_define([_defopt], m4_default([$2], [auto])) 104351fb744b4SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 104361fb744b4Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 104371fb744b4Smrg [with_glib=$withval], [with_glib=]_defopt) 104381fb744b4Smrgm4_undefine([_defopt]) 104391fb744b4Smrg 104401fb744b4Smrghave_glib=no 104411fb744b4Smrg# Do not probe GLib if user explicitly disabled unit testing 104421fb744b4Smrgif test "x$enable_unit_tests" != x"no"; then 104431fb744b4Smrg # Do not probe GLib if user explicitly disabled it 104441fb744b4Smrg if test "x$with_glib" != x"no"; then 104451fb744b4Smrg m4_ifval( 104461fb744b4Smrg [$1], 104471fb744b4Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 104481fb744b4Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 104491fb744b4Smrg ) 104501fb744b4Smrg fi 104511fb744b4Smrgfi 104521fb744b4Smrg 104531fb744b4Smrg# Not having GLib when unit testing has been explicitly requested is an error 104541fb744b4Smrgif test "x$enable_unit_tests" = x"yes"; then 104551fb744b4Smrg if test "x$have_glib" = x"no"; then 104561fb744b4Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 104571fb744b4Smrg fi 104581fb744b4Smrgfi 104591fb744b4Smrg 104601fb744b4Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 104611fb744b4Smrgif test "x$enable_unit_tests" = x"no"; then 104621fb744b4Smrg if test "x$with_glib" = x"yes"; then 104631fb744b4Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 104641fb744b4Smrg fi 104651fb744b4Smrgfi 104661fb744b4Smrg 104671fb744b4Smrg# Not having GLib when it has been explicitly requested is an error 104681fb744b4Smrgif test "x$with_glib" = x"yes"; then 104691fb744b4Smrg if test "x$have_glib" = x"no"; then 104701fb744b4Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 104711fb744b4Smrg fi 104721fb744b4Smrgfi 104731fb744b4Smrg 104741fb744b4SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 104751fb744b4Smrg]) # XORG_WITH_GLIB 104761fb744b4Smrg 104771fb744b4Smrg# XORG_LD_WRAP([required|optional]) 104781fb744b4Smrg# --------------------------------- 104791fb744b4Smrg# Minimum version: 1.13.0 104801fb744b4Smrg# 104811fb744b4Smrg# Check if linker supports -wrap, passed via compiler flags 104821fb744b4Smrg# 104831fb744b4Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 104841fb744b4Smrg# Otherwise the value of $enable_unit_tests is blank. 104851fb744b4Smrg# 104861fb744b4Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 104871fb744b4Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 104881fb744b4Smrg# available, an argument of "optional" allows use when some unit tests require 104891fb744b4Smrg# ld -wrap and others do not. 104901fb744b4Smrg# 104911fb744b4SmrgAC_DEFUN([XORG_LD_WRAP],[ 104921fb744b4SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 104931fb744b4Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 104941fb744b4Smrg void __wrap_exit(int status) { return; }], 104951fb744b4Smrg [exit(0);])]) 104961fb744b4Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 104971fb744b4Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 104981fb744b4Smrg if test "x$have_ld_wrap" = x"no"; then 104991fb744b4Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 105001fb744b4Smrg fi 105011fb744b4Smrgfi 105021fb744b4SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 105031fb744b4Smrg# 105041fb744b4Smrg]) # XORG_LD_WRAP 105051fb744b4Smrg 105061fb744b4Smrg# XORG_CHECK_LINKER_FLAGS 105071fb744b4Smrg# ----------------------- 105081fb744b4Smrg# SYNOPSIS 105091fb744b4Smrg# 105101fb744b4Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 105111fb744b4Smrg# 105121fb744b4Smrg# DESCRIPTION 105131fb744b4Smrg# 105141fb744b4Smrg# Check whether the given linker FLAGS work with the current language's 105151fb744b4Smrg# linker, or whether they give an error. 105161fb744b4Smrg# 105171fb744b4Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 105181fb744b4Smrg# success/failure. 105191fb744b4Smrg# 105201fb744b4Smrg# PROGRAM-SOURCE is the program source to link with, if needed 105211fb744b4Smrg# 105221fb744b4Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 105231fb744b4Smrg# 105241fb744b4Smrg# LICENSE 105251fb744b4Smrg# 105261fb744b4Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 105271fb744b4Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 105281fb744b4Smrg# Copyright (c) 2009 Matteo Frigo 105291fb744b4Smrg# 105301fb744b4Smrg# This program is free software: you can redistribute it and/or modify it 105311fb744b4Smrg# under the terms of the GNU General Public License as published by the 105321fb744b4Smrg# Free Software Foundation, either version 3 of the License, or (at your 105331fb744b4Smrg# option) any later version. 105341fb744b4Smrg# 105351fb744b4Smrg# This program is distributed in the hope that it will be useful, but 105361fb744b4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 105371fb744b4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 105381fb744b4Smrg# Public License for more details. 105391fb744b4Smrg# 105401fb744b4Smrg# You should have received a copy of the GNU General Public License along 105411fb744b4Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 105421fb744b4Smrg# 105431fb744b4Smrg# As a special exception, the respective Autoconf Macro's copyright owner 105441fb744b4Smrg# gives unlimited permission to copy, distribute and modify the configure 105451fb744b4Smrg# scripts that are the output of Autoconf when processing the Macro. You 105461fb744b4Smrg# need not follow the terms of the GNU General Public License when using 105471fb744b4Smrg# or distributing such scripts, even though portions of the text of the 105481fb744b4Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 105491fb744b4Smrg# all other use of the material that constitutes the Autoconf Macro. 105501fb744b4Smrg# 105511fb744b4Smrg# This special exception to the GPL applies to versions of the Autoconf 105521fb744b4Smrg# Macro released by the Autoconf Archive. When you make and distribute a 105531fb744b4Smrg# modified version of the Autoconf Macro, you may extend this special 105541fb744b4Smrg# exception to the GPL to apply to your modified version as well.# 105551fb744b4SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 105561fb744b4Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 105571fb744b4Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 105581fb744b4SmrgAS_LITERAL_IF([$1], 105591fb744b4Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 105601fb744b4Smrg ax_save_FLAGS=$LDFLAGS 105611fb744b4Smrg LDFLAGS="$1" 105621fb744b4Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 105631fb744b4Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 105641fb744b4Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 105651fb744b4Smrg LDFLAGS=$ax_save_FLAGS])], 105661fb744b4Smrg [ax_save_FLAGS=$LDFLAGS 105671fb744b4Smrg LDFLAGS="$1" 105681fb744b4Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 105691fb744b4Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 105701fb744b4Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 105711fb744b4Smrg LDFLAGS=$ax_save_FLAGS]) 105721fb744b4Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 105731fb744b4SmrgAC_MSG_RESULT($xorg_check_linker_flags) 105741fb744b4Smrgif test "x$xorg_check_linker_flags" = xyes; then 105751fb744b4Smrg m4_default([$2], :) 105761fb744b4Smrgelse 105771fb744b4Smrg m4_default([$3], :) 105781fb744b4Smrgfi 105791fb744b4Smrg]) # XORG_CHECK_LINKER_FLAGS 105801fb744b4Smrg 105811fb744b4Smrg# XORG_MEMORY_CHECK_FLAGS 105821fb744b4Smrg# ----------------------- 105831fb744b4Smrg# Minimum version: 1.16.0 105841fb744b4Smrg# 105851fb744b4Smrg# This macro attempts to find appropriate memory checking functionality 105861fb744b4Smrg# for various platforms which unit testing code may use to catch various 105871fb744b4Smrg# forms of memory allocation and access errors in testing. 105881fb744b4Smrg# 105891fb744b4Smrg# Interface to module: 105901fb744b4Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 105911fb744b4Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 105921fb744b4Smrg# 105931fb744b4Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 105941fb744b4Smrg# 105951fb744b4SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 105961fb744b4Smrg 105971fb744b4SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 105981fb744b4SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 105991fb744b4Smrg [Environment variables to enable memory checking in tests]) 106004f6cd06fSmrg 106011fb744b4Smrg# Check for different types of support on different platforms 106021fb744b4Smrgcase $host_os in 106031fb744b4Smrg solaris*) 106041fb744b4Smrg AC_CHECK_LIB([umem], [umem_alloc], 106051fb744b4Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 106061fb744b4Smrg ;; 106071fb744b4Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 106081fb744b4Smrg # both directly and inverted, so should not be 0 or 255. 106091fb744b4Smrg malloc_debug_env='MALLOC_PERTURB_=15' 106101fb744b4Smrg ;; 106111fb744b4Smrg darwin*) 106121fb744b4Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 106131fb744b4Smrg ;; 106141fb744b4Smrg *bsd*) 106151fb744b4Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 106161fb744b4Smrg ;; 106171fb744b4Smrgesac 106184f6cd06fSmrg 106191fb744b4Smrg# User supplied flags override default flags 106201fb744b4Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 106211fb744b4Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 106224f6cd06fSmrgfi 106234f6cd06fSmrg 106241fb744b4SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 106251fb744b4Smrg]) # XORG_WITH_LINT 106264f6cd06fSmrg 10627c35d236eSmrg# XORG_CHECK_MALLOC_ZERO 10628c35d236eSmrg# ---------------------- 106294f6cd06fSmrg# Minimum version: 1.0.0 106304f6cd06fSmrg# 10631c35d236eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10632c35d236eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10633c35d236eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10634c35d236eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10635c35d236eSmrgAC_ARG_ENABLE(malloc0returnsnull, 106361fb744b4Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 10637c35d236eSmrg [malloc(0) returns NULL (default: auto)]), 10638c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10639c35d236eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10640c35d236eSmrg 10641c35d236eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10642c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1064314210e8eSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1064414210e8eSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 106451fb744b4Smrg#include <stdlib.h> 106461fb744b4Smrg],[ 10647c35d236eSmrg char *m0, *r0, *c0, *p; 10648c35d236eSmrg m0 = malloc(0); 10649c35d236eSmrg p = malloc(10); 10650c35d236eSmrg r0 = realloc(p,0); 106511fb744b4Smrg c0 = calloc(0,10); 106521fb744b4Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 106531fb744b4Smrg])], 1065414210e8eSmrg [xorg_cv_malloc0_returns_null=yes], 1065514210e8eSmrg [xorg_cv_malloc0_returns_null=no])]) 1065614210e8eSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10657c35d236eSmrgfi 10658c35d236eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10659c35d236eSmrg 10660c35d236eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10661c35d236eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10662c35d236eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10663c35d236eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10664c35d236eSmrgelse 10665c35d236eSmrg MALLOC_ZERO_CFLAGS="" 10666c35d236eSmrg XMALLOC_ZERO_CFLAGS="" 10667c35d236eSmrg XTMALLOC_ZERO_CFLAGS="" 10668c35d236eSmrgfi 10669c35d236eSmrg 10670c35d236eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10671c35d236eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10672c35d236eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10673c35d236eSmrg]) # XORG_CHECK_MALLOC_ZERO 10674c35d236eSmrg 106754f6cd06fSmrg# XORG_WITH_LINT() 106764f6cd06fSmrg# ---------------- 106774f6cd06fSmrg# Minimum version: 1.1.0 106784f6cd06fSmrg# 106791fb744b4Smrg# This macro enables the use of a tool that flags some suspicious and 106801fb744b4Smrg# non-portable constructs (likely to be bugs) in C language source code. 106811fb744b4Smrg# It will attempt to locate the tool and use appropriate options. 106821fb744b4Smrg# There are various lint type tools on different platforms. 106831fb744b4Smrg# 106841fb744b4Smrg# Interface to module: 106851fb744b4Smrg# LINT: returns the path to the tool found on the platform 106861fb744b4Smrg# or the value set to LINT on the configure cmd line 106871fb744b4Smrg# also an Automake conditional 106881fb744b4Smrg# LINT_FLAGS: an Automake variable with appropriate flags 106891fb744b4Smrg# 106901fb744b4Smrg# --with-lint: 'yes' user instructs the module to use lint 106911fb744b4Smrg# 'no' user instructs the module not to use lint (default) 106921fb744b4Smrg# 106931fb744b4Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 106941fb744b4Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 106954f6cd06fSmrg# 106964f6cd06fSmrgAC_DEFUN([XORG_WITH_LINT],[ 106974f6cd06fSmrg 106981fb744b4SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 106991fb744b4SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 107001fb744b4SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 107014f6cd06fSmrg [Use a lint-style source code checker (default: disabled)])], 107024f6cd06fSmrg [use_lint=$withval], [use_lint=no]) 107031fb744b4Smrg 107041fb744b4Smrg# Obtain platform specific info like program name and options 107051fb744b4Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 107061fb744b4Smrgcase $host_os in 107071fb744b4Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 107081fb744b4Smrg lint_name=splint 107091fb744b4Smrg lint_options="-badflag" 107101fb744b4Smrg ;; 107111fb744b4Smrg *freebsd* | *netbsd*) 107121fb744b4Smrg lint_name=lint 107131fb744b4Smrg lint_options="-u -b" 107141fb744b4Smrg ;; 107151fb744b4Smrg *solaris*) 107161fb744b4Smrg lint_name=lint 107171fb744b4Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 107181fb744b4Smrg ;; 107191fb744b4Smrgesac 107201fb744b4Smrg 107211fb744b4Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 107221fb744b4Smrgif test "x$use_lint" = x"yes" ; then 107231fb744b4Smrg AC_PATH_PROG([LINT], [$lint_name]) 107241fb744b4Smrg if test "x$LINT" = "x"; then 107251fb744b4Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 107261fb744b4Smrg fi 107271fb744b4Smrgelif test "x$use_lint" = x"no" ; then 107281fb744b4Smrg if test "x$LINT" != "x"; then 107291fb744b4Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 107301fb744b4Smrg fi 107314f6cd06fSmrgelse 107321fb744b4Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 107334f6cd06fSmrgfi 107341fb744b4Smrg 107351fb744b4Smrg# User supplied flags override default flags 107361fb744b4Smrgif test "x$LINT_FLAGS" != "x"; then 107371fb744b4Smrg lint_options=$LINT_FLAGS 107384f6cd06fSmrgfi 107394f6cd06fSmrg 107401fb744b4SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 107411fb744b4SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 107424f6cd06fSmrg 107434f6cd06fSmrg]) # XORG_WITH_LINT 107444f6cd06fSmrg 107454f6cd06fSmrg# XORG_LINT_LIBRARY(LIBNAME) 107464f6cd06fSmrg# -------------------------- 107474f6cd06fSmrg# Minimum version: 1.1.0 107484f6cd06fSmrg# 107494f6cd06fSmrg# Sets up flags for building lint libraries for checking programs that call 107504f6cd06fSmrg# functions in the library. 107514f6cd06fSmrg# 107521fb744b4Smrg# Interface to module: 107531fb744b4Smrg# LINTLIB - Automake variable with the name of lint library file to make 107541fb744b4Smrg# MAKE_LINT_LIB - Automake conditional 107551fb744b4Smrg# 107561fb744b4Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 107571fb744b4Smrg# - 'no' user instructs the module not to create a lint library (default) 107584f6cd06fSmrg 107594f6cd06fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 107604f6cd06fSmrgAC_REQUIRE([XORG_WITH_LINT]) 107611fb744b4SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 107624f6cd06fSmrg [Create lint library (default: disabled)])], 107634f6cd06fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 107641fb744b4Smrg 107651fb744b4Smrgif test "x$make_lint_lib" = x"yes" ; then 107661fb744b4Smrg LINTLIB=llib-l$1.ln 107671fb744b4Smrg if test "x$LINT" = "x"; then 107681fb744b4Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 107691fb744b4Smrg fi 107701fb744b4Smrgelif test "x$make_lint_lib" != x"no" ; then 107711fb744b4Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 107724f6cd06fSmrgfi 107731fb744b4Smrg 107744f6cd06fSmrgAC_SUBST(LINTLIB) 107754f6cd06fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 107764f6cd06fSmrg 107774f6cd06fSmrg]) # XORG_LINT_LIBRARY 107784f6cd06fSmrg 107791fb744b4Smrg# XORG_COMPILER_BRAND 107801fb744b4Smrg# ------------------- 107811fb744b4Smrg# Minimum version: 1.14.0 107821fb744b4Smrg# 107831fb744b4Smrg# Checks for various brands of compilers and sets flags as appropriate: 107841fb744b4Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 107851fb744b4Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 107861fb744b4Smrg# clang compiler - sets CLANGCC to "yes" 107871fb744b4Smrg# Intel compiler - sets INTELCC to "yes" 107881fb744b4Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 107891fb744b4Smrg# 107901fb744b4SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 107911fb744b4SmrgAC_LANG_CASE( 107921fb744b4Smrg [C], [ 107931fb744b4Smrg AC_REQUIRE([AC_PROG_CC_C99]) 107941fb744b4Smrg ], 107951fb744b4Smrg [C++], [ 107961fb744b4Smrg AC_REQUIRE([AC_PROG_CXX]) 107971fb744b4Smrg ] 107981fb744b4Smrg) 107991fb744b4SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 108001fb744b4SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 108011fb744b4SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 108021fb744b4Smrg]) # XORG_COMPILER_BRAND 108031fb744b4Smrg 108041fb744b4Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 108051fb744b4Smrg# --------------- 108061fb744b4Smrg# Minimum version: 1.16.0 108071fb744b4Smrg# 108081fb744b4Smrg# Test if the compiler works when passed the given flag as a command line argument. 108091fb744b4Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 108101fb744b4Smrg# next flag in the list until there are no more options. 108111fb744b4Smrg# 108121fb744b4Smrg# Note that this does not guarantee that the compiler supports the flag as some 108131fb744b4Smrg# compilers will simply ignore arguments that they do not understand, but we do 108141fb744b4Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 108151fb744b4Smrg# -Werror=unused-command-line-argument 108161fb744b4Smrg# 108171fb744b4SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 108181fb744b4Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 108191fb744b4Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 108201fb744b4Smrg 108211fb744b4SmrgAC_LANG_COMPILER_REQUIRE 108221fb744b4Smrg 108231fb744b4SmrgAC_LANG_CASE( 108241fb744b4Smrg [C], [ 108251fb744b4Smrg AC_REQUIRE([AC_PROG_CC_C99]) 108261fb744b4Smrg define([PREFIX], [C]) 108271fb744b4Smrg define([CACHE_PREFIX], [cc]) 108281fb744b4Smrg define([COMPILER], [$CC]) 108291fb744b4Smrg ], 108301fb744b4Smrg [C++], [ 108311fb744b4Smrg define([PREFIX], [CXX]) 108321fb744b4Smrg define([CACHE_PREFIX], [cxx]) 108331fb744b4Smrg define([COMPILER], [$CXX]) 108341fb744b4Smrg ] 108351fb744b4Smrg) 108361fb744b4Smrg 108371fb744b4Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 108381fb744b4Smrg 108391fb744b4Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 108401fb744b4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 108411fb744b4Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 108421fb744b4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 108431fb744b4Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 108441fb744b4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 108451fb744b4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 108461fb744b4Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 108471fb744b4Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 108481fb744b4Smrgfi 108491fb744b4Smrg 108501fb744b4Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 108511fb744b4Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 108521fb744b4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 108531fb744b4Smrg fi 108541fb744b4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 108551fb744b4Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 108561fb744b4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 108571fb744b4Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 108581fb744b4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 108591fb744b4Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 108601fb744b4Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 108611fb744b4Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 108621fb744b4Smrgfi 108631fb744b4Smrg 108641fb744b4Smrgfound="no" 108651fb744b4Smrgm4_foreach([flag], m4_cdr($@), [ 108661fb744b4Smrg if test $found = "no" ; then 1086714210e8eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 108681fb744b4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 108691fb744b4Smrg fi 108701fb744b4Smrg 1087114210e8eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 108721fb744b4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 108731fb744b4Smrg fi 108741fb744b4Smrg 108751fb744b4Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 108761fb744b4Smrg 108771fb744b4Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 108781fb744b4Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 108791fb744b4Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 108801fb744b4Smrg AC_CACHE_VAL($cacheid, 108811fb744b4Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 108821fb744b4Smrg [eval $cacheid=yes], 108831fb744b4Smrg [eval $cacheid=no])]) 108841fb744b4Smrg 108851fb744b4Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 108861fb744b4Smrg 108871fb744b4Smrg eval supported=\$$cacheid 108881fb744b4Smrg AC_MSG_RESULT([$supported]) 108891fb744b4Smrg if test "$supported" = "yes" ; then 108901fb744b4Smrg $1="$$1 ]flag[" 108911fb744b4Smrg found="yes" 108921fb744b4Smrg fi 108931fb744b4Smrg fi 108941fb744b4Smrg]) 108951fb744b4Smrg]) # XORG_TESTSET_CFLAG 108961fb744b4Smrg 108971fb744b4Smrg# XORG_COMPILER_FLAGS 108981fb744b4Smrg# --------------- 108991fb744b4Smrg# Minimum version: 1.16.0 109001fb744b4Smrg# 109011fb744b4Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 109021fb744b4Smrg# arguments supported by the selected compiler which do NOT alter the generated 109031fb744b4Smrg# code. These arguments will cause the compiler to print various warnings 109041fb744b4Smrg# during compilation AND turn a conservative set of warnings into errors. 109051fb744b4Smrg# 109061fb744b4Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 109071fb744b4Smrg# future versions of util-macros as options are added to new compilers. 109081fb744b4Smrg# 109091fb744b4SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 109101fb744b4SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 109111fb744b4Smrg 109121fb744b4SmrgAC_ARG_ENABLE(selective-werror, 109131fb744b4Smrg AS_HELP_STRING([--disable-selective-werror], 109141fb744b4Smrg [Turn off selective compiler errors. (default: enabled)]), 109151fb744b4Smrg [SELECTIVE_WERROR=$enableval], 109161fb744b4Smrg [SELECTIVE_WERROR=yes]) 109171fb744b4Smrg 109181fb744b4SmrgAC_LANG_CASE( 109191fb744b4Smrg [C], [ 109201fb744b4Smrg define([PREFIX], [C]) 109211fb744b4Smrg ], 109221fb744b4Smrg [C++], [ 109231fb744b4Smrg define([PREFIX], [CXX]) 109241fb744b4Smrg ] 109251fb744b4Smrg) 109261fb744b4Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 109271fb744b4Smrgif test "x$SUNCC" = "xyes"; then 109281fb744b4Smrg [BASE_]PREFIX[FLAGS]="-v" 109291fb744b4Smrgelse 109301fb744b4Smrg [BASE_]PREFIX[FLAGS]="" 109311fb744b4Smrgfi 109321fb744b4Smrg 109331fb744b4Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 109341fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 109351fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 109361fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 109371fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 109381fb744b4Smrg 109391fb744b4SmrgAC_LANG_CASE( 109401fb744b4Smrg [C], [ 109411fb744b4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 109421fb744b4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 109431fb744b4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 109441fb744b4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1094514210e8eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 109461fb744b4Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 109471fb744b4Smrg ] 109481fb744b4Smrg) 109491fb744b4Smrg 109501fb744b4Smrg# This chunk adds additional warnings that could catch undesired effects. 109511fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 109521fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 109531fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 109541fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 109551fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 109561fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1095714210e8eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 109581fb744b4Smrg 109591fb744b4Smrg# These are currently disabled because they are noisy. They will be enabled 109601fb744b4Smrg# in the future once the codebase is sufficiently modernized to silence 109611fb744b4Smrg# them. For now, I don't want them to drown out the other warnings. 109621fb744b4Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 109631fb744b4Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1096414210e8eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 109651fb744b4Smrg 109661fb744b4Smrg# Turn some warnings into errors, so we don't accidently get successful builds 109671fb744b4Smrg# when there are problems that should be fixed. 109681fb744b4Smrg 109691fb744b4Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 109701fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 109711fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 109721fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 109731fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 109741fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 109751fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 109761fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 109771fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 109781fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 109791fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 109801fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 109811fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 109821fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 109831fb744b4Smrgelse 109841fb744b4SmrgAC_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]) 109851fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 109861fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 109871fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 109881fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 109891fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 109901fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 109911fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 109921fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 109931fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 109941fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 109951fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 109961fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 109971fb744b4SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 109981fb744b4Smrgfi 109991fb744b4Smrg 110001fb744b4SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 110011fb744b4Smrg]) # XORG_COMPILER_FLAGS 110021fb744b4Smrg 11003f55e6a01Smrg# XORG_CWARNFLAGS 11004f55e6a01Smrg# --------------- 11005f55e6a01Smrg# Minimum version: 1.2.0 110061fb744b4Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11007f55e6a01Smrg# 11008f55e6a01Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11009f55e6a01Smrg# 110101fb744b4Smrg# This function is deprecated because it defines -fno-strict-aliasing 110111fb744b4Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 110121fb744b4Smrg# is needed, then it should be added explicitly in the module when 110131fb744b4Smrg# it is updated to use BASE_CFLAGS. 110141fb744b4Smrg# 11015f55e6a01SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 110161fb744b4SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 110171fb744b4SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 110181fb744b4SmrgAC_LANG_CASE( 110191fb744b4Smrg [C], [ 110201fb744b4Smrg CWARNFLAGS="$BASE_CFLAGS" 110211fb744b4Smrg if test "x$GCC" = xyes ; then 110221fb744b4Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 110231fb744b4Smrg fi 110241fb744b4Smrg AC_SUBST(CWARNFLAGS) 110251fb744b4Smrg ] 110261fb744b4Smrg) 11027f55e6a01Smrg]) # XORG_CWARNFLAGS 110281fb744b4Smrg 110291fb744b4Smrg# XORG_STRICT_OPTION 110301fb744b4Smrg# ----------------------- 110311fb744b4Smrg# Minimum version: 1.3.0 110321fb744b4Smrg# 110331fb744b4Smrg# Add configure option to enable strict compilation flags, such as treating 110341fb744b4Smrg# warnings as fatal errors. 110351fb744b4Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 110361fb744b4Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 110371fb744b4Smrg# 110381fb744b4Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 110391fb744b4Smrg# when strict compilation is unconditionally desired. 110401fb744b4SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 110411fb744b4SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 110421fb744b4SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 110431fb744b4Smrg 110441fb744b4SmrgAC_ARG_ENABLE(strict-compilation, 110451fb744b4Smrg AS_HELP_STRING([--enable-strict-compilation], 110461fb744b4Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 110471fb744b4Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 110481fb744b4Smrg 110491fb744b4SmrgAC_LANG_CASE( 110501fb744b4Smrg [C], [ 110511fb744b4Smrg define([PREFIX], [C]) 110521fb744b4Smrg ], 110531fb744b4Smrg [C++], [ 110541fb744b4Smrg define([PREFIX], [CXX]) 110551fb744b4Smrg ] 110561fb744b4Smrg) 110571fb744b4Smrg 110581fb744b4Smrg[STRICT_]PREFIX[FLAGS]="" 110591fb744b4SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 110601fb744b4SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 110611fb744b4Smrg 110621fb744b4Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 110631fb744b4Smrg# activate it with -Werror, so we add it here explicitly. 110641fb744b4SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 110651fb744b4Smrg 110661fb744b4Smrgif test "x$STRICT_COMPILE" = "xyes"; then 110671fb744b4Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 110681fb744b4Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 110691fb744b4Smrgfi 110701fb744b4SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 110711fb744b4SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 110721fb744b4SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 110731fb744b4Smrg]) # XORG_STRICT_OPTION 110741fb744b4Smrg 110751fb744b4Smrg# XORG_DEFAULT_OPTIONS 110761fb744b4Smrg# -------------------- 110771fb744b4Smrg# Minimum version: 1.3.0 110781fb744b4Smrg# 110791fb744b4Smrg# Defines default options for X.Org modules. 110801fb744b4Smrg# 110811fb744b4SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 110821fb744b4SmrgAC_REQUIRE([AC_PROG_INSTALL]) 110831fb744b4SmrgXORG_COMPILER_FLAGS 110841fb744b4SmrgXORG_CWARNFLAGS 110851fb744b4SmrgXORG_STRICT_OPTION 110861fb744b4SmrgXORG_RELEASE_VERSION 110871fb744b4SmrgXORG_CHANGELOG 110881fb744b4SmrgXORG_INSTALL 110891fb744b4SmrgXORG_MANPAGE_SECTIONS 110901fb744b4Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 110911fb744b4Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 110921fb744b4Smrg]) # XORG_DEFAULT_OPTIONS 110931fb744b4Smrg 110941fb744b4Smrg# XORG_INSTALL() 110951fb744b4Smrg# ---------------- 110961fb744b4Smrg# Minimum version: 1.4.0 110971fb744b4Smrg# 110981fb744b4Smrg# Defines the variable INSTALL_CMD as the command to copy 110991fb744b4Smrg# INSTALL from $prefix/share/util-macros. 111001fb744b4Smrg# 111011fb744b4SmrgAC_DEFUN([XORG_INSTALL], [ 111021fb744b4SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 111031fb744b4Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 111041fb744b4SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 111051fb744b4Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 111061fb744b4Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 111071fb744b4Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 111081fb744b4SmrgAC_SUBST([INSTALL_CMD]) 111091fb744b4Smrg]) # XORG_INSTALL 11110c35d236eSmrgdnl Copyright 2005 Red Hat, Inc 11111c35d236eSmrgdnl 11112c35d236eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11113c35d236eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11114c35d236eSmrgdnl the above copyright notice appear in all copies and that both that 11115c35d236eSmrgdnl copyright notice and this permission notice appear in supporting 11116c35d236eSmrgdnl documentation. 11117c35d236eSmrgdnl 11118c35d236eSmrgdnl The above copyright notice and this permission notice shall be included 11119c35d236eSmrgdnl in all copies or substantial portions of the Software. 11120c35d236eSmrgdnl 11121c35d236eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11122c35d236eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11123c35d236eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11124c35d236eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11125c35d236eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11126c35d236eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11127c35d236eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11128c35d236eSmrgdnl 11129c35d236eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11130c35d236eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11131c35d236eSmrgdnl other dealings in this Software without prior written authorization 11132c35d236eSmrgdnl from the copyright holders. 11133c35d236eSmrgdnl 11134c35d236eSmrg 11135c35d236eSmrg# XORG_RELEASE_VERSION 11136c35d236eSmrg# -------------------- 111371fb744b4Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1113814210e8eSmrg 11139c35d236eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 111404f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 111414f6cd06fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 111424f6cd06fSmrg [Major version of this package]) 111434f6cd06fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 111444f6cd06fSmrg if test "x$PVM" = "x"; then 111454f6cd06fSmrg PVM="0" 111464f6cd06fSmrg fi 111474f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 111484f6cd06fSmrg [$PVM], 111494f6cd06fSmrg [Minor version of this package]) 111504f6cd06fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 111514f6cd06fSmrg if test "x$PVP" = "x"; then 111524f6cd06fSmrg PVP="0" 111534f6cd06fSmrg fi 111544f6cd06fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 111554f6cd06fSmrg [$PVP], 111564f6cd06fSmrg [Patch version of this package]) 11157c35d236eSmrg]) 11158c35d236eSmrg 11159f55e6a01Smrg# XORG_CHANGELOG() 11160f55e6a01Smrg# ---------------- 11161f55e6a01Smrg# Minimum version: 1.2.0 11162f55e6a01Smrg# 11163f55e6a01Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11164f55e6a01Smrg# ChangeLog from git. 11165f55e6a01Smrg# 11166f55e6a01Smrg# 11167f55e6a01SmrgAC_DEFUN([XORG_CHANGELOG], [ 111681fb744b4SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 111691fb744b4Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 111701fb744b4Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11171f55e6a01Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11172f55e6a01SmrgAC_SUBST([CHANGELOG_CMD]) 11173f55e6a01Smrg]) # XORG_CHANGELOG 11174f55e6a01Smrg 111751fb744b4Smrgdnl Copyright 2005 Red Hat, Inc 111761fb744b4Smrgdnl 111771fb744b4Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111781fb744b4Smrgdnl documentation for any purpose is hereby granted without fee, provided that 111791fb744b4Smrgdnl the above copyright notice appear in all copies and that both that 111801fb744b4Smrgdnl copyright notice and this permission notice appear in supporting 111811fb744b4Smrgdnl documentation. 111821fb744b4Smrgdnl 111831fb744b4Smrgdnl The above copyright notice and this permission notice shall be included 111841fb744b4Smrgdnl in all copies or substantial portions of the Software. 111851fb744b4Smrgdnl 111861fb744b4Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111871fb744b4Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111881fb744b4Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111891fb744b4Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111901fb744b4Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111911fb744b4Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111921fb744b4Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 111931fb744b4Smrgdnl 111941fb744b4Smrgdnl Except as contained in this notice, the name of the copyright holders shall 111951fb744b4Smrgdnl not be used in advertising or otherwise to promote the sale, use or 111961fb744b4Smrgdnl other dealings in this Software without prior written authorization 111971fb744b4Smrgdnl from the copyright holders. 111981fb744b4Smrgdnl 111991fb744b4Smrg 1120014210e8eSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 112011fb744b4Smrg# -------------------------- 1120214210e8eSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1120314210e8eSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 112041fb744b4Smrg 112051fb744b4SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 112061fb744b4Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 112071fb744b4Smrg SAVE_CFLAGS="$CFLAGS" 112081fb744b4Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 112091fb744b4Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 112101fb744b4Smrg#include "xorg-server.h" 112111fb744b4Smrg#if !defined $1 112121fb744b4Smrg#error $1 not defined 112131fb744b4Smrg#endif 112141fb744b4Smrg ]])], 112151fb744b4Smrg [_EXT_CHECK=yes], 112161fb744b4Smrg [_EXT_CHECK=no]) 112171fb744b4Smrg CFLAGS="$SAVE_CFLAGS" 112181fb744b4Smrg AC_MSG_CHECKING([if $1 is defined]) 112191fb744b4Smrg AC_MSG_RESULT([$_EXT_CHECK]) 112201fb744b4Smrg if test "$_EXT_CHECK" != no; then 112211fb744b4Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 112221fb744b4Smrg fi 112231fb744b4Smrg]) 112241fb744b4Smrg 1122514210e8eSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11226c35d236eSmrg# 11227c35d236eSmrg# This file is free software; the Free Software Foundation 11228c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11229c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11230c35d236eSmrg 11231c35d236eSmrg# AM_AUTOMAKE_VERSION(VERSION) 11232c35d236eSmrg# ---------------------------- 11233c35d236eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11234c35d236eSmrg# generated from the m4 files accompanying Automake X.Y. 112354f6cd06fSmrg# (This private macro should not be called outside this file.) 112364f6cd06fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1123714210e8eSmrg[am__api_version='1.15' 112384f6cd06fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 112394f6cd06fSmrgdnl require some minimum version. Point them to the right macro. 1124014210e8eSmrgm4_if([$1], [1.15], [], 112414f6cd06fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 112424f6cd06fSmrg]) 112434f6cd06fSmrg 112444f6cd06fSmrg# _AM_AUTOCONF_VERSION(VERSION) 112454f6cd06fSmrg# ----------------------------- 112464f6cd06fSmrg# aclocal traces this macro to find the Autoconf version. 112474f6cd06fSmrg# This is a private macro too. Using m4_define simplifies 112484f6cd06fSmrg# the logic in aclocal, which can simply ignore this definition. 112494f6cd06fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 11250c35d236eSmrg 11251c35d236eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11252c35d236eSmrg# ------------------------------- 112534f6cd06fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11254f55e6a01Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11255c35d236eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1125614210e8eSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 112574f6cd06fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 112584f6cd06fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11259f55e6a01Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11260c35d236eSmrg 11261c35d236eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11262c35d236eSmrg 1126314210e8eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11264c35d236eSmrg# 11265c35d236eSmrg# This file is free software; the Free Software Foundation 11266c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11267c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11268c35d236eSmrg 11269c35d236eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1127014210e8eSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1127114210e8eSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11272c35d236eSmrg# 11273c35d236eSmrg# Of course, Automake must honor this variable whenever it calls a 11274c35d236eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 11275c35d236eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11276c35d236eSmrg# depending on how configure is run. This is pretty annoying, since 11277c35d236eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11278c35d236eSmrg# source directory, any form will work fine, but in subdirectories a 11279c35d236eSmrg# relative path needs to be adjusted first. 11280c35d236eSmrg# 11281c35d236eSmrg# $ac_aux_dir/missing 11282c35d236eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 11283c35d236eSmrg# $top_srcdir/$ac_aux_dir/missing 11284c35d236eSmrg# fails if $ac_aux_dir is absolute, 11285c35d236eSmrg# fails when called from a subdirectory in a VPATH build with 11286c35d236eSmrg# a relative $ac_aux_dir 11287c35d236eSmrg# 11288c35d236eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11289c35d236eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 1129014210e8eSmrg# harmless because $srcdir is '.', but things will broke when you 11291c35d236eSmrg# start a VPATH build or use an absolute $srcdir. 11292c35d236eSmrg# 11293c35d236eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11294c35d236eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11295c35d236eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11296c35d236eSmrg# and then we would define $MISSING as 11297c35d236eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 11298c35d236eSmrg# This will work as long as MISSING is not called from configure, because 11299c35d236eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 11300c35d236eSmrg# However there are other variables, like CC, which are often used in 11301c35d236eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11302c35d236eSmrg# 11303c35d236eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 11304c35d236eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 11305c35d236eSmrg# configured tree to be moved without reconfiguration. 11306c35d236eSmrg 11307c35d236eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1130814210e8eSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1130914210e8eSmrg# Expand $ac_aux_dir to an absolute path. 1131014210e8eSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 11311c35d236eSmrg]) 11312c35d236eSmrg 11313c35d236eSmrg# AM_CONDITIONAL -*- Autoconf -*- 11314c35d236eSmrg 1131514210e8eSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11316c35d236eSmrg# 11317c35d236eSmrg# This file is free software; the Free Software Foundation 11318c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11319c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11320c35d236eSmrg 11321c35d236eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11322c35d236eSmrg# ------------------------------------- 11323c35d236eSmrg# Define a conditional. 11324c35d236eSmrgAC_DEFUN([AM_CONDITIONAL], 1132514210e8eSmrg[AC_PREREQ([2.52])dnl 1132614210e8eSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1132714210e8eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 113284f6cd06fSmrgAC_SUBST([$1_TRUE])dnl 113294f6cd06fSmrgAC_SUBST([$1_FALSE])dnl 113304f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 113314f6cd06fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11332518bcf38Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11333c35d236eSmrgif $2; then 11334c35d236eSmrg $1_TRUE= 11335c35d236eSmrg $1_FALSE='#' 11336c35d236eSmrgelse 11337c35d236eSmrg $1_TRUE='#' 11338c35d236eSmrg $1_FALSE= 11339c35d236eSmrgfi 11340c35d236eSmrgAC_CONFIG_COMMANDS_PRE( 11341c35d236eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11342c35d236eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 11343c35d236eSmrgUsually this means the macro was only invoked conditionally.]]) 11344c35d236eSmrgfi])]) 11345c35d236eSmrg 1134614210e8eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11347c35d236eSmrg# 11348c35d236eSmrg# This file is free software; the Free Software Foundation 11349c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11350c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11351c35d236eSmrg 11352c35d236eSmrg 1135314210e8eSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11354c35d236eSmrg# written in clear, in which case automake, when reading aclocal.m4, 11355c35d236eSmrg# will think it sees a *use*, and therefore will trigger all it's 11356c35d236eSmrg# C support machinery. Also note that it means that autoscan, seeing 11357c35d236eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11358c35d236eSmrg 11359c35d236eSmrg 11360c35d236eSmrg# _AM_DEPENDENCIES(NAME) 11361c35d236eSmrg# ---------------------- 11362c35d236eSmrg# See how the compiler implements dependency checking. 1136314210e8eSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11364c35d236eSmrg# We try a few techniques and use that to set a single cache variable. 11365c35d236eSmrg# 11366c35d236eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11367c35d236eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11368c35d236eSmrg# dependency, and given that the user is not expected to run this macro, 11369c35d236eSmrg# just rely on AC_PROG_CC. 11370c35d236eSmrgAC_DEFUN([_AM_DEPENDENCIES], 11371c35d236eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11372c35d236eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11373c35d236eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11374c35d236eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11375c35d236eSmrg 1137614210e8eSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1137714210e8eSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1137814210e8eSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1137914210e8eSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1138014210e8eSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1138114210e8eSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1138214210e8eSmrg [depcc="$$1" am_compiler_list=]) 11383c35d236eSmrg 11384c35d236eSmrgAC_CACHE_CHECK([dependency style of $depcc], 11385c35d236eSmrg [am_cv_$1_dependencies_compiler_type], 11386c35d236eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11387c35d236eSmrg # We make a subdir and do the tests there. Otherwise we can end up 11388c35d236eSmrg # making bogus files that we don't know about and never remove. For 11389c35d236eSmrg # instance it was reported that on HP-UX the gcc test will end up 1139014210e8eSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1139114210e8eSmrg # in D". 113921fb744b4Smrg rm -rf conftest.dir 11393c35d236eSmrg mkdir conftest.dir 11394c35d236eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 11395c35d236eSmrg # using a relative directory. 11396c35d236eSmrg cp "$am_depcomp" conftest.dir 11397c35d236eSmrg cd conftest.dir 11398c35d236eSmrg # We will build objects and dependencies in a subdirectory because 11399c35d236eSmrg # it helps to detect inapplicable dependency modes. For instance 11400c35d236eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 11401c35d236eSmrg # side effect of compilation, but ICC will put the dependencies in 11402c35d236eSmrg # the current directory while Tru64 will put them in the object 11403c35d236eSmrg # directory. 11404c35d236eSmrg mkdir sub 11405c35d236eSmrg 11406c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 11407c35d236eSmrg if test "$am_compiler_list" = ""; then 11408c35d236eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11409c35d236eSmrg fi 11410518bcf38Smrg am__universal=false 11411518bcf38Smrg m4_case([$1], [CC], 11412518bcf38Smrg [case " $depcc " in #( 11413518bcf38Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11414518bcf38Smrg esac], 11415518bcf38Smrg [CXX], 11416518bcf38Smrg [case " $depcc " in #( 11417518bcf38Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11418518bcf38Smrg esac]) 11419518bcf38Smrg 11420c35d236eSmrg for depmode in $am_compiler_list; do 11421c35d236eSmrg # Setup a source with many dependencies, because some compilers 11422c35d236eSmrg # like to wrap large dependency lists on column 80 (with \), and 11423c35d236eSmrg # we should not choose a depcomp mode which is confused by this. 11424c35d236eSmrg # 11425c35d236eSmrg # We need to recreate these files for each test, as the compiler may 11426c35d236eSmrg # overwrite some of them when testing with obscure command lines. 11427c35d236eSmrg # This happens at least with the AIX C compiler. 11428c35d236eSmrg : > sub/conftest.c 11429c35d236eSmrg for i in 1 2 3 4 5 6; do 11430c35d236eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1143114210e8eSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1143214210e8eSmrg # Solaris 10 /bin/sh. 1143314210e8eSmrg echo '/* dummy */' > sub/conftst$i.h 11434c35d236eSmrg done 11435c35d236eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11436c35d236eSmrg 1143714210e8eSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11438518bcf38Smrg # mode. It turns out that the SunPro C++ compiler does not properly 1143914210e8eSmrg # handle '-M -o', and we need to detect this. Also, some Intel 1144014210e8eSmrg # versions had trouble with output in subdirs. 11441518bcf38Smrg am__obj=sub/conftest.${OBJEXT-o} 11442518bcf38Smrg am__minus_obj="-o $am__obj" 11443c35d236eSmrg case $depmode in 11444518bcf38Smrg gcc) 11445518bcf38Smrg # This depmode causes a compiler race in universal mode. 11446518bcf38Smrg test "$am__universal" = false || continue 11447518bcf38Smrg ;; 11448c35d236eSmrg nosideeffect) 1144914210e8eSmrg # After this tag, mechanisms are not by side-effect, so they'll 1145014210e8eSmrg # only be used when explicitly requested. 11451c35d236eSmrg if test "x$enable_dependency_tracking" = xyes; then 11452c35d236eSmrg continue 11453c35d236eSmrg else 11454c35d236eSmrg break 11455c35d236eSmrg fi 11456c35d236eSmrg ;; 114571fb744b4Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1145814210e8eSmrg # This compiler won't grok '-c -o', but also, the minuso test has 11459518bcf38Smrg # not run yet. These depmodes are late enough in the game, and 11460518bcf38Smrg # so weak that their functioning should not be impacted. 11461518bcf38Smrg am__obj=conftest.${OBJEXT-o} 11462518bcf38Smrg am__minus_obj= 11463518bcf38Smrg ;; 11464c35d236eSmrg none) break ;; 11465c35d236eSmrg esac 11466c35d236eSmrg if depmode=$depmode \ 11467518bcf38Smrg source=sub/conftest.c object=$am__obj \ 11468c35d236eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11469518bcf38Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11470c35d236eSmrg >/dev/null 2>conftest.err && 114714f6cd06fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11472c35d236eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11473518bcf38Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11474c35d236eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11475c35d236eSmrg # icc doesn't choke on unknown options, it will just issue warnings 11476c35d236eSmrg # or remarks (even with -Werror). So we grep stderr for any message 11477c35d236eSmrg # that says an option was ignored or not supported. 11478c35d236eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11479c35d236eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 11480c35d236eSmrg # The diagnosis changed in icc 8.0: 11481c35d236eSmrg # icc: Command line remark: option '-MP' not supported 11482c35d236eSmrg if (grep 'ignoring option' conftest.err || 11483c35d236eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11484c35d236eSmrg am_cv_$1_dependencies_compiler_type=$depmode 11485c35d236eSmrg break 11486c35d236eSmrg fi 11487c35d236eSmrg fi 11488c35d236eSmrg done 11489c35d236eSmrg 11490c35d236eSmrg cd .. 11491c35d236eSmrg rm -rf conftest.dir 11492c35d236eSmrgelse 11493c35d236eSmrg am_cv_$1_dependencies_compiler_type=none 11494c35d236eSmrgfi 11495c35d236eSmrg]) 11496c35d236eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11497c35d236eSmrgAM_CONDITIONAL([am__fastdep$1], [ 11498c35d236eSmrg test "x$enable_dependency_tracking" != xno \ 11499c35d236eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11500c35d236eSmrg]) 11501c35d236eSmrg 11502c35d236eSmrg 11503c35d236eSmrg# AM_SET_DEPDIR 11504c35d236eSmrg# ------------- 11505c35d236eSmrg# Choose a directory name for dependency files. 1150614210e8eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11507c35d236eSmrgAC_DEFUN([AM_SET_DEPDIR], 11508c35d236eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11509c35d236eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11510c35d236eSmrg]) 11511c35d236eSmrg 11512c35d236eSmrg 11513c35d236eSmrg# AM_DEP_TRACK 11514c35d236eSmrg# ------------ 11515c35d236eSmrgAC_DEFUN([AM_DEP_TRACK], 1151614210e8eSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 1151714210e8eSmrgAS_HELP_STRING( 1151814210e8eSmrg [--enable-dependency-tracking], 1151914210e8eSmrg [do not reject slow dependency extractors]) 1152014210e8eSmrgAS_HELP_STRING( 1152114210e8eSmrg [--disable-dependency-tracking], 1152214210e8eSmrg [speeds up one-time build])]) 11523c35d236eSmrgif test "x$enable_dependency_tracking" != xno; then 11524c35d236eSmrg am_depcomp="$ac_aux_dir/depcomp" 11525c35d236eSmrg AMDEPBACKSLASH='\' 115261fb744b4Smrg am__nodep='_no' 11527c35d236eSmrgfi 11528c35d236eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 115294f6cd06fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 115304f6cd06fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 115311fb744b4SmrgAC_SUBST([am__nodep])dnl 115321fb744b4Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11533c35d236eSmrg]) 11534c35d236eSmrg 11535c35d236eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11536c35d236eSmrg 1153714210e8eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11538c35d236eSmrg# 11539c35d236eSmrg# This file is free software; the Free Software Foundation 11540c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11541c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11542c35d236eSmrg 11543c35d236eSmrg 11544c35d236eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11545c35d236eSmrg# ------------------------------ 11546c35d236eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11547518bcf38Smrg[{ 1154814210e8eSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11549518bcf38Smrg # are listed without --file. Let's play safe and only enable the eval 11550518bcf38Smrg # if we detect the quoting. 11551518bcf38Smrg case $CONFIG_FILES in 11552518bcf38Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11553518bcf38Smrg *) set x $CONFIG_FILES ;; 11554518bcf38Smrg esac 11555518bcf38Smrg shift 11556518bcf38Smrg for mf 11557518bcf38Smrg do 11558518bcf38Smrg # Strip MF so we end up with the name of the file. 11559518bcf38Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11560518bcf38Smrg # Check whether this is an Automake generated Makefile or not. 1156114210e8eSmrg # We used to match only the files named 'Makefile.in', but 11562518bcf38Smrg # some people rename them; so instead we look at the file content. 11563518bcf38Smrg # Grep'ing the first line is not enough: some people post-process 11564518bcf38Smrg # each Makefile.in and add a new line on top of each file to say so. 11565518bcf38Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11566518bcf38Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11567518bcf38Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11568518bcf38Smrg dirpart=`AS_DIRNAME("$mf")` 11569518bcf38Smrg else 11570518bcf38Smrg continue 11571518bcf38Smrg fi 11572518bcf38Smrg # Extract the definition of DEPDIR, am__include, and am__quote 1157314210e8eSmrg # from the Makefile without running 'make'. 11574518bcf38Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11575518bcf38Smrg test -z "$DEPDIR" && continue 11576518bcf38Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 1157714210e8eSmrg test -z "$am__include" && continue 11578518bcf38Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11579518bcf38Smrg # Find all dependency output files, they are included files with 11580518bcf38Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11581518bcf38Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11582518bcf38Smrg # expansion. 11583518bcf38Smrg for file in `sed -n " 11584518bcf38Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1158514210e8eSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11586518bcf38Smrg # Make sure the directory exists. 11587518bcf38Smrg test -f "$dirpart/$file" && continue 11588518bcf38Smrg fdir=`AS_DIRNAME(["$file"])` 11589518bcf38Smrg AS_MKDIR_P([$dirpart/$fdir]) 11590518bcf38Smrg # echo "creating $dirpart/$file" 11591518bcf38Smrg echo '# dummy' > "$dirpart/$file" 11592518bcf38Smrg done 11593c35d236eSmrg done 11594518bcf38Smrg} 11595c35d236eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11596c35d236eSmrg 11597c35d236eSmrg 11598c35d236eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11599c35d236eSmrg# ----------------------------- 11600c35d236eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 11601c35d236eSmrg# 11602c35d236eSmrg# This code is only required when automatic dependency tracking 1160314210e8eSmrg# is enabled. FIXME. This creates each '.P' file that we will 11604c35d236eSmrg# need in order to bootstrap the dependency handling code. 11605c35d236eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11606c35d236eSmrg[AC_CONFIG_COMMANDS([depfiles], 11607c35d236eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11608c35d236eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11609c35d236eSmrg]) 11610c35d236eSmrg 11611c35d236eSmrg# Do all the work for Automake. -*- Autoconf -*- 11612c35d236eSmrg 1161314210e8eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11614c35d236eSmrg# 11615c35d236eSmrg# This file is free software; the Free Software Foundation 11616c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11617c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11618c35d236eSmrg 11619c35d236eSmrg# This macro actually does too much. Some checks are only needed if 11620c35d236eSmrg# your package does certain things. But this isn't really a big deal. 11621c35d236eSmrg 1162214210e8eSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1162314210e8eSmrgm4_define([AC_PROG_CC], 1162414210e8eSmrgm4_defn([AC_PROG_CC]) 1162514210e8eSmrg[_AM_PROG_CC_C_O 1162614210e8eSmrg]) 1162714210e8eSmrg 11628c35d236eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11629c35d236eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 11630c35d236eSmrg# ----------------------------------------------- 11631c35d236eSmrg# The call with PACKAGE and VERSION arguments is the old style 11632c35d236eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11633c35d236eSmrg# and VERSION should now be passed to AC_INIT and removed from 11634c35d236eSmrg# the call to AM_INIT_AUTOMAKE. 11635c35d236eSmrg# We support both call styles for the transition. After 11636c35d236eSmrg# the next Automake release, Autoconf can make the AC_INIT 11637c35d236eSmrg# arguments mandatory, and then we can depend on a new Autoconf 11638c35d236eSmrg# release and drop the old call support. 11639c35d236eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1164014210e8eSmrg[AC_PREREQ([2.65])dnl 11641c35d236eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11642c35d236eSmrgdnl the ones we care about. 11643c35d236eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11644c35d236eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11645c35d236eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 116464f6cd06fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 116474f6cd06fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 116484f6cd06fSmrg # is not polluted with repeated "-I." 116494f6cd06fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 116504f6cd06fSmrg # test to see if srcdir already configured 116514f6cd06fSmrg if test -f $srcdir/config.status; then 116524f6cd06fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 116534f6cd06fSmrg fi 11654c35d236eSmrgfi 11655c35d236eSmrg 11656c35d236eSmrg# test whether we have cygpath 11657c35d236eSmrgif test -z "$CYGPATH_W"; then 11658c35d236eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11659c35d236eSmrg CYGPATH_W='cygpath -w' 11660c35d236eSmrg else 11661c35d236eSmrg CYGPATH_W=echo 11662c35d236eSmrg fi 11663c35d236eSmrgfi 11664c35d236eSmrgAC_SUBST([CYGPATH_W]) 11665c35d236eSmrg 11666c35d236eSmrg# Define the identity of the package. 11667c35d236eSmrgdnl Distinguish between old-style and new-style calls. 11668c35d236eSmrgm4_ifval([$2], 1166914210e8eSmrg[AC_DIAGNOSE([obsolete], 1167014210e8eSmrg [$0: two- and three-arguments forms are deprecated.]) 1167114210e8eSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11672c35d236eSmrg AC_SUBST([PACKAGE], [$1])dnl 11673c35d236eSmrg AC_SUBST([VERSION], [$2])], 11674c35d236eSmrg[_AM_SET_OPTIONS([$1])dnl 116754f6cd06fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1167614210e8eSmrgm4_if( 1167714210e8eSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1167814210e8eSmrg [ok:ok],, 116794f6cd06fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11680c35d236eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11681c35d236eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11682c35d236eSmrg 11683c35d236eSmrg_AM_IF_OPTION([no-define],, 1168414210e8eSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1168514210e8eSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11686c35d236eSmrg 11687c35d236eSmrg# Some tools Automake needs. 11688c35d236eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11689c35d236eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1169014210e8eSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1169114210e8eSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 1169214210e8eSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1169314210e8eSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 1169414210e8eSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11695518bcf38SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11696518bcf38SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1169714210e8eSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1169814210e8eSmrg# For better backward compatibility. To be removed once Automake 1.9.x 1169914210e8eSmrg# dies out for good. For more background, see: 1170014210e8eSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1170114210e8eSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1170214210e8eSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1170314210e8eSmrg# We need awk for the "check" target (and possibly the TAP driver). The 1170414210e8eSmrg# system "awk" is bad on some platforms. 11705c35d236eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11706c35d236eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11707c35d236eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11708c35d236eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11709518bcf38Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11710518bcf38Smrg [_AM_PROG_TAR([v7])])]) 11711c35d236eSmrg_AM_IF_OPTION([no-dependencies],, 11712c35d236eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1171314210e8eSmrg [_AM_DEPENDENCIES([CC])], 1171414210e8eSmrg [m4_define([AC_PROG_CC], 1171514210e8eSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11716c35d236eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1171714210e8eSmrg [_AM_DEPENDENCIES([CXX])], 1171814210e8eSmrg [m4_define([AC_PROG_CXX], 1171914210e8eSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 117204f6cd06fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1172114210e8eSmrg [_AM_DEPENDENCIES([OBJC])], 1172214210e8eSmrg [m4_define([AC_PROG_OBJC], 1172314210e8eSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1172414210e8eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1172514210e8eSmrg [_AM_DEPENDENCIES([OBJCXX])], 1172614210e8eSmrg [m4_define([AC_PROG_OBJCXX], 1172714210e8eSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11728c35d236eSmrg]) 1172914210e8eSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 1173014210e8eSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 1173114210e8eSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1173214210e8eSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11733518bcf38SmrgAC_CONFIG_COMMANDS_PRE(dnl 11734518bcf38Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11735518bcf38Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1173614210e8eSmrg 1173714210e8eSmrg# POSIX will say in a future version that running "rm -f" with no argument 1173814210e8eSmrg# is OK; and we want to be able to make that assumption in our Makefile 1173914210e8eSmrg# recipes. So use an aggressive probe to check that the usage we want is 1174014210e8eSmrg# actually supported "in the wild" to an acceptable degree. 1174114210e8eSmrg# See automake bug#10828. 1174214210e8eSmrg# To make any issue more visible, cause the running configure to be aborted 1174314210e8eSmrg# by default if the 'rm' program in use doesn't match our expectations; the 1174414210e8eSmrg# user can still override this though. 1174514210e8eSmrgif rm -f && rm -fr && rm -rf; then : OK; else 1174614210e8eSmrg cat >&2 <<'END' 1174714210e8eSmrgOops! 1174814210e8eSmrg 1174914210e8eSmrgYour 'rm' program seems unable to run without file operands specified 1175014210e8eSmrgon the command line, even when the '-f' option is present. This is contrary 1175114210e8eSmrgto the behaviour of most rm programs out there, and not conforming with 1175214210e8eSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1175314210e8eSmrg 1175414210e8eSmrgPlease tell bug-automake@gnu.org about your system, including the value 1175514210e8eSmrgof your $PATH and any error possibly output before this message. This 1175614210e8eSmrgcan help us improve future automake versions. 1175714210e8eSmrg 1175814210e8eSmrgEND 1175914210e8eSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1176014210e8eSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 1176114210e8eSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1176214210e8eSmrg echo >&2 1176314210e8eSmrg else 1176414210e8eSmrg cat >&2 <<'END' 1176514210e8eSmrgAborting the configuration process, to ensure you take notice of the issue. 1176614210e8eSmrg 1176714210e8eSmrgYou can download and install GNU coreutils to get an 'rm' implementation 1176814210e8eSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 1176914210e8eSmrg 1177014210e8eSmrgIf you want to complete the configuration process using your problematic 1177114210e8eSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1177214210e8eSmrgto "yes", and re-run configure. 1177314210e8eSmrg 1177414210e8eSmrgEND 1177514210e8eSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1177614210e8eSmrg fi 1177714210e8eSmrgfi 1177814210e8eSmrgdnl The trailing newline in this macro's definition is deliberate, for 1177914210e8eSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 1178014210e8eSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11781c35d236eSmrg]) 11782c35d236eSmrg 1178314210e8eSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11784518bcf38Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11785518bcf38Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11786518bcf38Smrgm4_define([_AC_COMPILER_EXEEXT], 11787518bcf38Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11788518bcf38Smrg 11789c35d236eSmrg# When config.status generates a header, we must update the stamp-h file. 11790c35d236eSmrg# This file resides in the same directory as the config header 11791c35d236eSmrg# that is generated. The stamp files are numbered to have different names. 11792c35d236eSmrg 11793c35d236eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11794c35d236eSmrg# loop where config.status creates the headers, so we can generate 11795c35d236eSmrg# our stamp files there. 11796c35d236eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11797c35d236eSmrg[# Compute $1's index in $config_headers. 117984f6cd06fSmrg_am_arg=$1 11799c35d236eSmrg_am_stamp_count=1 11800c35d236eSmrgfor _am_header in $config_headers :; do 11801c35d236eSmrg case $_am_header in 118024f6cd06fSmrg $_am_arg | $_am_arg:* ) 11803c35d236eSmrg break ;; 11804c35d236eSmrg * ) 11805c35d236eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11806c35d236eSmrg esac 11807c35d236eSmrgdone 118084f6cd06fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11809c35d236eSmrg 1181014210e8eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11811c35d236eSmrg# 11812c35d236eSmrg# This file is free software; the Free Software Foundation 11813c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11814c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11815c35d236eSmrg 11816c35d236eSmrg# AM_PROG_INSTALL_SH 11817c35d236eSmrg# ------------------ 11818c35d236eSmrg# Define $install_sh. 11819c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11820c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1182114210e8eSmrgif test x"${install_sh+set}" != xset; then 11822518bcf38Smrg case $am_aux_dir in 11823518bcf38Smrg *\ * | *\ *) 11824518bcf38Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11825518bcf38Smrg *) 11826518bcf38Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11827518bcf38Smrg esac 11828518bcf38Smrgfi 1182914210e8eSmrgAC_SUBST([install_sh])]) 11830c35d236eSmrg 1183114210e8eSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 11832c35d236eSmrg# 11833c35d236eSmrg# This file is free software; the Free Software Foundation 11834c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11835c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11836c35d236eSmrg 11837c35d236eSmrg# Check whether the underlying file-system supports filenames 11838c35d236eSmrg# with a leading dot. For instance MS-DOS doesn't. 11839c35d236eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11840c35d236eSmrg[rm -rf .tst 2>/dev/null 11841c35d236eSmrgmkdir .tst 2>/dev/null 11842c35d236eSmrgif test -d .tst; then 11843c35d236eSmrg am__leading_dot=. 11844c35d236eSmrgelse 11845c35d236eSmrg am__leading_dot=_ 11846c35d236eSmrgfi 11847c35d236eSmrgrmdir .tst 2>/dev/null 11848c35d236eSmrgAC_SUBST([am__leading_dot])]) 11849c35d236eSmrg 11850c35d236eSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11851c35d236eSmrg# From Jim Meyering 11852c35d236eSmrg 1185314210e8eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11854c35d236eSmrg# 11855c35d236eSmrg# This file is free software; the Free Software Foundation 11856c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11857c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11858c35d236eSmrg 11859518bcf38Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11860518bcf38Smrg# ---------------------------------- 11861518bcf38Smrg# Control maintainer-specific portions of Makefiles. 1186214210e8eSmrg# Default is to disable them, unless 'enable' is passed literally. 1186314210e8eSmrg# For symmetry, 'disable' may be passed as well. Anyway, the user 11864518bcf38Smrg# can override the default with the --enable/--disable switch. 11865c35d236eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 11866518bcf38Smrg[m4_case(m4_default([$1], [disable]), 11867518bcf38Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11868518bcf38Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11869518bcf38Smrg [m4_define([am_maintainer_other], [enable]) 11870518bcf38Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 118711fb744b4SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11872518bcf38Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11873518bcf38Smrg AC_ARG_ENABLE([maintainer-mode], 1187414210e8eSmrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 1187514210e8eSmrg am_maintainer_other[ make rules and dependencies not useful 1187614210e8eSmrg (and sometimes confusing) to the casual installer])], 1187714210e8eSmrg [USE_MAINTAINER_MODE=$enableval], 1187814210e8eSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11879c35d236eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11880518bcf38Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11881c35d236eSmrg MAINT=$MAINTAINER_MODE_TRUE 11882518bcf38Smrg AC_SUBST([MAINT])dnl 11883c35d236eSmrg] 11884c35d236eSmrg) 11885c35d236eSmrg 11886c35d236eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11887c35d236eSmrg 1188814210e8eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11889c35d236eSmrg# 11890c35d236eSmrg# This file is free software; the Free Software Foundation 11891c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11892c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11893c35d236eSmrg 11894c35d236eSmrg# AM_MAKE_INCLUDE() 11895c35d236eSmrg# ----------------- 11896c35d236eSmrg# Check to see how make treats includes. 11897c35d236eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11898c35d236eSmrg[am_make=${MAKE-make} 11899c35d236eSmrgcat > confinc << 'END' 11900c35d236eSmrgam__doit: 11901518bcf38Smrg @echo this is the am__doit target 11902c35d236eSmrg.PHONY: am__doit 11903c35d236eSmrgEND 11904c35d236eSmrg# If we don't find an include directive, just comment out the code. 11905c35d236eSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11906c35d236eSmrgam__include="#" 11907c35d236eSmrgam__quote= 11908c35d236eSmrg_am_result=none 11909c35d236eSmrg# First try GNU make style include. 11910c35d236eSmrgecho "include confinc" > confmf 1191114210e8eSmrg# Ignore all kinds of additional output from 'make'. 11912518bcf38Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11913518bcf38Smrg*the\ am__doit\ target*) 11914518bcf38Smrg am__include=include 11915518bcf38Smrg am__quote= 11916518bcf38Smrg _am_result=GNU 11917518bcf38Smrg ;; 11918518bcf38Smrgesac 11919c35d236eSmrg# Now try BSD make style include. 11920c35d236eSmrgif test "$am__include" = "#"; then 11921c35d236eSmrg echo '.include "confinc"' > confmf 11922518bcf38Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11923518bcf38Smrg *the\ am__doit\ target*) 11924518bcf38Smrg am__include=.include 11925518bcf38Smrg am__quote="\"" 11926518bcf38Smrg _am_result=BSD 11927518bcf38Smrg ;; 11928518bcf38Smrg esac 11929c35d236eSmrgfi 11930c35d236eSmrgAC_SUBST([am__include]) 11931c35d236eSmrgAC_SUBST([am__quote]) 11932c35d236eSmrgAC_MSG_RESULT([$_am_result]) 11933c35d236eSmrgrm -f confinc confmf 11934c35d236eSmrg]) 11935c35d236eSmrg 11936c35d236eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11937c35d236eSmrg 1193814210e8eSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11939c35d236eSmrg# 11940c35d236eSmrg# This file is free software; the Free Software Foundation 11941c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11942c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11943c35d236eSmrg 11944c35d236eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 11945c35d236eSmrg# ------------------------------ 11946c35d236eSmrgAC_DEFUN([AM_MISSING_PROG], 11947c35d236eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11948c35d236eSmrg$1=${$1-"${am_missing_run}$2"} 11949c35d236eSmrgAC_SUBST($1)]) 11950c35d236eSmrg 11951c35d236eSmrg# AM_MISSING_HAS_RUN 11952c35d236eSmrg# ------------------ 1195314210e8eSmrg# Define MISSING if not defined so far and test if it is modern enough. 1195414210e8eSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11955c35d236eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11956c35d236eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 119574f6cd06fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11958518bcf38Smrgif test x"${MISSING+set}" != xset; then 11959518bcf38Smrg case $am_aux_dir in 11960518bcf38Smrg *\ * | *\ *) 11961518bcf38Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11962518bcf38Smrg *) 11963518bcf38Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11964518bcf38Smrg esac 11965518bcf38Smrgfi 11966c35d236eSmrg# Use eval to expand $SHELL 1196714210e8eSmrgif eval "$MISSING --is-lightweight"; then 1196814210e8eSmrg am_missing_run="$MISSING " 11969c35d236eSmrgelse 11970c35d236eSmrg am_missing_run= 1197114210e8eSmrg AC_MSG_WARN(['missing' script is too old or missing]) 11972c35d236eSmrgfi 11973c35d236eSmrg]) 11974c35d236eSmrg 11975c35d236eSmrg# Helper functions for option handling. -*- Autoconf -*- 11976c35d236eSmrg 1197714210e8eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11978c35d236eSmrg# 11979c35d236eSmrg# This file is free software; the Free Software Foundation 11980c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 11981c35d236eSmrg# with or without modifications, as long as this notice is preserved. 11982c35d236eSmrg 11983c35d236eSmrg# _AM_MANGLE_OPTION(NAME) 11984c35d236eSmrg# ----------------------- 11985c35d236eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 11986c35d236eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11987c35d236eSmrg 11988c35d236eSmrg# _AM_SET_OPTION(NAME) 119891fb744b4Smrg# -------------------- 11990c35d236eSmrg# Set option NAME. Presently that only means defining a flag for this option. 11991c35d236eSmrgAC_DEFUN([_AM_SET_OPTION], 1199214210e8eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11993c35d236eSmrg 11994c35d236eSmrg# _AM_SET_OPTIONS(OPTIONS) 119951fb744b4Smrg# ------------------------ 11996c35d236eSmrg# OPTIONS is a space-separated list of Automake options. 11997c35d236eSmrgAC_DEFUN([_AM_SET_OPTIONS], 11998f55e6a01Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11999c35d236eSmrg 12000c35d236eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12001c35d236eSmrg# ------------------------------------------- 12002c35d236eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12003c35d236eSmrgAC_DEFUN([_AM_IF_OPTION], 12004c35d236eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12005c35d236eSmrg 1200614210e8eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1200714210e8eSmrg# 1200814210e8eSmrg# This file is free software; the Free Software Foundation 1200914210e8eSmrg# gives unlimited permission to copy and/or distribute it, 1201014210e8eSmrg# with or without modifications, as long as this notice is preserved. 1201114210e8eSmrg 1201214210e8eSmrg# _AM_PROG_CC_C_O 1201314210e8eSmrg# --------------- 1201414210e8eSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1201514210e8eSmrg# to automatically call this. 1201614210e8eSmrgAC_DEFUN([_AM_PROG_CC_C_O], 1201714210e8eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1201814210e8eSmrgAC_REQUIRE_AUX_FILE([compile])dnl 1201914210e8eSmrgAC_LANG_PUSH([C])dnl 1202014210e8eSmrgAC_CACHE_CHECK( 1202114210e8eSmrg [whether $CC understands -c and -o together], 1202214210e8eSmrg [am_cv_prog_cc_c_o], 1202314210e8eSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1202414210e8eSmrg # Make sure it works both with $CC and with simple cc. 1202514210e8eSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 1202614210e8eSmrg # compilers refuse to overwrite an existing .o file with -o, 1202714210e8eSmrg # though they will create one. 1202814210e8eSmrg am_cv_prog_cc_c_o=yes 1202914210e8eSmrg for am_i in 1 2; do 1203014210e8eSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1203114210e8eSmrg && test -f conftest2.$ac_objext; then 1203214210e8eSmrg : OK 1203314210e8eSmrg else 1203414210e8eSmrg am_cv_prog_cc_c_o=no 1203514210e8eSmrg break 1203614210e8eSmrg fi 1203714210e8eSmrg done 1203814210e8eSmrg rm -f core conftest* 1203914210e8eSmrg unset am_i]) 1204014210e8eSmrgif test "$am_cv_prog_cc_c_o" != yes; then 1204114210e8eSmrg # Losing compiler, so override with the script. 1204214210e8eSmrg # FIXME: It is wrong to rewrite CC. 1204314210e8eSmrg # But if we don't then we get into trouble of one sort or another. 1204414210e8eSmrg # A longer-term fix would be to have automake use am__CC in this case, 1204514210e8eSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1204614210e8eSmrg CC="$am_aux_dir/compile $CC" 1204714210e8eSmrgfi 1204814210e8eSmrgAC_LANG_POP([C])]) 1204914210e8eSmrg 1205014210e8eSmrg# For backward compatibility. 1205114210e8eSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12052c35d236eSmrg 1205314210e8eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12054c35d236eSmrg# 12055c35d236eSmrg# This file is free software; the Free Software Foundation 12056c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 12057c35d236eSmrg# with or without modifications, as long as this notice is preserved. 12058c35d236eSmrg 1205914210e8eSmrg# AM_RUN_LOG(COMMAND) 1206014210e8eSmrg# ------------------- 1206114210e8eSmrg# Run COMMAND, save the exit status in ac_status, and log it. 1206214210e8eSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1206314210e8eSmrgAC_DEFUN([AM_RUN_LOG], 1206414210e8eSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1206514210e8eSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1206614210e8eSmrg ac_status=$? 1206714210e8eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1206814210e8eSmrg (exit $ac_status); }]) 1206914210e8eSmrg 1207014210e8eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1207114210e8eSmrg 1207214210e8eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 1207314210e8eSmrg# 1207414210e8eSmrg# This file is free software; the Free Software Foundation 1207514210e8eSmrg# gives unlimited permission to copy and/or distribute it, 1207614210e8eSmrg# with or without modifications, as long as this notice is preserved. 12077c35d236eSmrg 12078c35d236eSmrg# AM_SANITY_CHECK 12079c35d236eSmrg# --------------- 12080c35d236eSmrgAC_DEFUN([AM_SANITY_CHECK], 12081c35d236eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 12082518bcf38Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12083518bcf38Smrg# name. Accept space and tab only in the latter. 12084518bcf38Smrgam_lf=' 12085518bcf38Smrg' 12086518bcf38Smrgcase `pwd` in 12087518bcf38Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12088518bcf38Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12089518bcf38Smrgesac 12090518bcf38Smrgcase $srcdir in 12091518bcf38Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1209214210e8eSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12093518bcf38Smrgesac 12094518bcf38Smrg 1209514210e8eSmrg# Do 'set' in a subshell so we don't clobber the current shell's 12096c35d236eSmrg# arguments. Must try -L first in case configure is actually a 12097c35d236eSmrg# symlink; some systems play weird games with the mod time of symlinks 12098c35d236eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 12099c35d236eSmrg# directory). 12100c35d236eSmrgif ( 1210114210e8eSmrg am_has_slept=no 1210214210e8eSmrg for am_try in 1 2; do 1210314210e8eSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 1210414210e8eSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1210514210e8eSmrg if test "$[*]" = "X"; then 1210614210e8eSmrg # -L didn't work. 1210714210e8eSmrg set X `ls -t "$srcdir/configure" conftest.file` 1210814210e8eSmrg fi 1210914210e8eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1211014210e8eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1211114210e8eSmrg 1211214210e8eSmrg # If neither matched, then we have a broken ls. This can happen 1211314210e8eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1211414210e8eSmrg # broken ls alias from the environment. This has actually 1211514210e8eSmrg # happened. Such a system could not be considered "sane". 1211614210e8eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1211714210e8eSmrg alias in your environment]) 1211814210e8eSmrg fi 1211914210e8eSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 1212014210e8eSmrg break 1212114210e8eSmrg fi 1212214210e8eSmrg # Just in case. 1212314210e8eSmrg sleep 1 1212414210e8eSmrg am_has_slept=yes 1212514210e8eSmrg done 12126c35d236eSmrg test "$[2]" = conftest.file 12127c35d236eSmrg ) 12128c35d236eSmrgthen 12129c35d236eSmrg # Ok. 12130c35d236eSmrg : 12131c35d236eSmrgelse 12132c35d236eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 12133c35d236eSmrgCheck your system clock]) 12134c35d236eSmrgfi 1213514210e8eSmrgAC_MSG_RESULT([yes]) 1213614210e8eSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 1213714210e8eSmrg# generated files are strictly newer. 1213814210e8eSmrgam_sleep_pid= 1213914210e8eSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1214014210e8eSmrg ( sleep 1 ) & 1214114210e8eSmrg am_sleep_pid=$! 1214214210e8eSmrgfi 1214314210e8eSmrgAC_CONFIG_COMMANDS_PRE( 1214414210e8eSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 1214514210e8eSmrg if test -n "$am_sleep_pid"; then 1214614210e8eSmrg # Hide warnings about reused PIDs. 1214714210e8eSmrg wait $am_sleep_pid 2>/dev/null 1214814210e8eSmrg fi 1214914210e8eSmrg AC_MSG_RESULT([done])]) 1215014210e8eSmrgrm -f conftest.file 1215114210e8eSmrg]) 12152c35d236eSmrg 1215314210e8eSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 121541fb744b4Smrg# 121551fb744b4Smrg# This file is free software; the Free Software Foundation 121561fb744b4Smrg# gives unlimited permission to copy and/or distribute it, 121571fb744b4Smrg# with or without modifications, as long as this notice is preserved. 121581fb744b4Smrg 121591fb744b4Smrg# AM_SILENT_RULES([DEFAULT]) 121601fb744b4Smrg# -------------------------- 121611fb744b4Smrg# Enable less verbose build rules; with the default set to DEFAULT 1216214210e8eSmrg# ("yes" being less verbose, "no" or empty being verbose). 121631fb744b4SmrgAC_DEFUN([AM_SILENT_RULES], 1216414210e8eSmrg[AC_ARG_ENABLE([silent-rules], [dnl 1216514210e8eSmrgAS_HELP_STRING( 1216614210e8eSmrg [--enable-silent-rules], 1216714210e8eSmrg [less verbose build output (undo: "make V=1")]) 1216814210e8eSmrgAS_HELP_STRING( 1216914210e8eSmrg [--disable-silent-rules], 1217014210e8eSmrg [verbose build output (undo: "make V=0")])dnl 1217114210e8eSmrg]) 1217214210e8eSmrgcase $enable_silent_rules in @%:@ ((( 1217314210e8eSmrg yes) AM_DEFAULT_VERBOSITY=0;; 1217414210e8eSmrg no) AM_DEFAULT_VERBOSITY=1;; 1217514210e8eSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 121761fb744b4Smrgesac 121771fb744b4Smrgdnl 1217814210e8eSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 121791fb744b4Smrgdnl do not support nested variable expansions. 121801fb744b4Smrgdnl See automake bug#9928 and bug#10237. 121811fb744b4Smrgam_make=${MAKE-make} 121821fb744b4SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 121831fb744b4Smrg [am_cv_make_support_nested_variables], 121841fb744b4Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 121851fb744b4SmrgBAR0=false 121861fb744b4SmrgBAR1=true 121871fb744b4SmrgV=1 121881fb744b4Smrgam__doit: 121891fb744b4Smrg @$(TRUE) 121901fb744b4Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 121911fb744b4Smrg am_cv_make_support_nested_variables=yes 121921fb744b4Smrgelse 121931fb744b4Smrg am_cv_make_support_nested_variables=no 121941fb744b4Smrgfi]) 121951fb744b4Smrgif test $am_cv_make_support_nested_variables = yes; then 1219614210e8eSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 121971fb744b4Smrg AM_V='$(V)' 121981fb744b4Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 121991fb744b4Smrgelse 122001fb744b4Smrg AM_V=$AM_DEFAULT_VERBOSITY 122011fb744b4Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 122021fb744b4Smrgfi 122031fb744b4SmrgAC_SUBST([AM_V])dnl 122041fb744b4SmrgAM_SUBST_NOTMAKE([AM_V])dnl 122051fb744b4SmrgAC_SUBST([AM_DEFAULT_V])dnl 122061fb744b4SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 122071fb744b4SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 122081fb744b4SmrgAM_BACKSLASH='\' 122091fb744b4SmrgAC_SUBST([AM_BACKSLASH])dnl 122101fb744b4Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 122111fb744b4Smrg]) 122121fb744b4Smrg 1221314210e8eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12214c35d236eSmrg# 12215c35d236eSmrg# This file is free software; the Free Software Foundation 12216c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 12217c35d236eSmrg# with or without modifications, as long as this notice is preserved. 12218c35d236eSmrg 12219c35d236eSmrg# AM_PROG_INSTALL_STRIP 12220c35d236eSmrg# --------------------- 1222114210e8eSmrg# One issue with vendor 'install' (even GNU) is that you can't 12222c35d236eSmrg# specify the program used to strip binaries. This is especially 12223c35d236eSmrg# annoying in cross-compiling environments, where the build's strip 12224c35d236eSmrg# is unlikely to handle the host's binaries. 12225c35d236eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1222614210e8eSmrg# always use install-sh in "make install-strip", and initialize 12227c35d236eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 12228c35d236eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12229c35d236eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1223014210e8eSmrg# Installed binaries are usually stripped using 'strip' when the user 1223114210e8eSmrg# run "make install-strip". However 'strip' might not be the right 12232c35d236eSmrg# tool to use in cross-compilation environments, therefore Automake 1223314210e8eSmrg# will honor the 'STRIP' environment variable to overrule this program. 1223414210e8eSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12235c35d236eSmrgif test "$cross_compiling" != no; then 12236c35d236eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 12237c35d236eSmrgfi 122384f6cd06fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12239c35d236eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12240c35d236eSmrg 1224114210e8eSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 122424f6cd06fSmrg# 122434f6cd06fSmrg# This file is free software; the Free Software Foundation 122444f6cd06fSmrg# gives unlimited permission to copy and/or distribute it, 122454f6cd06fSmrg# with or without modifications, as long as this notice is preserved. 122464f6cd06fSmrg 122474f6cd06fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 122484f6cd06fSmrg# --------------------------- 122494f6cd06fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 122504f6cd06fSmrg# This macro is traced by Automake. 122514f6cd06fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 122524f6cd06fSmrg 12253518bcf38Smrg# AM_SUBST_NOTMAKE(VARIABLE) 122541fb744b4Smrg# -------------------------- 12255518bcf38Smrg# Public sister of _AM_SUBST_NOTMAKE. 12256518bcf38SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12257518bcf38Smrg 12258c35d236eSmrg# Check how to create a tarball. -*- Autoconf -*- 12259c35d236eSmrg 1226014210e8eSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 12261c35d236eSmrg# 12262c35d236eSmrg# This file is free software; the Free Software Foundation 12263c35d236eSmrg# gives unlimited permission to copy and/or distribute it, 12264c35d236eSmrg# with or without modifications, as long as this notice is preserved. 12265c35d236eSmrg 12266c35d236eSmrg# _AM_PROG_TAR(FORMAT) 12267c35d236eSmrg# -------------------- 12268c35d236eSmrg# Check how to create a tarball in format FORMAT. 1226914210e8eSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12270c35d236eSmrg# 12271c35d236eSmrg# Substitute a variable $(am__tar) that is a command 12272c35d236eSmrg# writing to stdout a FORMAT-tarball containing the directory 12273c35d236eSmrg# $tardir. 12274c35d236eSmrg# tardir=directory && $(am__tar) > result.tar 12275c35d236eSmrg# 12276c35d236eSmrg# Substitute a variable $(am__untar) that extract such 12277c35d236eSmrg# a tarball read from stdin. 12278c35d236eSmrg# $(am__untar) < result.tar 1227914210e8eSmrg# 12280c35d236eSmrgAC_DEFUN([_AM_PROG_TAR], 122811fb744b4Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 122821fb744b4Smrg# in the wild :-( We should find a proper way to deprecate it ... 122831fb744b4SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1228414210e8eSmrg 1228514210e8eSmrg# We'll loop over all known methods to create a tar archive until one works. 12286c35d236eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12287c35d236eSmrg 1228814210e8eSmrgm4_if([$1], [v7], 1228914210e8eSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1229014210e8eSmrg 1229114210e8eSmrg [m4_case([$1], 1229214210e8eSmrg [ustar], 1229314210e8eSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1229414210e8eSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1229514210e8eSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1229614210e8eSmrg # and bug#13588). 1229714210e8eSmrg am_max_uid=2097151 # 2^21 - 1 1229814210e8eSmrg am_max_gid=$am_max_uid 1229914210e8eSmrg # The $UID and $GID variables are not portable, so we need to resort 1230014210e8eSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1230114210e8eSmrg # below are definitely unexpected, so allow the users to see them 1230214210e8eSmrg # (that is, avoid stderr redirection). 1230314210e8eSmrg am_uid=`id -u || echo unknown` 1230414210e8eSmrg am_gid=`id -g || echo unknown` 1230514210e8eSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1230614210e8eSmrg if test $am_uid -le $am_max_uid; then 1230714210e8eSmrg AC_MSG_RESULT([yes]) 1230814210e8eSmrg else 1230914210e8eSmrg AC_MSG_RESULT([no]) 1231014210e8eSmrg _am_tools=none 1231114210e8eSmrg fi 1231214210e8eSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1231314210e8eSmrg if test $am_gid -le $am_max_gid; then 1231414210e8eSmrg AC_MSG_RESULT([yes]) 1231514210e8eSmrg else 1231614210e8eSmrg AC_MSG_RESULT([no]) 1231714210e8eSmrg _am_tools=none 1231814210e8eSmrg fi], 12319c35d236eSmrg 1232014210e8eSmrg [pax], 1232114210e8eSmrg [], 1232214210e8eSmrg 1232314210e8eSmrg [m4_fatal([Unknown tar format])]) 1232414210e8eSmrg 1232514210e8eSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1232614210e8eSmrg 1232714210e8eSmrg # Go ahead even if we have the value already cached. We do so because we 1232814210e8eSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1232914210e8eSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1233014210e8eSmrg 1233114210e8eSmrg for _am_tool in $_am_tools; do 1233214210e8eSmrg case $_am_tool in 1233314210e8eSmrg gnutar) 1233414210e8eSmrg for _am_tar in tar gnutar gtar; do 1233514210e8eSmrg AM_RUN_LOG([$_am_tar --version]) && break 1233614210e8eSmrg done 1233714210e8eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1233814210e8eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1233914210e8eSmrg am__untar="$_am_tar -xf -" 1234014210e8eSmrg ;; 1234114210e8eSmrg plaintar) 1234214210e8eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1234314210e8eSmrg # ustar tarball either. 1234414210e8eSmrg (tar --version) >/dev/null 2>&1 && continue 1234514210e8eSmrg am__tar='tar chf - "$$tardir"' 1234614210e8eSmrg am__tar_='tar chf - "$tardir"' 1234714210e8eSmrg am__untar='tar xf -' 1234814210e8eSmrg ;; 1234914210e8eSmrg pax) 1235014210e8eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1235114210e8eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1235214210e8eSmrg am__untar='pax -r' 1235314210e8eSmrg ;; 1235414210e8eSmrg cpio) 1235514210e8eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1235614210e8eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1235714210e8eSmrg am__untar='cpio -i -H $1 -d' 1235814210e8eSmrg ;; 1235914210e8eSmrg none) 1236014210e8eSmrg am__tar=false 1236114210e8eSmrg am__tar_=false 1236214210e8eSmrg am__untar=false 1236314210e8eSmrg ;; 1236414210e8eSmrg esac 1236514210e8eSmrg 1236614210e8eSmrg # If the value was cached, stop now. We just wanted to have am__tar 1236714210e8eSmrg # and am__untar set. 1236814210e8eSmrg test -n "${am_cv_prog_tar_$1}" && break 1236914210e8eSmrg 1237014210e8eSmrg # tar/untar a dummy directory, and stop if the command works. 1237114210e8eSmrg rm -rf conftest.dir 1237214210e8eSmrg mkdir conftest.dir 1237314210e8eSmrg echo GrepMe > conftest.dir/file 1237414210e8eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1237514210e8eSmrg rm -rf conftest.dir 1237614210e8eSmrg if test -s conftest.tar; then 1237714210e8eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1237814210e8eSmrg AM_RUN_LOG([cat conftest.dir/file]) 1237914210e8eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1238014210e8eSmrg fi 1238114210e8eSmrg done 12382c35d236eSmrg rm -rf conftest.dir 12383c35d236eSmrg 1238414210e8eSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1238514210e8eSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1238614210e8eSmrg 12387c35d236eSmrgAC_SUBST([am__tar]) 12388c35d236eSmrgAC_SUBST([am__untar]) 12389c35d236eSmrg]) # _AM_PROG_TAR 12390c35d236eSmrg 12391