19384b2f3Smrg# generated automatically by aclocal 1.13.1 -*- Autoconf -*- 29384b2f3Smrg 39384b2f3Smrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 4966bf024Smrg 5966bf024Smrg# This file is free software; the Free Software Foundation 6966bf024Smrg# gives unlimited permission to copy and/or distribute it, 7966bf024Smrg# with or without modifications, as long as this notice is preserved. 8966bf024Smrg 9966bf024Smrg# This program is distributed in the hope that it will be useful, 10966bf024Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11966bf024Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12966bf024Smrg# PARTICULAR PURPOSE. 13966bf024Smrg 149384b2f3Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 159384b2f3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 169384b2f3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 179384b2f3Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 189384b2f3Smrg[m4_warning([this file was generated for autoconf 2.69. 199384b2f3SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 209384b2f3SmrgIf you have problems, you may need to regenerate the build system entirely. 219384b2f3SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22966bf024Smrg 239384b2f3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 249384b2f3Smrg# 259384b2f3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 269384b2f3Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 279384b2f3Smrg# Foundation, Inc. 289384b2f3Smrg# Written by Gordon Matzigkeit, 1996 299384b2f3Smrg# 309384b2f3Smrg# This file is free software; the Free Software Foundation gives 319384b2f3Smrg# unlimited permission to copy and/or distribute it, with or without 329384b2f3Smrg# modifications, as long as this notice is preserved. 339384b2f3Smrg 349384b2f3Smrgm4_define([_LT_COPYING], [dnl 359384b2f3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 369384b2f3Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 379384b2f3Smrg# Foundation, Inc. 389384b2f3Smrg# Written by Gordon Matzigkeit, 1996 399384b2f3Smrg# 409384b2f3Smrg# This file is part of GNU Libtool. 419384b2f3Smrg# 429384b2f3Smrg# GNU Libtool is free software; you can redistribute it and/or 439384b2f3Smrg# modify it under the terms of the GNU General Public License as 449384b2f3Smrg# published by the Free Software Foundation; either version 2 of 459384b2f3Smrg# the License, or (at your option) any later version. 469384b2f3Smrg# 479384b2f3Smrg# As a special exception to the GNU General Public License, 489384b2f3Smrg# if you distribute this file as part of a program or library that 499384b2f3Smrg# is built using GNU Libtool, you may include this file under the 509384b2f3Smrg# same distribution terms that you use for the rest of that program. 519384b2f3Smrg# 529384b2f3Smrg# GNU Libtool is distributed in the hope that it will be useful, 53966bf024Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54966bf024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55966bf024Smrg# GNU General Public License for more details. 569384b2f3Smrg# 57966bf024Smrg# You should have received a copy of the GNU General Public License 589384b2f3Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 599384b2f3Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 609384b2f3Smrg# obtained by writing to the Free Software Foundation, Inc., 619384b2f3Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 629384b2f3Smrg]) 63966bf024Smrg 649384b2f3Smrg# serial 57 LT_INIT 65966bf024Smrg 66966bf024Smrg 679384b2f3Smrg# LT_PREREQ(VERSION) 689384b2f3Smrg# ------------------ 699384b2f3Smrg# Complain and exit if this libtool version is less that VERSION. 709384b2f3Smrgm4_defun([LT_PREREQ], 719384b2f3Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 729384b2f3Smrg [m4_default([$3], 739384b2f3Smrg [m4_fatal([Libtool version $1 or higher is required], 749384b2f3Smrg 63)])], 759384b2f3Smrg [$2])]) 76966bf024Smrg 77966bf024Smrg 789384b2f3Smrg# _LT_CHECK_BUILDDIR 799384b2f3Smrg# ------------------ 809384b2f3Smrg# Complain if the absolute build directory name contains unusual characters 819384b2f3Smrgm4_defun([_LT_CHECK_BUILDDIR], 829384b2f3Smrg[case `pwd` in 839384b2f3Smrg *\ * | *\ *) 849384b2f3Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 859384b2f3Smrgesac 869384b2f3Smrg]) 87966bf024Smrg 88966bf024Smrg 899384b2f3Smrg# LT_INIT([OPTIONS]) 909384b2f3Smrg# ------------------ 919384b2f3SmrgAC_DEFUN([LT_INIT], 929384b2f3Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 939384b2f3SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 949384b2f3SmrgAC_BEFORE([$0], [LT_LANG])dnl 959384b2f3SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 969384b2f3SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 979384b2f3Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 989384b2f3Smrg 999384b2f3Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1009384b2f3Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1019384b2f3Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1029384b2f3Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1039384b2f3Smrgdnl unless we require an AC_DEFUNed macro: 1049384b2f3SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1059384b2f3SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1069384b2f3SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1079384b2f3SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1089384b2f3Smrgm4_require([_LT_PROG_LTMAIN])dnl 1099384b2f3Smrg 1109384b2f3Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1119384b2f3Smrg 1129384b2f3Smrgdnl Parse OPTIONS 1139384b2f3Smrg_LT_SET_OPTIONS([$0], [$1]) 114966bf024Smrg 1159384b2f3Smrg# This can be used to rebuild libtool when needed 1169384b2f3SmrgLIBTOOL_DEPS="$ltmain" 117966bf024Smrg 1189384b2f3Smrg# Always use our own libtool. 1199384b2f3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1209384b2f3SmrgAC_SUBST(LIBTOOL)dnl 121966bf024Smrg 1229384b2f3Smrg_LT_SETUP 123966bf024Smrg 1249384b2f3Smrg# Only expand once: 1259384b2f3Smrgm4_define([LT_INIT]) 1269384b2f3Smrg])# LT_INIT 127966bf024Smrg 1289384b2f3Smrg# Old names: 1299384b2f3SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1309384b2f3SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1319384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 1329384b2f3Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1339384b2f3Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1349384b2f3Smrg 1359384b2f3Smrg 1369384b2f3Smrg# _LT_CC_BASENAME(CC) 1379384b2f3Smrg# ------------------- 1389384b2f3Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1399384b2f3Smrgm4_defun([_LT_CC_BASENAME], 1409384b2f3Smrg[for cc_temp in $1""; do 1419384b2f3Smrg case $cc_temp in 1429384b2f3Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1439384b2f3Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1449384b2f3Smrg \-*) ;; 1459384b2f3Smrg *) break;; 146966bf024Smrg esac 147966bf024Smrgdone 1489384b2f3Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1499384b2f3Smrg]) 150966bf024Smrg 151966bf024Smrg 1529384b2f3Smrg# _LT_FILEUTILS_DEFAULTS 1539384b2f3Smrg# ---------------------- 1549384b2f3Smrg# It is okay to use these file commands and assume they have been set 1559384b2f3Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1569384b2f3Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1579384b2f3Smrg[: ${CP="cp -f"} 1589384b2f3Smrg: ${MV="mv -f"} 1599384b2f3Smrg: ${RM="rm -f"} 1609384b2f3Smrg])# _LT_FILEUTILS_DEFAULTS 1619384b2f3Smrg 1629384b2f3Smrg 1639384b2f3Smrg# _LT_SETUP 1649384b2f3Smrg# --------- 1659384b2f3Smrgm4_defun([_LT_SETUP], 1669384b2f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1679384b2f3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1689384b2f3SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1699384b2f3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170966bf024Smrg 1719384b2f3Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1729384b2f3Smrgdnl 1739384b2f3Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1749384b2f3Smrg_LT_DECL([], [host], [0])dnl 1759384b2f3Smrg_LT_DECL([], [host_os], [0])dnl 1769384b2f3Smrgdnl 1779384b2f3Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1789384b2f3Smrg_LT_DECL([], [build], [0])dnl 1799384b2f3Smrg_LT_DECL([], [build_os], [0])dnl 1809384b2f3Smrgdnl 1819384b2f3SmrgAC_REQUIRE([AC_PROG_CC])dnl 1829384b2f3SmrgAC_REQUIRE([LT_PATH_LD])dnl 1839384b2f3SmrgAC_REQUIRE([LT_PATH_NM])dnl 1849384b2f3Smrgdnl 1859384b2f3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1869384b2f3Smrgtest -z "$LN_S" && LN_S="ln -s" 1879384b2f3Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1889384b2f3Smrgdnl 1899384b2f3SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1909384b2f3Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1919384b2f3Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1929384b2f3Smrgdnl 1939384b2f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1949384b2f3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1959384b2f3Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1969384b2f3Smrgm4_require([_LT_CMD_RELOAD])dnl 1979384b2f3Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1989384b2f3Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1999384b2f3Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2009384b2f3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2019384b2f3Smrgm4_require([_LT_WITH_SYSROOT])dnl 2029384b2f3Smrg 2039384b2f3Smrg_LT_CONFIG_LIBTOOL_INIT([ 2049384b2f3Smrg# See if we are running on zsh, and set the options which allow our 2059384b2f3Smrg# commands through without removal of \ escapes INIT. 2069384b2f3Smrgif test -n "\${ZSH_VERSION+set}" ; then 2079384b2f3Smrg setopt NO_GLOB_SUBST 2089384b2f3Smrgfi 2099384b2f3Smrg]) 2109384b2f3Smrgif test -n "${ZSH_VERSION+set}" ; then 2119384b2f3Smrg setopt NO_GLOB_SUBST 2129384b2f3Smrgfi 213966bf024Smrg 2149384b2f3Smrg_LT_CHECK_OBJDIR 215966bf024Smrg 2169384b2f3Smrgm4_require([_LT_TAG_COMPILER])dnl 217966bf024Smrg 2189384b2f3Smrgcase $host_os in 2199384b2f3Smrgaix3*) 2209384b2f3Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2219384b2f3Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2229384b2f3Smrg # vanish in a puff of smoke. 2239384b2f3Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2249384b2f3Smrg COLLECT_NAMES= 2259384b2f3Smrg export COLLECT_NAMES 2269384b2f3Smrg fi 2279384b2f3Smrg ;; 2289384b2f3Smrgesac 229966bf024Smrg 2309384b2f3Smrg# Global variables: 2319384b2f3Smrgofile=libtool 2329384b2f3Smrgcan_build_shared=yes 233966bf024Smrg 2349384b2f3Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2359384b2f3Smrg# which needs '.lib'). 2369384b2f3Smrglibext=a 237966bf024Smrg 2389384b2f3Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239966bf024Smrg 2409384b2f3Smrgold_CC="$CC" 2419384b2f3Smrgold_CFLAGS="$CFLAGS" 242966bf024Smrg 2439384b2f3Smrg# Set sane defaults for various variables 2449384b2f3Smrgtest -z "$CC" && CC=cc 2459384b2f3Smrgtest -z "$LTCC" && LTCC=$CC 2469384b2f3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2479384b2f3Smrgtest -z "$LD" && LD=ld 2489384b2f3Smrgtest -z "$ac_objext" && ac_objext=o 249966bf024Smrg 2509384b2f3Smrg_LT_CC_BASENAME([$compiler]) 251966bf024Smrg 2529384b2f3Smrg# Only perform the check for file, if the check method requires it 2539384b2f3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2549384b2f3Smrgcase $deplibs_check_method in 2559384b2f3Smrgfile_magic*) 2569384b2f3Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2579384b2f3Smrg _LT_PATH_MAGIC 2589384b2f3Smrg fi 2599384b2f3Smrg ;; 2609384b2f3Smrgesac 261966bf024Smrg 2629384b2f3Smrg# Use C for the default configuration in the libtool script 2639384b2f3SmrgLT_SUPPORTED_TAG([CC]) 2649384b2f3Smrg_LT_LANG_C_CONFIG 2659384b2f3Smrg_LT_LANG_DEFAULT_CONFIG 2669384b2f3Smrg_LT_CONFIG_COMMANDS 2679384b2f3Smrg])# _LT_SETUP 268966bf024Smrg 269966bf024Smrg 2709384b2f3Smrg# _LT_PREPARE_SED_QUOTE_VARS 2719384b2f3Smrg# -------------------------- 2729384b2f3Smrg# Define a few sed substitution that help us do robust quoting. 2739384b2f3Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2749384b2f3Smrg[# Backslashify metacharacters that are still active within 2759384b2f3Smrg# double-quoted strings. 2769384b2f3Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277966bf024Smrg 2789384b2f3Smrg# Same as above, but do not quote variable references. 2799384b2f3Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280966bf024Smrg 2819384b2f3Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2829384b2f3Smrg# double_quote_subst'ed string. 2839384b2f3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284966bf024Smrg 2859384b2f3Smrg# Sed substitution to delay expansion of an escaped single quote. 2869384b2f3Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287966bf024Smrg 2889384b2f3Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2899384b2f3Smrgno_glob_subst='s/\*/\\\*/g' 2909384b2f3Smrg]) 291966bf024Smrg 2929384b2f3Smrg# _LT_PROG_LTMAIN 2939384b2f3Smrg# --------------- 2949384b2f3Smrg# Note that this code is called both from `configure', and `config.status' 2959384b2f3Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2969384b2f3Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2979384b2f3Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2989384b2f3Smrgm4_defun([_LT_PROG_LTMAIN], 2999384b2f3Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3009384b2f3Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3019384b2f3Smrgltmain="$ac_aux_dir/ltmain.sh" 3029384b2f3Smrg])# _LT_PROG_LTMAIN 303966bf024Smrg 304966bf024Smrg 305966bf024Smrg 3069384b2f3Smrg# So that we can recreate a full libtool script including additional 3079384b2f3Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3089384b2f3Smrg# in macros and then make a single call at the end using the `libtool' 3099384b2f3Smrg# label. 310966bf024Smrg 311966bf024Smrg 3129384b2f3Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3139384b2f3Smrg# ---------------------------------------- 3149384b2f3Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3159384b2f3Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3169384b2f3Smrg[m4_ifval([$1], 3179384b2f3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3189384b2f3Smrg [$1 3199384b2f3Smrg])])]) 320966bf024Smrg 3219384b2f3Smrg# Initialize. 3229384b2f3Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323966bf024Smrg 324966bf024Smrg 3259384b2f3Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3269384b2f3Smrg# ------------------------------ 3279384b2f3Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3289384b2f3Smrgm4_define([_LT_CONFIG_LIBTOOL], 3299384b2f3Smrg[m4_ifval([$1], 3309384b2f3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3319384b2f3Smrg [$1 3329384b2f3Smrg])])]) 3339384b2f3Smrg 3349384b2f3Smrg# Initialize. 3359384b2f3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3369384b2f3Smrg 3379384b2f3Smrg 3389384b2f3Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3399384b2f3Smrg# ----------------------------------------------------- 3409384b2f3Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3419384b2f3Smrg[_LT_CONFIG_LIBTOOL([$1]) 3429384b2f3Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3439384b2f3Smrg]) 344966bf024Smrg 345966bf024Smrg 3469384b2f3Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3479384b2f3Smrg# ----------------------------- 3489384b2f3Smrg# Add leading comment marks to the start of each line, and a trailing 3499384b2f3Smrg# full-stop to the whole comment if one is not present already. 3509384b2f3Smrgm4_define([_LT_FORMAT_COMMENT], 3519384b2f3Smrg[m4_ifval([$1], [ 3529384b2f3Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3539384b2f3Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3549384b2f3Smrg)]) 3559384b2f3Smrg 3569384b2f3Smrg 3579384b2f3Smrg 3589384b2f3Smrg 3599384b2f3Smrg 3609384b2f3Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3619384b2f3Smrg# ------------------------------------------------------------------- 3629384b2f3Smrg# CONFIGNAME is the name given to the value in the libtool script. 3639384b2f3Smrg# VARNAME is the (base) name used in the configure script. 3649384b2f3Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3659384b2f3Smrg# VARNAME. Any other value will be used directly. 3669384b2f3Smrgm4_define([_LT_DECL], 3679384b2f3Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3689384b2f3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3699384b2f3Smrg [m4_ifval([$1], [$1], [$2])]) 3709384b2f3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3719384b2f3Smrg m4_ifval([$4], 3729384b2f3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3739384b2f3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3749384b2f3Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3759384b2f3Smrg]) 376966bf024Smrg 377966bf024Smrg 3789384b2f3Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3799384b2f3Smrg# -------------------------------------------------------- 3809384b2f3Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381966bf024Smrg 3829384b2f3Smrg 3839384b2f3Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3849384b2f3Smrg# ------------------------------------------------ 3859384b2f3Smrgm4_define([lt_decl_tag_varnames], 3869384b2f3Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3879384b2f3Smrg 3889384b2f3Smrg 3899384b2f3Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3909384b2f3Smrg# --------------------------------------------------------- 3919384b2f3Smrgm4_define([_lt_decl_filter], 3929384b2f3Smrg[m4_case([$#], 3939384b2f3Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3949384b2f3Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3959384b2f3Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3969384b2f3Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3979384b2f3Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398966bf024Smrg]) 399966bf024Smrg 400966bf024Smrg 4019384b2f3Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4029384b2f3Smrg# -------------------------------------------------- 4039384b2f3Smrgm4_define([lt_decl_quote_varnames], 4049384b2f3Smrg[_lt_decl_filter([value], [1], $@)]) 405966bf024Smrg 406966bf024Smrg 4079384b2f3Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4089384b2f3Smrg# --------------------------------------------------- 4099384b2f3Smrgm4_define([lt_decl_dquote_varnames], 4109384b2f3Smrg[_lt_decl_filter([value], [2], $@)]) 411966bf024Smrg 412966bf024Smrg 4139384b2f3Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4149384b2f3Smrg# --------------------------------------------------- 4159384b2f3Smrgm4_define([lt_decl_varnames_tagged], 4169384b2f3Smrg[m4_assert([$# <= 2])dnl 4179384b2f3Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4189384b2f3Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4199384b2f3Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4209384b2f3Smrgm4_define([_lt_decl_varnames_tagged], 4219384b2f3Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422966bf024Smrg 423966bf024Smrg 4249384b2f3Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4259384b2f3Smrg# ------------------------------------------------ 4269384b2f3Smrgm4_define([lt_decl_all_varnames], 4279384b2f3Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4289384b2f3Smrg m4_if([$2], [], 4299384b2f3Smrg m4_quote(lt_decl_varnames), 4309384b2f3Smrg m4_quote(m4_shift($@))))[]dnl 4319384b2f3Smrg]) 4329384b2f3Smrgm4_define([_lt_decl_all_varnames], 4339384b2f3Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4349384b2f3Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435966bf024Smrg]) 436966bf024Smrg 437966bf024Smrg 4389384b2f3Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4399384b2f3Smrg# ------------------------------------ 4409384b2f3Smrg# Quote a variable value, and forward it to `config.status' so that its 4419384b2f3Smrg# declaration there will have the same value as in `configure'. VARNAME 4429384b2f3Smrg# must have a single quote delimited value for this to work. 4439384b2f3Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4449384b2f3Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445966bf024Smrg 446966bf024Smrg 4479384b2f3Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4489384b2f3Smrg# ------------------------------ 4499384b2f3Smrg# We delimit libtool config variables with single quotes, so when 4509384b2f3Smrg# we write them to config.status, we have to be sure to quote all 4519384b2f3Smrg# embedded single quotes properly. In configure, this macro expands 4529384b2f3Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4539384b2f3Smrg# 4549384b2f3Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4559384b2f3Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4569384b2f3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4579384b2f3Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458966bf024Smrg 459966bf024Smrg 4609384b2f3Smrg# _LT_LIBTOOL_TAGS 4619384b2f3Smrg# ---------------- 4629384b2f3Smrg# Output comment and list of tags supported by the script 4639384b2f3Smrgm4_defun([_LT_LIBTOOL_TAGS], 4649384b2f3Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4659384b2f3Smrgavailable_tags="_LT_TAGS"dnl 4669384b2f3Smrg]) 467966bf024Smrg 468966bf024Smrg 4699384b2f3Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4709384b2f3Smrg# ----------------------------------- 4719384b2f3Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4729384b2f3Smrg# expand to a commented shell variable setting: 4739384b2f3Smrg# 4749384b2f3Smrg# # Some comment about what VAR is for. 4759384b2f3Smrg# visible_name=$lt_internal_name 4769384b2f3Smrgm4_define([_LT_LIBTOOL_DECLARE], 4779384b2f3Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4789384b2f3Smrg [description])))[]dnl 4799384b2f3Smrgm4_pushdef([_libtool_name], 4809384b2f3Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4819384b2f3Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4829384b2f3Smrg [0], [_libtool_name=[$]$1], 4839384b2f3Smrg [1], [_libtool_name=$lt_[]$1], 4849384b2f3Smrg [2], [_libtool_name=$lt_[]$1], 4859384b2f3Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4869384b2f3Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4879384b2f3Smrg]) 488966bf024Smrg 489966bf024Smrg 4909384b2f3Smrg# _LT_LIBTOOL_CONFIG_VARS 4919384b2f3Smrg# ----------------------- 4929384b2f3Smrg# Produce commented declarations of non-tagged libtool config variables 4939384b2f3Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4949384b2f3Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4959384b2f3Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4969384b2f3Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4979384b2f3Smrg[m4_foreach([_lt_var], 4989384b2f3Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4999384b2f3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500966bf024Smrg 501966bf024Smrg 5029384b2f3Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5039384b2f3Smrg# ------------------------- 5049384b2f3Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5059384b2f3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5069384b2f3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 507966bf024Smrg 508966bf024Smrg 5099384b2f3Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5109384b2f3Smrg# ------------------------------ 5119384b2f3Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512966bf024Smrg 513966bf024Smrg 5149384b2f3Smrg# _LT_CONFIG_COMMANDS 5159384b2f3Smrg# ------------------- 5169384b2f3Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5179384b2f3Smrg# variables for single and double quote escaping we saved from calls 5189384b2f3Smrg# to _LT_DECL, we can put quote escaped variables declarations 5199384b2f3Smrg# into `config.status', and then the shell code to quote escape them in 5209384b2f3Smrg# for loops in `config.status'. Finally, any additional code accumulated 5219384b2f3Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5229384b2f3Smrgm4_defun([_LT_CONFIG_COMMANDS], 5239384b2f3Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5249384b2f3Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5259384b2f3Smrg dnl instead of duplicating it all over again into config.status, 5269384b2f3Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5279384b2f3Smrg dnl needs to know what name is stored there: 5289384b2f3Smrg [AC_CONFIG_COMMANDS([libtool], 5299384b2f3Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5309384b2f3Smrg dnl If the libtool generation code is destined for config.status, 5319384b2f3Smrg dnl expand the accumulated commands and init code now: 5329384b2f3Smrg [AC_CONFIG_COMMANDS([libtool], 5339384b2f3Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5349384b2f3Smrg])#_LT_CONFIG_COMMANDS 5359384b2f3Smrg 5369384b2f3Smrg 5379384b2f3Smrg# Initialize. 5389384b2f3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5399384b2f3Smrg[ 540966bf024Smrg 5419384b2f3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5429384b2f3Smrg# if CDPATH is set. 5439384b2f3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5449384b2f3Smrg 5459384b2f3Smrgsed_quote_subst='$sed_quote_subst' 5469384b2f3Smrgdouble_quote_subst='$double_quote_subst' 5479384b2f3Smrgdelay_variable_subst='$delay_variable_subst' 5489384b2f3Smrg_LT_CONFIG_STATUS_DECLARATIONS 5499384b2f3SmrgLTCC='$LTCC' 5509384b2f3SmrgLTCFLAGS='$LTCFLAGS' 5519384b2f3Smrgcompiler='$compiler_DEFAULT' 5529384b2f3Smrg 5539384b2f3Smrg# A function that is used when there is no print builtin or printf. 5549384b2f3Smrgfunc_fallback_echo () 5559384b2f3Smrg{ 5569384b2f3Smrg eval 'cat <<_LTECHO_EOF 5579384b2f3Smrg\$[]1 5589384b2f3Smrg_LTECHO_EOF' 5599384b2f3Smrg} 560966bf024Smrg 5619384b2f3Smrg# Quote evaled strings. 5629384b2f3Smrgfor var in lt_decl_all_varnames([[ \ 5639384b2f3Smrg]], lt_decl_quote_varnames); do 5649384b2f3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5659384b2f3Smrg *[[\\\\\\\`\\"\\\$]]*) 5669384b2f3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5679384b2f3Smrg ;; 5689384b2f3Smrg *) 5699384b2f3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5709384b2f3Smrg ;; 5719384b2f3Smrg esac 5729384b2f3Smrgdone 573966bf024Smrg 5749384b2f3Smrg# Double-quote double-evaled strings. 5759384b2f3Smrgfor var in lt_decl_all_varnames([[ \ 5769384b2f3Smrg]], lt_decl_dquote_varnames); do 5779384b2f3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5789384b2f3Smrg *[[\\\\\\\`\\"\\\$]]*) 5799384b2f3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5809384b2f3Smrg ;; 5819384b2f3Smrg *) 5829384b2f3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5839384b2f3Smrg ;; 5849384b2f3Smrg esac 5859384b2f3Smrgdone 586966bf024Smrg 5879384b2f3Smrg_LT_OUTPUT_LIBTOOL_INIT 5889384b2f3Smrg]) 589966bf024Smrg 5909384b2f3Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5919384b2f3Smrg# ------------------------------------ 5929384b2f3Smrg# Generate a child script FILE with all initialization necessary to 5939384b2f3Smrg# reuse the environment learned by the parent script, and make the 5949384b2f3Smrg# file executable. If COMMENT is supplied, it is inserted after the 5959384b2f3Smrg# `#!' sequence but before initialization text begins. After this 5969384b2f3Smrg# macro, additional text can be appended to FILE to form the body of 5979384b2f3Smrg# the child script. The macro ends with non-zero status if the 5989384b2f3Smrg# file could not be fully written (such as if the disk is full). 5999384b2f3Smrgm4_ifdef([AS_INIT_GENERATED], 6009384b2f3Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6019384b2f3Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6029384b2f3Smrg[m4_require([AS_PREPARE])]dnl 6039384b2f3Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6049384b2f3Smrg[lt_write_fail=0 6059384b2f3Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6069384b2f3Smrg#! $SHELL 6079384b2f3Smrg# Generated by $as_me. 6089384b2f3Smrg$2 6099384b2f3SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6109384b2f3Smrgexport SHELL 6119384b2f3Smrg_ASEOF 6129384b2f3Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6139384b2f3SmrgAS_SHELL_SANITIZE 6149384b2f3Smrg_AS_PREPARE 6159384b2f3Smrgexec AS_MESSAGE_FD>&1 6169384b2f3Smrg_ASEOF 6179384b2f3Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 6189384b2f3Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6199384b2f3Smrg 6209384b2f3Smrg# LT_OUTPUT 6219384b2f3Smrg# --------- 6229384b2f3Smrg# This macro allows early generation of the libtool script (before 6239384b2f3Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6249384b2f3Smrg# tests. 6259384b2f3SmrgAC_DEFUN([LT_OUTPUT], 6269384b2f3Smrg[: ${CONFIG_LT=./config.lt} 6279384b2f3SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6289384b2f3Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6299384b2f3Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6309384b2f3Smrg 6319384b2f3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6329384b2f3Smrglt_cl_silent=false 6339384b2f3Smrgexec AS_MESSAGE_LOG_FD>>config.log 6349384b2f3Smrg{ 6359384b2f3Smrg echo 6369384b2f3Smrg AS_BOX([Running $as_me.]) 6379384b2f3Smrg} >&AS_MESSAGE_LOG_FD 638966bf024Smrg 6399384b2f3Smrglt_cl_help="\ 6409384b2f3Smrg\`$as_me' creates a local libtool stub from the current configuration, 6419384b2f3Smrgfor use in further configure time tests before the real libtool is 6429384b2f3Smrggenerated. 643966bf024Smrg 6449384b2f3SmrgUsage: $[0] [[OPTIONS]] 645966bf024Smrg 6469384b2f3Smrg -h, --help print this help, then exit 6479384b2f3Smrg -V, --version print version number, then exit 6489384b2f3Smrg -q, --quiet do not print progress messages 6499384b2f3Smrg -d, --debug don't remove temporary files 650966bf024Smrg 6519384b2f3SmrgReport bugs to <bug-libtool@gnu.org>." 652966bf024Smrg 6539384b2f3Smrglt_cl_version="\ 6549384b2f3Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6559384b2f3Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6569384b2f3Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657966bf024Smrg 6589384b2f3SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6599384b2f3SmrgThis config.lt script is free software; the Free Software Foundation 6609384b2f3Smrggives unlimited permision to copy, distribute and modify it." 661966bf024Smrg 6629384b2f3Smrgwhile test $[#] != 0 6639384b2f3Smrgdo 6649384b2f3Smrg case $[1] in 6659384b2f3Smrg --version | --v* | -V ) 6669384b2f3Smrg echo "$lt_cl_version"; exit 0 ;; 6679384b2f3Smrg --help | --h* | -h ) 6689384b2f3Smrg echo "$lt_cl_help"; exit 0 ;; 6699384b2f3Smrg --debug | --d* | -d ) 6709384b2f3Smrg debug=: ;; 6719384b2f3Smrg --quiet | --q* | --silent | --s* | -q ) 6729384b2f3Smrg lt_cl_silent=: ;; 6739384b2f3Smrg 6749384b2f3Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6759384b2f3SmrgTry \`$[0] --help' for more information.]) ;; 6769384b2f3Smrg 6779384b2f3Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6789384b2f3SmrgTry \`$[0] --help' for more information.]) ;; 6799384b2f3Smrg esac 6809384b2f3Smrg shift 6819384b2f3Smrgdone 682966bf024Smrg 6839384b2f3Smrgif $lt_cl_silent; then 6849384b2f3Smrg exec AS_MESSAGE_FD>/dev/null 6859384b2f3Smrgfi 6869384b2f3Smrg_LTEOF 6879384b2f3Smrg 6889384b2f3Smrgcat >>"$CONFIG_LT" <<_LTEOF 6899384b2f3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6909384b2f3Smrg_LTEOF 6919384b2f3Smrg 6929384b2f3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6939384b2f3SmrgAC_MSG_NOTICE([creating $ofile]) 6949384b2f3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6959384b2f3SmrgAS_EXIT(0) 6969384b2f3Smrg_LTEOF 6979384b2f3Smrgchmod +x "$CONFIG_LT" 6989384b2f3Smrg 6999384b2f3Smrg# configure is writing to config.log, but config.lt does its own redirection, 7009384b2f3Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7019384b2f3Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7029384b2f3Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7039384b2f3Smrglt_cl_success=: 7049384b2f3Smrgtest "$silent" = yes && 7059384b2f3Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7069384b2f3Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7079384b2f3Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7089384b2f3Smrgexec AS_MESSAGE_LOG_FD>>config.log 7099384b2f3Smrg$lt_cl_success || AS_EXIT(1) 7109384b2f3Smrg])# LT_OUTPUT 7119384b2f3Smrg 7129384b2f3Smrg 7139384b2f3Smrg# _LT_CONFIG(TAG) 7149384b2f3Smrg# --------------- 7159384b2f3Smrg# If TAG is the built-in tag, create an initial libtool script with a 7169384b2f3Smrg# default configuration from the untagged config vars. Otherwise add code 7179384b2f3Smrg# to config.status for appending the configuration named by TAG from the 7189384b2f3Smrg# matching tagged config vars. 7199384b2f3Smrgm4_defun([_LT_CONFIG], 7209384b2f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7219384b2f3Smrg_LT_CONFIG_SAVE_COMMANDS([ 7229384b2f3Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7239384b2f3Smrg m4_if(_LT_TAG, [C], [ 7249384b2f3Smrg # See if we are running on zsh, and set the options which allow our 7259384b2f3Smrg # commands through without removal of \ escapes. 7269384b2f3Smrg if test -n "${ZSH_VERSION+set}" ; then 7279384b2f3Smrg setopt NO_GLOB_SUBST 728966bf024Smrg fi 729966bf024Smrg 7309384b2f3Smrg cfgfile="${ofile}T" 7319384b2f3Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7329384b2f3Smrg $RM "$cfgfile" 733966bf024Smrg 7349384b2f3Smrg cat <<_LT_EOF >> "$cfgfile" 7359384b2f3Smrg#! $SHELL 736966bf024Smrg 7379384b2f3Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7389384b2f3Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7399384b2f3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7409384b2f3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7419384b2f3Smrg# 7429384b2f3Smrg_LT_COPYING 7439384b2f3Smrg_LT_LIBTOOL_TAGS 744966bf024Smrg 7459384b2f3Smrg# ### BEGIN LIBTOOL CONFIG 7469384b2f3Smrg_LT_LIBTOOL_CONFIG_VARS 7479384b2f3Smrg_LT_LIBTOOL_TAG_VARS 7489384b2f3Smrg# ### END LIBTOOL CONFIG 749966bf024Smrg 7509384b2f3Smrg_LT_EOF 7519384b2f3Smrg 7529384b2f3Smrg case $host_os in 7539384b2f3Smrg aix3*) 7549384b2f3Smrg cat <<\_LT_EOF >> "$cfgfile" 7559384b2f3Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7569384b2f3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7579384b2f3Smrg# vanish in a puff of smoke. 7589384b2f3Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7599384b2f3Smrg COLLECT_NAMES= 7609384b2f3Smrg export COLLECT_NAMES 761966bf024Smrgfi 7629384b2f3Smrg_LT_EOF 7639384b2f3Smrg ;; 7649384b2f3Smrg esac 765966bf024Smrg 7669384b2f3Smrg _LT_PROG_LTMAIN 767966bf024Smrg 7689384b2f3Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7699384b2f3Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7709384b2f3Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7719384b2f3Smrg # is reportedly fixed, but why not run on old versions too? 7729384b2f3Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 7739384b2f3Smrg || (rm -f "$cfgfile"; exit 1) 774966bf024Smrg 7759384b2f3Smrg _LT_PROG_REPLACE_SHELLFNS 776966bf024Smrg 7779384b2f3Smrg mv -f "$cfgfile" "$ofile" || 7789384b2f3Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7799384b2f3Smrg chmod +x "$ofile" 7809384b2f3Smrg], 7819384b2f3Smrg[cat <<_LT_EOF >> "$ofile" 7829384b2f3Smrg 7839384b2f3Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7849384b2f3Smrgdnl in a comment (ie after a #). 7859384b2f3Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7869384b2f3Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7879384b2f3Smrg# ### END LIBTOOL TAG CONFIG: $1 7889384b2f3Smrg_LT_EOF 7899384b2f3Smrg])dnl /m4_if 7909384b2f3Smrg], 7919384b2f3Smrg[m4_if([$1], [], [ 7929384b2f3Smrg PACKAGE='$PACKAGE' 7939384b2f3Smrg VERSION='$VERSION' 7949384b2f3Smrg TIMESTAMP='$TIMESTAMP' 7959384b2f3Smrg RM='$RM' 7969384b2f3Smrg ofile='$ofile'], []) 7979384b2f3Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7989384b2f3Smrg])# _LT_CONFIG 799966bf024Smrg 800966bf024Smrg 8019384b2f3Smrg# LT_SUPPORTED_TAG(TAG) 8029384b2f3Smrg# --------------------- 8039384b2f3Smrg# Trace this macro to discover what tags are supported by the libtool 8049384b2f3Smrg# --tag option, using: 8059384b2f3Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8069384b2f3SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807966bf024Smrg 808966bf024Smrg 8099384b2f3Smrg# C support is built-in for now 8109384b2f3Smrgm4_define([_LT_LANG_C_enabled], []) 8119384b2f3Smrgm4_define([_LT_TAGS], []) 812966bf024Smrg 813966bf024Smrg 8149384b2f3Smrg# LT_LANG(LANG) 8159384b2f3Smrg# ------------- 8169384b2f3Smrg# Enable libtool support for the given language if not already enabled. 8179384b2f3SmrgAC_DEFUN([LT_LANG], 8189384b2f3Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8199384b2f3Smrgm4_case([$1], 8209384b2f3Smrg [C], [_LT_LANG(C)], 8219384b2f3Smrg [C++], [_LT_LANG(CXX)], 8229384b2f3Smrg [Go], [_LT_LANG(GO)], 8239384b2f3Smrg [Java], [_LT_LANG(GCJ)], 8249384b2f3Smrg [Fortran 77], [_LT_LANG(F77)], 8259384b2f3Smrg [Fortran], [_LT_LANG(FC)], 8269384b2f3Smrg [Windows Resource], [_LT_LANG(RC)], 8279384b2f3Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8289384b2f3Smrg [_LT_LANG($1)], 8299384b2f3Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8309384b2f3Smrg])# LT_LANG 8319384b2f3Smrg 8329384b2f3Smrg 8339384b2f3Smrg# _LT_LANG(LANGNAME) 8349384b2f3Smrg# ------------------ 8359384b2f3Smrgm4_defun([_LT_LANG], 8369384b2f3Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8379384b2f3Smrg [LT_SUPPORTED_TAG([$1])dnl 8389384b2f3Smrg m4_append([_LT_TAGS], [$1 ])dnl 8399384b2f3Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8409384b2f3Smrg _LT_LANG_$1_CONFIG($1)])dnl 8419384b2f3Smrg])# _LT_LANG 842966bf024Smrg 843966bf024Smrg 8449384b2f3Smrgm4_ifndef([AC_PROG_GO], [ 8459384b2f3Smrg# NOTE: This macro has been submitted for inclusion into # 8469384b2f3Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8479384b2f3Smrg# a released version of Autoconf we should remove this # 8489384b2f3Smrg# macro and use it instead. # 8499384b2f3Smrgm4_defun([AC_PROG_GO], 8509384b2f3Smrg[AC_LANG_PUSH(Go)dnl 8519384b2f3SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8529384b2f3SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8539384b2f3Smrg_AC_ARG_VAR_LDFLAGS()dnl 8549384b2f3SmrgAC_CHECK_TOOL(GOC, gccgo) 8559384b2f3Smrgif test -z "$GOC"; then 8569384b2f3Smrg if test -n "$ac_tool_prefix"; then 8579384b2f3Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8589384b2f3Smrg fi 859966bf024Smrgfi 8609384b2f3Smrgif test -z "$GOC"; then 8619384b2f3Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862966bf024Smrgfi 8639384b2f3Smrg])#m4_defun 8649384b2f3Smrg])#m4_ifndef 865966bf024Smrg 866966bf024Smrg 8679384b2f3Smrg# _LT_LANG_DEFAULT_CONFIG 8689384b2f3Smrg# ----------------------- 8699384b2f3Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8709384b2f3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8719384b2f3Smrg [LT_LANG(CXX)], 8729384b2f3Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8739384b2f3Smrg 8749384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8759384b2f3Smrg [LT_LANG(F77)], 8769384b2f3Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8779384b2f3Smrg 8789384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8799384b2f3Smrg [LT_LANG(FC)], 8809384b2f3Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8819384b2f3Smrg 8829384b2f3Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8839384b2f3Smrgdnl pulling things in needlessly. 8849384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8859384b2f3Smrg [LT_LANG(GCJ)], 8869384b2f3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8879384b2f3Smrg [LT_LANG(GCJ)], 8889384b2f3Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8899384b2f3Smrg [LT_LANG(GCJ)], 8909384b2f3Smrg [m4_ifdef([AC_PROG_GCJ], 8919384b2f3Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8929384b2f3Smrg m4_ifdef([A][M_PROG_GCJ], 8939384b2f3Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8949384b2f3Smrg m4_ifdef([LT_PROG_GCJ], 8959384b2f3Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8969384b2f3Smrg 8979384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 8989384b2f3Smrg [LT_LANG(GO)], 8999384b2f3Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9009384b2f3Smrg 9019384b2f3SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9029384b2f3Smrg [LT_LANG(RC)], 9039384b2f3Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9049384b2f3Smrg])# _LT_LANG_DEFAULT_CONFIG 9059384b2f3Smrg 9069384b2f3Smrg# Obsolete macros: 9079384b2f3SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9089384b2f3SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9099384b2f3SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9109384b2f3SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9119384b2f3SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9129384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 9139384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9149384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9159384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9169384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9179384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9189384b2f3Smrg 9199384b2f3Smrg 9209384b2f3Smrg# _LT_TAG_COMPILER 9219384b2f3Smrg# ---------------- 9229384b2f3Smrgm4_defun([_LT_TAG_COMPILER], 9239384b2f3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 924966bf024Smrg 9259384b2f3Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9269384b2f3Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9279384b2f3Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9289384b2f3Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929966bf024Smrg 9309384b2f3Smrg# If no C compiler was specified, use CC. 9319384b2f3SmrgLTCC=${LTCC-"$CC"} 932966bf024Smrg 9339384b2f3Smrg# If no C compiler flags were specified, use CFLAGS. 9349384b2f3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935966bf024Smrg 9369384b2f3Smrg# Allow CC to be a program name with arguments. 9379384b2f3Smrgcompiler=$CC 9389384b2f3Smrg])# _LT_TAG_COMPILER 939966bf024Smrg 940966bf024Smrg 9419384b2f3Smrg# _LT_COMPILER_BOILERPLATE 9429384b2f3Smrg# ------------------------ 9439384b2f3Smrg# Check for compiler boilerplate output or warnings with 9449384b2f3Smrg# the simple compiler test code. 9459384b2f3Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9469384b2f3Smrg[m4_require([_LT_DECL_SED])dnl 9479384b2f3Smrgac_outfile=conftest.$ac_objext 9489384b2f3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9499384b2f3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9509384b2f3Smrg_lt_compiler_boilerplate=`cat conftest.err` 9519384b2f3Smrg$RM conftest* 9529384b2f3Smrg])# _LT_COMPILER_BOILERPLATE 9539384b2f3Smrg 9549384b2f3Smrg 9559384b2f3Smrg# _LT_LINKER_BOILERPLATE 9569384b2f3Smrg# ---------------------- 9579384b2f3Smrg# Check for linker boilerplate output or warnings with 9589384b2f3Smrg# the simple link test code. 9599384b2f3Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9609384b2f3Smrg[m4_require([_LT_DECL_SED])dnl 9619384b2f3Smrgac_outfile=conftest.$ac_objext 9629384b2f3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9639384b2f3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9649384b2f3Smrg_lt_linker_boilerplate=`cat conftest.err` 9659384b2f3Smrg$RM -r conftest* 9669384b2f3Smrg])# _LT_LINKER_BOILERPLATE 9679384b2f3Smrg 9689384b2f3Smrg# _LT_REQUIRED_DARWIN_CHECKS 9699384b2f3Smrg# ------------------------- 9709384b2f3Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9719384b2f3Smrg case $host_os in 9729384b2f3Smrg rhapsody* | darwin*) 9739384b2f3Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9749384b2f3Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9759384b2f3Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9769384b2f3Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9779384b2f3Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9789384b2f3Smrg _LT_DECL([], [DSYMUTIL], [1], 9799384b2f3Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9809384b2f3Smrg _LT_DECL([], [NMEDIT], [1], 9819384b2f3Smrg [Tool to change global to local symbols on Mac OS X]) 9829384b2f3Smrg _LT_DECL([], [LIPO], [1], 9839384b2f3Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9849384b2f3Smrg _LT_DECL([], [OTOOL], [1], 9859384b2f3Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9869384b2f3Smrg _LT_DECL([], [OTOOL64], [1], 9879384b2f3Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9889384b2f3Smrg 9899384b2f3Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9909384b2f3Smrg [lt_cv_apple_cc_single_mod=no 9919384b2f3Smrg if test -z "${LT_MULTI_MODULE}"; then 9929384b2f3Smrg # By default we will add the -single_module flag. You can override 9939384b2f3Smrg # by either setting the environment variable LT_MULTI_MODULE 9949384b2f3Smrg # non-empty at configure time, or by adding -multi_module to the 9959384b2f3Smrg # link flags. 9969384b2f3Smrg rm -rf libconftest.dylib* 9979384b2f3Smrg echo "int foo(void){return 1;}" > conftest.c 9989384b2f3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9999384b2f3Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10009384b2f3Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10019384b2f3Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10029384b2f3Smrg _lt_result=$? 10039384b2f3Smrg # If there is a non-empty error log, and "single_module" 10049384b2f3Smrg # appears in it, assume the flag caused a linker warning 10059384b2f3Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10069384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10079384b2f3Smrg # Otherwise, if the output was created with a 0 exit code from 10089384b2f3Smrg # the compiler, it worked. 10099384b2f3Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10109384b2f3Smrg lt_cv_apple_cc_single_mod=yes 10119384b2f3Smrg else 10129384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10139384b2f3Smrg fi 10149384b2f3Smrg rm -rf libconftest.dylib* 10159384b2f3Smrg rm -f conftest.* 10169384b2f3Smrg fi]) 10179384b2f3Smrg 10189384b2f3Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10199384b2f3Smrg [lt_cv_ld_exported_symbols_list], 10209384b2f3Smrg [lt_cv_ld_exported_symbols_list=no 10219384b2f3Smrg save_LDFLAGS=$LDFLAGS 10229384b2f3Smrg echo "_main" > conftest.sym 10239384b2f3Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10249384b2f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10259384b2f3Smrg [lt_cv_ld_exported_symbols_list=yes], 10269384b2f3Smrg [lt_cv_ld_exported_symbols_list=no]) 10279384b2f3Smrg LDFLAGS="$save_LDFLAGS" 10289384b2f3Smrg ]) 1029966bf024Smrg 10309384b2f3Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10319384b2f3Smrg [lt_cv_ld_force_load=no 10329384b2f3Smrg cat > conftest.c << _LT_EOF 10339384b2f3Smrgint forced_loaded() { return 2;} 10349384b2f3Smrg_LT_EOF 10359384b2f3Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10369384b2f3Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10379384b2f3Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10389384b2f3Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10399384b2f3Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10409384b2f3Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10419384b2f3Smrg cat > conftest.c << _LT_EOF 10429384b2f3Smrgint main() { return 0;} 10439384b2f3Smrg_LT_EOF 10449384b2f3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10459384b2f3Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10469384b2f3Smrg _lt_result=$? 10479384b2f3Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10489384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10499384b2f3Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 10509384b2f3Smrg lt_cv_ld_force_load=yes 10519384b2f3Smrg else 10529384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10539384b2f3Smrg fi 10549384b2f3Smrg rm -f conftest.err libconftest.a conftest conftest.c 10559384b2f3Smrg rm -rf conftest.dSYM 10569384b2f3Smrg ]) 10579384b2f3Smrg case $host_os in 10589384b2f3Smrg rhapsody* | darwin1.[[012]]) 10599384b2f3Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10609384b2f3Smrg darwin1.*) 10619384b2f3Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10629384b2f3Smrg darwin*) # darwin 5.x on 10639384b2f3Smrg # if running on 10.5 or later, the deployment target defaults 10649384b2f3Smrg # to the OS version, if on x86, and 10.4, the deployment 10659384b2f3Smrg # target defaults to 10.4. Don't you love it? 10669384b2f3Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10679384b2f3Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10689384b2f3Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10699384b2f3Smrg 10.[[012]]*) 10709384b2f3Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10719384b2f3Smrg 10.*) 10729384b2f3Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10739384b2f3Smrg esac 10749384b2f3Smrg ;; 10759384b2f3Smrg esac 10769384b2f3Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10779384b2f3Smrg _lt_dar_single_mod='$single_module' 10789384b2f3Smrg fi 10799384b2f3Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10809384b2f3Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10819384b2f3Smrg else 10829384b2f3Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10839384b2f3Smrg fi 10849384b2f3Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10859384b2f3Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10869384b2f3Smrg else 10879384b2f3Smrg _lt_dsymutil= 10889384b2f3Smrg fi 10899384b2f3Smrg ;; 10909384b2f3Smrg esac 10919384b2f3Smrg]) 1092966bf024Smrg 1093966bf024Smrg 10949384b2f3Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 10959384b2f3Smrg# --------------------------------- 10969384b2f3Smrg# Checks for linker and compiler features on darwin 10979384b2f3Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10989384b2f3Smrg[ 10999384b2f3Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11009384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11019384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11029384b2f3Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11039384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11049384b2f3Smrg if test "$lt_cv_ld_force_load" = "yes"; then 11059384b2f3Smrg _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\"`' 11069384b2f3Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11079384b2f3Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11089384b2f3Smrg else 11099384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11109384b2f3Smrg fi 11119384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11129384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11139384b2f3Smrg case $cc_basename in 11149384b2f3Smrg ifort*) _lt_dar_can_shared=yes ;; 11159384b2f3Smrg *) _lt_dar_can_shared=$GCC ;; 11169384b2f3Smrg esac 11179384b2f3Smrg if test "$_lt_dar_can_shared" = "yes"; then 11189384b2f3Smrg output_verbose_link_cmd=func_echo_all 11199384b2f3Smrg _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}" 11209384b2f3Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11219384b2f3Smrg _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}" 11229384b2f3Smrg _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}" 11239384b2f3Smrg m4_if([$1], [CXX], 11249384b2f3Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11259384b2f3Smrg _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}" 11269384b2f3Smrg _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}" 11279384b2f3Smrg fi 11289384b2f3Smrg],[]) 11299384b2f3Smrg else 11309384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11319384b2f3Smrg fi 11329384b2f3Smrg]) 1133966bf024Smrg 11349384b2f3Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11359384b2f3Smrg# ---------------------------------- 11369384b2f3Smrg# Links a minimal program and checks the executable 11379384b2f3Smrg# for the system default hardcoded library path. In most cases, 11389384b2f3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11399384b2f3Smrg# the location of the communication and MPI libs are included too. 11409384b2f3Smrg# If we don't find anything, use the default library path according 11419384b2f3Smrg# to the aix ld manual. 11429384b2f3Smrg# Store the results from the different compilers for each TAGNAME. 11439384b2f3Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11449384b2f3Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11459384b2f3Smrg[m4_require([_LT_DECL_SED])dnl 11469384b2f3Smrgif test "${lt_cv_aix_libpath+set}" = set; then 11479384b2f3Smrg aix_libpath=$lt_cv_aix_libpath 11489384b2f3Smrgelse 11499384b2f3Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11509384b2f3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11519384b2f3Smrg lt_aix_libpath_sed='[ 11529384b2f3Smrg /Import File Strings/,/^$/ { 11539384b2f3Smrg /^0/ { 11549384b2f3Smrg s/^0 *\([^ ]*\) *$/\1/ 11559384b2f3Smrg p 11569384b2f3Smrg } 11579384b2f3Smrg }]' 11589384b2f3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11599384b2f3Smrg # Check for a 64-bit object if we didn't find anything. 11609384b2f3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11619384b2f3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11629384b2f3Smrg fi],[]) 11639384b2f3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11649384b2f3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 11659384b2f3Smrg fi 11669384b2f3Smrg ]) 11679384b2f3Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11689384b2f3Smrgfi 11699384b2f3Smrg])# _LT_SYS_MODULE_PATH_AIX 1170966bf024Smrg 1171966bf024Smrg 11729384b2f3Smrg# _LT_SHELL_INIT(ARG) 11739384b2f3Smrg# ------------------- 11749384b2f3Smrgm4_define([_LT_SHELL_INIT], 11759384b2f3Smrg[m4_divert_text([M4SH-INIT], [$1 11769384b2f3Smrg])])# _LT_SHELL_INIT 1177966bf024Smrg 1178966bf024Smrg 1179966bf024Smrg 11809384b2f3Smrg# _LT_PROG_ECHO_BACKSLASH 11819384b2f3Smrg# ----------------------- 11829384b2f3Smrg# Find how we can fake an echo command that does not interpret backslash. 11839384b2f3Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11849384b2f3Smrg# of the generated configure script which will find a shell with a builtin 11859384b2f3Smrg# printf (which we can use as an echo command). 11869384b2f3Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11879384b2f3Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11889384b2f3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11899384b2f3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11909384b2f3Smrg 11919384b2f3SmrgAC_MSG_CHECKING([how to print strings]) 11929384b2f3Smrg# Test print first, because it will be a builtin if present. 11939384b2f3Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11949384b2f3Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 11959384b2f3Smrg ECHO='print -r --' 11969384b2f3Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 11979384b2f3Smrg ECHO='printf %s\n' 11989384b2f3Smrgelse 11999384b2f3Smrg # Use this function as a fallback that always works. 12009384b2f3Smrg func_fallback_echo () 12019384b2f3Smrg { 12029384b2f3Smrg eval 'cat <<_LTECHO_EOF 12039384b2f3Smrg$[]1 12049384b2f3Smrg_LTECHO_EOF' 12059384b2f3Smrg } 12069384b2f3Smrg ECHO='func_fallback_echo' 12079384b2f3Smrgfi 1208966bf024Smrg 12099384b2f3Smrg# func_echo_all arg... 12109384b2f3Smrg# Invoke $ECHO with all args, space-separated. 12119384b2f3Smrgfunc_echo_all () 12129384b2f3Smrg{ 12139384b2f3Smrg $ECHO "$*" 12149384b2f3Smrg} 1215966bf024Smrg 12169384b2f3Smrgcase "$ECHO" in 12179384b2f3Smrg printf*) AC_MSG_RESULT([printf]) ;; 12189384b2f3Smrg print*) AC_MSG_RESULT([print -r]) ;; 12199384b2f3Smrg *) AC_MSG_RESULT([cat]) ;; 12209384b2f3Smrgesac 1221966bf024Smrg 12229384b2f3Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12239384b2f3Smrg[_AS_DETECT_SUGGESTED([ 12249384b2f3Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12259384b2f3Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12269384b2f3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12279384b2f3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12289384b2f3Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12299384b2f3Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12309384b2f3Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231966bf024Smrg 12329384b2f3Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12339384b2f3Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12349384b2f3Smrg])# _LT_PROG_ECHO_BACKSLASH 1235966bf024Smrg 1236966bf024Smrg 12379384b2f3Smrg# _LT_WITH_SYSROOT 1238966bf024Smrg# ---------------- 12399384b2f3SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12409384b2f3Smrg[AC_MSG_CHECKING([for sysroot]) 12419384b2f3SmrgAC_ARG_WITH([sysroot], 12429384b2f3Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 12439384b2f3Smrg (or the compiler's sysroot if not specified).], 12449384b2f3Smrg[], [with_sysroot=no]) 12459384b2f3Smrg 12469384b2f3Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12479384b2f3Smrgdnl in case the user passed a directory name. 12489384b2f3Smrglt_sysroot= 12499384b2f3Smrgcase ${with_sysroot} in #( 12509384b2f3Smrg yes) 12519384b2f3Smrg if test "$GCC" = yes; then 12529384b2f3Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12539384b2f3Smrg fi 12549384b2f3Smrg ;; #( 12559384b2f3Smrg /*) 12569384b2f3Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12579384b2f3Smrg ;; #( 12589384b2f3Smrg no|'') 12599384b2f3Smrg ;; #( 12609384b2f3Smrg *) 12619384b2f3Smrg AC_MSG_RESULT([${with_sysroot}]) 12629384b2f3Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12639384b2f3Smrg ;; 12649384b2f3Smrgesac 1265966bf024Smrg 12669384b2f3Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12679384b2f3Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12689384b2f3Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269966bf024Smrg 12709384b2f3Smrg# _LT_ENABLE_LOCK 12719384b2f3Smrg# --------------- 12729384b2f3Smrgm4_defun([_LT_ENABLE_LOCK], 12739384b2f3Smrg[AC_ARG_ENABLE([libtool-lock], 12749384b2f3Smrg [AS_HELP_STRING([--disable-libtool-lock], 12759384b2f3Smrg [avoid locking (might break parallel builds)])]) 12769384b2f3Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277966bf024Smrg 12789384b2f3Smrg# Some flags need to be propagated to the compiler or linker for good 12799384b2f3Smrg# libtool support. 12809384b2f3Smrgcase $host in 12819384b2f3Smrgia64-*-hpux*) 12829384b2f3Smrg # Find out which ABI we are using. 12839384b2f3Smrg echo 'int i;' > conftest.$ac_ext 12849384b2f3Smrg if AC_TRY_EVAL(ac_compile); then 12859384b2f3Smrg case `/usr/bin/file conftest.$ac_objext` in 12869384b2f3Smrg *ELF-32*) 12879384b2f3Smrg HPUX_IA64_MODE="32" 12889384b2f3Smrg ;; 12899384b2f3Smrg *ELF-64*) 12909384b2f3Smrg HPUX_IA64_MODE="64" 12919384b2f3Smrg ;; 12929384b2f3Smrg esac 1293966bf024Smrg fi 12949384b2f3Smrg rm -rf conftest* 12959384b2f3Smrg ;; 12969384b2f3Smrg*-*-irix6*) 12979384b2f3Smrg # Find out which ABI we are using. 12989384b2f3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12999384b2f3Smrg if AC_TRY_EVAL(ac_compile); then 13009384b2f3Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 13019384b2f3Smrg case `/usr/bin/file conftest.$ac_objext` in 13029384b2f3Smrg *32-bit*) 13039384b2f3Smrg LD="${LD-ld} -melf32bsmip" 13049384b2f3Smrg ;; 13059384b2f3Smrg *N32*) 13069384b2f3Smrg LD="${LD-ld} -melf32bmipn32" 13079384b2f3Smrg ;; 13089384b2f3Smrg *64-bit*) 13099384b2f3Smrg LD="${LD-ld} -melf64bmip" 13109384b2f3Smrg ;; 13119384b2f3Smrg esac 13129384b2f3Smrg else 13139384b2f3Smrg case `/usr/bin/file conftest.$ac_objext` in 13149384b2f3Smrg *32-bit*) 13159384b2f3Smrg LD="${LD-ld} -32" 13169384b2f3Smrg ;; 13179384b2f3Smrg *N32*) 13189384b2f3Smrg LD="${LD-ld} -n32" 13199384b2f3Smrg ;; 13209384b2f3Smrg *64-bit*) 13219384b2f3Smrg LD="${LD-ld} -64" 13229384b2f3Smrg ;; 13239384b2f3Smrg esac 13249384b2f3Smrg fi 13259384b2f3Smrg fi 13269384b2f3Smrg rm -rf conftest* 1327966bf024Smrg ;; 1328966bf024Smrg 13299384b2f3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 13309384b2f3Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13319384b2f3Smrg # Find out which ABI we are using. 13329384b2f3Smrg echo 'int i;' > conftest.$ac_ext 13339384b2f3Smrg if AC_TRY_EVAL(ac_compile); then 13349384b2f3Smrg case `/usr/bin/file conftest.o` in 13359384b2f3Smrg *32-bit*) 13369384b2f3Smrg case $host in 13379384b2f3Smrg x86_64-*kfreebsd*-gnu) 13389384b2f3Smrg LD="${LD-ld} -m elf_i386_fbsd" 13399384b2f3Smrg ;; 13409384b2f3Smrg x86_64-*linux*) 13419384b2f3Smrg LD="${LD-ld} -m elf_i386" 13429384b2f3Smrg ;; 13439384b2f3Smrg ppc64-*linux*|powerpc64-*linux*) 13449384b2f3Smrg LD="${LD-ld} -m elf32ppclinux" 13459384b2f3Smrg ;; 13469384b2f3Smrg s390x-*linux*) 13479384b2f3Smrg LD="${LD-ld} -m elf_s390" 13489384b2f3Smrg ;; 13499384b2f3Smrg sparc64-*linux*) 13509384b2f3Smrg LD="${LD-ld} -m elf32_sparc" 13519384b2f3Smrg ;; 13529384b2f3Smrg esac 13539384b2f3Smrg ;; 13549384b2f3Smrg *64-bit*) 13559384b2f3Smrg case $host in 13569384b2f3Smrg x86_64-*kfreebsd*-gnu) 13579384b2f3Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13589384b2f3Smrg ;; 13599384b2f3Smrg x86_64-*linux*) 13609384b2f3Smrg LD="${LD-ld} -m elf_x86_64" 13619384b2f3Smrg ;; 13629384b2f3Smrg ppc*-*linux*|powerpc*-*linux*) 13639384b2f3Smrg LD="${LD-ld} -m elf64ppc" 13649384b2f3Smrg ;; 13659384b2f3Smrg s390*-*linux*|s390*-*tpf*) 13669384b2f3Smrg LD="${LD-ld} -m elf64_s390" 13679384b2f3Smrg ;; 13689384b2f3Smrg sparc*-*linux*) 13699384b2f3Smrg LD="${LD-ld} -m elf64_sparc" 13709384b2f3Smrg ;; 13719384b2f3Smrg esac 13729384b2f3Smrg ;; 13739384b2f3Smrg esac 13749384b2f3Smrg fi 13759384b2f3Smrg rm -rf conftest* 13769384b2f3Smrg ;; 1377966bf024Smrg 13789384b2f3Smrg*-*-sco3.2v5*) 13799384b2f3Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13809384b2f3Smrg SAVE_CFLAGS="$CFLAGS" 13819384b2f3Smrg CFLAGS="$CFLAGS -belf" 13829384b2f3Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13839384b2f3Smrg [AC_LANG_PUSH(C) 13849384b2f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13859384b2f3Smrg AC_LANG_POP]) 13869384b2f3Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13879384b2f3Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13889384b2f3Smrg CFLAGS="$SAVE_CFLAGS" 13899384b2f3Smrg fi 13909384b2f3Smrg ;; 13919384b2f3Smrg*-*solaris*) 13929384b2f3Smrg # Find out which ABI we are using. 13939384b2f3Smrg echo 'int i;' > conftest.$ac_ext 13949384b2f3Smrg if AC_TRY_EVAL(ac_compile); then 13959384b2f3Smrg case `/usr/bin/file conftest.o` in 13969384b2f3Smrg *64-bit*) 13979384b2f3Smrg case $lt_cv_prog_gnu_ld in 13989384b2f3Smrg yes*) 13999384b2f3Smrg case $host in 14009384b2f3Smrg i?86-*-solaris*) 14019384b2f3Smrg LD="${LD-ld} -m elf_x86_64" 14029384b2f3Smrg ;; 14039384b2f3Smrg sparc*-*-solaris*) 14049384b2f3Smrg LD="${LD-ld} -m elf64_sparc" 14059384b2f3Smrg ;; 14069384b2f3Smrg esac 14079384b2f3Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14089384b2f3Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14099384b2f3Smrg LD="${LD-ld}_sol2" 14109384b2f3Smrg fi 14119384b2f3Smrg ;; 14129384b2f3Smrg *) 14139384b2f3Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14149384b2f3Smrg LD="${LD-ld} -64" 14159384b2f3Smrg fi 14169384b2f3Smrg ;; 14179384b2f3Smrg esac 14189384b2f3Smrg ;; 14199384b2f3Smrg esac 14209384b2f3Smrg fi 14219384b2f3Smrg rm -rf conftest* 14229384b2f3Smrg ;; 14239384b2f3Smrgesac 1424966bf024Smrg 14259384b2f3Smrgneed_locks="$enable_libtool_lock" 14269384b2f3Smrg])# _LT_ENABLE_LOCK 1427966bf024Smrg 1428966bf024Smrg 14299384b2f3Smrg# _LT_PROG_AR 14309384b2f3Smrg# ----------- 14319384b2f3Smrgm4_defun([_LT_PROG_AR], 14329384b2f3Smrg[AC_CHECK_TOOLS(AR, [ar], false) 14339384b2f3Smrg: ${AR=ar} 14349384b2f3Smrg: ${AR_FLAGS=cru} 14359384b2f3Smrg_LT_DECL([], [AR], [1], [The archiver]) 14369384b2f3Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 14379384b2f3Smrg 14389384b2f3SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 14399384b2f3Smrg [lt_cv_ar_at_file=no 14409384b2f3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 14419384b2f3Smrg [echo conftest.$ac_objext > conftest.lst 14429384b2f3Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 14439384b2f3Smrg AC_TRY_EVAL([lt_ar_try]) 14449384b2f3Smrg if test "$ac_status" -eq 0; then 14459384b2f3Smrg # Ensure the archiver fails upon bogus file names. 14469384b2f3Smrg rm -f conftest.$ac_objext libconftest.a 14479384b2f3Smrg AC_TRY_EVAL([lt_ar_try]) 14489384b2f3Smrg if test "$ac_status" -ne 0; then 14499384b2f3Smrg lt_cv_ar_at_file=@ 14509384b2f3Smrg fi 14519384b2f3Smrg fi 14529384b2f3Smrg rm -f conftest.* libconftest.a 14539384b2f3Smrg ]) 14549384b2f3Smrg ]) 1455966bf024Smrg 14569384b2f3Smrgif test "x$lt_cv_ar_at_file" = xno; then 14579384b2f3Smrg archiver_list_spec= 14589384b2f3Smrgelse 14599384b2f3Smrg archiver_list_spec=$lt_cv_ar_at_file 14609384b2f3Smrgfi 14619384b2f3Smrg_LT_DECL([], [archiver_list_spec], [1], 14629384b2f3Smrg [How to feed a file listing to the archiver]) 14639384b2f3Smrg])# _LT_PROG_AR 1464966bf024Smrg 14659384b2f3Smrg 14669384b2f3Smrg# _LT_CMD_OLD_ARCHIVE 14679384b2f3Smrg# ------------------- 14689384b2f3Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 14699384b2f3Smrg[_LT_PROG_AR 14709384b2f3Smrg 14719384b2f3SmrgAC_CHECK_TOOL(STRIP, strip, :) 1472966bf024Smrgtest -z "$STRIP" && STRIP=: 14739384b2f3Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 14749384b2f3Smrg 14759384b2f3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14769384b2f3Smrgtest -z "$RANLIB" && RANLIB=: 14779384b2f3Smrg_LT_DECL([], [RANLIB], [1], 14789384b2f3Smrg [Commands used to install an old-style archive]) 1479966bf024Smrg 1480966bf024Smrg# Determine commands to create old-style static archives. 14819384b2f3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482966bf024Smrgold_postinstall_cmds='chmod 644 $oldlib' 1483966bf024Smrgold_postuninstall_cmds= 1484966bf024Smrg 1485966bf024Smrgif test -n "$RANLIB"; then 1486966bf024Smrg case $host_os in 1487966bf024Smrg openbsd*) 14889384b2f3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489966bf024Smrg ;; 1490966bf024Smrg *) 14919384b2f3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492966bf024Smrg ;; 1493966bf024Smrg esac 14949384b2f3Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1495966bf024Smrgfi 1496966bf024Smrg 14979384b2f3Smrgcase $host_os in 14989384b2f3Smrg darwin*) 14999384b2f3Smrg lock_old_archive_extraction=yes ;; 15009384b2f3Smrg *) 15019384b2f3Smrg lock_old_archive_extraction=no ;; 1502966bf024Smrgesac 15039384b2f3Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15049384b2f3Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15059384b2f3Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15069384b2f3Smrg [Commands used to build an old-style archive]) 15079384b2f3Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15089384b2f3Smrg [Whether to use a lock for old archive extraction]) 15099384b2f3Smrg])# _LT_CMD_OLD_ARCHIVE 1510966bf024Smrg 1511966bf024Smrg 15129384b2f3Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15139384b2f3Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15149384b2f3Smrg# ---------------------------------------------------------------- 15159384b2f3Smrg# Check whether the given compiler option works 15169384b2f3SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15179384b2f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15189384b2f3Smrgm4_require([_LT_DECL_SED])dnl 15199384b2f3SmrgAC_CACHE_CHECK([$1], [$2], 15209384b2f3Smrg [$2=no 15219384b2f3Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15229384b2f3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15239384b2f3Smrg lt_compiler_flag="$3" 15249384b2f3Smrg # Insert the option either (1) after the last *FLAGS variable, or 15259384b2f3Smrg # (2) before a word containing "conftest.", or (3) at the end. 15269384b2f3Smrg # Note that $ac_compile itself does not contain backslashes and begins 15279384b2f3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 15289384b2f3Smrg # The option is referenced via a variable to avoid confusing sed. 15299384b2f3Smrg lt_compile=`echo "$ac_compile" | $SED \ 15309384b2f3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15319384b2f3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15329384b2f3Smrg -e 's:$: $lt_compiler_flag:'` 15339384b2f3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15349384b2f3Smrg (eval "$lt_compile" 2>conftest.err) 15359384b2f3Smrg ac_status=$? 15369384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 15379384b2f3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15389384b2f3Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 15399384b2f3Smrg # The compiler can only warn and ignore the option if not recognized 15409384b2f3Smrg # So say no if there are warnings other than the usual output. 15419384b2f3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15429384b2f3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15439384b2f3Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15449384b2f3Smrg $2=yes 15459384b2f3Smrg fi 15469384b2f3Smrg fi 15479384b2f3Smrg $RM conftest* 15489384b2f3Smrg]) 1549966bf024Smrg 15509384b2f3Smrgif test x"[$]$2" = xyes; then 15519384b2f3Smrg m4_if([$5], , :, [$5]) 15529384b2f3Smrgelse 15539384b2f3Smrg m4_if([$6], , :, [$6]) 15549384b2f3Smrgfi 15559384b2f3Smrg])# _LT_COMPILER_OPTION 1556966bf024Smrg 15579384b2f3Smrg# Old name: 15589384b2f3SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15599384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 15609384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1561966bf024Smrg 1562966bf024Smrg 15639384b2f3Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15649384b2f3Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15659384b2f3Smrg# ---------------------------------------------------- 15669384b2f3Smrg# Check whether the given linker option works 15679384b2f3SmrgAC_DEFUN([_LT_LINKER_OPTION], 15689384b2f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15699384b2f3Smrgm4_require([_LT_DECL_SED])dnl 15709384b2f3SmrgAC_CACHE_CHECK([$1], [$2], 15719384b2f3Smrg [$2=no 15729384b2f3Smrg save_LDFLAGS="$LDFLAGS" 15739384b2f3Smrg LDFLAGS="$LDFLAGS $3" 15749384b2f3Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 15759384b2f3Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15769384b2f3Smrg # The linker can only warn and ignore the option if not recognized 15779384b2f3Smrg # So say no if there are warnings 15789384b2f3Smrg if test -s conftest.err; then 15799384b2f3Smrg # Append any errors to the config.log. 15809384b2f3Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 15819384b2f3Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15829384b2f3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15839384b2f3Smrg if diff conftest.exp conftest.er2 >/dev/null; then 15849384b2f3Smrg $2=yes 15859384b2f3Smrg fi 15869384b2f3Smrg else 15879384b2f3Smrg $2=yes 15889384b2f3Smrg fi 15899384b2f3Smrg fi 15909384b2f3Smrg $RM -r conftest* 15919384b2f3Smrg LDFLAGS="$save_LDFLAGS" 15929384b2f3Smrg]) 1593966bf024Smrg 15949384b2f3Smrgif test x"[$]$2" = xyes; then 15959384b2f3Smrg m4_if([$4], , :, [$4]) 15969384b2f3Smrgelse 15979384b2f3Smrg m4_if([$5], , :, [$5]) 15989384b2f3Smrgfi 15999384b2f3Smrg])# _LT_LINKER_OPTION 1600966bf024Smrg 16019384b2f3Smrg# Old name: 16029384b2f3SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16039384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 16049384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1605966bf024Smrg 1606966bf024Smrg 16079384b2f3Smrg# LT_CMD_MAX_LEN 16089384b2f3Smrg#--------------- 16099384b2f3SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16109384b2f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16119384b2f3Smrg# find the maximum length of command line arguments 16129384b2f3SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16139384b2f3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16149384b2f3Smrg i=0 16159384b2f3Smrg teststring="ABCD" 1616966bf024Smrg 16179384b2f3Smrg case $build_os in 16189384b2f3Smrg msdosdjgpp*) 16199384b2f3Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16209384b2f3Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16219384b2f3Smrg # during glob expansion). Even if it were fixed, the result of this 16229384b2f3Smrg # check would be larger than it should be. 16239384b2f3Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16249384b2f3Smrg ;; 1625966bf024Smrg 16269384b2f3Smrg gnu*) 16279384b2f3Smrg # Under GNU Hurd, this test is not required because there is 16289384b2f3Smrg # no limit to the length of command line arguments. 16299384b2f3Smrg # Libtool will interpret -1 as no limit whatsoever 16309384b2f3Smrg lt_cv_sys_max_cmd_len=-1; 16319384b2f3Smrg ;; 1632966bf024Smrg 16339384b2f3Smrg cygwin* | mingw* | cegcc*) 16349384b2f3Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 16359384b2f3Smrg # about 5 minutes as the teststring grows exponentially. 16369384b2f3Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 16379384b2f3Smrg # you end up with a "frozen" computer, even though with patience 16389384b2f3Smrg # the test eventually succeeds (with a max line length of 256k). 16399384b2f3Smrg # Instead, let's just punt: use the minimum linelength reported by 16409384b2f3Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 16419384b2f3Smrg lt_cv_sys_max_cmd_len=8192; 16429384b2f3Smrg ;; 1643966bf024Smrg 16449384b2f3Smrg mint*) 16459384b2f3Smrg # On MiNT this can take a long time and run out of memory. 16469384b2f3Smrg lt_cv_sys_max_cmd_len=8192; 16479384b2f3Smrg ;; 1648966bf024Smrg 16499384b2f3Smrg amigaos*) 16509384b2f3Smrg # On AmigaOS with pdksh, this test takes hours, literally. 16519384b2f3Smrg # So we just punt and use a minimum line length of 8192. 16529384b2f3Smrg lt_cv_sys_max_cmd_len=8192; 16539384b2f3Smrg ;; 1654966bf024Smrg 16559384b2f3Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16569384b2f3Smrg # This has been around since 386BSD, at least. Likely further. 16579384b2f3Smrg if test -x /sbin/sysctl; then 16589384b2f3Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16599384b2f3Smrg elif test -x /usr/sbin/sysctl; then 16609384b2f3Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16619384b2f3Smrg else 16629384b2f3Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1663966bf024Smrg fi 16649384b2f3Smrg # And add a safety zone 16659384b2f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16669384b2f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16679384b2f3Smrg ;; 1668966bf024Smrg 16699384b2f3Smrg interix*) 16709384b2f3Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 16719384b2f3Smrg lt_cv_sys_max_cmd_len=196608 16729384b2f3Smrg ;; 1673966bf024Smrg 16749384b2f3Smrg os2*) 16759384b2f3Smrg # The test takes a long time on OS/2. 16769384b2f3Smrg lt_cv_sys_max_cmd_len=8192 16779384b2f3Smrg ;; 1678966bf024Smrg 16799384b2f3Smrg osf*) 16809384b2f3Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16819384b2f3Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16829384b2f3Smrg # nice to cause kernel panics so lets avoid the loop below. 16839384b2f3Smrg # First set a reasonable default. 16849384b2f3Smrg lt_cv_sys_max_cmd_len=16384 16859384b2f3Smrg # 16869384b2f3Smrg if test -x /sbin/sysconfig; then 16879384b2f3Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 16889384b2f3Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 16899384b2f3Smrg esac 16909384b2f3Smrg fi 16919384b2f3Smrg ;; 16929384b2f3Smrg sco3.2v5*) 16939384b2f3Smrg lt_cv_sys_max_cmd_len=102400 16949384b2f3Smrg ;; 16959384b2f3Smrg sysv5* | sco5v6* | sysv4.2uw2*) 16969384b2f3Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 16979384b2f3Smrg if test -n "$kargmax"; then 16989384b2f3Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1699966bf024Smrg else 17009384b2f3Smrg lt_cv_sys_max_cmd_len=32768 17019384b2f3Smrg fi 17029384b2f3Smrg ;; 17039384b2f3Smrg *) 17049384b2f3Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17059384b2f3Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 17069384b2f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17079384b2f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17089384b2f3Smrg else 17099384b2f3Smrg # Make teststring a little bigger before we do anything with it. 17109384b2f3Smrg # a 1K string should be a reasonable start. 17119384b2f3Smrg for i in 1 2 3 4 5 6 7 8 ; do 17129384b2f3Smrg teststring=$teststring$teststring 17139384b2f3Smrg done 17149384b2f3Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17159384b2f3Smrg # If test is not a shell built-in, we'll probably end up computing a 17169384b2f3Smrg # maximum length that is only half of the actual maximum length, but 17179384b2f3Smrg # we can't tell. 17189384b2f3Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 17199384b2f3Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17209384b2f3Smrg test $i != 17 # 1/2 MB should be enough 17219384b2f3Smrg do 17229384b2f3Smrg i=`expr $i + 1` 17239384b2f3Smrg teststring=$teststring$teststring 17249384b2f3Smrg done 17259384b2f3Smrg # Only check the string length outside the loop. 17269384b2f3Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17279384b2f3Smrg teststring= 17289384b2f3Smrg # Add a significant safety factor because C++ compilers can tack on 17299384b2f3Smrg # massive amounts of additional arguments before passing them to the 17309384b2f3Smrg # linker. It appears as though 1/2 is a usable value. 17319384b2f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17329384b2f3Smrg fi 17339384b2f3Smrg ;; 17349384b2f3Smrg esac 17359384b2f3Smrg]) 17369384b2f3Smrgif test -n $lt_cv_sys_max_cmd_len ; then 17379384b2f3Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17389384b2f3Smrgelse 17399384b2f3Smrg AC_MSG_RESULT(none) 17409384b2f3Smrgfi 17419384b2f3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17429384b2f3Smrg_LT_DECL([], [max_cmd_len], [0], 17439384b2f3Smrg [What is the maximum length of a command?]) 17449384b2f3Smrg])# LT_CMD_MAX_LEN 1745966bf024Smrg 17469384b2f3Smrg# Old name: 17479384b2f3SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17489384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 17499384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1750966bf024Smrg 1751966bf024Smrg 17529384b2f3Smrg# _LT_HEADER_DLFCN 17539384b2f3Smrg# ---------------- 17549384b2f3Smrgm4_defun([_LT_HEADER_DLFCN], 17559384b2f3Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17569384b2f3Smrg])# _LT_HEADER_DLFCN 1757966bf024Smrg 1758966bf024Smrg 17599384b2f3Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17609384b2f3Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761966bf024Smrg# ---------------------------------------------------------------- 17629384b2f3Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 17639384b2f3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1764966bf024Smrgif test "$cross_compiling" = yes; then : 1765966bf024Smrg [$4] 1766966bf024Smrgelse 1767966bf024Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1768966bf024Smrg lt_status=$lt_dlunknown 17699384b2f3Smrg cat > conftest.$ac_ext <<_LT_EOF 17709384b2f3Smrg[#line $LINENO "configure" 1771966bf024Smrg#include "confdefs.h" 1772966bf024Smrg 1773966bf024Smrg#if HAVE_DLFCN_H 1774966bf024Smrg#include <dlfcn.h> 1775966bf024Smrg#endif 1776966bf024Smrg 1777966bf024Smrg#include <stdio.h> 1778966bf024Smrg 1779966bf024Smrg#ifdef RTLD_GLOBAL 1780966bf024Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1781966bf024Smrg#else 1782966bf024Smrg# ifdef DL_GLOBAL 1783966bf024Smrg# define LT_DLGLOBAL DL_GLOBAL 1784966bf024Smrg# else 1785966bf024Smrg# define LT_DLGLOBAL 0 1786966bf024Smrg# endif 1787966bf024Smrg#endif 1788966bf024Smrg 1789966bf024Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1790966bf024Smrg find out it does not work in some platform. */ 1791966bf024Smrg#ifndef LT_DLLAZY_OR_NOW 1792966bf024Smrg# ifdef RTLD_LAZY 1793966bf024Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1794966bf024Smrg# else 1795966bf024Smrg# ifdef DL_LAZY 1796966bf024Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1797966bf024Smrg# else 1798966bf024Smrg# ifdef RTLD_NOW 1799966bf024Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1800966bf024Smrg# else 1801966bf024Smrg# ifdef DL_NOW 1802966bf024Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1803966bf024Smrg# else 1804966bf024Smrg# define LT_DLLAZY_OR_NOW 0 1805966bf024Smrg# endif 1806966bf024Smrg# endif 1807966bf024Smrg# endif 1808966bf024Smrg# endif 1809966bf024Smrg#endif 1810966bf024Smrg 18119384b2f3Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 18129384b2f3Smrg correspondingly for the symbols needed. */ 18139384b2f3Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18149384b2f3Smrgint fnord () __attribute__((visibility("default"))); 1815966bf024Smrg#endif 1816966bf024Smrg 18179384b2f3Smrgint fnord () { return 42; } 1818966bf024Smrgint main () 1819966bf024Smrg{ 1820966bf024Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1821966bf024Smrg int status = $lt_dlunknown; 1822966bf024Smrg 1823966bf024Smrg if (self) 1824966bf024Smrg { 1825966bf024Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18269384b2f3Smrg else 18279384b2f3Smrg { 18289384b2f3Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 18299384b2f3Smrg else puts (dlerror ()); 18309384b2f3Smrg } 1831966bf024Smrg /* dlclose (self); */ 1832966bf024Smrg } 18339384b2f3Smrg else 18349384b2f3Smrg puts (dlerror ()); 1835966bf024Smrg 18369384b2f3Smrg return status; 1837966bf024Smrg}] 18389384b2f3Smrg_LT_EOF 1839966bf024Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18409384b2f3Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1841966bf024Smrg lt_status=$? 1842966bf024Smrg case x$lt_status in 1843966bf024Smrg x$lt_dlno_uscore) $1 ;; 1844966bf024Smrg x$lt_dlneed_uscore) $2 ;; 18459384b2f3Smrg x$lt_dlunknown|x*) $3 ;; 1846966bf024Smrg esac 1847966bf024Smrg else : 1848966bf024Smrg # compilation failed 1849966bf024Smrg $3 1850966bf024Smrg fi 1851966bf024Smrgfi 1852966bf024Smrgrm -fr conftest* 18539384b2f3Smrg])# _LT_TRY_DLOPEN_SELF 1854966bf024Smrg 1855966bf024Smrg 18569384b2f3Smrg# LT_SYS_DLOPEN_SELF 18579384b2f3Smrg# ------------------ 18589384b2f3SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18599384b2f3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1860966bf024Smrgif test "x$enable_dlopen" != xyes; then 1861966bf024Smrg enable_dlopen=unknown 1862966bf024Smrg enable_dlopen_self=unknown 1863966bf024Smrg enable_dlopen_self_static=unknown 1864966bf024Smrgelse 1865966bf024Smrg lt_cv_dlopen=no 1866966bf024Smrg lt_cv_dlopen_libs= 1867966bf024Smrg 1868966bf024Smrg case $host_os in 1869966bf024Smrg beos*) 1870966bf024Smrg lt_cv_dlopen="load_add_on" 1871966bf024Smrg lt_cv_dlopen_libs= 1872966bf024Smrg lt_cv_dlopen_self=yes 1873966bf024Smrg ;; 1874966bf024Smrg 18759384b2f3Smrg mingw* | pw32* | cegcc*) 1876966bf024Smrg lt_cv_dlopen="LoadLibrary" 1877966bf024Smrg lt_cv_dlopen_libs= 18789384b2f3Smrg ;; 1879966bf024Smrg 1880966bf024Smrg cygwin*) 1881966bf024Smrg lt_cv_dlopen="dlopen" 1882966bf024Smrg lt_cv_dlopen_libs= 18839384b2f3Smrg ;; 1884966bf024Smrg 1885966bf024Smrg darwin*) 1886966bf024Smrg # if libdl is installed we need to link against it 1887966bf024Smrg AC_CHECK_LIB([dl], [dlopen], 1888966bf024Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1889966bf024Smrg lt_cv_dlopen="dyld" 1890966bf024Smrg lt_cv_dlopen_libs= 1891966bf024Smrg lt_cv_dlopen_self=yes 1892966bf024Smrg ]) 18939384b2f3Smrg ;; 1894966bf024Smrg 1895966bf024Smrg *) 1896966bf024Smrg AC_CHECK_FUNC([shl_load], 1897966bf024Smrg [lt_cv_dlopen="shl_load"], 1898966bf024Smrg [AC_CHECK_LIB([dld], [shl_load], 18999384b2f3Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1900966bf024Smrg [AC_CHECK_FUNC([dlopen], 1901966bf024Smrg [lt_cv_dlopen="dlopen"], 1902966bf024Smrg [AC_CHECK_LIB([dl], [dlopen], 1903966bf024Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1904966bf024Smrg [AC_CHECK_LIB([svld], [dlopen], 1905966bf024Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1906966bf024Smrg [AC_CHECK_LIB([dld], [dld_link], 19079384b2f3Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1908966bf024Smrg ]) 1909966bf024Smrg ]) 1910966bf024Smrg ]) 1911966bf024Smrg ]) 1912966bf024Smrg ]) 1913966bf024Smrg ;; 1914966bf024Smrg esac 1915966bf024Smrg 1916966bf024Smrg if test "x$lt_cv_dlopen" != xno; then 1917966bf024Smrg enable_dlopen=yes 1918966bf024Smrg else 1919966bf024Smrg enable_dlopen=no 1920966bf024Smrg fi 1921966bf024Smrg 1922966bf024Smrg case $lt_cv_dlopen in 1923966bf024Smrg dlopen) 1924966bf024Smrg save_CPPFLAGS="$CPPFLAGS" 1925966bf024Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926966bf024Smrg 1927966bf024Smrg save_LDFLAGS="$LDFLAGS" 19289384b2f3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929966bf024Smrg 1930966bf024Smrg save_LIBS="$LIBS" 1931966bf024Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1932966bf024Smrg 1933966bf024Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1934966bf024Smrg lt_cv_dlopen_self, [dnl 19359384b2f3Smrg _LT_TRY_DLOPEN_SELF( 1936966bf024Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1937966bf024Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1938966bf024Smrg ]) 1939966bf024Smrg 1940966bf024Smrg if test "x$lt_cv_dlopen_self" = xyes; then 19419384b2f3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1942966bf024Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19439384b2f3Smrg lt_cv_dlopen_self_static, [dnl 19449384b2f3Smrg _LT_TRY_DLOPEN_SELF( 1945966bf024Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1946966bf024Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1947966bf024Smrg ]) 1948966bf024Smrg fi 1949966bf024Smrg 1950966bf024Smrg CPPFLAGS="$save_CPPFLAGS" 1951966bf024Smrg LDFLAGS="$save_LDFLAGS" 1952966bf024Smrg LIBS="$save_LIBS" 1953966bf024Smrg ;; 1954966bf024Smrg esac 1955966bf024Smrg 1956966bf024Smrg case $lt_cv_dlopen_self in 1957966bf024Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1958966bf024Smrg *) enable_dlopen_self=unknown ;; 1959966bf024Smrg esac 1960966bf024Smrg 1961966bf024Smrg case $lt_cv_dlopen_self_static in 1962966bf024Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1963966bf024Smrg *) enable_dlopen_self_static=unknown ;; 1964966bf024Smrg esac 1965966bf024Smrgfi 19669384b2f3Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19679384b2f3Smrg [Whether dlopen is supported]) 19689384b2f3Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19699384b2f3Smrg [Whether dlopen of programs is supported]) 19709384b2f3Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19719384b2f3Smrg [Whether dlopen of statically linked programs is supported]) 19729384b2f3Smrg])# LT_SYS_DLOPEN_SELF 1973966bf024Smrg 19749384b2f3Smrg# Old name: 19759384b2f3SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19769384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 19779384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978966bf024Smrg 19799384b2f3Smrg 19809384b2f3Smrg# _LT_COMPILER_C_O([TAGNAME]) 19819384b2f3Smrg# --------------------------- 19829384b2f3Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 19839384b2f3Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19849384b2f3Smrgm4_defun([_LT_COMPILER_C_O], 19859384b2f3Smrg[m4_require([_LT_DECL_SED])dnl 19869384b2f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19879384b2f3Smrgm4_require([_LT_TAG_COMPILER])dnl 1988966bf024SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 19899384b2f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 19909384b2f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 19919384b2f3Smrg $RM -r conftest 2>/dev/null 1992966bf024Smrg mkdir conftest 1993966bf024Smrg cd conftest 1994966bf024Smrg mkdir out 19959384b2f3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996966bf024Smrg 1997966bf024Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1998966bf024Smrg # Insert the option either (1) after the last *FLAGS variable, or 1999966bf024Smrg # (2) before a word containing "conftest.", or (3) at the end. 2000966bf024Smrg # Note that $ac_compile itself does not contain backslashes and begins 2001966bf024Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2002966bf024Smrg lt_compile=`echo "$ac_compile" | $SED \ 20039384b2f3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2004966bf024Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2005966bf024Smrg -e 's:$: $lt_compiler_flag:'` 20069384b2f3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2007966bf024Smrg (eval "$lt_compile" 2>out/conftest.err) 2008966bf024Smrg ac_status=$? 2009966bf024Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20109384b2f3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2011966bf024Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2012966bf024Smrg then 2013966bf024Smrg # The compiler can only warn and ignore the option if not recognized 2014966bf024Smrg # So say no if there are warnings 20159384b2f3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20169384b2f3Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20179384b2f3Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20189384b2f3Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2019966bf024Smrg fi 2020966bf024Smrg fi 20219384b2f3Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20229384b2f3Smrg $RM conftest* 2023966bf024Smrg # SGI C++ compiler will create directory out/ii_files/ for 2024966bf024Smrg # template instantiation 20259384b2f3Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20269384b2f3Smrg $RM out/* && rmdir out 2027966bf024Smrg cd .. 20289384b2f3Smrg $RM -r conftest 20299384b2f3Smrg $RM conftest* 2030966bf024Smrg]) 20319384b2f3Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20329384b2f3Smrg [Does compiler simultaneously support -c and -o options?]) 20339384b2f3Smrg])# _LT_COMPILER_C_O 2034966bf024Smrg 2035966bf024Smrg 20369384b2f3Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20379384b2f3Smrg# ---------------------------------- 2038966bf024Smrg# Check to see if we can do hard links to lock some files if needed 20399384b2f3Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20409384b2f3Smrg[m4_require([_LT_ENABLE_LOCK])dnl 20419384b2f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20429384b2f3Smrg_LT_COMPILER_C_O([$1]) 2043966bf024Smrg 2044966bf024Smrghard_links="nottested" 20459384b2f3Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2046966bf024Smrg # do not overwrite the value of need_locks provided by the user 2047966bf024Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2048966bf024Smrg hard_links=yes 20499384b2f3Smrg $RM conftest* 2050966bf024Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2051966bf024Smrg touch conftest.a 2052966bf024Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2053966bf024Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2054966bf024Smrg AC_MSG_RESULT([$hard_links]) 2055966bf024Smrg if test "$hard_links" = no; then 2056966bf024Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2057966bf024Smrg need_locks=warn 2058966bf024Smrg fi 2059966bf024Smrgelse 2060966bf024Smrg need_locks=no 2061966bf024Smrgfi 20629384b2f3Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20639384b2f3Smrg])# _LT_COMPILER_FILE_LOCKS 2064966bf024Smrg 2065966bf024Smrg 20669384b2f3Smrg# _LT_CHECK_OBJDIR 20679384b2f3Smrg# ---------------- 20689384b2f3Smrgm4_defun([_LT_CHECK_OBJDIR], 2069966bf024Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2070966bf024Smrg[rm -f .libs 2>/dev/null 2071966bf024Smrgmkdir .libs 2>/dev/null 2072966bf024Smrgif test -d .libs; then 2073966bf024Smrg lt_cv_objdir=.libs 2074966bf024Smrgelse 2075966bf024Smrg # MS-DOS does not allow filenames that begin with a dot. 2076966bf024Smrg lt_cv_objdir=_libs 2077966bf024Smrgfi 2078966bf024Smrgrmdir .libs 2>/dev/null]) 2079966bf024Smrgobjdir=$lt_cv_objdir 20809384b2f3Smrg_LT_DECL([], [objdir], [0], 20819384b2f3Smrg [The name of the directory that contains temporary libtool files])dnl 20829384b2f3Smrgm4_pattern_allow([LT_OBJDIR])dnl 20839384b2f3SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20849384b2f3Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20859384b2f3Smrg])# _LT_CHECK_OBJDIR 2086966bf024Smrg 2087966bf024Smrg 20889384b2f3Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 20899384b2f3Smrg# -------------------------------------- 2090966bf024Smrg# Check hardcoding attributes. 20919384b2f3Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2092966bf024Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 20939384b2f3Smrg_LT_TAGVAR(hardcode_action, $1)= 20949384b2f3Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 20959384b2f3Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 20969384b2f3Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2097966bf024Smrg 20989384b2f3Smrg # We can hardcode non-existent directories. 20999384b2f3Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2100966bf024Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2101966bf024Smrg # have to relink, otherwise we might link with an installed library 2102966bf024Smrg # when we should be linking with a yet-to-be-installed one 21039384b2f3Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21049384b2f3Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2105966bf024Smrg # Linking always hardcodes the temporary library directory. 21069384b2f3Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2107966bf024Smrg else 2108966bf024Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21099384b2f3Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2110966bf024Smrg fi 2111966bf024Smrgelse 2112966bf024Smrg # We cannot hardcode anything, or else we can only hardcode existing 2113966bf024Smrg # directories. 21149384b2f3Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2115966bf024Smrgfi 21169384b2f3SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2117966bf024Smrg 21189384b2f3Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21199384b2f3Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2120966bf024Smrg # Fast installation is not supported 2121966bf024Smrg enable_fast_install=no 2122966bf024Smrgelif test "$shlibpath_overrides_runpath" = yes || 2123966bf024Smrg test "$enable_shared" = no; then 2124966bf024Smrg # Fast installation is not necessary 2125966bf024Smrg enable_fast_install=needless 2126966bf024Smrgfi 21279384b2f3Smrg_LT_TAGDECL([], [hardcode_action], [0], 21289384b2f3Smrg [How to hardcode a shared library path into an executable]) 21299384b2f3Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2130966bf024Smrg 2131966bf024Smrg 21329384b2f3Smrg# _LT_CMD_STRIPLIB 21339384b2f3Smrg# ---------------- 21349384b2f3Smrgm4_defun([_LT_CMD_STRIPLIB], 21359384b2f3Smrg[m4_require([_LT_DECL_EGREP]) 21369384b2f3Smrgstriplib= 2137966bf024Smrgold_striplib= 2138966bf024SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21399384b2f3Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2140966bf024Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2141966bf024Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2142966bf024Smrg AC_MSG_RESULT([yes]) 2143966bf024Smrgelse 2144966bf024Smrg# FIXME - insert some real tests, host_os isn't really good enough 2145966bf024Smrg case $host_os in 21469384b2f3Smrg darwin*) 21479384b2f3Smrg if test -n "$STRIP" ; then 21489384b2f3Smrg striplib="$STRIP -x" 21499384b2f3Smrg old_striplib="$STRIP -S" 21509384b2f3Smrg AC_MSG_RESULT([yes]) 21519384b2f3Smrg else 21529384b2f3Smrg AC_MSG_RESULT([no]) 21539384b2f3Smrg fi 21549384b2f3Smrg ;; 21559384b2f3Smrg *) 21569384b2f3Smrg AC_MSG_RESULT([no]) 2157966bf024Smrg ;; 2158966bf024Smrg esac 2159966bf024Smrgfi 21609384b2f3Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21619384b2f3Smrg_LT_DECL([], [striplib], [1]) 21629384b2f3Smrg])# _LT_CMD_STRIPLIB 2163966bf024Smrg 2164966bf024Smrg 21659384b2f3Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2166966bf024Smrg# ----------------------------- 2167966bf024Smrg# PORTME Fill in your ld.so characteristics 21689384b2f3Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21699384b2f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21709384b2f3Smrgm4_require([_LT_DECL_EGREP])dnl 21719384b2f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21729384b2f3Smrgm4_require([_LT_DECL_OBJDUMP])dnl 21739384b2f3Smrgm4_require([_LT_DECL_SED])dnl 21749384b2f3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21759384b2f3SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21769384b2f3Smrgm4_if([$1], 21779384b2f3Smrg [], [ 2178966bf024Smrgif test "$GCC" = yes; then 21799384b2f3Smrg case $host_os in 21809384b2f3Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21819384b2f3Smrg *) lt_awk_arg="/^libraries:/" ;; 21829384b2f3Smrg esac 21839384b2f3Smrg case $host_os in 21849384b2f3Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 21859384b2f3Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 21869384b2f3Smrg esac 21879384b2f3Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 21889384b2f3Smrg case $lt_search_path_spec in 21899384b2f3Smrg *\;*) 2190966bf024Smrg # if the path contains ";" then we assume it to be the separator 2191966bf024Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2192966bf024Smrg # assumed that no part of a normal pathname contains ";" but that should 2193966bf024Smrg # okay in the real world where ";" in dirpaths is itself problematic. 21949384b2f3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 21959384b2f3Smrg ;; 21969384b2f3Smrg *) 21979384b2f3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 21989384b2f3Smrg ;; 21999384b2f3Smrg esac 22009384b2f3Smrg # Ok, now we have the path, separated by spaces, we can step through it 22019384b2f3Smrg # and add multilib dir if necessary. 22029384b2f3Smrg lt_tmp_lt_search_path_spec= 22039384b2f3Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22049384b2f3Smrg for lt_sys_path in $lt_search_path_spec; do 22059384b2f3Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22069384b2f3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22079384b2f3Smrg else 22089384b2f3Smrg test -d "$lt_sys_path" && \ 22099384b2f3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22109384b2f3Smrg fi 22119384b2f3Smrg done 22129384b2f3Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22139384b2f3SmrgBEGIN {RS=" "; FS="/|\n";} { 22149384b2f3Smrg lt_foo=""; 22159384b2f3Smrg lt_count=0; 22169384b2f3Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 22179384b2f3Smrg if ($lt_i != "" && $lt_i != ".") { 22189384b2f3Smrg if ($lt_i == "..") { 22199384b2f3Smrg lt_count++; 22209384b2f3Smrg } else { 22219384b2f3Smrg if (lt_count == 0) { 22229384b2f3Smrg lt_foo="/" $lt_i lt_foo; 22239384b2f3Smrg } else { 22249384b2f3Smrg lt_count--; 22259384b2f3Smrg } 22269384b2f3Smrg } 22279384b2f3Smrg } 22289384b2f3Smrg } 22299384b2f3Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22309384b2f3Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22319384b2f3Smrg}'` 22329384b2f3Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 22339384b2f3Smrg # for these hosts. 22349384b2f3Smrg case $host_os in 22359384b2f3Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 22369384b2f3Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 22379384b2f3Smrg esac 22389384b2f3Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22399384b2f3Smrgelse 22409384b2f3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22419384b2f3Smrgfi]) 22429384b2f3Smrglibrary_names_spec= 22439384b2f3Smrglibname_spec='lib$name' 22449384b2f3Smrgsoname_spec= 22459384b2f3Smrgshrext_cmds=".so" 22469384b2f3Smrgpostinstall_cmds= 22479384b2f3Smrgpostuninstall_cmds= 22489384b2f3Smrgfinish_cmds= 22499384b2f3Smrgfinish_eval= 22509384b2f3Smrgshlibpath_var= 22519384b2f3Smrgshlibpath_overrides_runpath=unknown 22529384b2f3Smrgversion_type=none 22539384b2f3Smrgdynamic_linker="$host_os ld.so" 22549384b2f3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2255966bf024Smrgneed_lib_prefix=unknown 2256966bf024Smrghardcode_into_libs=no 2257966bf024Smrg 2258966bf024Smrg# when you set need_version to no, make sure it does not cause -set_version 2259966bf024Smrg# flags to be left without arguments 2260966bf024Smrgneed_version=unknown 2261966bf024Smrg 2262966bf024Smrgcase $host_os in 2263966bf024Smrgaix3*) 22649384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2265966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2266966bf024Smrg shlibpath_var=LIBPATH 2267966bf024Smrg 2268966bf024Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2269966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2270966bf024Smrg ;; 2271966bf024Smrg 22729384b2f3Smrgaix[[4-9]]*) 22739384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2274966bf024Smrg need_lib_prefix=no 2275966bf024Smrg need_version=no 2276966bf024Smrg hardcode_into_libs=yes 2277966bf024Smrg if test "$host_cpu" = ia64; then 2278966bf024Smrg # AIX 5 supports IA64 2279966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2280966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2281966bf024Smrg else 2282966bf024Smrg # With GCC up to 2.95.x, collect2 would create an import file 2283966bf024Smrg # for dependence libraries. The import file would start with 2284966bf024Smrg # the line `#! .'. This would cause the generated library to 2285966bf024Smrg # depend on `.', always an invalid library. This was fixed in 2286966bf024Smrg # development snapshots of GCC prior to 3.0. 2287966bf024Smrg case $host_os in 2288966bf024Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2289966bf024Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2290966bf024Smrg echo ' yes ' 22919384b2f3Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2292966bf024Smrg : 2293966bf024Smrg else 2294966bf024Smrg can_build_shared=no 2295966bf024Smrg fi 2296966bf024Smrg ;; 2297966bf024Smrg esac 2298966bf024Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2299966bf024Smrg # soname into executable. Probably we can add versioning support to 2300966bf024Smrg # collect2, so additional links can be useful in future. 2301966bf024Smrg if test "$aix_use_runtimelinking" = yes; then 2302966bf024Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2303966bf024Smrg # instead of lib<name>.a to let people know that these are not 2304966bf024Smrg # typical AIX shared libraries. 2305966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2306966bf024Smrg else 2307966bf024Smrg # We preserve .a as extension for shared libraries through AIX4.2 2308966bf024Smrg # and later when we are not doing run time linking. 2309966bf024Smrg library_names_spec='${libname}${release}.a $libname.a' 2310966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2311966bf024Smrg fi 2312966bf024Smrg shlibpath_var=LIBPATH 2313966bf024Smrg fi 2314966bf024Smrg ;; 2315966bf024Smrg 2316966bf024Smrgamigaos*) 23179384b2f3Smrg case $host_cpu in 23189384b2f3Smrg powerpc) 23199384b2f3Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23209384b2f3Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23219384b2f3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23229384b2f3Smrg ;; 23239384b2f3Smrg m68k) 23249384b2f3Smrg library_names_spec='$libname.ixlibrary $libname.a' 23259384b2f3Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 23269384b2f3Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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' 23279384b2f3Smrg ;; 23289384b2f3Smrg esac 2329966bf024Smrg ;; 2330966bf024Smrg 2331966bf024Smrgbeos*) 2332966bf024Smrg library_names_spec='${libname}${shared_ext}' 2333966bf024Smrg dynamic_linker="$host_os ld.so" 2334966bf024Smrg shlibpath_var=LIBRARY_PATH 2335966bf024Smrg ;; 2336966bf024Smrg 23379384b2f3Smrgbsdi[[45]]*) 23389384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2339966bf024Smrg need_version=no 2340966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2341966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2342966bf024Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2343966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2344966bf024Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2345966bf024Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2346966bf024Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2347966bf024Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2348966bf024Smrg # libtool to hard-code these into programs 2349966bf024Smrg ;; 2350966bf024Smrg 23519384b2f3Smrgcygwin* | mingw* | pw32* | cegcc*) 2352966bf024Smrg version_type=windows 2353966bf024Smrg shrext_cmds=".dll" 2354966bf024Smrg need_version=no 2355966bf024Smrg need_lib_prefix=no 2356966bf024Smrg 23579384b2f3Smrg case $GCC,$cc_basename in 23589384b2f3Smrg yes,*) 23599384b2f3Smrg # gcc 2360966bf024Smrg library_names_spec='$libname.dll.a' 2361966bf024Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2362966bf024Smrg postinstall_cmds='base_file=`basename \${file}`~ 23639384b2f3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2364966bf024Smrg dldir=$destdir/`dirname \$dlpath`~ 2365966bf024Smrg test -d \$dldir || mkdir -p \$dldir~ 23669384b2f3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23679384b2f3Smrg chmod a+x \$dldir/$dlname~ 23689384b2f3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23699384b2f3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23709384b2f3Smrg fi' 2371966bf024Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2372966bf024Smrg dlpath=$dir/\$dldll~ 23739384b2f3Smrg $RM \$dlpath' 2374966bf024Smrg shlibpath_overrides_runpath=yes 2375966bf024Smrg 2376966bf024Smrg case $host_os in 2377966bf024Smrg cygwin*) 2378966bf024Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2379966bf024Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23809384b2f3Smrgm4_if([$1], [],[ 23819384b2f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2382966bf024Smrg ;; 23839384b2f3Smrg mingw* | cegcc*) 2384966bf024Smrg # MinGW DLLs use traditional 'lib' prefix 2385966bf024Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2386966bf024Smrg ;; 2387966bf024Smrg pw32*) 2388966bf024Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 23899384b2f3Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23909384b2f3Smrg ;; 23919384b2f3Smrg esac 23929384b2f3Smrg dynamic_linker='Win32 ld.exe' 23939384b2f3Smrg ;; 23949384b2f3Smrg 23959384b2f3Smrg *,cl*) 23969384b2f3Smrg # Native MSVC 23979384b2f3Smrg libname_spec='$name' 23989384b2f3Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23999384b2f3Smrg library_names_spec='${libname}.dll.lib' 24009384b2f3Smrg 24019384b2f3Smrg case $build_os in 24029384b2f3Smrg mingw*) 24039384b2f3Smrg sys_lib_search_path_spec= 24049384b2f3Smrg lt_save_ifs=$IFS 24059384b2f3Smrg IFS=';' 24069384b2f3Smrg for lt_path in $LIB 24079384b2f3Smrg do 24089384b2f3Smrg IFS=$lt_save_ifs 24099384b2f3Smrg # Let DOS variable expansion print the short 8.3 style file name. 24109384b2f3Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 24119384b2f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 24129384b2f3Smrg done 24139384b2f3Smrg IFS=$lt_save_ifs 24149384b2f3Smrg # Convert to MSYS style. 24159384b2f3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 24169384b2f3Smrg ;; 24179384b2f3Smrg cygwin*) 24189384b2f3Smrg # Convert to unix form, then to dos form, then back to unix form 24199384b2f3Smrg # but this time dos style (no spaces!) so that the unix form looks 24209384b2f3Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 24219384b2f3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 24229384b2f3Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 24239384b2f3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24249384b2f3Smrg ;; 24259384b2f3Smrg *) 24269384b2f3Smrg sys_lib_search_path_spec="$LIB" 24279384b2f3Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 24289384b2f3Smrg # It is most probably a Windows format PATH. 24299384b2f3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 24309384b2f3Smrg else 24319384b2f3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 24329384b2f3Smrg fi 24339384b2f3Smrg # FIXME: find the short name or the path components, as spaces are 24349384b2f3Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2435966bf024Smrg ;; 2436966bf024Smrg esac 24379384b2f3Smrg 24389384b2f3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 24399384b2f3Smrg postinstall_cmds='base_file=`basename \${file}`~ 24409384b2f3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 24419384b2f3Smrg dldir=$destdir/`dirname \$dlpath`~ 24429384b2f3Smrg test -d \$dldir || mkdir -p \$dldir~ 24439384b2f3Smrg $install_prog $dir/$dlname \$dldir/$dlname' 24449384b2f3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 24459384b2f3Smrg dlpath=$dir/\$dldll~ 24469384b2f3Smrg $RM \$dlpath' 24479384b2f3Smrg shlibpath_overrides_runpath=yes 24489384b2f3Smrg dynamic_linker='Win32 link.exe' 2449966bf024Smrg ;; 2450966bf024Smrg 2451966bf024Smrg *) 24529384b2f3Smrg # Assume MSVC wrapper 2453966bf024Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 24549384b2f3Smrg dynamic_linker='Win32 ld.exe' 2455966bf024Smrg ;; 2456966bf024Smrg esac 2457966bf024Smrg # FIXME: first we should search . and the directory the executable is in 2458966bf024Smrg shlibpath_var=PATH 2459966bf024Smrg ;; 2460966bf024Smrg 2461966bf024Smrgdarwin* | rhapsody*) 2462966bf024Smrg dynamic_linker="$host_os dyld" 2463966bf024Smrg version_type=darwin 2464966bf024Smrg need_lib_prefix=no 2465966bf024Smrg need_version=no 24669384b2f3Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2467966bf024Smrg soname_spec='${libname}${release}${major}$shared_ext' 2468966bf024Smrg shlibpath_overrides_runpath=yes 2469966bf024Smrg shlibpath_var=DYLD_LIBRARY_PATH 24709384b2f3Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24719384b2f3Smrgm4_if([$1], [],[ 24729384b2f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2473966bf024Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2474966bf024Smrg ;; 2475966bf024Smrg 2476966bf024Smrgdgux*) 24779384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2478966bf024Smrg need_lib_prefix=no 2479966bf024Smrg need_version=no 2480966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2481966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2482966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2483966bf024Smrg ;; 2484966bf024Smrg 24859384b2f3Smrgfreebsd* | dragonfly*) 24869384b2f3Smrg # DragonFly does not have aout. When/if they implement a new 24879384b2f3Smrg # versioning mechanism, adjust this. 24889384b2f3Smrg if test -x /usr/bin/objformat; then 24899384b2f3Smrg objformat=`/usr/bin/objformat` 24909384b2f3Smrg else 24919384b2f3Smrg case $host_os in 24929384b2f3Smrg freebsd[[23]].*) objformat=aout ;; 24939384b2f3Smrg *) objformat=elf ;; 24949384b2f3Smrg esac 24959384b2f3Smrg fi 2496966bf024Smrg version_type=freebsd-$objformat 2497966bf024Smrg case $version_type in 2498966bf024Smrg freebsd-elf*) 2499966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2500966bf024Smrg need_version=no 2501966bf024Smrg need_lib_prefix=no 2502966bf024Smrg ;; 2503966bf024Smrg freebsd-*) 2504966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2505966bf024Smrg need_version=yes 2506966bf024Smrg ;; 2507966bf024Smrg esac 2508966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2509966bf024Smrg case $host_os in 25109384b2f3Smrg freebsd2.*) 2511966bf024Smrg shlibpath_overrides_runpath=yes 2512966bf024Smrg ;; 25139384b2f3Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2514966bf024Smrg shlibpath_overrides_runpath=yes 2515966bf024Smrg hardcode_into_libs=yes 2516966bf024Smrg ;; 25179384b2f3Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25189384b2f3Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2519966bf024Smrg shlibpath_overrides_runpath=no 2520966bf024Smrg hardcode_into_libs=yes 2521966bf024Smrg ;; 25229384b2f3Smrg *) # from 4.6 on, and DragonFly 25239384b2f3Smrg shlibpath_overrides_runpath=yes 25249384b2f3Smrg hardcode_into_libs=yes 25259384b2f3Smrg ;; 2526966bf024Smrg esac 2527966bf024Smrg ;; 2528966bf024Smrg 2529966bf024Smrggnu*) 25309384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2531966bf024Smrg need_lib_prefix=no 2532966bf024Smrg need_version=no 2533966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2534966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2535966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 25369384b2f3Smrg shlibpath_overrides_runpath=no 25379384b2f3Smrg hardcode_into_libs=yes 25389384b2f3Smrg ;; 25399384b2f3Smrg 25409384b2f3Smrghaiku*) 25419384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 25429384b2f3Smrg need_lib_prefix=no 25439384b2f3Smrg need_version=no 25449384b2f3Smrg dynamic_linker="$host_os runtime_loader" 25459384b2f3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25469384b2f3Smrg soname_spec='${libname}${release}${shared_ext}$major' 25479384b2f3Smrg shlibpath_var=LIBRARY_PATH 25489384b2f3Smrg shlibpath_overrides_runpath=yes 25499384b2f3Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2550966bf024Smrg hardcode_into_libs=yes 2551966bf024Smrg ;; 2552966bf024Smrg 2553966bf024Smrghpux9* | hpux10* | hpux11*) 2554966bf024Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2555966bf024Smrg # link against other versions. 2556966bf024Smrg version_type=sunos 2557966bf024Smrg need_lib_prefix=no 2558966bf024Smrg need_version=no 25599384b2f3Smrg case $host_cpu in 2560966bf024Smrg ia64*) 2561966bf024Smrg shrext_cmds='.so' 2562966bf024Smrg hardcode_into_libs=yes 2563966bf024Smrg dynamic_linker="$host_os dld.so" 2564966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2565966bf024Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2566966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2567966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2568966bf024Smrg if test "X$HPUX_IA64_MODE" = X32; then 2569966bf024Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2570966bf024Smrg else 2571966bf024Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2572966bf024Smrg fi 2573966bf024Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2574966bf024Smrg ;; 25759384b2f3Smrg hppa*64*) 25769384b2f3Smrg shrext_cmds='.sl' 25779384b2f3Smrg hardcode_into_libs=yes 25789384b2f3Smrg dynamic_linker="$host_os dld.sl" 25799384b2f3Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25809384b2f3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25819384b2f3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25829384b2f3Smrg soname_spec='${libname}${release}${shared_ext}$major' 25839384b2f3Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25849384b2f3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25859384b2f3Smrg ;; 25869384b2f3Smrg *) 2587966bf024Smrg shrext_cmds='.sl' 2588966bf024Smrg dynamic_linker="$host_os dld.sl" 2589966bf024Smrg shlibpath_var=SHLIB_PATH 2590966bf024Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2591966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2592966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2593966bf024Smrg ;; 2594966bf024Smrg esac 25959384b2f3Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2596966bf024Smrg postinstall_cmds='chmod 555 $lib' 25979384b2f3Smrg # or fails outright, so override atomically: 25989384b2f3Smrg install_override_mode=555 25999384b2f3Smrg ;; 26009384b2f3Smrg 26019384b2f3Smrginterix[[3-9]]*) 26029384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 26039384b2f3Smrg need_lib_prefix=no 26049384b2f3Smrg need_version=no 26059384b2f3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26069384b2f3Smrg soname_spec='${libname}${release}${shared_ext}$major' 26079384b2f3Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26089384b2f3Smrg shlibpath_var=LD_LIBRARY_PATH 26099384b2f3Smrg shlibpath_overrides_runpath=no 26109384b2f3Smrg hardcode_into_libs=yes 2611966bf024Smrg ;; 2612966bf024Smrg 2613966bf024Smrgirix5* | irix6* | nonstopux*) 2614966bf024Smrg case $host_os in 2615966bf024Smrg nonstopux*) version_type=nonstopux ;; 2616966bf024Smrg *) 2617966bf024Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 26189384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2619966bf024Smrg else 2620966bf024Smrg version_type=irix 2621966bf024Smrg fi ;; 2622966bf024Smrg esac 2623966bf024Smrg need_lib_prefix=no 2624966bf024Smrg need_version=no 2625966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2626966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2627966bf024Smrg case $host_os in 2628966bf024Smrg irix5* | nonstopux*) 2629966bf024Smrg libsuff= shlibsuff= 2630966bf024Smrg ;; 2631966bf024Smrg *) 2632966bf024Smrg case $LD in # libtool.m4 will add one of these switches to LD 2633966bf024Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2634966bf024Smrg libsuff= shlibsuff= libmagic=32-bit;; 2635966bf024Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2636966bf024Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2637966bf024Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2638966bf024Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2639966bf024Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2640966bf024Smrg esac 2641966bf024Smrg ;; 2642966bf024Smrg esac 2643966bf024Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2644966bf024Smrg shlibpath_overrides_runpath=no 2645966bf024Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2646966bf024Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2647966bf024Smrg hardcode_into_libs=yes 2648966bf024Smrg ;; 2649966bf024Smrg 2650966bf024Smrg# No shared lib support for Linux oldld, aout, or coff. 2651966bf024Smrglinux*oldld* | linux*aout* | linux*coff*) 2652966bf024Smrg dynamic_linker=no 2653966bf024Smrg ;; 2654966bf024Smrg 26559384b2f3Smrg# This must be glibc/ELF. 26569384b2f3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 26579384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2658966bf024Smrg need_lib_prefix=no 2659966bf024Smrg need_version=no 2660966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2661966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2662966bf024Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2663966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2664966bf024Smrg shlibpath_overrides_runpath=no 26659384b2f3Smrg 26669384b2f3Smrg # Some binutils ld are patched to set DT_RUNPATH 26679384b2f3Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 26689384b2f3Smrg [lt_cv_shlibpath_overrides_runpath=no 26699384b2f3Smrg save_LDFLAGS=$LDFLAGS 26709384b2f3Smrg save_libdir=$libdir 26719384b2f3Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 26729384b2f3Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 26739384b2f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 26749384b2f3Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 26759384b2f3Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 26769384b2f3Smrg LDFLAGS=$save_LDFLAGS 26779384b2f3Smrg libdir=$save_libdir 26789384b2f3Smrg ]) 26799384b2f3Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26809384b2f3Smrg 2681966bf024Smrg # This implies no fast_install, which is unacceptable. 2682966bf024Smrg # Some rework will be needed to allow for fast_install 2683966bf024Smrg # before this can be enabled. 2684966bf024Smrg hardcode_into_libs=yes 2685966bf024Smrg 2686966bf024Smrg # Append ld.so.conf contents to the search path 2687966bf024Smrg if test -f /etc/ld.so.conf; then 26889384b2f3Smrg 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' ' '` 26899384b2f3Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2690966bf024Smrg fi 2691966bf024Smrg 2692966bf024Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2693966bf024Smrg # powerpc, because MkLinux only supported shared libraries with the 2694966bf024Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2695966bf024Smrg # most powerpc-linux boxes support dynamic linking these days and 2696966bf024Smrg # people can always --disable-shared, the test was removed, and we 2697966bf024Smrg # assume the GNU/Linux dynamic linker is in use. 2698966bf024Smrg dynamic_linker='GNU/Linux ld.so' 2699966bf024Smrg ;; 2700966bf024Smrg 2701966bf024Smrgnetbsd*) 2702966bf024Smrg version_type=sunos 2703966bf024Smrg need_lib_prefix=no 2704966bf024Smrg need_version=no 27059384b2f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2706966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2707966bf024Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2708966bf024Smrg dynamic_linker='NetBSD (a.out) ld.so' 2709966bf024Smrg else 2710966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2711966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2712966bf024Smrg dynamic_linker='NetBSD ld.elf_so' 2713966bf024Smrg fi 2714966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2715966bf024Smrg shlibpath_overrides_runpath=yes 2716966bf024Smrg hardcode_into_libs=yes 2717966bf024Smrg ;; 2718966bf024Smrg 2719966bf024Smrgnewsos6) 27209384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2721966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2722966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2723966bf024Smrg shlibpath_overrides_runpath=yes 2724966bf024Smrg ;; 2725966bf024Smrg 27269384b2f3Smrg*nto* | *qnx*) 27279384b2f3Smrg version_type=qnx 2728966bf024Smrg need_lib_prefix=no 2729966bf024Smrg need_version=no 2730966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2731966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2732966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 27339384b2f3Smrg shlibpath_overrides_runpath=no 27349384b2f3Smrg hardcode_into_libs=yes 27359384b2f3Smrg dynamic_linker='ldqnx.so' 2736966bf024Smrg ;; 2737966bf024Smrg 2738966bf024Smrgopenbsd*) 2739966bf024Smrg version_type=sunos 27409384b2f3Smrg sys_lib_dlsearch_path_spec="/usr/lib" 2741966bf024Smrg need_lib_prefix=no 27429384b2f3Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27439384b2f3Smrg case $host_os in 27449384b2f3Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27459384b2f3Smrg *) need_version=no ;; 27469384b2f3Smrg esac 2747966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2748966bf024Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2749966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 27509384b2f3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2751966bf024Smrg case $host_os in 2752966bf024Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 2753966bf024Smrg shlibpath_overrides_runpath=no 2754966bf024Smrg ;; 2755966bf024Smrg *) 2756966bf024Smrg shlibpath_overrides_runpath=yes 2757966bf024Smrg ;; 2758966bf024Smrg esac 2759966bf024Smrg else 2760966bf024Smrg shlibpath_overrides_runpath=yes 2761966bf024Smrg fi 2762966bf024Smrg ;; 2763966bf024Smrg 2764966bf024Smrgos2*) 2765966bf024Smrg libname_spec='$name' 2766966bf024Smrg shrext_cmds=".dll" 2767966bf024Smrg need_lib_prefix=no 2768966bf024Smrg library_names_spec='$libname${shared_ext} $libname.a' 2769966bf024Smrg dynamic_linker='OS/2 ld.exe' 2770966bf024Smrg shlibpath_var=LIBPATH 2771966bf024Smrg ;; 2772966bf024Smrg 2773966bf024Smrgosf3* | osf4* | osf5*) 2774966bf024Smrg version_type=osf 2775966bf024Smrg need_lib_prefix=no 2776966bf024Smrg need_version=no 2777966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2778966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2779966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2780966bf024Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2781966bf024Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2782966bf024Smrg ;; 2783966bf024Smrg 27849384b2f3Smrgrdos*) 27859384b2f3Smrg dynamic_linker=no 2786966bf024Smrg ;; 2787966bf024Smrg 2788966bf024Smrgsolaris*) 27899384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2790966bf024Smrg need_lib_prefix=no 2791966bf024Smrg need_version=no 2792966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2793966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2794966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2795966bf024Smrg shlibpath_overrides_runpath=yes 2796966bf024Smrg hardcode_into_libs=yes 2797966bf024Smrg # ldd complains unless libraries are executable 2798966bf024Smrg postinstall_cmds='chmod +x $lib' 2799966bf024Smrg ;; 2800966bf024Smrg 2801966bf024Smrgsunos4*) 2802966bf024Smrg version_type=sunos 2803966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2804966bf024Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2805966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2806966bf024Smrg shlibpath_overrides_runpath=yes 2807966bf024Smrg if test "$with_gnu_ld" = yes; then 2808966bf024Smrg need_lib_prefix=no 2809966bf024Smrg fi 2810966bf024Smrg need_version=yes 2811966bf024Smrg ;; 2812966bf024Smrg 28139384b2f3Smrgsysv4 | sysv4.3*) 28149384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2815966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2816966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2817966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2818966bf024Smrg case $host_vendor in 2819966bf024Smrg sni) 2820966bf024Smrg shlibpath_overrides_runpath=no 2821966bf024Smrg need_lib_prefix=no 2822966bf024Smrg runpath_var=LD_RUN_PATH 2823966bf024Smrg ;; 2824966bf024Smrg siemens) 2825966bf024Smrg need_lib_prefix=no 2826966bf024Smrg ;; 2827966bf024Smrg motorola) 2828966bf024Smrg need_lib_prefix=no 2829966bf024Smrg need_version=no 2830966bf024Smrg shlibpath_overrides_runpath=no 2831966bf024Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2832966bf024Smrg ;; 2833966bf024Smrg esac 2834966bf024Smrg ;; 2835966bf024Smrg 2836966bf024Smrgsysv4*MP*) 2837966bf024Smrg if test -d /usr/nec ;then 28389384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2839966bf024Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2840966bf024Smrg soname_spec='$libname${shared_ext}.$major' 2841966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2842966bf024Smrg fi 2843966bf024Smrg ;; 2844966bf024Smrg 28459384b2f3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28469384b2f3Smrg version_type=freebsd-elf 28479384b2f3Smrg need_lib_prefix=no 28489384b2f3Smrg need_version=no 28499384b2f3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28509384b2f3Smrg soname_spec='${libname}${release}${shared_ext}$major' 28519384b2f3Smrg shlibpath_var=LD_LIBRARY_PATH 28529384b2f3Smrg shlibpath_overrides_runpath=yes 28539384b2f3Smrg hardcode_into_libs=yes 28549384b2f3Smrg if test "$with_gnu_ld" = yes; then 28559384b2f3Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28569384b2f3Smrg else 28579384b2f3Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28589384b2f3Smrg case $host_os in 28599384b2f3Smrg sco3.2v5*) 28609384b2f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28619384b2f3Smrg ;; 28629384b2f3Smrg esac 28639384b2f3Smrg fi 28649384b2f3Smrg sys_lib_dlsearch_path_spec='/usr/lib' 28659384b2f3Smrg ;; 28669384b2f3Smrg 28679384b2f3Smrgtpf*) 28689384b2f3Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 28699384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 28709384b2f3Smrg need_lib_prefix=no 28719384b2f3Smrg need_version=no 28729384b2f3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28739384b2f3Smrg shlibpath_var=LD_LIBRARY_PATH 28749384b2f3Smrg shlibpath_overrides_runpath=no 28759384b2f3Smrg hardcode_into_libs=yes 28769384b2f3Smrg ;; 28779384b2f3Smrg 2878966bf024Smrguts4*) 28799384b2f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 2880966bf024Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2881966bf024Smrg soname_spec='${libname}${release}${shared_ext}$major' 2882966bf024Smrg shlibpath_var=LD_LIBRARY_PATH 2883966bf024Smrg ;; 2884966bf024Smrg 2885966bf024Smrg*) 2886966bf024Smrg dynamic_linker=no 2887966bf024Smrg ;; 2888966bf024Smrgesac 2889966bf024SmrgAC_MSG_RESULT([$dynamic_linker]) 2890966bf024Smrgtest "$dynamic_linker" = no && can_build_shared=no 2891966bf024Smrg 28929384b2f3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 28939384b2f3Smrgif test "$GCC" = yes; then 28949384b2f3Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 28959384b2f3Smrgfi 2896966bf024Smrg 28979384b2f3Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 28989384b2f3Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 28999384b2f3Smrgfi 29009384b2f3Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29019384b2f3Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29029384b2f3Smrgfi 2903966bf024Smrg 29049384b2f3Smrg_LT_DECL([], [variables_saved_for_relink], [1], 29059384b2f3Smrg [Variables whose values should be saved in libtool wrapper scripts and 29069384b2f3Smrg restored at link time]) 29079384b2f3Smrg_LT_DECL([], [need_lib_prefix], [0], 29089384b2f3Smrg [Do we need the "lib" prefix for modules?]) 29099384b2f3Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29109384b2f3Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29119384b2f3Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29129384b2f3Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29139384b2f3Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29149384b2f3Smrg [Is shlibpath searched before the hard-coded library search path?]) 29159384b2f3Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29169384b2f3Smrg_LT_DECL([], [library_names_spec], [1], 29179384b2f3Smrg [[List of archive names. First name is the real one, the rest are links. 29189384b2f3Smrg The last name is the one that the linker finds with -lNAME]]) 29199384b2f3Smrg_LT_DECL([], [soname_spec], [1], 29209384b2f3Smrg [[The coded name of the library, if different from the real name]]) 29219384b2f3Smrg_LT_DECL([], [install_override_mode], [1], 29229384b2f3Smrg [Permission mode override for installation of shared libraries]) 29239384b2f3Smrg_LT_DECL([], [postinstall_cmds], [2], 29249384b2f3Smrg [Command to use after installation of a shared archive]) 29259384b2f3Smrg_LT_DECL([], [postuninstall_cmds], [2], 29269384b2f3Smrg [Command to use after uninstallation of a shared archive]) 29279384b2f3Smrg_LT_DECL([], [finish_cmds], [2], 29289384b2f3Smrg [Commands used to finish a libtool library installation in a directory]) 29299384b2f3Smrg_LT_DECL([], [finish_eval], [1], 29309384b2f3Smrg [[As "finish_cmds", except a single script fragment to be evaled but 29319384b2f3Smrg not shown]]) 29329384b2f3Smrg_LT_DECL([], [hardcode_into_libs], [0], 29339384b2f3Smrg [Whether we should hardcode library paths into libraries]) 29349384b2f3Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29359384b2f3Smrg [Compile-time system search path for libraries]) 29369384b2f3Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29379384b2f3Smrg [Run-time system search path for libraries]) 29389384b2f3Smrg])# _LT_SYS_DYNAMIC_LINKER 29399384b2f3Smrg 29409384b2f3Smrg 29419384b2f3Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 29429384b2f3Smrg# -------------------------- 29439384b2f3Smrg# find a file program which can recognize shared library 29449384b2f3SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29459384b2f3Smrg[m4_require([_LT_DECL_EGREP])dnl 29469384b2f3SmrgAC_MSG_CHECKING([for $1]) 29479384b2f3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29489384b2f3Smrg[case $MAGIC_CMD in 29499384b2f3Smrg[[\\/*] | ?:[\\/]*]) 29509384b2f3Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 29519384b2f3Smrg ;; 29529384b2f3Smrg*) 29539384b2f3Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 29549384b2f3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29559384b2f3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 29569384b2f3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 29579384b2f3Smrgdnl not every word. This closes a longstanding sh security hole. 29589384b2f3Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29599384b2f3Smrg for ac_dir in $ac_dummy; do 2960966bf024Smrg IFS="$lt_save_ifs" 29619384b2f3Smrg test -z "$ac_dir" && ac_dir=. 29629384b2f3Smrg if test -f $ac_dir/$1; then 29639384b2f3Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29649384b2f3Smrg if test -n "$file_magic_test_file"; then 29659384b2f3Smrg case $deplibs_check_method in 29669384b2f3Smrg "file_magic "*) 29679384b2f3Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29689384b2f3Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29699384b2f3Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29709384b2f3Smrg $EGREP "$file_magic_regex" > /dev/null; then 29719384b2f3Smrg : 29729384b2f3Smrg else 29739384b2f3Smrg cat <<_LT_EOF 1>&2 2974966bf024Smrg 29759384b2f3Smrg*** Warning: the command libtool uses to detect shared libraries, 29769384b2f3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 29779384b2f3Smrg*** The result is that libtool may fail to recognize shared libraries 29789384b2f3Smrg*** as such. This will affect the creation of libtool libraries that 29799384b2f3Smrg*** depend on shared libraries, but programs linked with such libtool 29809384b2f3Smrg*** libraries will work regardless of this problem. Nevertheless, you 29819384b2f3Smrg*** may want to report the problem to your system manager and/or to 29829384b2f3Smrg*** bug-libtool@gnu.org 2983966bf024Smrg 29849384b2f3Smrg_LT_EOF 29859384b2f3Smrg fi ;; 29869384b2f3Smrg esac 29879384b2f3Smrg fi 29889384b2f3Smrg break 2989966bf024Smrg fi 2990966bf024Smrg done 2991966bf024Smrg IFS="$lt_save_ifs" 29929384b2f3Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 29939384b2f3Smrg ;; 29949384b2f3Smrgesac]) 29959384b2f3SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29969384b2f3Smrgif test -n "$MAGIC_CMD"; then 29979384b2f3Smrg AC_MSG_RESULT($MAGIC_CMD) 29989384b2f3Smrgelse 29999384b2f3Smrg AC_MSG_RESULT(no) 30009384b2f3Smrgfi 30019384b2f3Smrg_LT_DECL([], [MAGIC_CMD], [0], 30029384b2f3Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30039384b2f3Smrg])# _LT_PATH_TOOL_PREFIX 30049384b2f3Smrg 30059384b2f3Smrg# Old name: 30069384b2f3SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30079384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 30089384b2f3Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 30099384b2f3Smrg 3010966bf024Smrg 30119384b2f3Smrg# _LT_PATH_MAGIC 30129384b2f3Smrg# -------------- 30139384b2f3Smrg# find a file program which can recognize a shared library 30149384b2f3Smrgm4_defun([_LT_PATH_MAGIC], 30159384b2f3Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30169384b2f3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 30179384b2f3Smrg if test -n "$ac_tool_prefix"; then 30189384b2f3Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3019966bf024Smrg else 30209384b2f3Smrg MAGIC_CMD=: 3021966bf024Smrg fi 3022966bf024Smrgfi 30239384b2f3Smrg])# _LT_PATH_MAGIC 3024966bf024Smrg 3025966bf024Smrg 30269384b2f3Smrg# LT_PATH_LD 3027966bf024Smrg# ---------- 3028966bf024Smrg# find the pathname to the GNU or non-GNU linker 30299384b2f3SmrgAC_DEFUN([LT_PATH_LD], 30309384b2f3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3031966bf024SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3032966bf024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30339384b2f3Smrgm4_require([_LT_DECL_SED])dnl 30349384b2f3Smrgm4_require([_LT_DECL_EGREP])dnl 30359384b2f3Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30369384b2f3Smrg 30379384b2f3SmrgAC_ARG_WITH([gnu-ld], 30389384b2f3Smrg [AS_HELP_STRING([--with-gnu-ld], 30399384b2f3Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30409384b2f3Smrg [test "$withval" = no || with_gnu_ld=yes], 30419384b2f3Smrg [with_gnu_ld=no])dnl 30429384b2f3Smrg 3043966bf024Smrgac_prog=ld 3044966bf024Smrgif test "$GCC" = yes; then 3045966bf024Smrg # Check if gcc -print-prog-name=ld gives a path. 3046966bf024Smrg AC_MSG_CHECKING([for ld used by $CC]) 3047966bf024Smrg case $host in 3048966bf024Smrg *-*-mingw*) 3049966bf024Smrg # gcc leaves a trailing carriage return which upsets mingw 3050966bf024Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3051966bf024Smrg *) 3052966bf024Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3053966bf024Smrg esac 3054966bf024Smrg case $ac_prog in 3055966bf024Smrg # Accept absolute paths. 3056966bf024Smrg [[\\/]]* | ?:[[\\/]]*) 3057966bf024Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3058966bf024Smrg # Canonicalize the pathname of ld 30599384b2f3Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30609384b2f3Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30619384b2f3Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3062966bf024Smrg done 3063966bf024Smrg test -z "$LD" && LD="$ac_prog" 3064966bf024Smrg ;; 3065966bf024Smrg "") 3066966bf024Smrg # If it fails, then pretend we aren't using GCC. 3067966bf024Smrg ac_prog=ld 3068966bf024Smrg ;; 3069966bf024Smrg *) 3070966bf024Smrg # If it is relative, then search for the first ld in PATH. 3071966bf024Smrg with_gnu_ld=unknown 3072966bf024Smrg ;; 3073966bf024Smrg esac 3074966bf024Smrgelif test "$with_gnu_ld" = yes; then 3075966bf024Smrg AC_MSG_CHECKING([for GNU ld]) 3076966bf024Smrgelse 3077966bf024Smrg AC_MSG_CHECKING([for non-GNU ld]) 3078966bf024Smrgfi 3079966bf024SmrgAC_CACHE_VAL(lt_cv_path_LD, 3080966bf024Smrg[if test -z "$LD"; then 3081966bf024Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3082966bf024Smrg for ac_dir in $PATH; do 3083966bf024Smrg IFS="$lt_save_ifs" 3084966bf024Smrg test -z "$ac_dir" && ac_dir=. 3085966bf024Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3086966bf024Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 3087966bf024Smrg # Check to see if the program is GNU ld. I'd rather use --version, 30889384b2f3Smrg # but apparently some variants of GNU ld only accept -v. 3089966bf024Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3090966bf024Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3091966bf024Smrg *GNU* | *'with BFD'*) 3092966bf024Smrg test "$with_gnu_ld" != no && break 3093966bf024Smrg ;; 3094966bf024Smrg *) 3095966bf024Smrg test "$with_gnu_ld" != yes && break 3096966bf024Smrg ;; 3097966bf024Smrg esac 3098966bf024Smrg fi 3099966bf024Smrg done 3100966bf024Smrg IFS="$lt_save_ifs" 3101966bf024Smrgelse 3102966bf024Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3103966bf024Smrgfi]) 3104966bf024SmrgLD="$lt_cv_path_LD" 3105966bf024Smrgif test -n "$LD"; then 3106966bf024Smrg AC_MSG_RESULT($LD) 3107966bf024Smrgelse 3108966bf024Smrg AC_MSG_RESULT(no) 3109966bf024Smrgfi 3110966bf024Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31119384b2f3Smrg_LT_PATH_LD_GNU 31129384b2f3SmrgAC_SUBST([LD]) 3113966bf024Smrg 31149384b2f3Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31159384b2f3Smrg])# LT_PATH_LD 3116966bf024Smrg 31179384b2f3Smrg# Old names: 31189384b2f3SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31199384b2f3SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31209384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 31219384b2f3Smrgdnl AC_DEFUN([AM_PROG_LD], []) 31229384b2f3Smrgdnl AC_DEFUN([AC_PROG_LD], []) 31239384b2f3Smrg 31249384b2f3Smrg 31259384b2f3Smrg# _LT_PATH_LD_GNU 31269384b2f3Smrg#- -------------- 31279384b2f3Smrgm4_defun([_LT_PATH_LD_GNU], 31289384b2f3Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31299384b2f3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3130966bf024Smrgcase `$LD -v 2>&1 </dev/null` in 3131966bf024Smrg*GNU* | *'with BFD'*) 3132966bf024Smrg lt_cv_prog_gnu_ld=yes 3133966bf024Smrg ;; 3134966bf024Smrg*) 3135966bf024Smrg lt_cv_prog_gnu_ld=no 3136966bf024Smrg ;; 3137966bf024Smrgesac]) 3138966bf024Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31399384b2f3Smrg])# _LT_PATH_LD_GNU 3140966bf024Smrg 3141966bf024Smrg 31429384b2f3Smrg# _LT_CMD_RELOAD 31439384b2f3Smrg# -------------- 3144966bf024Smrg# find reload flag for linker 3145966bf024Smrg# -- PORTME Some linkers may need a different reload flag. 31469384b2f3Smrgm4_defun([_LT_CMD_RELOAD], 3147966bf024Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3148966bf024Smrg lt_cv_ld_reload_flag, 3149966bf024Smrg [lt_cv_ld_reload_flag='-r']) 3150966bf024Smrgreload_flag=$lt_cv_ld_reload_flag 3151966bf024Smrgcase $reload_flag in 3152966bf024Smrg"" | " "*) ;; 3153966bf024Smrg*) reload_flag=" $reload_flag" ;; 3154966bf024Smrgesac 3155966bf024Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 31569384b2f3Smrgcase $host_os in 31579384b2f3Smrg cygwin* | mingw* | pw32* | cegcc*) 31589384b2f3Smrg if test "$GCC" != yes; then 31599384b2f3Smrg reload_cmds=false 31609384b2f3Smrg fi 31619384b2f3Smrg ;; 31629384b2f3Smrg darwin*) 31639384b2f3Smrg if test "$GCC" = yes; then 31649384b2f3Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31659384b2f3Smrg else 31669384b2f3Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31679384b2f3Smrg fi 31689384b2f3Smrg ;; 31699384b2f3Smrgesac 31709384b2f3Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 31719384b2f3Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31729384b2f3Smrg])# _LT_CMD_RELOAD 3173966bf024Smrg 3174966bf024Smrg 31759384b2f3Smrg# _LT_CHECK_MAGIC_METHOD 31769384b2f3Smrg# ---------------------- 3177966bf024Smrg# how to check for library dependencies 3178966bf024Smrg# -- PORTME fill in with the dynamic library characteristics 31799384b2f3Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31809384b2f3Smrg[m4_require([_LT_DECL_EGREP]) 31819384b2f3Smrgm4_require([_LT_DECL_OBJDUMP]) 31829384b2f3SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3183966bf024Smrglt_cv_deplibs_check_method, 3184966bf024Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3185966bf024Smrglt_cv_file_magic_test_file= 3186966bf024Smrglt_cv_deplibs_check_method='unknown' 3187966bf024Smrg# Need to set the preceding variable on all platforms that support 3188966bf024Smrg# interlibrary dependencies. 3189966bf024Smrg# 'none' -- dependencies not supported. 3190966bf024Smrg# `unknown' -- same as none, but documents that we really don't know. 3191966bf024Smrg# 'pass_all' -- all dependencies passed with no checks. 3192966bf024Smrg# 'test_compile' -- check by making test program. 3193966bf024Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3194966bf024Smrg# which responds to the $file_magic_cmd with a given extended regex. 3195966bf024Smrg# If you have `file' or equivalent on your system and you're not sure 3196966bf024Smrg# whether `pass_all' will *always* work, you probably want this one. 3197966bf024Smrg 3198966bf024Smrgcase $host_os in 31999384b2f3Smrgaix[[4-9]]*) 3200966bf024Smrg lt_cv_deplibs_check_method=pass_all 3201966bf024Smrg ;; 3202966bf024Smrg 3203966bf024Smrgbeos*) 3204966bf024Smrg lt_cv_deplibs_check_method=pass_all 3205966bf024Smrg ;; 3206966bf024Smrg 32079384b2f3Smrgbsdi[[45]]*) 3208966bf024Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3209966bf024Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3210966bf024Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3211966bf024Smrg ;; 3212966bf024Smrg 3213966bf024Smrgcygwin*) 3214966bf024Smrg # func_win32_libid is a shell function defined in ltmain.sh 3215966bf024Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3216966bf024Smrg lt_cv_file_magic_cmd='func_win32_libid' 3217966bf024Smrg ;; 3218966bf024Smrg 3219966bf024Smrgmingw* | pw32*) 3220966bf024Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 32219384b2f3Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32229384b2f3Smrg # unless we find 'file', for example because we are cross-compiling. 32239384b2f3Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 32249384b2f3Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32259384b2f3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32269384b2f3Smrg lt_cv_file_magic_cmd='func_win32_libid' 32279384b2f3Smrg else 32289384b2f3Smrg # Keep this pattern in sync with the one in func_win32_libid. 32299384b2f3Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32309384b2f3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32319384b2f3Smrg fi 32329384b2f3Smrg ;; 32339384b2f3Smrg 32349384b2f3Smrgcegcc*) 32359384b2f3Smrg # use the weaker test based on 'objdump'. See mingw*. 32369384b2f3Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3237966bf024Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3238966bf024Smrg ;; 3239966bf024Smrg 3240966bf024Smrgdarwin* | rhapsody*) 3241966bf024Smrg lt_cv_deplibs_check_method=pass_all 3242966bf024Smrg ;; 3243966bf024Smrg 32449384b2f3Smrgfreebsd* | dragonfly*) 32459384b2f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3246966bf024Smrg case $host_cpu in 3247966bf024Smrg i*86 ) 3248966bf024Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3249966bf024Smrg # Let's accept both of them until this is cleared up. 32509384b2f3Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3251966bf024Smrg lt_cv_file_magic_cmd=/usr/bin/file 3252966bf024Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3253966bf024Smrg ;; 3254966bf024Smrg esac 3255966bf024Smrg else 3256966bf024Smrg lt_cv_deplibs_check_method=pass_all 3257966bf024Smrg fi 3258966bf024Smrg ;; 3259966bf024Smrg 3260966bf024Smrggnu*) 3261966bf024Smrg lt_cv_deplibs_check_method=pass_all 3262966bf024Smrg ;; 3263966bf024Smrg 32649384b2f3Smrghaiku*) 32659384b2f3Smrg lt_cv_deplibs_check_method=pass_all 32669384b2f3Smrg ;; 32679384b2f3Smrg 3268966bf024Smrghpux10.20* | hpux11*) 3269966bf024Smrg lt_cv_file_magic_cmd=/usr/bin/file 32709384b2f3Smrg case $host_cpu in 3271966bf024Smrg ia64*) 3272966bf024Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3273966bf024Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3274966bf024Smrg ;; 3275966bf024Smrg hppa*64*) 32769384b2f3Smrg [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]'] 3277966bf024Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3278966bf024Smrg ;; 3279966bf024Smrg *) 32809384b2f3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3281966bf024Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3282966bf024Smrg ;; 3283966bf024Smrg esac 3284966bf024Smrg ;; 3285966bf024Smrg 32869384b2f3Smrginterix[[3-9]]*) 32879384b2f3Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32889384b2f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 32899384b2f3Smrg ;; 32909384b2f3Smrg 3291966bf024Smrgirix5* | irix6* | nonstopux*) 3292966bf024Smrg case $LD in 3293966bf024Smrg *-32|*"-32 ") libmagic=32-bit;; 3294966bf024Smrg *-n32|*"-n32 ") libmagic=N32;; 3295966bf024Smrg *-64|*"-64 ") libmagic=64-bit;; 3296966bf024Smrg *) libmagic=never-match;; 3297966bf024Smrg esac 3298966bf024Smrg lt_cv_deplibs_check_method=pass_all 3299966bf024Smrg ;; 3300966bf024Smrg 33019384b2f3Smrg# This must be glibc/ELF. 33029384b2f3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3303966bf024Smrg lt_cv_deplibs_check_method=pass_all 3304966bf024Smrg ;; 3305966bf024Smrg 3306966bf024Smrgnetbsd*) 33079384b2f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3308966bf024Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3309966bf024Smrg else 3310966bf024Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3311966bf024Smrg fi 3312966bf024Smrg ;; 3313966bf024Smrg 3314966bf024Smrgnewos6*) 3315966bf024Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3316966bf024Smrg lt_cv_file_magic_cmd=/usr/bin/file 3317966bf024Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3318966bf024Smrg ;; 3319966bf024Smrg 33209384b2f3Smrg*nto* | *qnx*) 33219384b2f3Smrg lt_cv_deplibs_check_method=pass_all 3322966bf024Smrg ;; 3323966bf024Smrg 3324966bf024Smrgopenbsd*) 33259384b2f3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33269384b2f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3327966bf024Smrg else 33289384b2f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3329966bf024Smrg fi 3330966bf024Smrg ;; 3331966bf024Smrg 3332966bf024Smrgosf3* | osf4* | osf5*) 3333966bf024Smrg lt_cv_deplibs_check_method=pass_all 3334966bf024Smrg ;; 3335966bf024Smrg 33369384b2f3Smrgrdos*) 3337966bf024Smrg lt_cv_deplibs_check_method=pass_all 3338966bf024Smrg ;; 3339966bf024Smrg 3340966bf024Smrgsolaris*) 3341966bf024Smrg lt_cv_deplibs_check_method=pass_all 3342966bf024Smrg ;; 3343966bf024Smrg 33449384b2f3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33459384b2f3Smrg lt_cv_deplibs_check_method=pass_all 33469384b2f3Smrg ;; 33479384b2f3Smrg 33489384b2f3Smrgsysv4 | sysv4.3*) 3349966bf024Smrg case $host_vendor in 3350966bf024Smrg motorola) 3351966bf024Smrg 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]]' 3352966bf024Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3353966bf024Smrg ;; 3354966bf024Smrg ncr) 3355966bf024Smrg lt_cv_deplibs_check_method=pass_all 3356966bf024Smrg ;; 3357966bf024Smrg sequent) 3358966bf024Smrg lt_cv_file_magic_cmd='/bin/file' 3359966bf024Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3360966bf024Smrg ;; 3361966bf024Smrg sni) 3362966bf024Smrg lt_cv_file_magic_cmd='/bin/file' 3363966bf024Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3364966bf024Smrg lt_cv_file_magic_test_file=/lib/libc.so 3365966bf024Smrg ;; 3366966bf024Smrg siemens) 3367966bf024Smrg lt_cv_deplibs_check_method=pass_all 3368966bf024Smrg ;; 33699384b2f3Smrg pc) 33709384b2f3Smrg lt_cv_deplibs_check_method=pass_all 33719384b2f3Smrg ;; 3372966bf024Smrg esac 3373966bf024Smrg ;; 3374966bf024Smrg 33759384b2f3Smrgtpf*) 3376966bf024Smrg lt_cv_deplibs_check_method=pass_all 3377966bf024Smrg ;; 3378966bf024Smrgesac 3379966bf024Smrg]) 33809384b2f3Smrg 33819384b2f3Smrgfile_magic_glob= 33829384b2f3Smrgwant_nocaseglob=no 33839384b2f3Smrgif test "$build" = "$host"; then 33849384b2f3Smrg case $host_os in 33859384b2f3Smrg mingw* | pw32*) 33869384b2f3Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 33879384b2f3Smrg want_nocaseglob=yes 33889384b2f3Smrg else 33899384b2f3Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 33909384b2f3Smrg fi 33919384b2f3Smrg ;; 33929384b2f3Smrg esac 33939384b2f3Smrgfi 33949384b2f3Smrg 3395966bf024Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3396966bf024Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3397966bf024Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3398966bf024Smrg 33999384b2f3Smrg_LT_DECL([], [deplibs_check_method], [1], 34009384b2f3Smrg [Method to check whether dependent libraries are shared objects]) 34019384b2f3Smrg_LT_DECL([], [file_magic_cmd], [1], 34029384b2f3Smrg [Command to use when deplibs_check_method = "file_magic"]) 34039384b2f3Smrg_LT_DECL([], [file_magic_glob], [1], 34049384b2f3Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 34059384b2f3Smrg_LT_DECL([], [want_nocaseglob], [1], 34069384b2f3Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34079384b2f3Smrg])# _LT_CHECK_MAGIC_METHOD 3408966bf024Smrg 34099384b2f3Smrg 34109384b2f3Smrg# LT_PATH_NM 3411966bf024Smrg# ---------- 34129384b2f3Smrg# find the pathname to a BSD- or MS-compatible name lister 34139384b2f3SmrgAC_DEFUN([LT_PATH_NM], 34149384b2f3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 34159384b2f3SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3416966bf024Smrg[if test -n "$NM"; then 3417966bf024Smrg # Let the user override the test. 3418966bf024Smrg lt_cv_path_NM="$NM" 3419966bf024Smrgelse 34209384b2f3Smrg lt_nm_to_check="${ac_tool_prefix}nm" 34219384b2f3Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34229384b2f3Smrg lt_nm_to_check="$lt_nm_to_check nm" 34239384b2f3Smrg fi 34249384b2f3Smrg for lt_tmp_nm in $lt_nm_to_check; do 34259384b2f3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34269384b2f3Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34279384b2f3Smrg IFS="$lt_save_ifs" 34289384b2f3Smrg test -z "$ac_dir" && ac_dir=. 34299384b2f3Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 34309384b2f3Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34319384b2f3Smrg # Check to see if the nm accepts a BSD-compat flag. 34329384b2f3Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34339384b2f3Smrg # nm: unknown option "B" ignored 34349384b2f3Smrg # Tru64's nm complains that /dev/null is an invalid object file 34359384b2f3Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34369384b2f3Smrg */dev/null* | *'Invalid file or object type'*) 34379384b2f3Smrg lt_cv_path_NM="$tmp_nm -B" 3438966bf024Smrg break 3439966bf024Smrg ;; 3440966bf024Smrg *) 34419384b2f3Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34429384b2f3Smrg */dev/null*) 34439384b2f3Smrg lt_cv_path_NM="$tmp_nm -p" 34449384b2f3Smrg break 34459384b2f3Smrg ;; 34469384b2f3Smrg *) 34479384b2f3Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34489384b2f3Smrg continue # so that we can try to find one that supports BSD flags 34499384b2f3Smrg ;; 34509384b2f3Smrg esac 3451966bf024Smrg ;; 3452966bf024Smrg esac 34539384b2f3Smrg fi 34549384b2f3Smrg done 34559384b2f3Smrg IFS="$lt_save_ifs" 3456966bf024Smrg done 34579384b2f3Smrg : ${lt_cv_path_NM=no} 3458966bf024Smrgfi]) 34599384b2f3Smrgif test "$lt_cv_path_NM" != "no"; then 34609384b2f3Smrg NM="$lt_cv_path_NM" 34619384b2f3Smrgelse 34629384b2f3Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 34639384b2f3Smrg if test -n "$DUMPBIN"; then : 34649384b2f3Smrg # Let the user override the test. 34659384b2f3Smrg else 34669384b2f3Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 34679384b2f3Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 34689384b2f3Smrg *COFF*) 34699384b2f3Smrg DUMPBIN="$DUMPBIN -symbols" 34709384b2f3Smrg ;; 34719384b2f3Smrg *) 34729384b2f3Smrg DUMPBIN=: 34739384b2f3Smrg ;; 34749384b2f3Smrg esac 34759384b2f3Smrg fi 34769384b2f3Smrg AC_SUBST([DUMPBIN]) 34779384b2f3Smrg if test "$DUMPBIN" != ":"; then 34789384b2f3Smrg NM="$DUMPBIN" 34799384b2f3Smrg fi 34809384b2f3Smrgfi 34819384b2f3Smrgtest -z "$NM" && NM=nm 34829384b2f3SmrgAC_SUBST([NM]) 34839384b2f3Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34849384b2f3Smrg 34859384b2f3SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34869384b2f3Smrg [lt_cv_nm_interface="BSD nm" 34879384b2f3Smrg echo "int some_variable = 0;" > conftest.$ac_ext 34889384b2f3Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 34899384b2f3Smrg (eval "$ac_compile" 2>conftest.err) 34909384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 34919384b2f3Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 34929384b2f3Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 34939384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 34949384b2f3Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 34959384b2f3Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 34969384b2f3Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 34979384b2f3Smrg lt_cv_nm_interface="MS dumpbin" 34989384b2f3Smrg fi 34999384b2f3Smrg rm -f conftest*]) 35009384b2f3Smrg])# LT_PATH_NM 35019384b2f3Smrg 35029384b2f3Smrg# Old names: 35039384b2f3SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35049384b2f3SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35059384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 35069384b2f3Smrgdnl AC_DEFUN([AM_PROG_NM], []) 35079384b2f3Smrgdnl AC_DEFUN([AC_PROG_NM], []) 35089384b2f3Smrg 35099384b2f3Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35109384b2f3Smrg# -------------------------------- 35119384b2f3Smrg# how to determine the name of the shared library 35129384b2f3Smrg# associated with a specific link library. 35139384b2f3Smrg# -- PORTME fill in with the dynamic library characteristics 35149384b2f3Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 35159384b2f3Smrg[m4_require([_LT_DECL_EGREP]) 35169384b2f3Smrgm4_require([_LT_DECL_OBJDUMP]) 35179384b2f3Smrgm4_require([_LT_DECL_DLLTOOL]) 35189384b2f3SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 35199384b2f3Smrglt_cv_sharedlib_from_linklib_cmd, 35209384b2f3Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3521966bf024Smrg 35229384b2f3Smrgcase $host_os in 35239384b2f3Smrgcygwin* | mingw* | pw32* | cegcc*) 35249384b2f3Smrg # two different shell functions defined in ltmain.sh 35259384b2f3Smrg # decide which to use based on capabilities of $DLLTOOL 35269384b2f3Smrg case `$DLLTOOL --help 2>&1` in 35279384b2f3Smrg *--identify-strict*) 35289384b2f3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 35299384b2f3Smrg ;; 35309384b2f3Smrg *) 35319384b2f3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 35329384b2f3Smrg ;; 35339384b2f3Smrg esac 35349384b2f3Smrg ;; 35359384b2f3Smrg*) 35369384b2f3Smrg # fallback: assume linklib IS sharedlib 35379384b2f3Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 35389384b2f3Smrg ;; 35399384b2f3Smrgesac 35409384b2f3Smrg]) 35419384b2f3Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 35429384b2f3Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3543966bf024Smrg 35449384b2f3Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 35459384b2f3Smrg [Command to associate shared and link libraries]) 35469384b2f3Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 35479384b2f3Smrg 35489384b2f3Smrg 35499384b2f3Smrg# _LT_PATH_MANIFEST_TOOL 35509384b2f3Smrg# ---------------------- 35519384b2f3Smrg# locate the manifest tool 35529384b2f3Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 35539384b2f3Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 35549384b2f3Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 35559384b2f3SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 35569384b2f3Smrg [lt_cv_path_mainfest_tool=no 35579384b2f3Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 35589384b2f3Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 35599384b2f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35609384b2f3Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 35619384b2f3Smrg lt_cv_path_mainfest_tool=yes 35629384b2f3Smrg fi 35639384b2f3Smrg rm -f conftest*]) 35649384b2f3Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 35659384b2f3Smrg MANIFEST_TOOL=: 35669384b2f3Smrgfi 35679384b2f3Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 35689384b2f3Smrg])# _LT_PATH_MANIFEST_TOOL 35699384b2f3Smrg 35709384b2f3Smrg 35719384b2f3Smrg# LT_LIB_M 35729384b2f3Smrg# -------- 3573966bf024Smrg# check for math library 35749384b2f3SmrgAC_DEFUN([LT_LIB_M], 3575966bf024Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3576966bf024SmrgLIBM= 3577966bf024Smrgcase $host in 35789384b2f3Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3579966bf024Smrg # These system don't have libm, or don't need it 3580966bf024Smrg ;; 3581966bf024Smrg*-ncr-sysv4.3*) 3582966bf024Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3583966bf024Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3584966bf024Smrg ;; 3585966bf024Smrg*) 3586966bf024Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3587966bf024Smrg ;; 3588966bf024Smrgesac 35899384b2f3SmrgAC_SUBST([LIBM]) 35909384b2f3Smrg])# LT_LIB_M 3591966bf024Smrg 35929384b2f3Smrg# Old name: 35939384b2f3SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 35949384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 35959384b2f3Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3596966bf024Smrg 3597966bf024Smrg 35989384b2f3Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 35999384b2f3Smrg# ------------------------------- 36009384b2f3Smrgm4_defun([_LT_COMPILER_NO_RTTI], 36019384b2f3Smrg[m4_require([_LT_TAG_COMPILER])dnl 3602966bf024Smrg 36039384b2f3Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3604966bf024Smrg 36059384b2f3Smrgif test "$GCC" = yes; then 36069384b2f3Smrg case $cc_basename in 36079384b2f3Smrg nvcc*) 36089384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 36099384b2f3Smrg *) 36109384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3611966bf024Smrg esac 3612966bf024Smrg 36139384b2f3Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36149384b2f3Smrg lt_cv_prog_compiler_rtti_exceptions, 36159384b2f3Smrg [-fno-rtti -fno-exceptions], [], 36169384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36179384b2f3Smrgfi 36189384b2f3Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36199384b2f3Smrg [Compiler flag to turn off builtin functions]) 36209384b2f3Smrg])# _LT_COMPILER_NO_RTTI 3621966bf024Smrg 3622966bf024Smrg 36239384b2f3Smrg# _LT_CMD_GLOBAL_SYMBOLS 36249384b2f3Smrg# ---------------------- 36259384b2f3Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36269384b2f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36279384b2f3SmrgAC_REQUIRE([AC_PROG_CC])dnl 36289384b2f3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36299384b2f3SmrgAC_REQUIRE([LT_PATH_NM])dnl 36309384b2f3SmrgAC_REQUIRE([LT_PATH_LD])dnl 36319384b2f3Smrgm4_require([_LT_DECL_SED])dnl 36329384b2f3Smrgm4_require([_LT_DECL_EGREP])dnl 36339384b2f3Smrgm4_require([_LT_TAG_COMPILER])dnl 3634966bf024Smrg 36359384b2f3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36369384b2f3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36379384b2f3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36389384b2f3Smrg[ 36399384b2f3Smrg# These are sane defaults that work on at least a few old systems. 36409384b2f3Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3641966bf024Smrg 36429384b2f3Smrg# Character class describing NM global symbol codes. 36439384b2f3Smrgsymcode='[[BCDEGRST]]' 3644966bf024Smrg 36459384b2f3Smrg# Regexp to match symbols that can be accessed directly from C. 36469384b2f3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3647966bf024Smrg 36489384b2f3Smrg# Define system-specific variables. 36499384b2f3Smrgcase $host_os in 36509384b2f3Smrgaix*) 36519384b2f3Smrg symcode='[[BCDT]]' 3652966bf024Smrg ;; 36539384b2f3Smrgcygwin* | mingw* | pw32* | cegcc*) 36549384b2f3Smrg symcode='[[ABCDGISTW]]' 3655966bf024Smrg ;; 36569384b2f3Smrghpux*) 36579384b2f3Smrg if test "$host_cpu" = ia64; then 36589384b2f3Smrg symcode='[[ABCDEGRST]]' 3659966bf024Smrg fi 36609384b2f3Smrg ;; 36619384b2f3Smrgirix* | nonstopux*) 36629384b2f3Smrg symcode='[[BCDEGRST]]' 36639384b2f3Smrg ;; 36649384b2f3Smrgosf*) 36659384b2f3Smrg symcode='[[BCDEGQRST]]' 36669384b2f3Smrg ;; 36679384b2f3Smrgsolaris*) 36689384b2f3Smrg symcode='[[BDRT]]' 36699384b2f3Smrg ;; 36709384b2f3Smrgsco3.2v5*) 36719384b2f3Smrg symcode='[[DT]]' 36729384b2f3Smrg ;; 36739384b2f3Smrgsysv4.2uw2*) 36749384b2f3Smrg symcode='[[DT]]' 36759384b2f3Smrg ;; 36769384b2f3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36779384b2f3Smrg symcode='[[ABDT]]' 36789384b2f3Smrg ;; 36799384b2f3Smrgsysv4) 36809384b2f3Smrg symcode='[[DFNSTU]]' 36819384b2f3Smrg ;; 3682966bf024Smrgesac 3683966bf024Smrg 36849384b2f3Smrg# If we're using GNU nm, then use its standard symbol codes. 36859384b2f3Smrgcase `$NM -V 2>&1` in 36869384b2f3Smrg*GNU* | *'with BFD'*) 36879384b2f3Smrg symcode='[[ABCDGIRSTW]]' ;; 36889384b2f3Smrgesac 3689966bf024Smrg 36909384b2f3Smrg# Transform an extracted symbol line into a proper C declaration. 36919384b2f3Smrg# Some systems (esp. on ia64) link data and code symbols differently, 36929384b2f3Smrg# so use this general approach. 36939384b2f3Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3694966bf024Smrg 36959384b2f3Smrg# Transform an extracted symbol line into symbol name and symbol address 36969384b2f3Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 36979384b2f3Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3698966bf024Smrg 36999384b2f3Smrg# Handle CRLF in mingw tool chain 37009384b2f3Smrgopt_cr= 37019384b2f3Smrgcase $build_os in 37029384b2f3Smrgmingw*) 37039384b2f3Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37049384b2f3Smrg ;; 37059384b2f3Smrgesac 3706966bf024Smrg 37079384b2f3Smrg# Try without a prefix underscore, then with it. 37089384b2f3Smrgfor ac_symprfx in "" "_"; do 3709966bf024Smrg 37109384b2f3Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37119384b2f3Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3712966bf024Smrg 37139384b2f3Smrg # Write the raw and C identifiers. 37149384b2f3Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37159384b2f3Smrg # Fake it for dumpbin and say T for any non-static function 37169384b2f3Smrg # and D for any global variable. 37179384b2f3Smrg # Also find C++ and __fastcall symbols from MSVC++, 37189384b2f3Smrg # which start with @ or ?. 37199384b2f3Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37209384b2f3Smrg" {last_section=section; section=\$ 3};"\ 37219384b2f3Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37229384b2f3Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37239384b2f3Smrg" \$ 0!~/External *\|/{next};"\ 37249384b2f3Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37259384b2f3Smrg" {if(hide[section]) next};"\ 37269384b2f3Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37279384b2f3Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37289384b2f3Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37299384b2f3Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37309384b2f3Smrg" ' prfx=^$ac_symprfx]" 37319384b2f3Smrg else 37329384b2f3Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37339384b2f3Smrg fi 37349384b2f3Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3735966bf024Smrg 37369384b2f3Smrg # Check to see that the pipe works correctly. 37379384b2f3Smrg pipe_works=no 3738966bf024Smrg 37399384b2f3Smrg rm -f conftest* 37409384b2f3Smrg cat > conftest.$ac_ext <<_LT_EOF 37419384b2f3Smrg#ifdef __cplusplus 37429384b2f3Smrgextern "C" { 37439384b2f3Smrg#endif 37449384b2f3Smrgchar nm_test_var; 37459384b2f3Smrgvoid nm_test_func(void); 37469384b2f3Smrgvoid nm_test_func(void){} 37479384b2f3Smrg#ifdef __cplusplus 37489384b2f3Smrg} 37499384b2f3Smrg#endif 37509384b2f3Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 37519384b2f3Smrg_LT_EOF 3752966bf024Smrg 37539384b2f3Smrg if AC_TRY_EVAL(ac_compile); then 37549384b2f3Smrg # Now try to grab the symbols. 37559384b2f3Smrg nlist=conftest.nm 37569384b2f3Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37579384b2f3Smrg # Try sorting and uniquifying the output. 37589384b2f3Smrg if sort "$nlist" | uniq > "$nlist"T; then 37599384b2f3Smrg mv -f "$nlist"T "$nlist" 37609384b2f3Smrg else 37619384b2f3Smrg rm -f "$nlist"T 37629384b2f3Smrg fi 3763966bf024Smrg 37649384b2f3Smrg # Make sure that we snagged all the symbols we need. 37659384b2f3Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37669384b2f3Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37679384b2f3Smrg cat <<_LT_EOF > conftest.$ac_ext 37689384b2f3Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 37699384b2f3Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 37709384b2f3Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 37719384b2f3Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 37729384b2f3Smrg# define LT@&t@_DLSYM_CONST 37739384b2f3Smrg#elif defined(__osf__) 37749384b2f3Smrg/* This system does not cope well with relocations in const data. */ 37759384b2f3Smrg# define LT@&t@_DLSYM_CONST 37769384b2f3Smrg#else 37779384b2f3Smrg# define LT@&t@_DLSYM_CONST const 37789384b2f3Smrg#endif 3779966bf024Smrg 37809384b2f3Smrg#ifdef __cplusplus 37819384b2f3Smrgextern "C" { 37829384b2f3Smrg#endif 3783966bf024Smrg 37849384b2f3Smrg_LT_EOF 37859384b2f3Smrg # Now generate the symbol file. 37869384b2f3Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3787966bf024Smrg 37889384b2f3Smrg cat <<_LT_EOF >> conftest.$ac_ext 3789966bf024Smrg 37909384b2f3Smrg/* The mapping between symbol names and symbols. */ 37919384b2f3SmrgLT@&t@_DLSYM_CONST struct { 37929384b2f3Smrg const char *name; 37939384b2f3Smrg void *address; 37949384b2f3Smrg} 37959384b2f3Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 37969384b2f3Smrg{ 37979384b2f3Smrg { "@PROGRAM@", (void *) 0 }, 37989384b2f3Smrg_LT_EOF 37999384b2f3Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38009384b2f3Smrg cat <<\_LT_EOF >> conftest.$ac_ext 38019384b2f3Smrg {0, (void *) 0} 38029384b2f3Smrg}; 3803966bf024Smrg 38049384b2f3Smrg/* This works around a problem in FreeBSD linker */ 38059384b2f3Smrg#ifdef FREEBSD_WORKAROUND 38069384b2f3Smrgstatic const void *lt_preloaded_setup() { 38079384b2f3Smrg return lt__PROGRAM__LTX_preloaded_symbols; 38089384b2f3Smrg} 38099384b2f3Smrg#endif 3810966bf024Smrg 38119384b2f3Smrg#ifdef __cplusplus 38129384b2f3Smrg} 38139384b2f3Smrg#endif 38149384b2f3Smrg_LT_EOF 38159384b2f3Smrg # Now try linking the two files. 38169384b2f3Smrg mv conftest.$ac_objext conftstm.$ac_objext 38179384b2f3Smrg lt_globsym_save_LIBS=$LIBS 38189384b2f3Smrg lt_globsym_save_CFLAGS=$CFLAGS 38199384b2f3Smrg LIBS="conftstm.$ac_objext" 38209384b2f3Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38219384b2f3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38229384b2f3Smrg pipe_works=yes 38239384b2f3Smrg fi 38249384b2f3Smrg LIBS=$lt_globsym_save_LIBS 38259384b2f3Smrg CFLAGS=$lt_globsym_save_CFLAGS 38269384b2f3Smrg else 38279384b2f3Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38289384b2f3Smrg fi 38299384b2f3Smrg else 38309384b2f3Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38319384b2f3Smrg fi 3832966bf024Smrg else 38339384b2f3Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3834966bf024Smrg fi 3835966bf024Smrg else 38369384b2f3Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38379384b2f3Smrg cat conftest.$ac_ext >&5 3838966bf024Smrg fi 38399384b2f3Smrg rm -rf conftest* conftst* 3840966bf024Smrg 38419384b2f3Smrg # Do not use the global_symbol_pipe unless it works. 38429384b2f3Smrg if test "$pipe_works" = yes; then 38439384b2f3Smrg break 38449384b2f3Smrg else 38459384b2f3Smrg lt_cv_sys_global_symbol_pipe= 38469384b2f3Smrg fi 38479384b2f3Smrgdone 38489384b2f3Smrg]) 38499384b2f3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38509384b2f3Smrg lt_cv_sys_global_symbol_to_cdecl= 38519384b2f3Smrgfi 38529384b2f3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38539384b2f3Smrg AC_MSG_RESULT(failed) 3854966bf024Smrgelse 38559384b2f3Smrg AC_MSG_RESULT(ok) 3856966bf024Smrgfi 3857966bf024Smrg 38589384b2f3Smrg# Response file support. 38599384b2f3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 38609384b2f3Smrg nm_file_list_spec='@' 38619384b2f3Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 38629384b2f3Smrg nm_file_list_spec='@' 38639384b2f3Smrgfi 3864966bf024Smrg 38659384b2f3Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38669384b2f3Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 38679384b2f3Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38689384b2f3Smrg [Transform the output of nm in a proper C declaration]) 38699384b2f3Smrg_LT_DECL([global_symbol_to_c_name_address], 38709384b2f3Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38719384b2f3Smrg [Transform the output of nm in a C name address pair]) 38729384b2f3Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38739384b2f3Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38749384b2f3Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 38759384b2f3Smrg_LT_DECL([], [nm_file_list_spec], [1], 38769384b2f3Smrg [Specify filename containing input files for $NM]) 38779384b2f3Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 38789384b2f3Smrg 38799384b2f3Smrg 38809384b2f3Smrg# _LT_COMPILER_PIC([TAGNAME]) 38819384b2f3Smrg# --------------------------- 38829384b2f3Smrgm4_defun([_LT_COMPILER_PIC], 38839384b2f3Smrg[m4_require([_LT_TAG_COMPILER])dnl 38849384b2f3Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38859384b2f3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38869384b2f3Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3887966bf024Smrg 38889384b2f3Smrgm4_if([$1], [CXX], [ 38899384b2f3Smrg # C++ specific cases for pic, static, wl, etc. 38909384b2f3Smrg if test "$GXX" = yes; then 38919384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38929384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3893966bf024Smrg 38949384b2f3Smrg case $host_os in 38959384b2f3Smrg aix*) 38969384b2f3Smrg # All AIX code is PIC. 38979384b2f3Smrg if test "$host_cpu" = ia64; then 38989384b2f3Smrg # AIX 5 now supports IA64 processor 38999384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39009384b2f3Smrg fi 39019384b2f3Smrg ;; 3902966bf024Smrg 39039384b2f3Smrg amigaos*) 39049384b2f3Smrg case $host_cpu in 39059384b2f3Smrg powerpc) 39069384b2f3Smrg # see comment about AmigaOS4 .so support 39079384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39089384b2f3Smrg ;; 39099384b2f3Smrg m68k) 39109384b2f3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 39119384b2f3Smrg # adding the `-m68020' flag to GCC prevents building anything better, 39129384b2f3Smrg # like `-m68040'. 39139384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39149384b2f3Smrg ;; 3915966bf024Smrg esac 39169384b2f3Smrg ;; 3917966bf024Smrg 39189384b2f3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39199384b2f3Smrg # PIC is the default for these OSes. 3920966bf024Smrg ;; 39219384b2f3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39229384b2f3Smrg # This hack is so that the source file can tell whether it is being 39239384b2f3Smrg # built for inclusion in a dll (and should export symbols for example). 39249384b2f3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39259384b2f3Smrg # (--disable-auto-import) libraries 39269384b2f3Smrg m4_if([$1], [GCJ], [], 39279384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3928966bf024Smrg ;; 39299384b2f3Smrg darwin* | rhapsody*) 39309384b2f3Smrg # PIC is the default on this platform 39319384b2f3Smrg # Common symbols not allowed in MH_DYLIB files 39329384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3933966bf024Smrg ;; 39349384b2f3Smrg *djgpp*) 39359384b2f3Smrg # DJGPP does not support shared libraries at all 39369384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3937966bf024Smrg ;; 39389384b2f3Smrg haiku*) 39399384b2f3Smrg # PIC is the default for Haiku. 39409384b2f3Smrg # The "-static" flag exists, but is broken. 39419384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 39429384b2f3Smrg ;; 39439384b2f3Smrg interix[[3-9]]*) 39449384b2f3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39459384b2f3Smrg # Instead, we relocate shared libraries at runtime. 39469384b2f3Smrg ;; 39479384b2f3Smrg sysv4*MP*) 39489384b2f3Smrg if test -d /usr/nec; then 39499384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3950966bf024Smrg fi 3951966bf024Smrg ;; 39529384b2f3Smrg hpux*) 39539384b2f3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39549384b2f3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39559384b2f3Smrg # sets the default TLS model and affects inlining. 39569384b2f3Smrg case $host_cpu in 3957966bf024Smrg hppa*64*) 39589384b2f3Smrg ;; 3959966bf024Smrg *) 39609384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39619384b2f3Smrg ;; 3962966bf024Smrg esac 3963966bf024Smrg ;; 39649384b2f3Smrg *qnx* | *nto*) 39659384b2f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39669384b2f3Smrg # it will coredump. 39679384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3968966bf024Smrg ;; 3969966bf024Smrg *) 39709384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3971966bf024Smrg ;; 3972966bf024Smrg esac 39739384b2f3Smrg else 39749384b2f3Smrg case $host_os in 39759384b2f3Smrg aix[[4-9]]*) 39769384b2f3Smrg # All AIX code is PIC. 39779384b2f3Smrg if test "$host_cpu" = ia64; then 39789384b2f3Smrg # AIX 5 now supports IA64 processor 39799384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39809384b2f3Smrg else 39819384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39829384b2f3Smrg fi 3983966bf024Smrg ;; 39849384b2f3Smrg chorus*) 39859384b2f3Smrg case $cc_basename in 39869384b2f3Smrg cxch68*) 39879384b2f3Smrg # Green Hills C++ Compiler 39889384b2f3Smrg # _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" 3989966bf024Smrg ;; 3990966bf024Smrg esac 3991966bf024Smrg ;; 39929384b2f3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39939384b2f3Smrg # This hack is so that the source file can tell whether it is being 39949384b2f3Smrg # built for inclusion in a dll (and should export symbols for example). 39959384b2f3Smrg m4_if([$1], [GCJ], [], 39969384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39979384b2f3Smrg ;; 39989384b2f3Smrg dgux*) 39999384b2f3Smrg case $cc_basename in 40009384b2f3Smrg ec++*) 40019384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40029384b2f3Smrg ;; 40039384b2f3Smrg ghcx*) 40049384b2f3Smrg # Green Hills C++ Compiler 40059384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40069384b2f3Smrg ;; 40079384b2f3Smrg *) 40089384b2f3Smrg ;; 40099384b2f3Smrg esac 40109384b2f3Smrg ;; 40119384b2f3Smrg freebsd* | dragonfly*) 40129384b2f3Smrg # FreeBSD uses GNU C++ 40139384b2f3Smrg ;; 40149384b2f3Smrg hpux9* | hpux10* | hpux11*) 40159384b2f3Smrg case $cc_basename in 40169384b2f3Smrg CC*) 40179384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40189384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40199384b2f3Smrg if test "$host_cpu" != ia64; then 40209384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40219384b2f3Smrg fi 40229384b2f3Smrg ;; 40239384b2f3Smrg aCC*) 40249384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40259384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40269384b2f3Smrg case $host_cpu in 40279384b2f3Smrg hppa*64*|ia64*) 40289384b2f3Smrg # +Z the default 4029966bf024Smrg ;; 4030966bf024Smrg *) 40319384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4032966bf024Smrg ;; 4033966bf024Smrg esac 40349384b2f3Smrg ;; 40359384b2f3Smrg *) 40369384b2f3Smrg ;; 40379384b2f3Smrg esac 4038966bf024Smrg ;; 40399384b2f3Smrg interix*) 40409384b2f3Smrg # This is c89, which is MS Visual C++ (no shared libs) 40419384b2f3Smrg # Anyone wants to do a port? 4042966bf024Smrg ;; 40439384b2f3Smrg irix5* | irix6* | nonstopux*) 40449384b2f3Smrg case $cc_basename in 40459384b2f3Smrg CC*) 40469384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40479384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40489384b2f3Smrg # CC pic flag -KPIC is the default. 40499384b2f3Smrg ;; 40509384b2f3Smrg *) 40519384b2f3Smrg ;; 40529384b2f3Smrg esac 4053966bf024Smrg ;; 40549384b2f3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 40559384b2f3Smrg case $cc_basename in 40569384b2f3Smrg KCC*) 40579384b2f3Smrg # KAI C++ Compiler 40589384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40599384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40609384b2f3Smrg ;; 40619384b2f3Smrg ecpc* ) 40629384b2f3Smrg # old Intel C++ for x86_64 which still supported -KPIC. 40639384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40649384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40659384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40669384b2f3Smrg ;; 40679384b2f3Smrg icpc* ) 40689384b2f3Smrg # Intel C++, used to be incompatible with GCC. 40699384b2f3Smrg # ICC 10 doesn't accept -KPIC any more. 40709384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40719384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40729384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40739384b2f3Smrg ;; 40749384b2f3Smrg pgCC* | pgcpp*) 40759384b2f3Smrg # Portland Group C++ compiler 40769384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40779384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40789384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40799384b2f3Smrg ;; 40809384b2f3Smrg cxx*) 40819384b2f3Smrg # Compaq C++ 40829384b2f3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 40839384b2f3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 40849384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40859384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40869384b2f3Smrg ;; 40879384b2f3Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 40889384b2f3Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40899384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40909384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40919384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40929384b2f3Smrg ;; 40939384b2f3Smrg *) 40949384b2f3Smrg case `$CC -V 2>&1 | sed 5q` in 40959384b2f3Smrg *Sun\ C*) 40969384b2f3Smrg # Sun C++ 5.9 40979384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40989384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40999384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41009384b2f3Smrg ;; 41019384b2f3Smrg esac 41029384b2f3Smrg ;; 41039384b2f3Smrg esac 4104966bf024Smrg ;; 41059384b2f3Smrg lynxos*) 4106966bf024Smrg ;; 41079384b2f3Smrg m88k*) 4108966bf024Smrg ;; 41099384b2f3Smrg mvs*) 41109384b2f3Smrg case $cc_basename in 41119384b2f3Smrg cxx*) 41129384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41139384b2f3Smrg ;; 41149384b2f3Smrg *) 41159384b2f3Smrg ;; 41169384b2f3Smrg esac 4117966bf024Smrg ;; 41189384b2f3Smrg netbsd*) 4119966bf024Smrg ;; 41209384b2f3Smrg *qnx* | *nto*) 41219384b2f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41229384b2f3Smrg # it will coredump. 41239384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41249384b2f3Smrg ;; 41259384b2f3Smrg osf3* | osf4* | osf5*) 41269384b2f3Smrg case $cc_basename in 41279384b2f3Smrg KCC*) 41289384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41299384b2f3Smrg ;; 41309384b2f3Smrg RCC*) 41319384b2f3Smrg # Rational C++ 2.4.1 41329384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41339384b2f3Smrg ;; 41349384b2f3Smrg cxx*) 41359384b2f3Smrg # Digital/Compaq C++ 41369384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41379384b2f3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 41389384b2f3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 41399384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41409384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41419384b2f3Smrg ;; 41429384b2f3Smrg *) 41439384b2f3Smrg ;; 41449384b2f3Smrg esac 4145966bf024Smrg ;; 41469384b2f3Smrg psos*) 4147966bf024Smrg ;; 41489384b2f3Smrg solaris*) 41499384b2f3Smrg case $cc_basename in 41509384b2f3Smrg CC* | sunCC*) 41519384b2f3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 41529384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41539384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41549384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41559384b2f3Smrg ;; 41569384b2f3Smrg gcx*) 41579384b2f3Smrg # Green Hills C++ Compiler 41589384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41599384b2f3Smrg ;; 41609384b2f3Smrg *) 41619384b2f3Smrg ;; 41629384b2f3Smrg esac 4163966bf024Smrg ;; 41649384b2f3Smrg sunos4*) 41659384b2f3Smrg case $cc_basename in 41669384b2f3Smrg CC*) 41679384b2f3Smrg # Sun C++ 4.x 41689384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41699384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41709384b2f3Smrg ;; 41719384b2f3Smrg lcc*) 41729384b2f3Smrg # Lucid 41739384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41749384b2f3Smrg ;; 41759384b2f3Smrg *) 41769384b2f3Smrg ;; 41779384b2f3Smrg esac 4178966bf024Smrg ;; 41799384b2f3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41809384b2f3Smrg case $cc_basename in 41819384b2f3Smrg CC*) 41829384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41839384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41849384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41859384b2f3Smrg ;; 41869384b2f3Smrg esac 4187966bf024Smrg ;; 41889384b2f3Smrg tandem*) 41899384b2f3Smrg case $cc_basename in 41909384b2f3Smrg NCC*) 41919384b2f3Smrg # NonStop-UX NCC 3.20 41929384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41939384b2f3Smrg ;; 41949384b2f3Smrg *) 41959384b2f3Smrg ;; 41969384b2f3Smrg esac 4197966bf024Smrg ;; 41989384b2f3Smrg vxworks*) 4199966bf024Smrg ;; 4200966bf024Smrg *) 42019384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42029384b2f3Smrg ;; 42039384b2f3Smrg esac 42049384b2f3Smrg fi 42059384b2f3Smrg], 42069384b2f3Smrg[ 42079384b2f3Smrg if test "$GCC" = yes; then 42089384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42099384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42109384b2f3Smrg 42119384b2f3Smrg case $host_os in 42129384b2f3Smrg aix*) 42139384b2f3Smrg # All AIX code is PIC. 42149384b2f3Smrg if test "$host_cpu" = ia64; then 42159384b2f3Smrg # AIX 5 now supports IA64 processor 42169384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42179384b2f3Smrg fi 42189384b2f3Smrg ;; 4219966bf024Smrg 42209384b2f3Smrg amigaos*) 42219384b2f3Smrg case $host_cpu in 42229384b2f3Smrg powerpc) 42239384b2f3Smrg # see comment about AmigaOS4 .so support 42249384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42259384b2f3Smrg ;; 42269384b2f3Smrg m68k) 42279384b2f3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42289384b2f3Smrg # adding the `-m68020' flag to GCC prevents building anything better, 42299384b2f3Smrg # like `-m68040'. 42309384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42319384b2f3Smrg ;; 42329384b2f3Smrg esac 42339384b2f3Smrg ;; 4234966bf024Smrg 42359384b2f3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42369384b2f3Smrg # PIC is the default for these OSes. 42379384b2f3Smrg ;; 4238966bf024Smrg 42399384b2f3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42409384b2f3Smrg # This hack is so that the source file can tell whether it is being 42419384b2f3Smrg # built for inclusion in a dll (and should export symbols for example). 42429384b2f3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42439384b2f3Smrg # (--disable-auto-import) libraries 42449384b2f3Smrg m4_if([$1], [GCJ], [], 42459384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42469384b2f3Smrg ;; 42479384b2f3Smrg 42489384b2f3Smrg darwin* | rhapsody*) 42499384b2f3Smrg # PIC is the default on this platform 42509384b2f3Smrg # Common symbols not allowed in MH_DYLIB files 42519384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42529384b2f3Smrg ;; 42539384b2f3Smrg 42549384b2f3Smrg haiku*) 42559384b2f3Smrg # PIC is the default for Haiku. 42569384b2f3Smrg # The "-static" flag exists, but is broken. 42579384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42589384b2f3Smrg ;; 42599384b2f3Smrg 42609384b2f3Smrg hpux*) 42619384b2f3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42629384b2f3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42639384b2f3Smrg # sets the default TLS model and affects inlining. 42649384b2f3Smrg case $host_cpu in 42659384b2f3Smrg hppa*64*) 42669384b2f3Smrg # +Z the default 4267966bf024Smrg ;; 4268966bf024Smrg *) 42699384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4270966bf024Smrg ;; 42719384b2f3Smrg esac 42729384b2f3Smrg ;; 42739384b2f3Smrg 42749384b2f3Smrg interix[[3-9]]*) 42759384b2f3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42769384b2f3Smrg # Instead, we relocate shared libraries at runtime. 42779384b2f3Smrg ;; 42789384b2f3Smrg 42799384b2f3Smrg msdosdjgpp*) 42809384b2f3Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42819384b2f3Smrg # on systems that don't support them. 42829384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42839384b2f3Smrg enable_shared=no 42849384b2f3Smrg ;; 42859384b2f3Smrg 42869384b2f3Smrg *nto* | *qnx*) 42879384b2f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42889384b2f3Smrg # it will coredump. 42899384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42909384b2f3Smrg ;; 42919384b2f3Smrg 42929384b2f3Smrg sysv4*MP*) 42939384b2f3Smrg if test -d /usr/nec; then 42949384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42959384b2f3Smrg fi 42969384b2f3Smrg ;; 42979384b2f3Smrg 42989384b2f3Smrg *) 42999384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43009384b2f3Smrg ;; 4301966bf024Smrg esac 43029384b2f3Smrg 4303966bf024Smrg case $cc_basename in 43049384b2f3Smrg nvcc*) # Cuda Compiler Driver 2.2 43059384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 43069384b2f3Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 43079384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 43089384b2f3Smrg fi 43099384b2f3Smrg ;; 4310966bf024Smrg esac 43119384b2f3Smrg else 43129384b2f3Smrg # PORTME Check for flag to pass linker flags through the system compiler. 43139384b2f3Smrg case $host_os in 43149384b2f3Smrg aix*) 43159384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43169384b2f3Smrg if test "$host_cpu" = ia64; then 43179384b2f3Smrg # AIX 5 now supports IA64 processor 43189384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43199384b2f3Smrg else 43209384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43219384b2f3Smrg fi 43229384b2f3Smrg ;; 43239384b2f3Smrg 43249384b2f3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43259384b2f3Smrg # This hack is so that the source file can tell whether it is being 43269384b2f3Smrg # built for inclusion in a dll (and should export symbols for example). 43279384b2f3Smrg m4_if([$1], [GCJ], [], 43289384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43299384b2f3Smrg ;; 4330966bf024Smrg 43319384b2f3Smrg hpux9* | hpux10* | hpux11*) 43329384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43339384b2f3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43349384b2f3Smrg # not for PA HP-UX. 43359384b2f3Smrg case $host_cpu in 43369384b2f3Smrg hppa*64*|ia64*) 43379384b2f3Smrg # +Z the default 4338966bf024Smrg ;; 4339966bf024Smrg *) 43409384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43419384b2f3Smrg ;; 43429384b2f3Smrg esac 43439384b2f3Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43449384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43459384b2f3Smrg ;; 4346966bf024Smrg 43479384b2f3Smrg irix5* | irix6* | nonstopux*) 43489384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43499384b2f3Smrg # PIC (with -KPIC) is the default. 43509384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43519384b2f3Smrg ;; 4352966bf024Smrg 43539384b2f3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 43549384b2f3Smrg case $cc_basename in 43559384b2f3Smrg # old Intel for x86_64 which still supported -KPIC. 43569384b2f3Smrg ecc*) 43579384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43589384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43599384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43609384b2f3Smrg ;; 43619384b2f3Smrg # icc used to be incompatible with GCC. 43629384b2f3Smrg # ICC 10 doesn't accept -KPIC any more. 43639384b2f3Smrg icc* | ifort*) 43649384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43659384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43669384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43679384b2f3Smrg ;; 43689384b2f3Smrg # Lahey Fortran 8.1. 43699384b2f3Smrg lf95*) 43709384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43719384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43729384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4373966bf024Smrg ;; 43749384b2f3Smrg nagfor*) 43759384b2f3Smrg # NAG Fortran compiler 43769384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 43779384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 43789384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43799384b2f3Smrg ;; 43809384b2f3Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43819384b2f3Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 43829384b2f3Smrg # which looks to be a dead project) 43839384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43849384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43859384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43869384b2f3Smrg ;; 43879384b2f3Smrg ccc*) 43889384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43899384b2f3Smrg # All Alpha code is PIC. 43909384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43919384b2f3Smrg ;; 43929384b2f3Smrg xl* | bgxl* | bgf* | mpixl*) 43939384b2f3Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 43949384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43959384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 43969384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4397966bf024Smrg ;; 4398966bf024Smrg *) 43999384b2f3Smrg case `$CC -V 2>&1 | sed 5q` in 44009384b2f3Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 44019384b2f3Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 44029384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44039384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44049384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 44059384b2f3Smrg ;; 44069384b2f3Smrg *Sun\ F* | *Sun*Fortran*) 44079384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44089384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44099384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44109384b2f3Smrg ;; 44119384b2f3Smrg *Sun\ C*) 44129384b2f3Smrg # Sun C 5.9 44139384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44149384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44159384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44169384b2f3Smrg ;; 44179384b2f3Smrg *Intel*\ [[CF]]*Compiler*) 44189384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44199384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44209384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44219384b2f3Smrg ;; 44229384b2f3Smrg *Portland\ Group*) 44239384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44249384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44259384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44269384b2f3Smrg ;; 44279384b2f3Smrg esac 4428966bf024Smrg ;; 44299384b2f3Smrg esac 44309384b2f3Smrg ;; 4431966bf024Smrg 44329384b2f3Smrg newsos6) 44339384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44349384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44359384b2f3Smrg ;; 4436966bf024Smrg 44379384b2f3Smrg *nto* | *qnx*) 44389384b2f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44399384b2f3Smrg # it will coredump. 44409384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44419384b2f3Smrg ;; 4442966bf024Smrg 44439384b2f3Smrg osf3* | osf4* | osf5*) 44449384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44459384b2f3Smrg # All OSF/1 code is PIC. 44469384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44479384b2f3Smrg ;; 4448966bf024Smrg 44499384b2f3Smrg rdos*) 44509384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44519384b2f3Smrg ;; 4452966bf024Smrg 44539384b2f3Smrg solaris*) 44549384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44559384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44569384b2f3Smrg case $cc_basename in 44579384b2f3Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44589384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44599384b2f3Smrg *) 44609384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44619384b2f3Smrg esac 44629384b2f3Smrg ;; 4463966bf024Smrg 44649384b2f3Smrg sunos4*) 44659384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44669384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44679384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44689384b2f3Smrg ;; 4469966bf024Smrg 44709384b2f3Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 44719384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44729384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44739384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44749384b2f3Smrg ;; 4475966bf024Smrg 44769384b2f3Smrg sysv4*MP*) 44779384b2f3Smrg if test -d /usr/nec ;then 44789384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44799384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44809384b2f3Smrg fi 44819384b2f3Smrg ;; 4482966bf024Smrg 44839384b2f3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44849384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44859384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44869384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44879384b2f3Smrg ;; 4488966bf024Smrg 44899384b2f3Smrg unicos*) 44909384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44919384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 44929384b2f3Smrg ;; 4493966bf024Smrg 44949384b2f3Smrg uts4*) 44959384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44969384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44979384b2f3Smrg ;; 4498966bf024Smrg 44999384b2f3Smrg *) 45009384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45019384b2f3Smrg ;; 4502966bf024Smrg esac 4503966bf024Smrg fi 45049384b2f3Smrg]) 45059384b2f3Smrgcase $host_os in 45069384b2f3Smrg # For platforms which do not support PIC, -DPIC is meaningless: 45079384b2f3Smrg *djgpp*) 45089384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45099384b2f3Smrg ;; 45109384b2f3Smrg *) 45119384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45129384b2f3Smrg ;; 4513966bf024Smrgesac 4514966bf024Smrg 45159384b2f3SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 45169384b2f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 45179384b2f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 45189384b2f3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4519966bf024Smrg 45209384b2f3Smrg# 45219384b2f3Smrg# Check to make sure the PIC flag actually works. 45229384b2f3Smrg# 45239384b2f3Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45249384b2f3Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45259384b2f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45269384b2f3Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45279384b2f3Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45289384b2f3Smrg "" | " "*) ;; 45299384b2f3Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45309384b2f3Smrg esac], 45319384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45329384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45339384b2f3Smrgfi 45349384b2f3Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45359384b2f3Smrg [Additional compiler flags for building library objects]) 4536966bf024Smrg 45379384b2f3Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 45389384b2f3Smrg [How to pass a linker flag through the compiler]) 45399384b2f3Smrg# 45409384b2f3Smrg# Check to make sure the static flag actually works. 45419384b2f3Smrg# 45429384b2f3Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45439384b2f3Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45449384b2f3Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45459384b2f3Smrg $lt_tmp_static_flag, 45469384b2f3Smrg [], 45479384b2f3Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45489384b2f3Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45499384b2f3Smrg [Compiler flag to prevent dynamic linking]) 45509384b2f3Smrg])# _LT_COMPILER_PIC 4551966bf024Smrg 4552966bf024Smrg 45539384b2f3Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 45549384b2f3Smrg# ---------------------------- 45559384b2f3Smrg# See if the linker supports building shared libraries. 45569384b2f3Smrgm4_defun([_LT_LINKER_SHLIBS], 45579384b2f3Smrg[AC_REQUIRE([LT_PATH_LD])dnl 45589384b2f3SmrgAC_REQUIRE([LT_PATH_NM])dnl 45599384b2f3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45609384b2f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45619384b2f3Smrgm4_require([_LT_DECL_EGREP])dnl 45629384b2f3Smrgm4_require([_LT_DECL_SED])dnl 45639384b2f3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45649384b2f3Smrgm4_require([_LT_TAG_COMPILER])dnl 45659384b2f3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45669384b2f3Smrgm4_if([$1], [CXX], [ 45679384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 45689384b2f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45699384b2f3Smrg case $host_os in 45709384b2f3Smrg aix[[4-9]]*) 45719384b2f3Smrg # If we're using GNU nm, then we don't want the "-C" option. 45729384b2f3Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45739384b2f3Smrg # Also, AIX nm treats weak defined symbols like other global defined 45749384b2f3Smrg # symbols, whereas GNU nm marks them as "W". 45759384b2f3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45769384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45779384b2f3Smrg else 45789384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45799384b2f3Smrg fi 45809384b2f3Smrg ;; 45819384b2f3Smrg pw32*) 45829384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 45839384b2f3Smrg ;; 45849384b2f3Smrg cygwin* | mingw* | cegcc*) 45859384b2f3Smrg case $cc_basename in 45869384b2f3Smrg cl*) 45879384b2f3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 45889384b2f3Smrg ;; 45899384b2f3Smrg *) 45909384b2f3Smrg _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' 45919384b2f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 45929384b2f3Smrg ;; 45939384b2f3Smrg esac 45949384b2f3Smrg ;; 45959384b2f3Smrg *) 45969384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 45979384b2f3Smrg ;; 45989384b2f3Smrg esac 45999384b2f3Smrg], [ 46009384b2f3Smrg runpath_var= 46019384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 46029384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 46039384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)= 46049384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46059384b2f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 46069384b2f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46079384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46089384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46099384b2f3Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 46109384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 46119384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46129384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46139384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46149384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46159384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46169384b2f3Smrg _LT_TAGVAR(inherit_rpath, $1)=no 46179384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46189384b2f3Smrg _LT_TAGVAR(module_cmds, $1)= 46199384b2f3Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 46209384b2f3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46219384b2f3Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46229384b2f3Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46239384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46249384b2f3Smrg # include_expsyms should be a list of space-separated symbols to be *always* 46259384b2f3Smrg # included in the symbol list 46269384b2f3Smrg _LT_TAGVAR(include_expsyms, $1)= 46279384b2f3Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 46289384b2f3Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46299384b2f3Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46309384b2f3Smrg # as well as any symbol that contains `d'. 46319384b2f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46329384b2f3Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46339384b2f3Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 46349384b2f3Smrg # the symbol is explicitly referenced. Since portable code cannot 46359384b2f3Smrg # rely on this symbol name, it's probably fine to never include it in 46369384b2f3Smrg # preloaded symbol tables. 46379384b2f3Smrg # Exclude shared library initialization/finalization symbols. 46389384b2f3Smrgdnl Note also adjust exclude_expsyms for C++ above. 46399384b2f3Smrg extract_expsyms_cmds= 4640966bf024Smrg 46419384b2f3Smrg case $host_os in 46429384b2f3Smrg cygwin* | mingw* | pw32* | cegcc*) 46439384b2f3Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46449384b2f3Smrg # When not using gcc, we currently assume that we are using 46459384b2f3Smrg # Microsoft Visual C++. 46469384b2f3Smrg if test "$GCC" != yes; then 46479384b2f3Smrg with_gnu_ld=no 46489384b2f3Smrg fi 46499384b2f3Smrg ;; 46509384b2f3Smrg interix*) 46519384b2f3Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46529384b2f3Smrg with_gnu_ld=yes 46539384b2f3Smrg ;; 46549384b2f3Smrg openbsd*) 46559384b2f3Smrg with_gnu_ld=no 46569384b2f3Smrg ;; 46579384b2f3Smrg esac 4658966bf024Smrg 46599384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4660966bf024Smrg 46619384b2f3Smrg # On some targets, GNU ld is compatible enough with the native linker 46629384b2f3Smrg # that we're better off using the native interface for both. 46639384b2f3Smrg lt_use_gnu_ld_interface=no 46649384b2f3Smrg if test "$with_gnu_ld" = yes; then 46659384b2f3Smrg case $host_os in 46669384b2f3Smrg aix*) 46679384b2f3Smrg # The AIX port of GNU ld has always aspired to compatibility 46689384b2f3Smrg # with the native linker. However, as the warning in the GNU ld 46699384b2f3Smrg # block says, versions before 2.19.5* couldn't really create working 46709384b2f3Smrg # shared libraries, regardless of the interface used. 46719384b2f3Smrg case `$LD -v 2>&1` in 46729384b2f3Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 46739384b2f3Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 46749384b2f3Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 46759384b2f3Smrg *) 46769384b2f3Smrg lt_use_gnu_ld_interface=yes 46779384b2f3Smrg ;; 46789384b2f3Smrg esac 46799384b2f3Smrg ;; 46809384b2f3Smrg *) 46819384b2f3Smrg lt_use_gnu_ld_interface=yes 46829384b2f3Smrg ;; 46839384b2f3Smrg esac 46849384b2f3Smrg fi 4685966bf024Smrg 46869384b2f3Smrg if test "$lt_use_gnu_ld_interface" = yes; then 46879384b2f3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 46889384b2f3Smrg wlarc='${wl}' 4689966bf024Smrg 46909384b2f3Smrg # Set some defaults for GNU ld with shared library support. These 46919384b2f3Smrg # are reset later if shared libraries are not supported. Putting them 46929384b2f3Smrg # here allows them to be overridden if necessary. 46939384b2f3Smrg runpath_var=LD_RUN_PATH 46949384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 46959384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 46969384b2f3Smrg # ancient GNU ld didn't support --whole-archive et. al. 46979384b2f3Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 46989384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 46999384b2f3Smrg else 47009384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47019384b2f3Smrg fi 47029384b2f3Smrg supports_anon_versioning=no 47039384b2f3Smrg case `$LD -v 2>&1` in 47049384b2f3Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47059384b2f3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47069384b2f3Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47079384b2f3Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47089384b2f3Smrg *\ 2.11.*) ;; # other 2.11 versions 47099384b2f3Smrg *) supports_anon_versioning=yes ;; 47109384b2f3Smrg esac 4711966bf024Smrg 47129384b2f3Smrg # See if GNU ld supports shared libraries. 47139384b2f3Smrg case $host_os in 47149384b2f3Smrg aix[[3-9]]*) 47159384b2f3Smrg # On AIX/PPC, the GNU linker is very broken 47169384b2f3Smrg if test "$host_cpu" != ia64; then 47179384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47189384b2f3Smrg cat <<_LT_EOF 1>&2 4719966bf024Smrg 47209384b2f3Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47219384b2f3Smrg*** to be unable to reliably create shared libraries on AIX. 47229384b2f3Smrg*** Therefore, libtool is disabling shared libraries support. If you 47239384b2f3Smrg*** really care for shared libraries, you may want to install binutils 47249384b2f3Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 47259384b2f3Smrg*** You will then need to restart the configuration process. 4726966bf024Smrg 47279384b2f3Smrg_LT_EOF 47289384b2f3Smrg fi 47299384b2f3Smrg ;; 4730966bf024Smrg 47319384b2f3Smrg amigaos*) 47329384b2f3Smrg case $host_cpu in 47339384b2f3Smrg powerpc) 47349384b2f3Smrg # see comment about AmigaOS4 .so support 47359384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47369384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47379384b2f3Smrg ;; 47389384b2f3Smrg m68k) 47399384b2f3Smrg _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)' 47409384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47419384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47429384b2f3Smrg ;; 47439384b2f3Smrg esac 47449384b2f3Smrg ;; 4745966bf024Smrg 47469384b2f3Smrg beos*) 47479384b2f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47489384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47499384b2f3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47509384b2f3Smrg # support --undefined. This deserves some investigation. FIXME 47519384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47529384b2f3Smrg else 47539384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47549384b2f3Smrg fi 47559384b2f3Smrg ;; 4756966bf024Smrg 47579384b2f3Smrg cygwin* | mingw* | pw32* | cegcc*) 47589384b2f3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47599384b2f3Smrg # as there is no search path for DLLs. 47609384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47619384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47629384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47639384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 47649384b2f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47659384b2f3Smrg _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' 47669384b2f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47679384b2f3Smrg 47689384b2f3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47699384b2f3Smrg _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' 47709384b2f3Smrg # If the export-symbols file already is a .def file (1st line 47719384b2f3Smrg # is EXPORTS), use it as is; otherwise, prepend... 47729384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47739384b2f3Smrg cp $export_symbols $output_objdir/$soname.def; 47749384b2f3Smrg else 47759384b2f3Smrg echo EXPORTS > $output_objdir/$soname.def; 47769384b2f3Smrg cat $export_symbols >> $output_objdir/$soname.def; 47779384b2f3Smrg fi~ 47789384b2f3Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47799384b2f3Smrg else 47809384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47819384b2f3Smrg fi 47829384b2f3Smrg ;; 4783966bf024Smrg 47849384b2f3Smrg haiku*) 47859384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47869384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 47879384b2f3Smrg ;; 4788966bf024Smrg 47899384b2f3Smrg interix[[3-9]]*) 47909384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 47919384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47929384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 47939384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47949384b2f3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 47959384b2f3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 47969384b2f3Smrg # default) and relocated if they conflict, which is a slow very memory 47979384b2f3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 47989384b2f3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 47999384b2f3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48009384b2f3Smrg _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' 48019384b2f3Smrg _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' 48029384b2f3Smrg ;; 4803966bf024Smrg 48049384b2f3Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48059384b2f3Smrg tmp_diet=no 48069384b2f3Smrg if test "$host_os" = linux-dietlibc; then 48079384b2f3Smrg case $cc_basename in 48089384b2f3Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48099384b2f3Smrg esac 48109384b2f3Smrg fi 48119384b2f3Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48129384b2f3Smrg && test "$tmp_diet" = no 48139384b2f3Smrg then 48149384b2f3Smrg tmp_addflag=' $pic_flag' 48159384b2f3Smrg tmp_sharedflag='-shared' 48169384b2f3Smrg case $cc_basename,$host_cpu in 48179384b2f3Smrg pgcc*) # Portland Group C compiler 48189384b2f3Smrg _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' 48199384b2f3Smrg tmp_addflag=' $pic_flag' 48209384b2f3Smrg ;; 48219384b2f3Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 48229384b2f3Smrg # Portland Group f77 and f90 compilers 48239384b2f3Smrg _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' 48249384b2f3Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 48259384b2f3Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48269384b2f3Smrg tmp_addflag=' -i_dynamic' ;; 48279384b2f3Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48289384b2f3Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48299384b2f3Smrg ifc* | ifort*) # Intel Fortran compiler 48309384b2f3Smrg tmp_addflag=' -nofor_main' ;; 48319384b2f3Smrg lf95*) # Lahey Fortran 8.1 48329384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48339384b2f3Smrg tmp_sharedflag='--shared' ;; 48349384b2f3Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48359384b2f3Smrg tmp_sharedflag='-qmkshrobj' 48369384b2f3Smrg tmp_addflag= ;; 48379384b2f3Smrg nvcc*) # Cuda Compiler Driver 2.2 48389384b2f3Smrg _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' 48399384b2f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48409384b2f3Smrg ;; 48419384b2f3Smrg esac 48429384b2f3Smrg case `$CC -V 2>&1 | sed 5q` in 48439384b2f3Smrg *Sun\ C*) # Sun C 5.9 48449384b2f3Smrg _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' 48459384b2f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48469384b2f3Smrg tmp_sharedflag='-G' ;; 48479384b2f3Smrg *Sun\ F*) # Sun Fortran 8.3 48489384b2f3Smrg tmp_sharedflag='-G' ;; 48499384b2f3Smrg esac 48509384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4851966bf024Smrg 48529384b2f3Smrg if test "x$supports_anon_versioning" = xyes; then 48539384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48549384b2f3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48559384b2f3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48569384b2f3Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48579384b2f3Smrg fi 4858966bf024Smrg 48599384b2f3Smrg case $cc_basename in 48609384b2f3Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48619384b2f3Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48629384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 48639384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48649384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48659384b2f3Smrg if test "x$supports_anon_versioning" = xyes; then 48669384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48679384b2f3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48689384b2f3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48699384b2f3Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48709384b2f3Smrg fi 48719384b2f3Smrg ;; 48729384b2f3Smrg esac 48739384b2f3Smrg else 48749384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48759384b2f3Smrg fi 48769384b2f3Smrg ;; 4877966bf024Smrg 48789384b2f3Smrg netbsd*) 48799384b2f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48809384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48819384b2f3Smrg wlarc= 48829384b2f3Smrg else 48839384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48849384b2f3Smrg _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' 48859384b2f3Smrg fi 48869384b2f3Smrg ;; 4887966bf024Smrg 48889384b2f3Smrg solaris*) 48899384b2f3Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 48909384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48919384b2f3Smrg cat <<_LT_EOF 1>&2 4892966bf024Smrg 48939384b2f3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 48949384b2f3Smrg*** create shared libraries on Solaris systems. Therefore, libtool 48959384b2f3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 48969384b2f3Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 48979384b2f3Smrg*** your PATH or compiler configuration so that the native linker is 48989384b2f3Smrg*** used, and then restart. 4899966bf024Smrg 49009384b2f3Smrg_LT_EOF 49019384b2f3Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49029384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49039384b2f3Smrg _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' 49049384b2f3Smrg else 49059384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49069384b2f3Smrg fi 49079384b2f3Smrg ;; 4908966bf024Smrg 49099384b2f3Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49109384b2f3Smrg case `$LD -v 2>&1` in 49119384b2f3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49129384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49139384b2f3Smrg cat <<_LT_EOF 1>&2 4914966bf024Smrg 49159384b2f3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49169384b2f3Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49179384b2f3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49189384b2f3Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49199384b2f3Smrg*** your PATH or compiler configuration so that the native linker is 49209384b2f3Smrg*** used, and then restart. 4921966bf024Smrg 49229384b2f3Smrg_LT_EOF 49239384b2f3Smrg ;; 49249384b2f3Smrg *) 49259384b2f3Smrg # For security reasons, it is highly recommended that you always 49269384b2f3Smrg # use absolute paths for naming shared libraries, and exclude the 49279384b2f3Smrg # DT_RUNPATH tag from executables and libraries. But doing so 49289384b2f3Smrg # requires that you compile everything twice, which is a pain. 49299384b2f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49309384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49319384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49329384b2f3Smrg _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' 49339384b2f3Smrg else 49349384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49359384b2f3Smrg fi 49369384b2f3Smrg ;; 49379384b2f3Smrg esac 49389384b2f3Smrg ;; 4939966bf024Smrg 49409384b2f3Smrg sunos4*) 49419384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49429384b2f3Smrg wlarc= 49439384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 49449384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4945966bf024Smrg ;; 49469384b2f3Smrg 4947966bf024Smrg *) 49489384b2f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49499384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49509384b2f3Smrg _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' 49519384b2f3Smrg else 49529384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49539384b2f3Smrg fi 4954966bf024Smrg ;; 4955966bf024Smrg esac 4956966bf024Smrg 49579384b2f3Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49589384b2f3Smrg runpath_var= 49599384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49609384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49619384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49629384b2f3Smrg fi 49639384b2f3Smrg else 49649384b2f3Smrg # PORTME fill in a description of your system's linker (not GNU ld) 49659384b2f3Smrg case $host_os in 49669384b2f3Smrg aix3*) 49679384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49689384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 49699384b2f3Smrg _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' 49709384b2f3Smrg # Note: this linker hardcodes the directories in LIBPATH if there 49719384b2f3Smrg # are no directories specified by -L. 49729384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49739384b2f3Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49749384b2f3Smrg # Neither direct hardcoding nor static linking is supported with a 49759384b2f3Smrg # broken collect2. 49769384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49779384b2f3Smrg fi 49789384b2f3Smrg ;; 4979966bf024Smrg 49809384b2f3Smrg aix[[4-9]]*) 49819384b2f3Smrg if test "$host_cpu" = ia64; then 49829384b2f3Smrg # On IA64, the linker does run time linking by default, so we don't 49839384b2f3Smrg # have to do anything special. 49849384b2f3Smrg aix_use_runtimelinking=no 49859384b2f3Smrg exp_sym_flag='-Bexport' 49869384b2f3Smrg no_entry_flag="" 49879384b2f3Smrg else 49889384b2f3Smrg # If we're using GNU nm, then we don't want the "-C" option. 49899384b2f3Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 49909384b2f3Smrg # Also, AIX nm treats weak defined symbols like other global 49919384b2f3Smrg # defined symbols, whereas GNU nm marks them as "W". 49929384b2f3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49939384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 49949384b2f3Smrg else 49959384b2f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 49969384b2f3Smrg fi 49979384b2f3Smrg aix_use_runtimelinking=no 4998966bf024Smrg 49999384b2f3Smrg # Test if we are trying to use run time linking or normal 50009384b2f3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50019384b2f3Smrg # need to do runtime linking. 50029384b2f3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50039384b2f3Smrg for ld_flag in $LDFLAGS; do 50049384b2f3Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50059384b2f3Smrg aix_use_runtimelinking=yes 50069384b2f3Smrg break 50079384b2f3Smrg fi 50089384b2f3Smrg done 50099384b2f3Smrg ;; 50109384b2f3Smrg esac 5011966bf024Smrg 50129384b2f3Smrg exp_sym_flag='-bexport' 50139384b2f3Smrg no_entry_flag='-bnoentry' 50149384b2f3Smrg fi 5015966bf024Smrg 50169384b2f3Smrg # When large executables or shared objects are built, AIX ld can 50179384b2f3Smrg # have problems creating the table of contents. If linking a library 50189384b2f3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 50199384b2f3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50209384b2f3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5021966bf024Smrg 50229384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='' 50239384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50249384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50259384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50269384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50279384b2f3Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5028966bf024Smrg 50299384b2f3Smrg if test "$GCC" = yes; then 50309384b2f3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50319384b2f3Smrg # We only want to do this on AIX 4.2 and lower, the check 50329384b2f3Smrg # below for broken collect2 doesn't work under 4.3+ 50339384b2f3Smrg collect2name=`${CC} -print-prog-name=collect2` 50349384b2f3Smrg if test -f "$collect2name" && 50359384b2f3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50369384b2f3Smrg then 50379384b2f3Smrg # We have reworked collect2 50389384b2f3Smrg : 50399384b2f3Smrg else 50409384b2f3Smrg # We have old collect2 50419384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50429384b2f3Smrg # It fails to find uninstalled libraries when the uninstalled 50439384b2f3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 50449384b2f3Smrg # to unsupported forces relinking 50459384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50469384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50479384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50489384b2f3Smrg fi 50499384b2f3Smrg ;; 50509384b2f3Smrg esac 50519384b2f3Smrg shared_flag='-shared' 50529384b2f3Smrg if test "$aix_use_runtimelinking" = yes; then 50539384b2f3Smrg shared_flag="$shared_flag "'${wl}-G' 50549384b2f3Smrg fi 50559384b2f3Smrg else 50569384b2f3Smrg # not using gcc 50579384b2f3Smrg if test "$host_cpu" = ia64; then 50589384b2f3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50599384b2f3Smrg # chokes on -Wl,-G. The following line is correct: 50609384b2f3Smrg shared_flag='-G' 50619384b2f3Smrg else 50629384b2f3Smrg if test "$aix_use_runtimelinking" = yes; then 50639384b2f3Smrg shared_flag='${wl}-G' 50649384b2f3Smrg else 50659384b2f3Smrg shared_flag='${wl}-bM:SRE' 50669384b2f3Smrg fi 50679384b2f3Smrg fi 50689384b2f3Smrg fi 5069966bf024Smrg 50709384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50719384b2f3Smrg # It seems that -bexpall does not export symbols beginning with 50729384b2f3Smrg # underscore (_), so it is better to generate a list of symbols to export. 50739384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 50749384b2f3Smrg if test "$aix_use_runtimelinking" = yes; then 50759384b2f3Smrg # Warning - without using the other runtime loading flags (-brtl), 50769384b2f3Smrg # -berok will link without error, but may produce a broken library. 50779384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50789384b2f3Smrg # Determine the default libpath from the value encoded in an 50799384b2f3Smrg # empty executable. 50809384b2f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50819384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50829384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 50839384b2f3Smrg else 50849384b2f3Smrg if test "$host_cpu" = ia64; then 50859384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50869384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50879384b2f3Smrg _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" 50889384b2f3Smrg else 50899384b2f3Smrg # Determine the default libpath from the value encoded in an 50909384b2f3Smrg # empty executable. 50919384b2f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50929384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50939384b2f3Smrg # Warning - without using the other run time loading flags, 50949384b2f3Smrg # -berok will link without error, but may produce a broken library. 50959384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 50969384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 50979384b2f3Smrg if test "$with_gnu_ld" = yes; then 50989384b2f3Smrg # We only use this code for GNU lds that support --whole-archive. 50999384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 51009384b2f3Smrg else 51019384b2f3Smrg # Exported symbols can be pulled into shared objects from archives 51029384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 51039384b2f3Smrg fi 51049384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51059384b2f3Smrg # This is similar to how AIX traditionally builds its shared libraries. 51069384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 51079384b2f3Smrg fi 51089384b2f3Smrg fi 51099384b2f3Smrg ;; 5110966bf024Smrg 51119384b2f3Smrg amigaos*) 51129384b2f3Smrg case $host_cpu in 51139384b2f3Smrg powerpc) 51149384b2f3Smrg # see comment about AmigaOS4 .so support 51159384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51169384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51179384b2f3Smrg ;; 51189384b2f3Smrg m68k) 51199384b2f3Smrg _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)' 51209384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51219384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51229384b2f3Smrg ;; 51239384b2f3Smrg esac 51249384b2f3Smrg ;; 5125966bf024Smrg 51269384b2f3Smrg bsdi[[45]]*) 51279384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51289384b2f3Smrg ;; 5129966bf024Smrg 51309384b2f3Smrg cygwin* | mingw* | pw32* | cegcc*) 51319384b2f3Smrg # When not using gcc, we currently assume that we are using 51329384b2f3Smrg # Microsoft Visual C++. 51339384b2f3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51349384b2f3Smrg # no search path for DLLs. 51359384b2f3Smrg case $cc_basename in 51369384b2f3Smrg cl*) 51379384b2f3Smrg # Native MSVC 51389384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51399384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51409384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 51419384b2f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 51429384b2f3Smrg # Tell ltmain to make .lib files, not .a files. 51439384b2f3Smrg libext=lib 51449384b2f3Smrg # Tell ltmain to make .dll files, not .so files. 51459384b2f3Smrg shrext_cmds=".dll" 51469384b2f3Smrg # FIXME: Setting linknames here is a bad hack. 51479384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 51489384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 51499384b2f3Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 51509384b2f3Smrg else 51519384b2f3Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 51529384b2f3Smrg fi~ 51539384b2f3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 51549384b2f3Smrg linknames=' 51559384b2f3Smrg # The linker will not automatically build a static lib if we build a DLL. 51569384b2f3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51579384b2f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51589384b2f3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 51599384b2f3Smrg _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' 51609384b2f3Smrg # Don't use ranlib 51619384b2f3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 51629384b2f3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 51639384b2f3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 51649384b2f3Smrg case $lt_outputfile in 51659384b2f3Smrg *.exe|*.EXE) ;; 51669384b2f3Smrg *) 51679384b2f3Smrg lt_outputfile="$lt_outputfile.exe" 51689384b2f3Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 51699384b2f3Smrg ;; 51709384b2f3Smrg esac~ 51719384b2f3Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 51729384b2f3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 51739384b2f3Smrg $RM "$lt_outputfile.manifest"; 51749384b2f3Smrg fi' 51759384b2f3Smrg ;; 51769384b2f3Smrg *) 51779384b2f3Smrg # Assume MSVC wrapper 51789384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 51799384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51809384b2f3Smrg # Tell ltmain to make .lib files, not .a files. 51819384b2f3Smrg libext=lib 51829384b2f3Smrg # Tell ltmain to make .dll files, not .so files. 51839384b2f3Smrg shrext_cmds=".dll" 51849384b2f3Smrg # FIXME: Setting linknames here is a bad hack. 51859384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 51869384b2f3Smrg # The linker will automatically build a .lib file if we build a DLL. 51879384b2f3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 51889384b2f3Smrg # FIXME: Should let the user specify the lib program. 51899384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 51909384b2f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51919384b2f3Smrg ;; 51929384b2f3Smrg esac 51939384b2f3Smrg ;; 5194966bf024Smrg 51959384b2f3Smrg darwin* | rhapsody*) 51969384b2f3Smrg _LT_DARWIN_LINKER_FEATURES($1) 51979384b2f3Smrg ;; 5198966bf024Smrg 51999384b2f3Smrg dgux*) 52009384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52019384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52029384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52039384b2f3Smrg ;; 5204966bf024Smrg 52059384b2f3Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52069384b2f3Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 52079384b2f3Smrg # does not break anything, and helps significantly (at the cost of a little 52089384b2f3Smrg # extra space). 52099384b2f3Smrg freebsd2.2*) 52109384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52119384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52129384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52139384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52149384b2f3Smrg ;; 5215966bf024Smrg 52169384b2f3Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 52179384b2f3Smrg freebsd2.*) 52189384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52199384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52209384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52219384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52229384b2f3Smrg ;; 5223966bf024Smrg 52249384b2f3Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52259384b2f3Smrg freebsd* | dragonfly*) 52269384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52279384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52289384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52299384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52309384b2f3Smrg ;; 5231966bf024Smrg 52329384b2f3Smrg hpux9*) 52339384b2f3Smrg if test "$GCC" = yes; then 52349384b2f3Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52359384b2f3Smrg else 52369384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52379384b2f3Smrg fi 52389384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52399384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52409384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5241966bf024Smrg 52429384b2f3Smrg # hardcode_minus_L: Not really in the search PATH, 52439384b2f3Smrg # but as the default location of the library. 52449384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52459384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52469384b2f3Smrg ;; 5247966bf024Smrg 52489384b2f3Smrg hpux10*) 52499384b2f3Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52509384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52519384b2f3Smrg else 52529384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52539384b2f3Smrg fi 52549384b2f3Smrg if test "$with_gnu_ld" = no; then 52559384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52569384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52579384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52589384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52599384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52609384b2f3Smrg # hardcode_minus_L: Not really in the search PATH, 52619384b2f3Smrg # but as the default location of the library. 52629384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52639384b2f3Smrg fi 52649384b2f3Smrg ;; 5265966bf024Smrg 52669384b2f3Smrg hpux11*) 52679384b2f3Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52689384b2f3Smrg case $host_cpu in 52699384b2f3Smrg hppa*64*) 52709384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52719384b2f3Smrg ;; 52729384b2f3Smrg ia64*) 52739384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52749384b2f3Smrg ;; 52759384b2f3Smrg *) 52769384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52779384b2f3Smrg ;; 52789384b2f3Smrg esac 52799384b2f3Smrg else 52809384b2f3Smrg case $host_cpu in 52819384b2f3Smrg hppa*64*) 52829384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52839384b2f3Smrg ;; 52849384b2f3Smrg ia64*) 52859384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52869384b2f3Smrg ;; 52879384b2f3Smrg *) 52889384b2f3Smrg m4_if($1, [], [ 52899384b2f3Smrg # Older versions of the 11.00 compiler do not understand -b yet 52909384b2f3Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 52919384b2f3Smrg _LT_LINKER_OPTION([if $CC understands -b], 52929384b2f3Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 52939384b2f3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 52949384b2f3Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 52959384b2f3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 52969384b2f3Smrg ;; 52979384b2f3Smrg esac 52989384b2f3Smrg fi 52999384b2f3Smrg if test "$with_gnu_ld" = no; then 53009384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53019384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5302966bf024Smrg 53039384b2f3Smrg case $host_cpu in 53049384b2f3Smrg hppa*64*|ia64*) 53059384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53069384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53079384b2f3Smrg ;; 53089384b2f3Smrg *) 53099384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53109384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53119384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5312966bf024Smrg 53139384b2f3Smrg # hardcode_minus_L: Not really in the search PATH, 53149384b2f3Smrg # but as the default location of the library. 53159384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53169384b2f3Smrg ;; 53179384b2f3Smrg esac 53189384b2f3Smrg fi 53199384b2f3Smrg ;; 5320966bf024Smrg 53219384b2f3Smrg irix5* | irix6* | nonstopux*) 53229384b2f3Smrg if test "$GCC" = yes; then 53239384b2f3Smrg _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' 53249384b2f3Smrg # Try to use the -exported_symbol ld option, if it does not 53259384b2f3Smrg # work, assume that -exports_file does not work either and 53269384b2f3Smrg # implicitly export all symbols. 53279384b2f3Smrg # This should be the same for all languages, so no per-tag cache variable. 53289384b2f3Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 53299384b2f3Smrg [lt_cv_irix_exported_symbol], 53309384b2f3Smrg [save_LDFLAGS="$LDFLAGS" 53319384b2f3Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 53329384b2f3Smrg AC_LINK_IFELSE( 53339384b2f3Smrg [AC_LANG_SOURCE( 53349384b2f3Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 53359384b2f3Smrg [C++], [[int foo (void) { return 0; }]], 53369384b2f3Smrg [Fortran 77], [[ 53379384b2f3Smrg subroutine foo 53389384b2f3Smrg end]], 53399384b2f3Smrg [Fortran], [[ 53409384b2f3Smrg subroutine foo 53419384b2f3Smrg end]])])], 53429384b2f3Smrg [lt_cv_irix_exported_symbol=yes], 53439384b2f3Smrg [lt_cv_irix_exported_symbol=no]) 53449384b2f3Smrg LDFLAGS="$save_LDFLAGS"]) 53459384b2f3Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 53469384b2f3Smrg _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' 53479384b2f3Smrg fi 53489384b2f3Smrg else 53499384b2f3Smrg _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' 53509384b2f3Smrg _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' 53519384b2f3Smrg fi 53529384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53539384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53549384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53559384b2f3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 53569384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53579384b2f3Smrg ;; 5358966bf024Smrg 53599384b2f3Smrg netbsd*) 53609384b2f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53619384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53629384b2f3Smrg else 53639384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53649384b2f3Smrg fi 53659384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53669384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53679384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53689384b2f3Smrg ;; 5369966bf024Smrg 53709384b2f3Smrg newsos6) 53719384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53729384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53739384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53749384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53759384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53769384b2f3Smrg ;; 5377966bf024Smrg 53789384b2f3Smrg *nto* | *qnx*) 53799384b2f3Smrg ;; 5380966bf024Smrg 53819384b2f3Smrg openbsd*) 53829384b2f3Smrg if test -f /usr/libexec/ld.so; then 53839384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53849384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53859384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53869384b2f3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53879384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53889384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 53899384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 53909384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53919384b2f3Smrg else 53929384b2f3Smrg case $host_os in 53939384b2f3Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 53949384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53959384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53969384b2f3Smrg ;; 53979384b2f3Smrg *) 53989384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53999384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54009384b2f3Smrg ;; 54019384b2f3Smrg esac 54029384b2f3Smrg fi 54039384b2f3Smrg else 54049384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54059384b2f3Smrg fi 54069384b2f3Smrg ;; 5407966bf024Smrg 54089384b2f3Smrg os2*) 54099384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54109384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54119384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 54129384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 54139384b2f3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54149384b2f3Smrg ;; 5415966bf024Smrg 54169384b2f3Smrg osf3*) 54179384b2f3Smrg if test "$GCC" = yes; then 54189384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54199384b2f3Smrg _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' 54209384b2f3Smrg else 54219384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54229384b2f3Smrg _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' 54239384b2f3Smrg fi 54249384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54259384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54269384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54279384b2f3Smrg ;; 5428966bf024Smrg 54299384b2f3Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54309384b2f3Smrg if test "$GCC" = yes; then 54319384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54329384b2f3Smrg _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' 54339384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54349384b2f3Smrg else 54359384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54369384b2f3Smrg _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' 54379384b2f3Smrg _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~ 54389384b2f3Smrg $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' 5439966bf024Smrg 54409384b2f3Smrg # Both c and cxx compiler support -rpath directly 54419384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54429384b2f3Smrg fi 54439384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54449384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54459384b2f3Smrg ;; 5446966bf024Smrg 54479384b2f3Smrg solaris*) 54489384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54499384b2f3Smrg if test "$GCC" = yes; then 54509384b2f3Smrg wlarc='${wl}' 54519384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54529384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54539384b2f3Smrg $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' 54549384b2f3Smrg else 54559384b2f3Smrg case `$CC -V 2>&1` in 54569384b2f3Smrg *"Compilers 5.0"*) 54579384b2f3Smrg wlarc='' 54589384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54599384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54609384b2f3Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54619384b2f3Smrg ;; 54629384b2f3Smrg *) 54639384b2f3Smrg wlarc='${wl}' 54649384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54659384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54669384b2f3Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54679384b2f3Smrg ;; 54689384b2f3Smrg esac 54699384b2f3Smrg fi 54709384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54719384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54729384b2f3Smrg case $host_os in 54739384b2f3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54749384b2f3Smrg *) 54759384b2f3Smrg # The compiler driver will combine and reorder linker options, 54769384b2f3Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54779384b2f3Smrg # but is careful enough not to reorder. 54789384b2f3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54799384b2f3Smrg if test "$GCC" = yes; then 54809384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54819384b2f3Smrg else 54829384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54839384b2f3Smrg fi 54849384b2f3Smrg ;; 54859384b2f3Smrg esac 54869384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54879384b2f3Smrg ;; 5488966bf024Smrg 54899384b2f3Smrg sunos4*) 54909384b2f3Smrg if test "x$host_vendor" = xsequent; then 54919384b2f3Smrg # Use $CC to link under sequent, because it throws in some extra .o 54929384b2f3Smrg # files that make .init and .fini sections work. 54939384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 54949384b2f3Smrg else 54959384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 54969384b2f3Smrg fi 54979384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54989384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54999384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55009384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55019384b2f3Smrg ;; 5502966bf024Smrg 55039384b2f3Smrg sysv4) 55049384b2f3Smrg case $host_vendor in 55059384b2f3Smrg sni) 55069384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55079384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55089384b2f3Smrg ;; 55099384b2f3Smrg siemens) 55109384b2f3Smrg ## LD is ld it makes a PLAMLIB 55119384b2f3Smrg ## CC just makes a GrossModule. 55129384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55139384b2f3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55149384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55159384b2f3Smrg ;; 55169384b2f3Smrg motorola) 55179384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55189384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55199384b2f3Smrg ;; 55209384b2f3Smrg esac 55219384b2f3Smrg runpath_var='LD_RUN_PATH' 55229384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55239384b2f3Smrg ;; 5524966bf024Smrg 55259384b2f3Smrg sysv4.3*) 55269384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55279384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55289384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55299384b2f3Smrg ;; 5530966bf024Smrg 55319384b2f3Smrg sysv4*MP*) 55329384b2f3Smrg if test -d /usr/nec; then 55339384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55349384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55359384b2f3Smrg runpath_var=LD_RUN_PATH 55369384b2f3Smrg hardcode_runpath_var=yes 55379384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 55389384b2f3Smrg fi 55399384b2f3Smrg ;; 5540966bf024Smrg 55419384b2f3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55429384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55439384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55449384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55459384b2f3Smrg runpath_var='LD_RUN_PATH' 5546966bf024Smrg 55479384b2f3Smrg if test "$GCC" = yes; then 55489384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55499384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55509384b2f3Smrg else 55519384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55529384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55539384b2f3Smrg fi 55549384b2f3Smrg ;; 5555966bf024Smrg 55569384b2f3Smrg sysv5* | sco3.2v5* | sco5v6*) 55579384b2f3Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55589384b2f3Smrg # link with -lc, and that would cause any symbols used from libc to 55599384b2f3Smrg # always be unresolved, which means just about no library would 55609384b2f3Smrg # ever link correctly. If we're not using GNU ld we use -z text 55619384b2f3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55629384b2f3Smrg # as -z defs. 55639384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55649384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55659384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55669384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55679384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55689384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55699384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55709384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55719384b2f3Smrg runpath_var='LD_RUN_PATH' 5572966bf024Smrg 55739384b2f3Smrg if test "$GCC" = yes; then 55749384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55759384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55769384b2f3Smrg else 55779384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55789384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55799384b2f3Smrg fi 55809384b2f3Smrg ;; 5581966bf024Smrg 55829384b2f3Smrg uts4*) 55839384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55849384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55859384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55869384b2f3Smrg ;; 5587966bf024Smrg 55889384b2f3Smrg *) 55899384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 55909384b2f3Smrg ;; 55919384b2f3Smrg esac 5592966bf024Smrg 55939384b2f3Smrg if test x$host_vendor = xsni; then 55949384b2f3Smrg case $host in 55959384b2f3Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 55969384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 55979384b2f3Smrg ;; 55989384b2f3Smrg esac 55999384b2f3Smrg fi 56009384b2f3Smrg fi 56019384b2f3Smrg]) 56029384b2f3SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56039384b2f3Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5604966bf024Smrg 56059384b2f3Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5606966bf024Smrg 56079384b2f3Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56089384b2f3Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56099384b2f3Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 56109384b2f3Smrg [The commands to extract the exported symbol list from a shared archive]) 5611966bf024Smrg 56129384b2f3Smrg# 56139384b2f3Smrg# Do we need to explicitly link libc? 56149384b2f3Smrg# 56159384b2f3Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56169384b2f3Smrgx|xyes) 56179384b2f3Smrg # Assume -lc should be added 56189384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5619966bf024Smrg 56209384b2f3Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56219384b2f3Smrg case $_LT_TAGVAR(archive_cmds, $1) in 56229384b2f3Smrg *'~'*) 56239384b2f3Smrg # FIXME: we may have to deal with multi-command sequences. 56249384b2f3Smrg ;; 56259384b2f3Smrg '$CC '*) 56269384b2f3Smrg # Test whether the compiler implicitly links with -lc since on some 56279384b2f3Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56289384b2f3Smrg # to ld, don't add -lc before -lgcc. 56299384b2f3Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 56309384b2f3Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 56319384b2f3Smrg [$RM conftest* 56329384b2f3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 56339384b2f3Smrg 56349384b2f3Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 56359384b2f3Smrg soname=conftest 56369384b2f3Smrg lib=conftest 56379384b2f3Smrg libobjs=conftest.$ac_objext 56389384b2f3Smrg deplibs= 56399384b2f3Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 56409384b2f3Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 56419384b2f3Smrg compiler_flags=-v 56429384b2f3Smrg linker_flags=-v 56439384b2f3Smrg verstring= 56449384b2f3Smrg output_objdir=. 56459384b2f3Smrg libname=conftest 56469384b2f3Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 56479384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 56489384b2f3Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 56499384b2f3Smrg then 56509384b2f3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 56519384b2f3Smrg else 56529384b2f3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56539384b2f3Smrg fi 56549384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 56559384b2f3Smrg else 56569384b2f3Smrg cat conftest.err 1>&5 56579384b2f3Smrg fi 56589384b2f3Smrg $RM conftest* 56599384b2f3Smrg ]) 56609384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56619384b2f3Smrg ;; 56629384b2f3Smrg esac 56639384b2f3Smrg fi 56649384b2f3Smrg ;; 56659384b2f3Smrgesac 5666966bf024Smrg 56679384b2f3Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56689384b2f3Smrg [Whether or not to add -lc for building shared libraries]) 56699384b2f3Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56709384b2f3Smrg [enable_shared_with_static_runtimes], [0], 56719384b2f3Smrg [Whether or not to disallow shared libs when runtime libs are static]) 56729384b2f3Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56739384b2f3Smrg [Compiler flag to allow reflexive dlopens]) 56749384b2f3Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56759384b2f3Smrg [Compiler flag to generate shared objects directly from archives]) 56769384b2f3Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 56779384b2f3Smrg [Whether the compiler copes with passing no objects directly]) 56789384b2f3Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56799384b2f3Smrg [Create an old-style archive from a shared archive]) 56809384b2f3Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56819384b2f3Smrg [Create a temporary old-style archive to link instead of a shared archive]) 56829384b2f3Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56839384b2f3Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56849384b2f3Smrg_LT_TAGDECL([], [module_cmds], [2], 56859384b2f3Smrg [Commands used to build a loadable module if different from building 56869384b2f3Smrg a shared archive.]) 56879384b2f3Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 56889384b2f3Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 56899384b2f3Smrg [Whether we are building with GNU ld or not]) 56909384b2f3Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 56919384b2f3Smrg [Flag that allows shared libraries with undefined symbols to be built]) 56929384b2f3Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 56939384b2f3Smrg [Flag that enforces no undefined symbols]) 56949384b2f3Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 56959384b2f3Smrg [Flag to hardcode $libdir into a binary during linking. 56969384b2f3Smrg This must work even if $libdir does not exist]) 56979384b2f3Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 56989384b2f3Smrg [Whether we need a single "-rpath" flag with a separated argument]) 56999384b2f3Smrg_LT_TAGDECL([], [hardcode_direct], [0], 57009384b2f3Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57019384b2f3Smrg DIR into the resulting binary]) 57029384b2f3Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57039384b2f3Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57049384b2f3Smrg DIR into the resulting binary and the resulting library dependency is 57059384b2f3Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57069384b2f3Smrg library is relocated]) 57079384b2f3Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57089384b2f3Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57099384b2f3Smrg into the resulting binary]) 57109384b2f3Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57119384b2f3Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57129384b2f3Smrg into the resulting binary]) 57139384b2f3Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 57149384b2f3Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 57159384b2f3Smrg into the library and all subsequent libraries and executables linked 57169384b2f3Smrg against it]) 57179384b2f3Smrg_LT_TAGDECL([], [inherit_rpath], [0], 57189384b2f3Smrg [Set to yes if linker adds runtime paths of dependent libraries 57199384b2f3Smrg to runtime path list]) 57209384b2f3Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 57219384b2f3Smrg [Whether libtool must link a program against all its dependency libraries]) 57229384b2f3Smrg_LT_TAGDECL([], [always_export_symbols], [0], 57239384b2f3Smrg [Set to "yes" if exported symbols are required]) 57249384b2f3Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57259384b2f3Smrg [The commands to list exported symbols]) 57269384b2f3Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 57279384b2f3Smrg [Symbols that should not be listed in the preloaded symbols]) 57289384b2f3Smrg_LT_TAGDECL([], [include_expsyms], [1], 57299384b2f3Smrg [Symbols that must always be exported]) 57309384b2f3Smrg_LT_TAGDECL([], [prelink_cmds], [2], 57319384b2f3Smrg [Commands necessary for linking programs (against libraries) with templates]) 57329384b2f3Smrg_LT_TAGDECL([], [postlink_cmds], [2], 57339384b2f3Smrg [Commands necessary for finishing linking programs]) 57349384b2f3Smrg_LT_TAGDECL([], [file_list_spec], [1], 57359384b2f3Smrg [Specify filename containing input files]) 57369384b2f3Smrgdnl FIXME: Not yet implemented 57379384b2f3Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57389384b2f3Smrgdnl [Compiler flag to generate thread safe objects]) 57399384b2f3Smrg])# _LT_LINKER_SHLIBS 57409384b2f3Smrg 57419384b2f3Smrg 57429384b2f3Smrg# _LT_LANG_C_CONFIG([TAG]) 57439384b2f3Smrg# ------------------------ 57449384b2f3Smrg# Ensure that the configuration variables for a C compiler are suitably 57459384b2f3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 57469384b2f3Smrg# the compiler configuration to `libtool'. 57479384b2f3Smrgm4_defun([_LT_LANG_C_CONFIG], 57489384b2f3Smrg[m4_require([_LT_DECL_EGREP])dnl 57499384b2f3Smrglt_save_CC="$CC" 57509384b2f3SmrgAC_LANG_PUSH(C) 5751966bf024Smrg 57529384b2f3Smrg# Source file extension for C test sources. 57539384b2f3Smrgac_ext=c 5754966bf024Smrg 57559384b2f3Smrg# Object file extension for compiled C test sources. 57569384b2f3Smrgobjext=o 57579384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 5758966bf024Smrg 57599384b2f3Smrg# Code to be used in simple compile tests 57609384b2f3Smrglt_simple_compile_test_code="int some_variable = 0;" 5761966bf024Smrg 57629384b2f3Smrg# Code to be used in simple link tests 57639384b2f3Smrglt_simple_link_test_code='int main(){return(0);}' 57649384b2f3Smrg 57659384b2f3Smrg_LT_TAG_COMPILER 57669384b2f3Smrg# Save the default compiler, since it gets overwritten when the other 57679384b2f3Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57689384b2f3Smrgcompiler_DEFAULT=$CC 57699384b2f3Smrg 57709384b2f3Smrg# save warnings/boilerplate of simple test code 57719384b2f3Smrg_LT_COMPILER_BOILERPLATE 57729384b2f3Smrg_LT_LINKER_BOILERPLATE 57739384b2f3Smrg 57749384b2f3Smrgif test -n "$compiler"; then 57759384b2f3Smrg _LT_COMPILER_NO_RTTI($1) 57769384b2f3Smrg _LT_COMPILER_PIC($1) 57779384b2f3Smrg _LT_COMPILER_C_O($1) 57789384b2f3Smrg _LT_COMPILER_FILE_LOCKS($1) 57799384b2f3Smrg _LT_LINKER_SHLIBS($1) 57809384b2f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 57819384b2f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 57829384b2f3Smrg LT_SYS_DLOPEN_SELF 57839384b2f3Smrg _LT_CMD_STRIPLIB 57849384b2f3Smrg 57859384b2f3Smrg # Report which library types will actually be built 57869384b2f3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57879384b2f3Smrg AC_MSG_RESULT([$can_build_shared]) 57889384b2f3Smrg 57899384b2f3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 57909384b2f3Smrg test "$can_build_shared" = "no" && enable_shared=no 57919384b2f3Smrg 57929384b2f3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 57939384b2f3Smrg # are all built from PIC. 57949384b2f3Smrg case $host_os in 57959384b2f3Smrg aix3*) 57969384b2f3Smrg test "$enable_shared" = yes && enable_static=no 57979384b2f3Smrg if test -n "$RANLIB"; then 57989384b2f3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 57999384b2f3Smrg postinstall_cmds='$RANLIB $lib' 58009384b2f3Smrg fi 58019384b2f3Smrg ;; 5802966bf024Smrg 58039384b2f3Smrg aix[[4-9]]*) 58049384b2f3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58059384b2f3Smrg test "$enable_shared" = yes && enable_static=no 58069384b2f3Smrg fi 58079384b2f3Smrg ;; 58089384b2f3Smrg esac 58099384b2f3Smrg AC_MSG_RESULT([$enable_shared]) 5810966bf024Smrg 58119384b2f3Smrg AC_MSG_CHECKING([whether to build static libraries]) 58129384b2f3Smrg # Make sure either enable_shared or enable_static is yes. 58139384b2f3Smrg test "$enable_shared" = yes || enable_static=yes 58149384b2f3Smrg AC_MSG_RESULT([$enable_static]) 5815966bf024Smrg 58169384b2f3Smrg _LT_CONFIG($1) 58179384b2f3Smrgfi 58189384b2f3SmrgAC_LANG_POP 58199384b2f3SmrgCC="$lt_save_CC" 58209384b2f3Smrg])# _LT_LANG_C_CONFIG 5821966bf024Smrg 5822966bf024Smrg 58239384b2f3Smrg# _LT_LANG_CXX_CONFIG([TAG]) 58249384b2f3Smrg# -------------------------- 58259384b2f3Smrg# Ensure that the configuration variables for a C++ compiler are suitably 58269384b2f3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 58279384b2f3Smrg# the compiler configuration to `libtool'. 58289384b2f3Smrgm4_defun([_LT_LANG_CXX_CONFIG], 58299384b2f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58309384b2f3Smrgm4_require([_LT_DECL_EGREP])dnl 58319384b2f3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 58329384b2f3Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 58339384b2f3Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 58349384b2f3Smrg (test "X$CXX" != "Xg++"))) ; then 58359384b2f3Smrg AC_PROG_CXXCPP 58369384b2f3Smrgelse 58379384b2f3Smrg _lt_caught_CXX_error=yes 58389384b2f3Smrgfi 5839966bf024Smrg 58409384b2f3SmrgAC_LANG_PUSH(C++) 58419384b2f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58429384b2f3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 58439384b2f3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 58449384b2f3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58459384b2f3Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 58469384b2f3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58479384b2f3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 58489384b2f3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58499384b2f3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58509384b2f3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58519384b2f3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58529384b2f3Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58539384b2f3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 58549384b2f3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 58559384b2f3Smrg_LT_TAGVAR(module_cmds, $1)= 58569384b2f3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 58579384b2f3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58589384b2f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 58599384b2f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 58609384b2f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58619384b2f3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 58629384b2f3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58639384b2f3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5864966bf024Smrg 58659384b2f3Smrg# Source file extension for C++ test sources. 58669384b2f3Smrgac_ext=cpp 5867966bf024Smrg 58689384b2f3Smrg# Object file extension for compiled C++ test sources. 58699384b2f3Smrgobjext=o 58709384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 58719384b2f3Smrg 58729384b2f3Smrg# No sense in running all these tests if we already determined that 58739384b2f3Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 58749384b2f3Smrg# are currently assumed to apply to all compilers on this platform, 58759384b2f3Smrg# and will be corrupted by setting them based on a non-working compiler. 58769384b2f3Smrgif test "$_lt_caught_CXX_error" != yes; then 58779384b2f3Smrg # Code to be used in simple compile tests 58789384b2f3Smrg lt_simple_compile_test_code="int some_variable = 0;" 58799384b2f3Smrg 58809384b2f3Smrg # Code to be used in simple link tests 58819384b2f3Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 58829384b2f3Smrg 58839384b2f3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 58849384b2f3Smrg _LT_TAG_COMPILER 58859384b2f3Smrg 58869384b2f3Smrg # save warnings/boilerplate of simple test code 58879384b2f3Smrg _LT_COMPILER_BOILERPLATE 58889384b2f3Smrg _LT_LINKER_BOILERPLATE 58899384b2f3Smrg 58909384b2f3Smrg # Allow CC to be a program name with arguments. 58919384b2f3Smrg lt_save_CC=$CC 58929384b2f3Smrg lt_save_CFLAGS=$CFLAGS 58939384b2f3Smrg lt_save_LD=$LD 58949384b2f3Smrg lt_save_GCC=$GCC 58959384b2f3Smrg GCC=$GXX 58969384b2f3Smrg lt_save_with_gnu_ld=$with_gnu_ld 58979384b2f3Smrg lt_save_path_LD=$lt_cv_path_LD 58989384b2f3Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 58999384b2f3Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59009384b2f3Smrg else 59019384b2f3Smrg $as_unset lt_cv_prog_gnu_ld 59029384b2f3Smrg fi 59039384b2f3Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 59049384b2f3Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 59059384b2f3Smrg else 59069384b2f3Smrg $as_unset lt_cv_path_LD 59079384b2f3Smrg fi 59089384b2f3Smrg test -z "${LDCXX+set}" || LD=$LDCXX 59099384b2f3Smrg CC=${CXX-"c++"} 59109384b2f3Smrg CFLAGS=$CXXFLAGS 59119384b2f3Smrg compiler=$CC 59129384b2f3Smrg _LT_TAGVAR(compiler, $1)=$CC 59139384b2f3Smrg _LT_CC_BASENAME([$compiler]) 59149384b2f3Smrg 59159384b2f3Smrg if test -n "$compiler"; then 59169384b2f3Smrg # We don't want -fno-exception when compiling C++ code, so set the 59179384b2f3Smrg # no_builtin_flag separately 59189384b2f3Smrg if test "$GXX" = yes; then 59199384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59209384b2f3Smrg else 59219384b2f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59229384b2f3Smrg fi 5923966bf024Smrg 59249384b2f3Smrg if test "$GXX" = yes; then 59259384b2f3Smrg # Set up default GNU C++ configuration 5926966bf024Smrg 59279384b2f3Smrg LT_PATH_LD 5928966bf024Smrg 59299384b2f3Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59309384b2f3Smrg # archiving commands below assume that GNU ld is being used. 59319384b2f3Smrg if test "$with_gnu_ld" = yes; then 59329384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59339384b2f3Smrg _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' 5934966bf024Smrg 59359384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59369384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5937966bf024Smrg 59389384b2f3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 59399384b2f3Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59409384b2f3Smrg # investigate it a little bit more. (MM) 59419384b2f3Smrg wlarc='${wl}' 5942966bf024Smrg 59439384b2f3Smrg # ancient GNU ld didn't support --whole-archive et. al. 59449384b2f3Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59459384b2f3Smrg $GREP 'no-whole-archive' > /dev/null; then 59469384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59479384b2f3Smrg else 59489384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59499384b2f3Smrg fi 59509384b2f3Smrg else 59519384b2f3Smrg with_gnu_ld=no 59529384b2f3Smrg wlarc= 59539384b2f3Smrg 59549384b2f3Smrg # A generic and very simple default shared library creation 59559384b2f3Smrg # command for GNU C++ for the case where it uses the native 59569384b2f3Smrg # linker, instead of GNU ld. If possible, this setting should 59579384b2f3Smrg # overridden to take advantage of the native linker features on 59589384b2f3Smrg # the platform it is being used on. 59599384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59609384b2f3Smrg fi 5961966bf024Smrg 59629384b2f3Smrg # Commands to make compiler produce verbose output that lists 59639384b2f3Smrg # what "hidden" libraries, object files and flags are used when 59649384b2f3Smrg # linking a shared library. 59659384b2f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5966966bf024Smrg 59679384b2f3Smrg else 59689384b2f3Smrg GXX=no 59699384b2f3Smrg with_gnu_ld=no 59709384b2f3Smrg wlarc= 59719384b2f3Smrg fi 5972966bf024Smrg 59739384b2f3Smrg # PORTME: fill in a description of your system's C++ link characteristics 59749384b2f3Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59759384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59769384b2f3Smrg case $host_os in 59779384b2f3Smrg aix3*) 59789384b2f3Smrg # FIXME: insert proper C++ library support 59799384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59809384b2f3Smrg ;; 59819384b2f3Smrg aix[[4-9]]*) 59829384b2f3Smrg if test "$host_cpu" = ia64; then 59839384b2f3Smrg # On IA64, the linker does run time linking by default, so we don't 59849384b2f3Smrg # have to do anything special. 59859384b2f3Smrg aix_use_runtimelinking=no 59869384b2f3Smrg exp_sym_flag='-Bexport' 59879384b2f3Smrg no_entry_flag="" 59889384b2f3Smrg else 59899384b2f3Smrg aix_use_runtimelinking=no 59909384b2f3Smrg 59919384b2f3Smrg # Test if we are trying to use run time linking or normal 59929384b2f3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59939384b2f3Smrg # need to do runtime linking. 59949384b2f3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59959384b2f3Smrg for ld_flag in $LDFLAGS; do 59969384b2f3Smrg case $ld_flag in 59979384b2f3Smrg *-brtl*) 59989384b2f3Smrg aix_use_runtimelinking=yes 59999384b2f3Smrg break 60009384b2f3Smrg ;; 60019384b2f3Smrg esac 60029384b2f3Smrg done 60039384b2f3Smrg ;; 60049384b2f3Smrg esac 6005966bf024Smrg 60069384b2f3Smrg exp_sym_flag='-bexport' 60079384b2f3Smrg no_entry_flag='-bnoentry' 60089384b2f3Smrg fi 6009966bf024Smrg 60109384b2f3Smrg # When large executables or shared objects are built, AIX ld can 60119384b2f3Smrg # have problems creating the table of contents. If linking a library 60129384b2f3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60139384b2f3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60149384b2f3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60159384b2f3Smrg 60169384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='' 60179384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60189384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60199384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60209384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60219384b2f3Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60229384b2f3Smrg 60239384b2f3Smrg if test "$GXX" = yes; then 60249384b2f3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60259384b2f3Smrg # We only want to do this on AIX 4.2 and lower, the check 60269384b2f3Smrg # below for broken collect2 doesn't work under 4.3+ 60279384b2f3Smrg collect2name=`${CC} -print-prog-name=collect2` 60289384b2f3Smrg if test -f "$collect2name" && 60299384b2f3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60309384b2f3Smrg then 60319384b2f3Smrg # We have reworked collect2 60329384b2f3Smrg : 60339384b2f3Smrg else 60349384b2f3Smrg # We have old collect2 60359384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60369384b2f3Smrg # It fails to find uninstalled libraries when the uninstalled 60379384b2f3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 60389384b2f3Smrg # to unsupported forces relinking 60399384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60409384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60419384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60429384b2f3Smrg fi 60439384b2f3Smrg esac 60449384b2f3Smrg shared_flag='-shared' 60459384b2f3Smrg if test "$aix_use_runtimelinking" = yes; then 60469384b2f3Smrg shared_flag="$shared_flag "'${wl}-G' 60479384b2f3Smrg fi 60489384b2f3Smrg else 60499384b2f3Smrg # not using gcc 60509384b2f3Smrg if test "$host_cpu" = ia64; then 60519384b2f3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60529384b2f3Smrg # chokes on -Wl,-G. The following line is correct: 60539384b2f3Smrg shared_flag='-G' 60549384b2f3Smrg else 60559384b2f3Smrg if test "$aix_use_runtimelinking" = yes; then 60569384b2f3Smrg shared_flag='${wl}-G' 60579384b2f3Smrg else 60589384b2f3Smrg shared_flag='${wl}-bM:SRE' 60599384b2f3Smrg fi 60609384b2f3Smrg fi 60619384b2f3Smrg fi 6062966bf024Smrg 60639384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60649384b2f3Smrg # It seems that -bexpall does not export symbols beginning with 60659384b2f3Smrg # underscore (_), so it is better to generate a list of symbols to 60669384b2f3Smrg # export. 60679384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60689384b2f3Smrg if test "$aix_use_runtimelinking" = yes; then 60699384b2f3Smrg # Warning - without using the other runtime loading flags (-brtl), 60709384b2f3Smrg # -berok will link without error, but may produce a broken library. 60719384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60729384b2f3Smrg # Determine the default libpath from the value encoded in an empty 60739384b2f3Smrg # executable. 60749384b2f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60759384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60769384b2f3Smrg 60779384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 60789384b2f3Smrg else 60799384b2f3Smrg if test "$host_cpu" = ia64; then 60809384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60819384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60829384b2f3Smrg _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" 60839384b2f3Smrg else 60849384b2f3Smrg # Determine the default libpath from the value encoded in an 60859384b2f3Smrg # empty executable. 60869384b2f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60879384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60889384b2f3Smrg # Warning - without using the other run time loading flags, 60899384b2f3Smrg # -berok will link without error, but may produce a broken library. 60909384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60919384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 60929384b2f3Smrg if test "$with_gnu_ld" = yes; then 60939384b2f3Smrg # We only use this code for GNU lds that support --whole-archive. 60949384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 60959384b2f3Smrg else 60969384b2f3Smrg # Exported symbols can be pulled into shared objects from archives 60979384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 60989384b2f3Smrg fi 60999384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61009384b2f3Smrg # This is similar to how AIX traditionally builds its shared 61019384b2f3Smrg # libraries. 61029384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 61039384b2f3Smrg fi 61049384b2f3Smrg fi 61059384b2f3Smrg ;; 6106966bf024Smrg 61079384b2f3Smrg beos*) 61089384b2f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61099384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61109384b2f3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61119384b2f3Smrg # support --undefined. This deserves some investigation. FIXME 61129384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61139384b2f3Smrg else 61149384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61159384b2f3Smrg fi 61169384b2f3Smrg ;; 6117966bf024Smrg 61189384b2f3Smrg chorus*) 61199384b2f3Smrg case $cc_basename in 61209384b2f3Smrg *) 61219384b2f3Smrg # FIXME: insert proper C++ library support 61229384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61239384b2f3Smrg ;; 61249384b2f3Smrg esac 61259384b2f3Smrg ;; 6126966bf024Smrg 61279384b2f3Smrg cygwin* | mingw* | pw32* | cegcc*) 61289384b2f3Smrg case $GXX,$cc_basename in 61299384b2f3Smrg ,cl* | no,cl*) 61309384b2f3Smrg # Native MSVC 61319384b2f3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61329384b2f3Smrg # no search path for DLLs. 61339384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61349384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61359384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 61369384b2f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 61379384b2f3Smrg # Tell ltmain to make .lib files, not .a files. 61389384b2f3Smrg libext=lib 61399384b2f3Smrg # Tell ltmain to make .dll files, not .so files. 61409384b2f3Smrg shrext_cmds=".dll" 61419384b2f3Smrg # FIXME: Setting linknames here is a bad hack. 61429384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61439384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61449384b2f3Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61459384b2f3Smrg else 61469384b2f3Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61479384b2f3Smrg fi~ 61489384b2f3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61499384b2f3Smrg linknames=' 61509384b2f3Smrg # The linker will not automatically build a static lib if we build a DLL. 61519384b2f3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61529384b2f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61539384b2f3Smrg # Don't use ranlib 61549384b2f3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61559384b2f3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61569384b2f3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61579384b2f3Smrg case $lt_outputfile in 61589384b2f3Smrg *.exe|*.EXE) ;; 61599384b2f3Smrg *) 61609384b2f3Smrg lt_outputfile="$lt_outputfile.exe" 61619384b2f3Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61629384b2f3Smrg ;; 61639384b2f3Smrg esac~ 61649384b2f3Smrg func_to_tool_file "$lt_outputfile"~ 61659384b2f3Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61669384b2f3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61679384b2f3Smrg $RM "$lt_outputfile.manifest"; 61689384b2f3Smrg fi' 61699384b2f3Smrg ;; 61709384b2f3Smrg *) 61719384b2f3Smrg # g++ 61729384b2f3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 61739384b2f3Smrg # as there is no search path for DLLs. 61749384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61759384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 61769384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61779384b2f3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 61789384b2f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61799384b2f3Smrg 61809384b2f3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 61819384b2f3Smrg _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' 61829384b2f3Smrg # If the export-symbols file already is a .def file (1st line 61839384b2f3Smrg # is EXPORTS), use it as is; otherwise, prepend... 61849384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61859384b2f3Smrg cp $export_symbols $output_objdir/$soname.def; 61869384b2f3Smrg else 61879384b2f3Smrg echo EXPORTS > $output_objdir/$soname.def; 61889384b2f3Smrg cat $export_symbols >> $output_objdir/$soname.def; 61899384b2f3Smrg fi~ 61909384b2f3Smrg $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' 61919384b2f3Smrg else 61929384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61939384b2f3Smrg fi 61949384b2f3Smrg ;; 61959384b2f3Smrg esac 61969384b2f3Smrg ;; 61979384b2f3Smrg darwin* | rhapsody*) 61989384b2f3Smrg _LT_DARWIN_LINKER_FEATURES($1) 61999384b2f3Smrg ;; 6200966bf024Smrg 62019384b2f3Smrg dgux*) 62029384b2f3Smrg case $cc_basename in 62039384b2f3Smrg ec++*) 62049384b2f3Smrg # FIXME: insert proper C++ library support 62059384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62069384b2f3Smrg ;; 62079384b2f3Smrg ghcx*) 62089384b2f3Smrg # Green Hills C++ Compiler 62099384b2f3Smrg # FIXME: insert proper C++ library support 62109384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62119384b2f3Smrg ;; 62129384b2f3Smrg *) 62139384b2f3Smrg # FIXME: insert proper C++ library support 62149384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62159384b2f3Smrg ;; 62169384b2f3Smrg esac 62179384b2f3Smrg ;; 6218966bf024Smrg 62199384b2f3Smrg freebsd2.*) 62209384b2f3Smrg # C++ shared libraries reported to be fairly broken before 62219384b2f3Smrg # switch to ELF 62229384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62239384b2f3Smrg ;; 6224966bf024Smrg 62259384b2f3Smrg freebsd-elf*) 62269384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62279384b2f3Smrg ;; 6228966bf024Smrg 62299384b2f3Smrg freebsd* | dragonfly*) 62309384b2f3Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62319384b2f3Smrg # conventions 62329384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 62339384b2f3Smrg ;; 6234966bf024Smrg 62359384b2f3Smrg gnu*) 62369384b2f3Smrg ;; 6237966bf024Smrg 62389384b2f3Smrg haiku*) 62399384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62409384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62419384b2f3Smrg ;; 6242966bf024Smrg 62439384b2f3Smrg hpux9*) 62449384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62459384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62469384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62479384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62489384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62499384b2f3Smrg # but as the default 62509384b2f3Smrg # location of the library. 62519384b2f3Smrg 62529384b2f3Smrg case $cc_basename in 62539384b2f3Smrg CC*) 62549384b2f3Smrg # FIXME: insert proper C++ library support 62559384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62569384b2f3Smrg ;; 62579384b2f3Smrg aCC*) 62589384b2f3Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62599384b2f3Smrg # Commands to make compiler produce verbose output that lists 62609384b2f3Smrg # what "hidden" libraries, object files and flags are used when 62619384b2f3Smrg # linking a shared library. 62629384b2f3Smrg # 62639384b2f3Smrg # There doesn't appear to be a way to prevent this compiler from 62649384b2f3Smrg # explicitly linking system object files so we need to strip them 62659384b2f3Smrg # from the output so that they don't get included in the library 62669384b2f3Smrg # dependencies. 62679384b2f3Smrg 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"' 62689384b2f3Smrg ;; 62699384b2f3Smrg *) 62709384b2f3Smrg if test "$GXX" = yes; then 62719384b2f3Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62729384b2f3Smrg else 62739384b2f3Smrg # FIXME: insert proper C++ library support 62749384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62759384b2f3Smrg fi 62769384b2f3Smrg ;; 62779384b2f3Smrg esac 62789384b2f3Smrg ;; 6279966bf024Smrg 62809384b2f3Smrg hpux10*|hpux11*) 62819384b2f3Smrg if test $with_gnu_ld = no; then 62829384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62839384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62849384b2f3Smrg 62859384b2f3Smrg case $host_cpu in 62869384b2f3Smrg hppa*64*|ia64*) 62879384b2f3Smrg ;; 62889384b2f3Smrg *) 62899384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62909384b2f3Smrg ;; 62919384b2f3Smrg esac 62929384b2f3Smrg fi 62939384b2f3Smrg case $host_cpu in 62949384b2f3Smrg hppa*64*|ia64*) 62959384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 62969384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62979384b2f3Smrg ;; 62989384b2f3Smrg *) 62999384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63009384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63019384b2f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63029384b2f3Smrg # but as the default 63039384b2f3Smrg # location of the library. 63049384b2f3Smrg ;; 63059384b2f3Smrg esac 6306966bf024Smrg 63079384b2f3Smrg case $cc_basename in 63089384b2f3Smrg CC*) 63099384b2f3Smrg # FIXME: insert proper C++ library support 63109384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63119384b2f3Smrg ;; 63129384b2f3Smrg aCC*) 63139384b2f3Smrg case $host_cpu in 63149384b2f3Smrg hppa*64*) 63159384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63169384b2f3Smrg ;; 63179384b2f3Smrg ia64*) 63189384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63199384b2f3Smrg ;; 63209384b2f3Smrg *) 63219384b2f3Smrg _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' 63229384b2f3Smrg ;; 63239384b2f3Smrg esac 63249384b2f3Smrg # Commands to make compiler produce verbose output that lists 63259384b2f3Smrg # what "hidden" libraries, object files and flags are used when 63269384b2f3Smrg # linking a shared library. 63279384b2f3Smrg # 63289384b2f3Smrg # There doesn't appear to be a way to prevent this compiler from 63299384b2f3Smrg # explicitly linking system object files so we need to strip them 63309384b2f3Smrg # from the output so that they don't get included in the library 63319384b2f3Smrg # dependencies. 63329384b2f3Smrg 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"' 63339384b2f3Smrg ;; 63349384b2f3Smrg *) 63359384b2f3Smrg if test "$GXX" = yes; then 63369384b2f3Smrg if test $with_gnu_ld = no; then 63379384b2f3Smrg case $host_cpu in 63389384b2f3Smrg hppa*64*) 63399384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63409384b2f3Smrg ;; 63419384b2f3Smrg ia64*) 63429384b2f3Smrg _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' 63439384b2f3Smrg ;; 63449384b2f3Smrg *) 63459384b2f3Smrg _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' 63469384b2f3Smrg ;; 63479384b2f3Smrg esac 63489384b2f3Smrg fi 63499384b2f3Smrg else 63509384b2f3Smrg # FIXME: insert proper C++ library support 63519384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63529384b2f3Smrg fi 63539384b2f3Smrg ;; 63549384b2f3Smrg esac 63559384b2f3Smrg ;; 6356966bf024Smrg 63579384b2f3Smrg interix[[3-9]]*) 63589384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63599384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63609384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63619384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63629384b2f3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63639384b2f3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63649384b2f3Smrg # default) and relocated if they conflict, which is a slow very memory 63659384b2f3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 63669384b2f3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63679384b2f3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63689384b2f3Smrg _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' 63699384b2f3Smrg _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' 63709384b2f3Smrg ;; 63719384b2f3Smrg irix5* | irix6*) 63729384b2f3Smrg case $cc_basename in 63739384b2f3Smrg CC*) 63749384b2f3Smrg # SGI C++ 63759384b2f3Smrg _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' 63769384b2f3Smrg 63779384b2f3Smrg # Archives containing C++ object files must be created using 63789384b2f3Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63799384b2f3Smrg # necessary to make sure instantiated templates are included 63809384b2f3Smrg # in the archive. 63819384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63829384b2f3Smrg ;; 63839384b2f3Smrg *) 63849384b2f3Smrg if test "$GXX" = yes; then 63859384b2f3Smrg if test "$with_gnu_ld" = no; then 63869384b2f3Smrg _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' 63879384b2f3Smrg else 63889384b2f3Smrg _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' 63899384b2f3Smrg fi 63909384b2f3Smrg fi 63919384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63929384b2f3Smrg ;; 63939384b2f3Smrg esac 63949384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63959384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63969384b2f3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 63979384b2f3Smrg ;; 6398966bf024Smrg 63999384b2f3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 64009384b2f3Smrg case $cc_basename in 64019384b2f3Smrg KCC*) 64029384b2f3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6403966bf024Smrg 64049384b2f3Smrg # KCC will only create a shared library if the output file 64059384b2f3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64069384b2f3Smrg # to its proper name (with version) after linking. 64079384b2f3Smrg _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' 64089384b2f3Smrg _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' 64099384b2f3Smrg # Commands to make compiler produce verbose output that lists 64109384b2f3Smrg # what "hidden" libraries, object files and flags are used when 64119384b2f3Smrg # linking a shared library. 64129384b2f3Smrg # 64139384b2f3Smrg # There doesn't appear to be a way to prevent this compiler from 64149384b2f3Smrg # explicitly linking system object files so we need to strip them 64159384b2f3Smrg # from the output so that they don't get included in the library 64169384b2f3Smrg # dependencies. 64179384b2f3Smrg 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"' 64189384b2f3Smrg 64199384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64209384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64219384b2f3Smrg 64229384b2f3Smrg # Archives containing C++ object files must be created using 64239384b2f3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64249384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64259384b2f3Smrg ;; 64269384b2f3Smrg icpc* | ecpc* ) 64279384b2f3Smrg # Intel C++ 64289384b2f3Smrg with_gnu_ld=yes 64299384b2f3Smrg # version 8.0 and above of icpc choke on multiply defined symbols 64309384b2f3Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64319384b2f3Smrg # earlier do not add the objects themselves. 64329384b2f3Smrg case `$CC -V 2>&1` in 64339384b2f3Smrg *"Version 7."*) 64349384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64359384b2f3Smrg _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' 64369384b2f3Smrg ;; 64379384b2f3Smrg *) # Version 8.0 or newer 64389384b2f3Smrg tmp_idyn= 64399384b2f3Smrg case $host_cpu in 64409384b2f3Smrg ia64*) tmp_idyn=' -i_dynamic';; 64419384b2f3Smrg esac 64429384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64439384b2f3Smrg _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' 64449384b2f3Smrg ;; 64459384b2f3Smrg esac 64469384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64479384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64489384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64499384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64509384b2f3Smrg ;; 64519384b2f3Smrg pgCC* | pgcpp*) 64529384b2f3Smrg # Portland Group C++ compiler 64539384b2f3Smrg case `$CC -V` in 64549384b2f3Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64559384b2f3Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64569384b2f3Smrg rm -rf $tpldir~ 64579384b2f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 64589384b2f3Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64599384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64609384b2f3Smrg rm -rf $tpldir~ 64619384b2f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 64629384b2f3Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64639384b2f3Smrg $RANLIB $oldlib' 64649384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64659384b2f3Smrg rm -rf $tpldir~ 64669384b2f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64679384b2f3Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64689384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64699384b2f3Smrg rm -rf $tpldir~ 64709384b2f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64719384b2f3Smrg $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' 64729384b2f3Smrg ;; 64739384b2f3Smrg *) # Version 6 and above use weak symbols 64749384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64759384b2f3Smrg _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' 64769384b2f3Smrg ;; 64779384b2f3Smrg esac 6478966bf024Smrg 64799384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64809384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64819384b2f3Smrg _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' 64829384b2f3Smrg ;; 64839384b2f3Smrg cxx*) 64849384b2f3Smrg # Compaq C++ 64859384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64869384b2f3Smrg _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' 6487966bf024Smrg 64889384b2f3Smrg runpath_var=LD_RUN_PATH 64899384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64909384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6491966bf024Smrg 64929384b2f3Smrg # Commands to make compiler produce verbose output that lists 64939384b2f3Smrg # what "hidden" libraries, object files and flags are used when 64949384b2f3Smrg # linking a shared library. 64959384b2f3Smrg # 64969384b2f3Smrg # There doesn't appear to be a way to prevent this compiler from 64979384b2f3Smrg # explicitly linking system object files so we need to strip them 64989384b2f3Smrg # from the output so that they don't get included in the library 64999384b2f3Smrg # dependencies. 65009384b2f3Smrg 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' 65019384b2f3Smrg ;; 65029384b2f3Smrg xl* | mpixl* | bgxl*) 65039384b2f3Smrg # IBM XL 8.0 on PPC, with GNU ld 65049384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65059384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65069384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65079384b2f3Smrg if test "x$supports_anon_versioning" = xyes; then 65089384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65099384b2f3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65109384b2f3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65119384b2f3Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65129384b2f3Smrg fi 65139384b2f3Smrg ;; 65149384b2f3Smrg *) 65159384b2f3Smrg case `$CC -V 2>&1 | sed 5q` in 65169384b2f3Smrg *Sun\ C*) 65179384b2f3Smrg # Sun C++ 5.9 65189384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65199384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65209384b2f3Smrg _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' 65219384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65229384b2f3Smrg _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' 65239384b2f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65249384b2f3Smrg 65259384b2f3Smrg # Not sure whether something based on 65269384b2f3Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65279384b2f3Smrg # would be better. 65289384b2f3Smrg output_verbose_link_cmd='func_echo_all' 65299384b2f3Smrg 65309384b2f3Smrg # Archives containing C++ object files must be created using 65319384b2f3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65329384b2f3Smrg # necessary to make sure instantiated templates are included 65339384b2f3Smrg # in the archive. 65349384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65359384b2f3Smrg ;; 65369384b2f3Smrg esac 65379384b2f3Smrg ;; 65389384b2f3Smrg esac 65399384b2f3Smrg ;; 6540966bf024Smrg 65419384b2f3Smrg lynxos*) 65429384b2f3Smrg # FIXME: insert proper C++ library support 65439384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65449384b2f3Smrg ;; 6545966bf024Smrg 65469384b2f3Smrg m88k*) 65479384b2f3Smrg # FIXME: insert proper C++ library support 65489384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65499384b2f3Smrg ;; 6550966bf024Smrg 65519384b2f3Smrg mvs*) 65529384b2f3Smrg case $cc_basename in 65539384b2f3Smrg cxx*) 65549384b2f3Smrg # FIXME: insert proper C++ library support 65559384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65569384b2f3Smrg ;; 65579384b2f3Smrg *) 65589384b2f3Smrg # FIXME: insert proper C++ library support 65599384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65609384b2f3Smrg ;; 65619384b2f3Smrg esac 65629384b2f3Smrg ;; 6563966bf024Smrg 65649384b2f3Smrg netbsd*) 65659384b2f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65669384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65679384b2f3Smrg wlarc= 65689384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65699384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65709384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65719384b2f3Smrg fi 65729384b2f3Smrg # Workaround some broken pre-1.5 toolchains 65739384b2f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65749384b2f3Smrg ;; 6575966bf024Smrg 65769384b2f3Smrg *nto* | *qnx*) 65779384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 65789384b2f3Smrg ;; 6579966bf024Smrg 65809384b2f3Smrg openbsd2*) 65819384b2f3Smrg # C++ shared libraries are fairly broken 65829384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65839384b2f3Smrg ;; 6584966bf024Smrg 65859384b2f3Smrg openbsd*) 65869384b2f3Smrg if test -f /usr/libexec/ld.so; then 65879384b2f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65889384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65899384b2f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65909384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 65919384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65929384b2f3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65939384b2f3Smrg _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' 65949384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65959384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 65969384b2f3Smrg fi 65979384b2f3Smrg output_verbose_link_cmd=func_echo_all 65989384b2f3Smrg else 65999384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66009384b2f3Smrg fi 66019384b2f3Smrg ;; 6602966bf024Smrg 66039384b2f3Smrg osf3* | osf4* | osf5*) 66049384b2f3Smrg case $cc_basename in 66059384b2f3Smrg KCC*) 66069384b2f3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66079384b2f3Smrg 66089384b2f3Smrg # KCC will only create a shared library if the output file 66099384b2f3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66109384b2f3Smrg # to its proper name (with version) after linking. 66119384b2f3Smrg _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' 66129384b2f3Smrg 66139384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66149384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66159384b2f3Smrg 66169384b2f3Smrg # Archives containing C++ object files must be created using 66179384b2f3Smrg # the KAI C++ compiler. 66189384b2f3Smrg case $host in 66199384b2f3Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66209384b2f3Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66219384b2f3Smrg esac 66229384b2f3Smrg ;; 66239384b2f3Smrg RCC*) 66249384b2f3Smrg # Rational C++ 2.4.1 66259384b2f3Smrg # FIXME: insert proper C++ library support 66269384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66279384b2f3Smrg ;; 66289384b2f3Smrg cxx*) 66299384b2f3Smrg case $host in 66309384b2f3Smrg osf3*) 66319384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66329384b2f3Smrg _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' 66339384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66349384b2f3Smrg ;; 66359384b2f3Smrg *) 66369384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 66379384b2f3Smrg _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' 66389384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66399384b2f3Smrg echo "-hidden">> $lib.exp~ 66409384b2f3Smrg $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~ 66419384b2f3Smrg $RM $lib.exp' 66429384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66439384b2f3Smrg ;; 66449384b2f3Smrg esac 6645966bf024Smrg 66469384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6647966bf024Smrg 66489384b2f3Smrg # Commands to make compiler produce verbose output that lists 66499384b2f3Smrg # what "hidden" libraries, object files and flags are used when 66509384b2f3Smrg # linking a shared library. 66519384b2f3Smrg # 66529384b2f3Smrg # There doesn't appear to be a way to prevent this compiler from 66539384b2f3Smrg # explicitly linking system object files so we need to strip them 66549384b2f3Smrg # from the output so that they don't get included in the library 66559384b2f3Smrg # dependencies. 66569384b2f3Smrg 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"' 66579384b2f3Smrg ;; 66589384b2f3Smrg *) 66599384b2f3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66609384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66619384b2f3Smrg case $host in 66629384b2f3Smrg osf3*) 66639384b2f3Smrg _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' 66649384b2f3Smrg ;; 66659384b2f3Smrg *) 66669384b2f3Smrg _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' 66679384b2f3Smrg ;; 66689384b2f3Smrg esac 66699384b2f3Smrg 66709384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66719384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66729384b2f3Smrg 66739384b2f3Smrg # Commands to make compiler produce verbose output that lists 66749384b2f3Smrg # what "hidden" libraries, object files and flags are used when 66759384b2f3Smrg # linking a shared library. 66769384b2f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66779384b2f3Smrg 66789384b2f3Smrg else 66799384b2f3Smrg # FIXME: insert proper C++ library support 66809384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66819384b2f3Smrg fi 66829384b2f3Smrg ;; 66839384b2f3Smrg esac 66849384b2f3Smrg ;; 6685966bf024Smrg 66869384b2f3Smrg psos*) 66879384b2f3Smrg # FIXME: insert proper C++ library support 66889384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66899384b2f3Smrg ;; 6690966bf024Smrg 66919384b2f3Smrg sunos4*) 66929384b2f3Smrg case $cc_basename in 66939384b2f3Smrg CC*) 66949384b2f3Smrg # Sun C++ 4.x 66959384b2f3Smrg # FIXME: insert proper C++ library support 66969384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66979384b2f3Smrg ;; 66989384b2f3Smrg lcc*) 66999384b2f3Smrg # Lucid 67009384b2f3Smrg # FIXME: insert proper C++ library support 67019384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67029384b2f3Smrg ;; 67039384b2f3Smrg *) 67049384b2f3Smrg # FIXME: insert proper C++ library support 67059384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67069384b2f3Smrg ;; 67079384b2f3Smrg esac 67089384b2f3Smrg ;; 6709966bf024Smrg 67109384b2f3Smrg solaris*) 67119384b2f3Smrg case $cc_basename in 67129384b2f3Smrg CC* | sunCC*) 67139384b2f3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 67149384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67159384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67169384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67179384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67189384b2f3Smrg $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' 67199384b2f3Smrg 67209384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67219384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67229384b2f3Smrg case $host_os in 67239384b2f3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67249384b2f3Smrg *) 67259384b2f3Smrg # The compiler driver will combine and reorder linker options, 67269384b2f3Smrg # but understands `-z linker_flag'. 67279384b2f3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67289384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67299384b2f3Smrg ;; 67309384b2f3Smrg esac 67319384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6732966bf024Smrg 67339384b2f3Smrg output_verbose_link_cmd='func_echo_all' 6734966bf024Smrg 67359384b2f3Smrg # Archives containing C++ object files must be created using 67369384b2f3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67379384b2f3Smrg # necessary to make sure instantiated templates are included 67389384b2f3Smrg # in the archive. 67399384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67409384b2f3Smrg ;; 67419384b2f3Smrg gcx*) 67429384b2f3Smrg # Green Hills C++ Compiler 67439384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6744966bf024Smrg 67459384b2f3Smrg # The C++ compiler must be used to create the archive. 67469384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67479384b2f3Smrg ;; 67489384b2f3Smrg *) 67499384b2f3Smrg # GNU C++ compiler with Solaris linker 67509384b2f3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67519384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67529384b2f3Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 67539384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67549384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67559384b2f3Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67569384b2f3Smrg 67579384b2f3Smrg # Commands to make compiler produce verbose output that lists 67589384b2f3Smrg # what "hidden" libraries, object files and flags are used when 67599384b2f3Smrg # linking a shared library. 67609384b2f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67619384b2f3Smrg else 67629384b2f3Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67639384b2f3Smrg # platform. 67649384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67659384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67669384b2f3Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67679384b2f3Smrg 67689384b2f3Smrg # Commands to make compiler produce verbose output that lists 67699384b2f3Smrg # what "hidden" libraries, object files and flags are used when 67709384b2f3Smrg # linking a shared library. 67719384b2f3Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67729384b2f3Smrg fi 67739384b2f3Smrg 67749384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67759384b2f3Smrg case $host_os in 67769384b2f3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67779384b2f3Smrg *) 67789384b2f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67799384b2f3Smrg ;; 67809384b2f3Smrg esac 67819384b2f3Smrg fi 67829384b2f3Smrg ;; 67839384b2f3Smrg esac 67849384b2f3Smrg ;; 6785966bf024Smrg 67869384b2f3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67879384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67889384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67899384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67909384b2f3Smrg runpath_var='LD_RUN_PATH' 6791966bf024Smrg 67929384b2f3Smrg case $cc_basename in 67939384b2f3Smrg CC*) 67949384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67959384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67969384b2f3Smrg ;; 67979384b2f3Smrg *) 67989384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67999384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68009384b2f3Smrg ;; 68019384b2f3Smrg esac 68029384b2f3Smrg ;; 6803966bf024Smrg 68049384b2f3Smrg sysv5* | sco3.2v5* | sco5v6*) 68059384b2f3Smrg # Note: We can NOT use -z defs as we might desire, because we do not 68069384b2f3Smrg # link with -lc, and that would cause any symbols used from libc to 68079384b2f3Smrg # always be unresolved, which means just about no library would 68089384b2f3Smrg # ever link correctly. If we're not using GNU ld we use -z text 68099384b2f3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 68109384b2f3Smrg # as -z defs. 68119384b2f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68129384b2f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68139384b2f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68149384b2f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68159384b2f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68169384b2f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68179384b2f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68189384b2f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68199384b2f3Smrg runpath_var='LD_RUN_PATH' 6820966bf024Smrg 68219384b2f3Smrg case $cc_basename in 68229384b2f3Smrg CC*) 68239384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68249384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68259384b2f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 68269384b2f3Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 68279384b2f3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 68289384b2f3Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68299384b2f3Smrg ;; 68309384b2f3Smrg *) 68319384b2f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68329384b2f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68339384b2f3Smrg ;; 68349384b2f3Smrg esac 68359384b2f3Smrg ;; 6836966bf024Smrg 68379384b2f3Smrg tandem*) 68389384b2f3Smrg case $cc_basename in 68399384b2f3Smrg NCC*) 68409384b2f3Smrg # NonStop-UX NCC 3.20 68419384b2f3Smrg # FIXME: insert proper C++ library support 68429384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68439384b2f3Smrg ;; 68449384b2f3Smrg *) 68459384b2f3Smrg # FIXME: insert proper C++ library support 68469384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68479384b2f3Smrg ;; 68489384b2f3Smrg esac 68499384b2f3Smrg ;; 6850966bf024Smrg 68519384b2f3Smrg vxworks*) 68529384b2f3Smrg # FIXME: insert proper C++ library support 68539384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68549384b2f3Smrg ;; 6855966bf024Smrg 68569384b2f3Smrg *) 68579384b2f3Smrg # FIXME: insert proper C++ library support 68589384b2f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68599384b2f3Smrg ;; 68609384b2f3Smrg esac 6861966bf024Smrg 68629384b2f3Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68639384b2f3Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68649384b2f3Smrg 68659384b2f3Smrg _LT_TAGVAR(GCC, $1)="$GXX" 68669384b2f3Smrg _LT_TAGVAR(LD, $1)="$LD" 68679384b2f3Smrg 68689384b2f3Smrg ## CAVEAT EMPTOR: 68699384b2f3Smrg ## There is no encapsulation within the following macros, do not change 68709384b2f3Smrg ## the running order or otherwise move them around unless you know exactly 68719384b2f3Smrg ## what you are doing... 68729384b2f3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68739384b2f3Smrg _LT_COMPILER_PIC($1) 68749384b2f3Smrg _LT_COMPILER_C_O($1) 68759384b2f3Smrg _LT_COMPILER_FILE_LOCKS($1) 68769384b2f3Smrg _LT_LINKER_SHLIBS($1) 68779384b2f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 68789384b2f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68799384b2f3Smrg 68809384b2f3Smrg _LT_CONFIG($1) 68819384b2f3Smrg fi # test -n "$compiler" 68829384b2f3Smrg 68839384b2f3Smrg CC=$lt_save_CC 68849384b2f3Smrg CFLAGS=$lt_save_CFLAGS 68859384b2f3Smrg LDCXX=$LD 68869384b2f3Smrg LD=$lt_save_LD 68879384b2f3Smrg GCC=$lt_save_GCC 68889384b2f3Smrg with_gnu_ld=$lt_save_with_gnu_ld 68899384b2f3Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 68909384b2f3Smrg lt_cv_path_LD=$lt_save_path_LD 68919384b2f3Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 68929384b2f3Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 68939384b2f3Smrgfi # test "$_lt_caught_CXX_error" != yes 6894966bf024Smrg 68959384b2f3SmrgAC_LANG_POP 68969384b2f3Smrg])# _LT_LANG_CXX_CONFIG 6897966bf024Smrg 6898966bf024Smrg 68999384b2f3Smrg# _LT_FUNC_STRIPNAME_CNF 69009384b2f3Smrg# ---------------------- 69019384b2f3Smrg# func_stripname_cnf prefix suffix name 69029384b2f3Smrg# strip PREFIX and SUFFIX off of NAME. 69039384b2f3Smrg# PREFIX and SUFFIX must not contain globbing or regex special 69049384b2f3Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 69059384b2f3Smrg# dot (in which case that matches only a dot). 69069384b2f3Smrg# 69079384b2f3Smrg# This function is identical to the (non-XSI) version of func_stripname, 69089384b2f3Smrg# except this one can be used by m4 code that may be executed by configure, 69099384b2f3Smrg# rather than the libtool script. 69109384b2f3Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 69119384b2f3SmrgAC_REQUIRE([_LT_DECL_SED]) 69129384b2f3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 69139384b2f3Smrgfunc_stripname_cnf () 69149384b2f3Smrg{ 69159384b2f3Smrg case ${2} in 69169384b2f3Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 69179384b2f3Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 69189384b2f3Smrg esac 69199384b2f3Smrg} # func_stripname_cnf 69209384b2f3Smrg])# _LT_FUNC_STRIPNAME_CNF 6921966bf024Smrg 69229384b2f3Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69239384b2f3Smrg# --------------------------------- 69249384b2f3Smrg# Figure out "hidden" library dependencies from verbose 69259384b2f3Smrg# compiler output when linking a shared library. 69269384b2f3Smrg# Parse the compiler output and extract the necessary 69279384b2f3Smrg# objects, libraries and library flags. 69289384b2f3Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69299384b2f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69309384b2f3SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69319384b2f3Smrg# Dependencies to place before and after the object being linked: 69329384b2f3Smrg_LT_TAGVAR(predep_objects, $1)= 69339384b2f3Smrg_LT_TAGVAR(postdep_objects, $1)= 69349384b2f3Smrg_LT_TAGVAR(predeps, $1)= 69359384b2f3Smrg_LT_TAGVAR(postdeps, $1)= 69369384b2f3Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6937966bf024Smrg 69389384b2f3Smrgdnl we can't use the lt_simple_compile_test_code here, 69399384b2f3Smrgdnl because it contains code intended for an executable, 69409384b2f3Smrgdnl not a library. It's possible we should let each 69419384b2f3Smrgdnl tag define a new lt_????_link_test_code variable, 69429384b2f3Smrgdnl but it's only used here... 69439384b2f3Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69449384b2f3Smrgint a; 69459384b2f3Smrgvoid foo (void) { a = 0; } 69469384b2f3Smrg_LT_EOF 69479384b2f3Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69489384b2f3Smrgclass Foo 69499384b2f3Smrg{ 69509384b2f3Smrgpublic: 69519384b2f3Smrg Foo (void) { a = 0; } 69529384b2f3Smrgprivate: 69539384b2f3Smrg int a; 69549384b2f3Smrg}; 69559384b2f3Smrg_LT_EOF 69569384b2f3Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69579384b2f3Smrg subroutine foo 69589384b2f3Smrg implicit none 69599384b2f3Smrg integer*4 a 69609384b2f3Smrg a=0 69619384b2f3Smrg return 69629384b2f3Smrg end 69639384b2f3Smrg_LT_EOF 69649384b2f3Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69659384b2f3Smrg subroutine foo 69669384b2f3Smrg implicit none 69679384b2f3Smrg integer a 69689384b2f3Smrg a=0 69699384b2f3Smrg return 69709384b2f3Smrg end 69719384b2f3Smrg_LT_EOF 69729384b2f3Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69739384b2f3Smrgpublic class foo { 69749384b2f3Smrg private int a; 69759384b2f3Smrg public void bar (void) { 69769384b2f3Smrg a = 0; 69779384b2f3Smrg } 69789384b2f3Smrg}; 69799384b2f3Smrg_LT_EOF 69809384b2f3Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 69819384b2f3Smrgpackage foo 69829384b2f3Smrgfunc foo() { 6983966bf024Smrg} 69849384b2f3Smrg_LT_EOF 69859384b2f3Smrg]) 6986966bf024Smrg 69879384b2f3Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 69889384b2f3Smrgcase "$CC $CFLAGS " in #( 69899384b2f3Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 69909384b2f3Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 69919384b2f3Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 69929384b2f3Smrgesac 6993966bf024Smrg 69949384b2f3Smrgdnl Parse the compiler output and extract the necessary 69959384b2f3Smrgdnl objects, libraries and library flags. 69969384b2f3Smrgif AC_TRY_EVAL(ac_compile); then 69979384b2f3Smrg # Parse the compiler output and extract the necessary 69989384b2f3Smrg # objects, libraries and library flags. 6999966bf024Smrg 70009384b2f3Smrg # Sentinel used to keep track of whether or not we are before 70019384b2f3Smrg # the conftest object file. 70029384b2f3Smrg pre_test_object_deps_done=no 7003966bf024Smrg 70049384b2f3Smrg for p in `eval "$output_verbose_link_cmd"`; do 70059384b2f3Smrg case ${prev}${p} in 7006966bf024Smrg 70079384b2f3Smrg -L* | -R* | -l*) 70089384b2f3Smrg # Some compilers place space between "-{L,R}" and the path. 70099384b2f3Smrg # Remove the space. 70109384b2f3Smrg if test $p = "-L" || 70119384b2f3Smrg test $p = "-R"; then 70129384b2f3Smrg prev=$p 70139384b2f3Smrg continue 70149384b2f3Smrg fi 7015966bf024Smrg 70169384b2f3Smrg # Expand the sysroot to ease extracting the directories later. 70179384b2f3Smrg if test -z "$prev"; then 70189384b2f3Smrg case $p in 70199384b2f3Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 70209384b2f3Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 70219384b2f3Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 70229384b2f3Smrg esac 70239384b2f3Smrg fi 70249384b2f3Smrg case $p in 70259384b2f3Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 70269384b2f3Smrg esac 70279384b2f3Smrg if test "$pre_test_object_deps_done" = no; then 70289384b2f3Smrg case ${prev} in 70299384b2f3Smrg -L | -R) 70309384b2f3Smrg # Internal compiler library paths should come after those 70319384b2f3Smrg # provided the user. The postdeps already come after the 70329384b2f3Smrg # user supplied libs so there is no need to process them. 70339384b2f3Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70349384b2f3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70359384b2f3Smrg else 70369384b2f3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70379384b2f3Smrg fi 70389384b2f3Smrg ;; 70399384b2f3Smrg # The "-l" case would never come before the object being 70409384b2f3Smrg # linked, so don't bother handling this case. 70419384b2f3Smrg esac 70429384b2f3Smrg else 70439384b2f3Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70449384b2f3Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70459384b2f3Smrg else 70469384b2f3Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70479384b2f3Smrg fi 70489384b2f3Smrg fi 70499384b2f3Smrg prev= 70509384b2f3Smrg ;; 7051966bf024Smrg 70529384b2f3Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70539384b2f3Smrg *.$objext) 70549384b2f3Smrg # This assumes that the test object file only shows up 70559384b2f3Smrg # once in the compiler output. 70569384b2f3Smrg if test "$p" = "conftest.$objext"; then 70579384b2f3Smrg pre_test_object_deps_done=yes 70589384b2f3Smrg continue 70599384b2f3Smrg fi 70609384b2f3Smrg 70619384b2f3Smrg if test "$pre_test_object_deps_done" = no; then 70629384b2f3Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70639384b2f3Smrg _LT_TAGVAR(predep_objects, $1)="$p" 70649384b2f3Smrg else 70659384b2f3Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70669384b2f3Smrg fi 70679384b2f3Smrg else 70689384b2f3Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70699384b2f3Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 70709384b2f3Smrg else 70719384b2f3Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70729384b2f3Smrg fi 70739384b2f3Smrg fi 70749384b2f3Smrg ;; 70759384b2f3Smrg 70769384b2f3Smrg *) ;; # Ignore the rest. 70779384b2f3Smrg 70789384b2f3Smrg esac 70799384b2f3Smrg done 70809384b2f3Smrg 70819384b2f3Smrg # Clean up. 70829384b2f3Smrg rm -f a.out a.exe 7083966bf024Smrgelse 70849384b2f3Smrg echo "libtool.m4: error: problem compiling $1 test program" 7085966bf024Smrgfi 7086966bf024Smrg 70879384b2f3Smrg$RM -f confest.$objext 70889384b2f3SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 70899384b2f3Smrg 70909384b2f3Smrg# PORTME: override above test on systems where it is broken 70919384b2f3Smrgm4_if([$1], [CXX], 70929384b2f3Smrg[case $host_os in 70939384b2f3Smrginterix[[3-9]]*) 70949384b2f3Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 70959384b2f3Smrg # hack all around it, let's just trust "g++" to DTRT. 70969384b2f3Smrg _LT_TAGVAR(predep_objects,$1)= 70979384b2f3Smrg _LT_TAGVAR(postdep_objects,$1)= 70989384b2f3Smrg _LT_TAGVAR(postdeps,$1)= 70999384b2f3Smrg ;; 7100966bf024Smrg 71019384b2f3Smrglinux*) 71029384b2f3Smrg case `$CC -V 2>&1 | sed 5q` in 71039384b2f3Smrg *Sun\ C*) 71049384b2f3Smrg # Sun C++ 5.9 71059384b2f3Smrg 71069384b2f3Smrg # The more standards-conforming stlport4 library is 71079384b2f3Smrg # incompatible with the Cstd library. Avoid specifying 71089384b2f3Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71099384b2f3Smrg # -library=stlport4 depends on it. 71109384b2f3Smrg case " $CXX $CXXFLAGS " in 71119384b2f3Smrg *" -library=stlport4 "*) 71129384b2f3Smrg solaris_use_stlport4=yes 71139384b2f3Smrg ;; 71149384b2f3Smrg esac 7115966bf024Smrg 71169384b2f3Smrg if test "$solaris_use_stlport4" != yes; then 71179384b2f3Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71189384b2f3Smrg fi 71199384b2f3Smrg ;; 71209384b2f3Smrg esac 71219384b2f3Smrg ;; 7122966bf024Smrg 71239384b2f3Smrgsolaris*) 71249384b2f3Smrg case $cc_basename in 71259384b2f3Smrg CC* | sunCC*) 71269384b2f3Smrg # The more standards-conforming stlport4 library is 71279384b2f3Smrg # incompatible with the Cstd library. Avoid specifying 71289384b2f3Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71299384b2f3Smrg # -library=stlport4 depends on it. 71309384b2f3Smrg case " $CXX $CXXFLAGS " in 71319384b2f3Smrg *" -library=stlport4 "*) 71329384b2f3Smrg solaris_use_stlport4=yes 7133966bf024Smrg ;; 7134966bf024Smrg esac 71359384b2f3Smrg 71369384b2f3Smrg # Adding this requires a known-good setup of shared libraries for 71379384b2f3Smrg # Sun compiler versions before 5.6, else PIC objects from an old 71389384b2f3Smrg # archive will be linked into the output, leading to subtle bugs. 71399384b2f3Smrg if test "$solaris_use_stlport4" != yes; then 71409384b2f3Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71419384b2f3Smrg fi 71429384b2f3Smrg ;; 71439384b2f3Smrg esac 71449384b2f3Smrg ;; 71459384b2f3Smrgesac 71469384b2f3Smrg]) 71479384b2f3Smrg 71489384b2f3Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 71499384b2f3Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71509384b2f3Smrgesac 71519384b2f3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71529384b2f3Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71539384b2f3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71549384b2f3Smrgfi 71559384b2f3Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71569384b2f3Smrg [The directories searched by this compiler when creating a shared library]) 71579384b2f3Smrg_LT_TAGDECL([], [predep_objects], [1], 71589384b2f3Smrg [Dependencies to place before and after the objects being linked to 71599384b2f3Smrg create a shared library]) 71609384b2f3Smrg_LT_TAGDECL([], [postdep_objects], [1]) 71619384b2f3Smrg_LT_TAGDECL([], [predeps], [1]) 71629384b2f3Smrg_LT_TAGDECL([], [postdeps], [1]) 71639384b2f3Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71649384b2f3Smrg [The library search path used internally by the compiler when linking 71659384b2f3Smrg a shared library]) 71669384b2f3Smrg])# _LT_SYS_HIDDEN_LIBDEPS 71679384b2f3Smrg 71689384b2f3Smrg 71699384b2f3Smrg# _LT_LANG_F77_CONFIG([TAG]) 71709384b2f3Smrg# -------------------------- 71719384b2f3Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 71729384b2f3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71739384b2f3Smrg# to write the compiler configuration to `libtool'. 71749384b2f3Smrgm4_defun([_LT_LANG_F77_CONFIG], 71759384b2f3Smrg[AC_LANG_PUSH(Fortran 77) 71769384b2f3Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 71779384b2f3Smrg _lt_disable_F77=yes 71789384b2f3Smrgfi 71799384b2f3Smrg 71809384b2f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71819384b2f3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 71829384b2f3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 71839384b2f3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71849384b2f3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 71859384b2f3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 71869384b2f3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 71879384b2f3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71889384b2f3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 71899384b2f3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 71909384b2f3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 71919384b2f3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 71929384b2f3Smrg_LT_TAGVAR(module_cmds, $1)= 71939384b2f3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 71949384b2f3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 71959384b2f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 71969384b2f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 71979384b2f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 71989384b2f3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 71999384b2f3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72009384b2f3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 72019384b2f3Smrg 72029384b2f3Smrg# Source file extension for f77 test sources. 72039384b2f3Smrgac_ext=f 72049384b2f3Smrg 72059384b2f3Smrg# Object file extension for compiled f77 test sources. 72069384b2f3Smrgobjext=o 72079384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 72089384b2f3Smrg 72099384b2f3Smrg# No sense in running all these tests if we already determined that 72109384b2f3Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 72119384b2f3Smrg# are currently assumed to apply to all compilers on this platform, 72129384b2f3Smrg# and will be corrupted by setting them based on a non-working compiler. 72139384b2f3Smrgif test "$_lt_disable_F77" != yes; then 72149384b2f3Smrg # Code to be used in simple compile tests 72159384b2f3Smrg lt_simple_compile_test_code="\ 72169384b2f3Smrg subroutine t 72179384b2f3Smrg return 72189384b2f3Smrg end 72199384b2f3Smrg" 72209384b2f3Smrg 72219384b2f3Smrg # Code to be used in simple link tests 72229384b2f3Smrg lt_simple_link_test_code="\ 72239384b2f3Smrg program t 72249384b2f3Smrg end 72259384b2f3Smrg" 72269384b2f3Smrg 72279384b2f3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72289384b2f3Smrg _LT_TAG_COMPILER 72299384b2f3Smrg 72309384b2f3Smrg # save warnings/boilerplate of simple test code 72319384b2f3Smrg _LT_COMPILER_BOILERPLATE 72329384b2f3Smrg _LT_LINKER_BOILERPLATE 72339384b2f3Smrg 72349384b2f3Smrg # Allow CC to be a program name with arguments. 72359384b2f3Smrg lt_save_CC="$CC" 72369384b2f3Smrg lt_save_GCC=$GCC 72379384b2f3Smrg lt_save_CFLAGS=$CFLAGS 72389384b2f3Smrg CC=${F77-"f77"} 72399384b2f3Smrg CFLAGS=$FFLAGS 72409384b2f3Smrg compiler=$CC 72419384b2f3Smrg _LT_TAGVAR(compiler, $1)=$CC 72429384b2f3Smrg _LT_CC_BASENAME([$compiler]) 72439384b2f3Smrg GCC=$G77 72449384b2f3Smrg if test -n "$compiler"; then 72459384b2f3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72469384b2f3Smrg AC_MSG_RESULT([$can_build_shared]) 72479384b2f3Smrg 72489384b2f3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 72499384b2f3Smrg test "$can_build_shared" = "no" && enable_shared=no 72509384b2f3Smrg 72519384b2f3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 72529384b2f3Smrg # are all built from PIC. 7253966bf024Smrg case $host_os in 72549384b2f3Smrg aix3*) 72559384b2f3Smrg test "$enable_shared" = yes && enable_static=no 72569384b2f3Smrg if test -n "$RANLIB"; then 72579384b2f3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72589384b2f3Smrg postinstall_cmds='$RANLIB $lib' 72599384b2f3Smrg fi 72609384b2f3Smrg ;; 72619384b2f3Smrg aix[[4-9]]*) 72629384b2f3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72639384b2f3Smrg test "$enable_shared" = yes && enable_static=no 7264966bf024Smrg fi 72659384b2f3Smrg ;; 7266966bf024Smrg esac 72679384b2f3Smrg AC_MSG_RESULT([$enable_shared]) 72689384b2f3Smrg 72699384b2f3Smrg AC_MSG_CHECKING([whether to build static libraries]) 72709384b2f3Smrg # Make sure either enable_shared or enable_static is yes. 72719384b2f3Smrg test "$enable_shared" = yes || enable_static=yes 72729384b2f3Smrg AC_MSG_RESULT([$enable_static]) 72739384b2f3Smrg 72749384b2f3Smrg _LT_TAGVAR(GCC, $1)="$G77" 72759384b2f3Smrg _LT_TAGVAR(LD, $1)="$LD" 72769384b2f3Smrg 72779384b2f3Smrg ## CAVEAT EMPTOR: 72789384b2f3Smrg ## There is no encapsulation within the following macros, do not change 72799384b2f3Smrg ## the running order or otherwise move them around unless you know exactly 72809384b2f3Smrg ## what you are doing... 72819384b2f3Smrg _LT_COMPILER_PIC($1) 72829384b2f3Smrg _LT_COMPILER_C_O($1) 72839384b2f3Smrg _LT_COMPILER_FILE_LOCKS($1) 72849384b2f3Smrg _LT_LINKER_SHLIBS($1) 72859384b2f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 72869384b2f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 72879384b2f3Smrg 72889384b2f3Smrg _LT_CONFIG($1) 72899384b2f3Smrg fi # test -n "$compiler" 72909384b2f3Smrg 72919384b2f3Smrg GCC=$lt_save_GCC 72929384b2f3Smrg CC="$lt_save_CC" 72939384b2f3Smrg CFLAGS="$lt_save_CFLAGS" 72949384b2f3Smrgfi # test "$_lt_disable_F77" != yes 72959384b2f3Smrg 72969384b2f3SmrgAC_LANG_POP 72979384b2f3Smrg])# _LT_LANG_F77_CONFIG 72989384b2f3Smrg 72999384b2f3Smrg 73009384b2f3Smrg# _LT_LANG_FC_CONFIG([TAG]) 73019384b2f3Smrg# ------------------------- 73029384b2f3Smrg# Ensure that the configuration variables for a Fortran compiler are 73039384b2f3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73049384b2f3Smrg# to write the compiler configuration to `libtool'. 73059384b2f3Smrgm4_defun([_LT_LANG_FC_CONFIG], 73069384b2f3Smrg[AC_LANG_PUSH(Fortran) 73079384b2f3Smrg 73089384b2f3Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 73099384b2f3Smrg _lt_disable_FC=yes 73109384b2f3Smrgfi 73119384b2f3Smrg 73129384b2f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73139384b2f3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 73149384b2f3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 73159384b2f3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73169384b2f3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73179384b2f3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 73189384b2f3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73199384b2f3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73209384b2f3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73219384b2f3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73229384b2f3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 73239384b2f3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 73249384b2f3Smrg_LT_TAGVAR(module_cmds, $1)= 73259384b2f3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 73269384b2f3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73279384b2f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 73289384b2f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 73299384b2f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73309384b2f3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 73319384b2f3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73329384b2f3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73339384b2f3Smrg 73349384b2f3Smrg# Source file extension for fc test sources. 73359384b2f3Smrgac_ext=${ac_fc_srcext-f} 73369384b2f3Smrg 73379384b2f3Smrg# Object file extension for compiled fc test sources. 73389384b2f3Smrgobjext=o 73399384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 73409384b2f3Smrg 73419384b2f3Smrg# No sense in running all these tests if we already determined that 73429384b2f3Smrg# the FC compiler isn't working. Some variables (like enable_shared) 73439384b2f3Smrg# are currently assumed to apply to all compilers on this platform, 73449384b2f3Smrg# and will be corrupted by setting them based on a non-working compiler. 73459384b2f3Smrgif test "$_lt_disable_FC" != yes; then 73469384b2f3Smrg # Code to be used in simple compile tests 73479384b2f3Smrg lt_simple_compile_test_code="\ 73489384b2f3Smrg subroutine t 73499384b2f3Smrg return 73509384b2f3Smrg end 73519384b2f3Smrg" 73529384b2f3Smrg 73539384b2f3Smrg # Code to be used in simple link tests 73549384b2f3Smrg lt_simple_link_test_code="\ 73559384b2f3Smrg program t 73569384b2f3Smrg end 73579384b2f3Smrg" 73589384b2f3Smrg 73599384b2f3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73609384b2f3Smrg _LT_TAG_COMPILER 73619384b2f3Smrg 73629384b2f3Smrg # save warnings/boilerplate of simple test code 73639384b2f3Smrg _LT_COMPILER_BOILERPLATE 73649384b2f3Smrg _LT_LINKER_BOILERPLATE 73659384b2f3Smrg 73669384b2f3Smrg # Allow CC to be a program name with arguments. 73679384b2f3Smrg lt_save_CC="$CC" 73689384b2f3Smrg lt_save_GCC=$GCC 73699384b2f3Smrg lt_save_CFLAGS=$CFLAGS 73709384b2f3Smrg CC=${FC-"f95"} 73719384b2f3Smrg CFLAGS=$FCFLAGS 73729384b2f3Smrg compiler=$CC 73739384b2f3Smrg GCC=$ac_cv_fc_compiler_gnu 7374966bf024Smrg 73759384b2f3Smrg _LT_TAGVAR(compiler, $1)=$CC 73769384b2f3Smrg _LT_CC_BASENAME([$compiler]) 73779384b2f3Smrg 73789384b2f3Smrg if test -n "$compiler"; then 73799384b2f3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73809384b2f3Smrg AC_MSG_RESULT([$can_build_shared]) 73819384b2f3Smrg 73829384b2f3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 73839384b2f3Smrg test "$can_build_shared" = "no" && enable_shared=no 73849384b2f3Smrg 73859384b2f3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 73869384b2f3Smrg # are all built from PIC. 7387966bf024Smrg case $host_os in 73889384b2f3Smrg aix3*) 73899384b2f3Smrg test "$enable_shared" = yes && enable_static=no 73909384b2f3Smrg if test -n "$RANLIB"; then 73919384b2f3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 73929384b2f3Smrg postinstall_cmds='$RANLIB $lib' 73939384b2f3Smrg fi 73949384b2f3Smrg ;; 73959384b2f3Smrg aix[[4-9]]*) 73969384b2f3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 73979384b2f3Smrg test "$enable_shared" = yes && enable_static=no 73989384b2f3Smrg fi 73999384b2f3Smrg ;; 74009384b2f3Smrg esac 74019384b2f3Smrg AC_MSG_RESULT([$enable_shared]) 74029384b2f3Smrg 74039384b2f3Smrg AC_MSG_CHECKING([whether to build static libraries]) 74049384b2f3Smrg # Make sure either enable_shared or enable_static is yes. 74059384b2f3Smrg test "$enable_shared" = yes || enable_static=yes 74069384b2f3Smrg AC_MSG_RESULT([$enable_static]) 74079384b2f3Smrg 74089384b2f3Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74099384b2f3Smrg _LT_TAGVAR(LD, $1)="$LD" 74109384b2f3Smrg 74119384b2f3Smrg ## CAVEAT EMPTOR: 74129384b2f3Smrg ## There is no encapsulation within the following macros, do not change 74139384b2f3Smrg ## the running order or otherwise move them around unless you know exactly 74149384b2f3Smrg ## what you are doing... 74159384b2f3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74169384b2f3Smrg _LT_COMPILER_PIC($1) 74179384b2f3Smrg _LT_COMPILER_C_O($1) 74189384b2f3Smrg _LT_COMPILER_FILE_LOCKS($1) 74199384b2f3Smrg _LT_LINKER_SHLIBS($1) 74209384b2f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 74219384b2f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74229384b2f3Smrg 74239384b2f3Smrg _LT_CONFIG($1) 74249384b2f3Smrg fi # test -n "$compiler" 74259384b2f3Smrg 74269384b2f3Smrg GCC=$lt_save_GCC 74279384b2f3Smrg CC=$lt_save_CC 74289384b2f3Smrg CFLAGS=$lt_save_CFLAGS 74299384b2f3Smrgfi # test "$_lt_disable_FC" != yes 7430966bf024Smrg 74319384b2f3SmrgAC_LANG_POP 74329384b2f3Smrg])# _LT_LANG_FC_CONFIG 7433966bf024Smrg 7434966bf024Smrg 74359384b2f3Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 74369384b2f3Smrg# -------------------------- 74379384b2f3Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74389384b2f3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74399384b2f3Smrg# to write the compiler configuration to `libtool'. 74409384b2f3Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 74419384b2f3Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74429384b2f3SmrgAC_LANG_SAVE 74439384b2f3Smrg 74449384b2f3Smrg# Source file extension for Java test sources. 74459384b2f3Smrgac_ext=java 74469384b2f3Smrg 74479384b2f3Smrg# Object file extension for compiled Java test sources. 74489384b2f3Smrgobjext=o 74499384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 74509384b2f3Smrg 74519384b2f3Smrg# Code to be used in simple compile tests 74529384b2f3Smrglt_simple_compile_test_code="class foo {}" 74539384b2f3Smrg 74549384b2f3Smrg# Code to be used in simple link tests 74559384b2f3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 74569384b2f3Smrg 74579384b2f3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74589384b2f3Smrg_LT_TAG_COMPILER 74599384b2f3Smrg 74609384b2f3Smrg# save warnings/boilerplate of simple test code 74619384b2f3Smrg_LT_COMPILER_BOILERPLATE 74629384b2f3Smrg_LT_LINKER_BOILERPLATE 74639384b2f3Smrg 74649384b2f3Smrg# Allow CC to be a program name with arguments. 74659384b2f3Smrglt_save_CC=$CC 74669384b2f3Smrglt_save_CFLAGS=$CFLAGS 74679384b2f3Smrglt_save_GCC=$GCC 74689384b2f3SmrgGCC=yes 74699384b2f3SmrgCC=${GCJ-"gcj"} 74709384b2f3SmrgCFLAGS=$GCJFLAGS 74719384b2f3Smrgcompiler=$CC 74729384b2f3Smrg_LT_TAGVAR(compiler, $1)=$CC 74739384b2f3Smrg_LT_TAGVAR(LD, $1)="$LD" 74749384b2f3Smrg_LT_CC_BASENAME([$compiler]) 74759384b2f3Smrg 74769384b2f3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74779384b2f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74789384b2f3Smrg 74799384b2f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 74809384b2f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 74819384b2f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74829384b2f3Smrg 74839384b2f3Smrgif test -n "$compiler"; then 74849384b2f3Smrg _LT_COMPILER_NO_RTTI($1) 74859384b2f3Smrg _LT_COMPILER_PIC($1) 74869384b2f3Smrg _LT_COMPILER_C_O($1) 74879384b2f3Smrg _LT_COMPILER_FILE_LOCKS($1) 74889384b2f3Smrg _LT_LINKER_SHLIBS($1) 74899384b2f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74909384b2f3Smrg 74919384b2f3Smrg _LT_CONFIG($1) 74929384b2f3Smrgfi 74939384b2f3Smrg 74949384b2f3SmrgAC_LANG_RESTORE 74959384b2f3Smrg 74969384b2f3SmrgGCC=$lt_save_GCC 74979384b2f3SmrgCC=$lt_save_CC 74989384b2f3SmrgCFLAGS=$lt_save_CFLAGS 74999384b2f3Smrg])# _LT_LANG_GCJ_CONFIG 75009384b2f3Smrg 75019384b2f3Smrg 75029384b2f3Smrg# _LT_LANG_GO_CONFIG([TAG]) 75039384b2f3Smrg# -------------------------- 75049384b2f3Smrg# Ensure that the configuration variables for the GNU Go compiler 75059384b2f3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75069384b2f3Smrg# to write the compiler configuration to `libtool'. 75079384b2f3Smrgm4_defun([_LT_LANG_GO_CONFIG], 75089384b2f3Smrg[AC_REQUIRE([LT_PROG_GO])dnl 75099384b2f3SmrgAC_LANG_SAVE 75109384b2f3Smrg 75119384b2f3Smrg# Source file extension for Go test sources. 75129384b2f3Smrgac_ext=go 75139384b2f3Smrg 75149384b2f3Smrg# Object file extension for compiled Go test sources. 75159384b2f3Smrgobjext=o 75169384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 75179384b2f3Smrg 75189384b2f3Smrg# Code to be used in simple compile tests 75199384b2f3Smrglt_simple_compile_test_code="package main; func main() { }" 75209384b2f3Smrg 75219384b2f3Smrg# Code to be used in simple link tests 75229384b2f3Smrglt_simple_link_test_code='package main; func main() { }' 75239384b2f3Smrg 75249384b2f3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 75259384b2f3Smrg_LT_TAG_COMPILER 75269384b2f3Smrg 75279384b2f3Smrg# save warnings/boilerplate of simple test code 75289384b2f3Smrg_LT_COMPILER_BOILERPLATE 75299384b2f3Smrg_LT_LINKER_BOILERPLATE 75309384b2f3Smrg 75319384b2f3Smrg# Allow CC to be a program name with arguments. 75329384b2f3Smrglt_save_CC=$CC 75339384b2f3Smrglt_save_CFLAGS=$CFLAGS 75349384b2f3Smrglt_save_GCC=$GCC 75359384b2f3SmrgGCC=yes 75369384b2f3SmrgCC=${GOC-"gccgo"} 75379384b2f3SmrgCFLAGS=$GOFLAGS 75389384b2f3Smrgcompiler=$CC 75399384b2f3Smrg_LT_TAGVAR(compiler, $1)=$CC 75409384b2f3Smrg_LT_TAGVAR(LD, $1)="$LD" 75419384b2f3Smrg_LT_CC_BASENAME([$compiler]) 75429384b2f3Smrg 75439384b2f3Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 75449384b2f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 75459384b2f3Smrg 75469384b2f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 75479384b2f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 75489384b2f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 75499384b2f3Smrg 75509384b2f3Smrgif test -n "$compiler"; then 75519384b2f3Smrg _LT_COMPILER_NO_RTTI($1) 75529384b2f3Smrg _LT_COMPILER_PIC($1) 75539384b2f3Smrg _LT_COMPILER_C_O($1) 75549384b2f3Smrg _LT_COMPILER_FILE_LOCKS($1) 75559384b2f3Smrg _LT_LINKER_SHLIBS($1) 75569384b2f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 75579384b2f3Smrg 75589384b2f3Smrg _LT_CONFIG($1) 75599384b2f3Smrgfi 75609384b2f3Smrg 75619384b2f3SmrgAC_LANG_RESTORE 75629384b2f3Smrg 75639384b2f3SmrgGCC=$lt_save_GCC 75649384b2f3SmrgCC=$lt_save_CC 75659384b2f3SmrgCFLAGS=$lt_save_CFLAGS 75669384b2f3Smrg])# _LT_LANG_GO_CONFIG 75679384b2f3Smrg 75689384b2f3Smrg 75699384b2f3Smrg# _LT_LANG_RC_CONFIG([TAG]) 75709384b2f3Smrg# ------------------------- 75719384b2f3Smrg# Ensure that the configuration variables for the Windows resource compiler 75729384b2f3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75739384b2f3Smrg# to write the compiler configuration to `libtool'. 75749384b2f3Smrgm4_defun([_LT_LANG_RC_CONFIG], 75759384b2f3Smrg[AC_REQUIRE([LT_PROG_RC])dnl 75769384b2f3SmrgAC_LANG_SAVE 75779384b2f3Smrg 75789384b2f3Smrg# Source file extension for RC test sources. 75799384b2f3Smrgac_ext=rc 75809384b2f3Smrg 75819384b2f3Smrg# Object file extension for compiled RC test sources. 75829384b2f3Smrgobjext=o 75839384b2f3Smrg_LT_TAGVAR(objext, $1)=$objext 75849384b2f3Smrg 75859384b2f3Smrg# Code to be used in simple compile tests 75869384b2f3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 75879384b2f3Smrg 75889384b2f3Smrg# Code to be used in simple link tests 75899384b2f3Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 75909384b2f3Smrg 75919384b2f3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 75929384b2f3Smrg_LT_TAG_COMPILER 75939384b2f3Smrg 75949384b2f3Smrg# save warnings/boilerplate of simple test code 75959384b2f3Smrg_LT_COMPILER_BOILERPLATE 75969384b2f3Smrg_LT_LINKER_BOILERPLATE 75979384b2f3Smrg 75989384b2f3Smrg# Allow CC to be a program name with arguments. 75999384b2f3Smrglt_save_CC="$CC" 76009384b2f3Smrglt_save_CFLAGS=$CFLAGS 76019384b2f3Smrglt_save_GCC=$GCC 76029384b2f3SmrgGCC= 76039384b2f3SmrgCC=${RC-"windres"} 76049384b2f3SmrgCFLAGS= 76059384b2f3Smrgcompiler=$CC 76069384b2f3Smrg_LT_TAGVAR(compiler, $1)=$CC 76079384b2f3Smrg_LT_CC_BASENAME([$compiler]) 76089384b2f3Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 76099384b2f3Smrg 76109384b2f3Smrgif test -n "$compiler"; then 76119384b2f3Smrg : 76129384b2f3Smrg _LT_CONFIG($1) 76139384b2f3Smrgfi 76149384b2f3Smrg 76159384b2f3SmrgGCC=$lt_save_GCC 76169384b2f3SmrgAC_LANG_RESTORE 76179384b2f3SmrgCC=$lt_save_CC 76189384b2f3SmrgCFLAGS=$lt_save_CFLAGS 76199384b2f3Smrg])# _LT_LANG_RC_CONFIG 76209384b2f3Smrg 76219384b2f3Smrg 76229384b2f3Smrg# LT_PROG_GCJ 76239384b2f3Smrg# ----------- 76249384b2f3SmrgAC_DEFUN([LT_PROG_GCJ], 76259384b2f3Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76269384b2f3Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76279384b2f3Smrg [AC_CHECK_TOOL(GCJ, gcj,) 76289384b2f3Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76299384b2f3Smrg AC_SUBST(GCJFLAGS)])])[]dnl 76309384b2f3Smrg]) 76319384b2f3Smrg 76329384b2f3Smrg# Old name: 76339384b2f3SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76349384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 76359384b2f3Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76369384b2f3Smrg 76379384b2f3Smrg 76389384b2f3Smrg# LT_PROG_GO 76399384b2f3Smrg# ---------- 76409384b2f3SmrgAC_DEFUN([LT_PROG_GO], 76419384b2f3Smrg[AC_CHECK_TOOL(GOC, gccgo,) 76429384b2f3Smrg]) 76439384b2f3Smrg 76449384b2f3Smrg 76459384b2f3Smrg# LT_PROG_RC 76469384b2f3Smrg# ---------- 76479384b2f3SmrgAC_DEFUN([LT_PROG_RC], 76489384b2f3Smrg[AC_CHECK_TOOL(RC, windres,) 76499384b2f3Smrg]) 76509384b2f3Smrg 76519384b2f3Smrg# Old name: 76529384b2f3SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76539384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 76549384b2f3Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76559384b2f3Smrg 76569384b2f3Smrg 76579384b2f3Smrg# _LT_DECL_EGREP 76589384b2f3Smrg# -------------- 76599384b2f3Smrg# If we don't have a new enough Autoconf to choose the best grep 76609384b2f3Smrg# available, choose the one first in the user's PATH. 76619384b2f3Smrgm4_defun([_LT_DECL_EGREP], 76629384b2f3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76639384b2f3SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76649384b2f3Smrgtest -z "$GREP" && GREP=grep 76659384b2f3Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76669384b2f3Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76679384b2f3Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76689384b2f3Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76699384b2f3SmrgAC_SUBST([GREP]) 76709384b2f3Smrg]) 76719384b2f3Smrg 76729384b2f3Smrg 76739384b2f3Smrg# _LT_DECL_OBJDUMP 76749384b2f3Smrg# -------------- 76759384b2f3Smrg# If we don't have a new enough Autoconf to choose the best objdump 76769384b2f3Smrg# available, choose the one first in the user's PATH. 76779384b2f3Smrgm4_defun([_LT_DECL_OBJDUMP], 76789384b2f3Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76799384b2f3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76809384b2f3Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76819384b2f3SmrgAC_SUBST([OBJDUMP]) 76829384b2f3Smrg]) 76839384b2f3Smrg 76849384b2f3Smrg# _LT_DECL_DLLTOOL 76859384b2f3Smrg# ---------------- 76869384b2f3Smrg# Ensure DLLTOOL variable is set. 76879384b2f3Smrgm4_defun([_LT_DECL_DLLTOOL], 76889384b2f3Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 76899384b2f3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 76909384b2f3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 76919384b2f3SmrgAC_SUBST([DLLTOOL]) 76929384b2f3Smrg]) 76939384b2f3Smrg 76949384b2f3Smrg# _LT_DECL_SED 76959384b2f3Smrg# ------------ 76969384b2f3Smrg# Check for a fully-functional sed program, that truncates 76979384b2f3Smrg# as few characters as possible. Prefer GNU sed if found. 76989384b2f3Smrgm4_defun([_LT_DECL_SED], 76999384b2f3Smrg[AC_PROG_SED 77009384b2f3Smrgtest -z "$SED" && SED=sed 77019384b2f3SmrgXsed="$SED -e 1s/^X//" 77029384b2f3Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77039384b2f3Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77049384b2f3Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77059384b2f3Smrg])# _LT_DECL_SED 77069384b2f3Smrg 77079384b2f3Smrgm4_ifndef([AC_PROG_SED], [ 77089384b2f3Smrg# NOTE: This macro has been submitted for inclusion into # 77099384b2f3Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77109384b2f3Smrg# a released version of Autoconf we should remove this # 77119384b2f3Smrg# macro and use it instead. # 77129384b2f3Smrg 77139384b2f3Smrgm4_defun([AC_PROG_SED], 77149384b2f3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77159384b2f3SmrgAC_CACHE_VAL(lt_cv_path_SED, 77169384b2f3Smrg[# Loop through the user's path and test for sed and gsed. 77179384b2f3Smrg# Then use that list of sed's as ones to test for truncation. 77189384b2f3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77199384b2f3Smrgfor as_dir in $PATH 77209384b2f3Smrgdo 77219384b2f3Smrg IFS=$as_save_IFS 77229384b2f3Smrg test -z "$as_dir" && as_dir=. 77239384b2f3Smrg for lt_ac_prog in sed gsed; do 77249384b2f3Smrg for ac_exec_ext in '' $ac_executable_extensions; do 77259384b2f3Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77269384b2f3Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77279384b2f3Smrg fi 77289384b2f3Smrg done 77299384b2f3Smrg done 77309384b2f3Smrgdone 77319384b2f3SmrgIFS=$as_save_IFS 77329384b2f3Smrglt_ac_max=0 77339384b2f3Smrglt_ac_count=0 77349384b2f3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77359384b2f3Smrg# along with /bin/sed that truncates output. 77369384b2f3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77379384b2f3Smrg test ! -f $lt_ac_sed && continue 77389384b2f3Smrg cat /dev/null > conftest.in 77399384b2f3Smrg lt_ac_count=0 77409384b2f3Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77419384b2f3Smrg # Check for GNU sed and select it if it is found. 77429384b2f3Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77439384b2f3Smrg lt_cv_path_SED=$lt_ac_sed 77449384b2f3Smrg break 77459384b2f3Smrg fi 77469384b2f3Smrg while true; do 77479384b2f3Smrg cat conftest.in conftest.in >conftest.tmp 77489384b2f3Smrg mv conftest.tmp conftest.in 77499384b2f3Smrg cp conftest.in conftest.nl 77509384b2f3Smrg echo >>conftest.nl 77519384b2f3Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77529384b2f3Smrg cmp -s conftest.out conftest.nl || break 77539384b2f3Smrg # 10000 chars as input seems more than enough 77549384b2f3Smrg test $lt_ac_count -gt 10 && break 77559384b2f3Smrg lt_ac_count=`expr $lt_ac_count + 1` 77569384b2f3Smrg if test $lt_ac_count -gt $lt_ac_max; then 77579384b2f3Smrg lt_ac_max=$lt_ac_count 77589384b2f3Smrg lt_cv_path_SED=$lt_ac_sed 77599384b2f3Smrg fi 77609384b2f3Smrg done 77619384b2f3Smrgdone 77629384b2f3Smrg]) 77639384b2f3SmrgSED=$lt_cv_path_SED 77649384b2f3SmrgAC_SUBST([SED]) 77659384b2f3SmrgAC_MSG_RESULT([$SED]) 77669384b2f3Smrg])#AC_PROG_SED 77679384b2f3Smrg])#m4_ifndef 77689384b2f3Smrg 77699384b2f3Smrg# Old name: 77709384b2f3SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77719384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 77729384b2f3Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77739384b2f3Smrg 77749384b2f3Smrg 77759384b2f3Smrg# _LT_CHECK_SHELL_FEATURES 77769384b2f3Smrg# ------------------------ 77779384b2f3Smrg# Find out whether the shell is Bourne or XSI compatible, 77789384b2f3Smrg# or has some other useful features. 77799384b2f3Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77809384b2f3Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77819384b2f3Smrg# Try some XSI features 77829384b2f3Smrgxsi_shell=no 77839384b2f3Smrg( _lt_dummy="a/b/c" 77849384b2f3Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 77859384b2f3Smrg = c,a/b,b/c, \ 77869384b2f3Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 77879384b2f3Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 77889384b2f3Smrg && xsi_shell=yes 77899384b2f3SmrgAC_MSG_RESULT([$xsi_shell]) 77909384b2f3Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 77919384b2f3Smrg 77929384b2f3SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 77939384b2f3Smrglt_shell_append=no 77949384b2f3Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 77959384b2f3Smrg >/dev/null 2>&1 \ 77969384b2f3Smrg && lt_shell_append=yes 77979384b2f3SmrgAC_MSG_RESULT([$lt_shell_append]) 77989384b2f3Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 77999384b2f3Smrg 78009384b2f3Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78019384b2f3Smrg lt_unset=unset 78029384b2f3Smrgelse 78039384b2f3Smrg lt_unset=false 78049384b2f3Smrgfi 78059384b2f3Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78069384b2f3Smrg 78079384b2f3Smrg# test EBCDIC or ASCII 78089384b2f3Smrgcase `echo X|tr X '\101'` in 78099384b2f3Smrg A) # ASCII based system 78109384b2f3Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78119384b2f3Smrg lt_SP2NL='tr \040 \012' 78129384b2f3Smrg lt_NL2SP='tr \015\012 \040\040' 78139384b2f3Smrg ;; 78149384b2f3Smrg *) # EBCDIC based system 78159384b2f3Smrg lt_SP2NL='tr \100 \n' 78169384b2f3Smrg lt_NL2SP='tr \r\n \100\100' 78179384b2f3Smrg ;; 78189384b2f3Smrgesac 78199384b2f3Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78209384b2f3Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78219384b2f3Smrg])# _LT_CHECK_SHELL_FEATURES 78229384b2f3Smrg 78239384b2f3Smrg 78249384b2f3Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 78259384b2f3Smrg# ------------------------------------------------------ 78269384b2f3Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 78279384b2f3Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 78289384b2f3Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 78299384b2f3Smrg[dnl { 78309384b2f3Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 78319384b2f3Smrg$1 ()\ 78329384b2f3Smrg{\ 78339384b2f3Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 78349384b2f3Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 78359384b2f3Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 78369384b2f3Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 78379384b2f3Smrgtest 0 -eq $? || _lt_function_replace_fail=: 78389384b2f3Smrg]) 78399384b2f3Smrg 78409384b2f3Smrg 78419384b2f3Smrg# _LT_PROG_REPLACE_SHELLFNS 78429384b2f3Smrg# ------------------------- 78439384b2f3Smrg# Replace existing portable implementations of several shell functions with 78449384b2f3Smrg# equivalent extended shell implementations where those features are available.. 78459384b2f3Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 78469384b2f3Smrg[if test x"$xsi_shell" = xyes; then 78479384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 78489384b2f3Smrg case ${1} in 78499384b2f3Smrg */*) func_dirname_result="${1%/*}${2}" ;; 78509384b2f3Smrg * ) func_dirname_result="${3}" ;; 78519384b2f3Smrg esac]) 78529384b2f3Smrg 78539384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 78549384b2f3Smrg func_basename_result="${1##*/}"]) 78559384b2f3Smrg 78569384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 78579384b2f3Smrg case ${1} in 78589384b2f3Smrg */*) func_dirname_result="${1%/*}${2}" ;; 78599384b2f3Smrg * ) func_dirname_result="${3}" ;; 78609384b2f3Smrg esac 78619384b2f3Smrg func_basename_result="${1##*/}"]) 78629384b2f3Smrg 78639384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 78649384b2f3Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 78659384b2f3Smrg # positional parameters, so assign one to ordinary parameter first. 78669384b2f3Smrg func_stripname_result=${3} 78679384b2f3Smrg func_stripname_result=${func_stripname_result#"${1}"} 78689384b2f3Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 78699384b2f3Smrg 78709384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 78719384b2f3Smrg func_split_long_opt_name=${1%%=*} 78729384b2f3Smrg func_split_long_opt_arg=${1#*=}]) 78739384b2f3Smrg 78749384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 78759384b2f3Smrg func_split_short_opt_arg=${1#??} 78769384b2f3Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78779384b2f3Smrg 78789384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 78799384b2f3Smrg case ${1} in 78809384b2f3Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 78819384b2f3Smrg *) func_lo2o_result=${1} ;; 78829384b2f3Smrg esac]) 78839384b2f3Smrg 78849384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 78859384b2f3Smrg 78869384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 78879384b2f3Smrg 78889384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 78899384b2f3Smrgfi 78909384b2f3Smrg 78919384b2f3Smrgif test x"$lt_shell_append" = xyes; then 78929384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 78939384b2f3Smrg 78949384b2f3Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 78959384b2f3Smrg func_quote_for_eval "${2}" 78969384b2f3Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 78979384b2f3Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 78989384b2f3Smrg 78999384b2f3Smrg # Save a `func_append' function call where possible by direct use of '+=' 79009384b2f3Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 79019384b2f3Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 79029384b2f3Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 79039384b2f3Smrg test 0 -eq $? || _lt_function_replace_fail=: 79049384b2f3Smrgelse 79059384b2f3Smrg # Save a `func_append' function call even when '+=' is not available 79069384b2f3Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 79079384b2f3Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 79089384b2f3Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 79099384b2f3Smrg test 0 -eq $? || _lt_function_replace_fail=: 79109384b2f3Smrgfi 79119384b2f3Smrg 79129384b2f3Smrgif test x"$_lt_function_replace_fail" = x":"; then 79139384b2f3Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 79149384b2f3Smrgfi 79159384b2f3Smrg]) 79169384b2f3Smrg 79179384b2f3Smrg# _LT_PATH_CONVERSION_FUNCTIONS 79189384b2f3Smrg# ----------------------------- 79199384b2f3Smrg# Determine which file name conversion functions should be used by 79209384b2f3Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 79219384b2f3Smrg# for certain cross-compile configurations and native mingw. 79229384b2f3Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 79239384b2f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 79249384b2f3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 79259384b2f3SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 79269384b2f3SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 79279384b2f3Smrg[case $host in 79289384b2f3Smrg *-*-mingw* ) 79299384b2f3Smrg case $build in 79309384b2f3Smrg *-*-mingw* ) # actually msys 79319384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 79329384b2f3Smrg ;; 79339384b2f3Smrg *-*-cygwin* ) 79349384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 79359384b2f3Smrg ;; 79369384b2f3Smrg * ) # otherwise, assume *nix 79379384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 79389384b2f3Smrg ;; 79399384b2f3Smrg esac 79409384b2f3Smrg ;; 79419384b2f3Smrg *-*-cygwin* ) 79429384b2f3Smrg case $build in 79439384b2f3Smrg *-*-mingw* ) # actually msys 79449384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 79459384b2f3Smrg ;; 79469384b2f3Smrg *-*-cygwin* ) 79479384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 79489384b2f3Smrg ;; 79499384b2f3Smrg * ) # otherwise, assume *nix 79509384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 79519384b2f3Smrg ;; 79529384b2f3Smrg esac 79539384b2f3Smrg ;; 79549384b2f3Smrg * ) # unhandled hosts (and "normal" native builds) 79559384b2f3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 79569384b2f3Smrg ;; 79579384b2f3Smrgesac 79589384b2f3Smrg]) 79599384b2f3Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 79609384b2f3SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 79619384b2f3Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 79629384b2f3Smrg [0], [convert $build file names to $host format])dnl 79639384b2f3Smrg 79649384b2f3SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 79659384b2f3SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 79669384b2f3Smrg[#assume ordinary cross tools, or native build. 79679384b2f3Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 79689384b2f3Smrgcase $host in 79699384b2f3Smrg *-*-mingw* ) 79709384b2f3Smrg case $build in 79719384b2f3Smrg *-*-mingw* ) # actually msys 79729384b2f3Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 79739384b2f3Smrg ;; 79749384b2f3Smrg esac 79759384b2f3Smrg ;; 79769384b2f3Smrgesac 79779384b2f3Smrg]) 79789384b2f3Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 79799384b2f3SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 79809384b2f3Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 79819384b2f3Smrg [0], [convert $build files to toolchain format])dnl 79829384b2f3Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 79839384b2f3Smrg 79849384b2f3Smrg# Helper functions for option handling. -*- Autoconf -*- 79859384b2f3Smrg# 79869384b2f3Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 79879384b2f3Smrg# Inc. 79889384b2f3Smrg# Written by Gary V. Vaughan, 2004 79899384b2f3Smrg# 79909384b2f3Smrg# This file is free software; the Free Software Foundation gives 79919384b2f3Smrg# unlimited permission to copy and/or distribute it, with or without 79929384b2f3Smrg# modifications, as long as this notice is preserved. 79939384b2f3Smrg 79949384b2f3Smrg# serial 7 ltoptions.m4 79959384b2f3Smrg 79969384b2f3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 79979384b2f3SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 79989384b2f3Smrg 79999384b2f3Smrg 80009384b2f3Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80019384b2f3Smrg# ------------------------------------------ 80029384b2f3Smrgm4_define([_LT_MANGLE_OPTION], 80039384b2f3Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 80049384b2f3Smrg 80059384b2f3Smrg 80069384b2f3Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80079384b2f3Smrg# --------------------------------------- 80089384b2f3Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80099384b2f3Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80109384b2f3Smrg# saved as a flag. 80119384b2f3Smrgm4_define([_LT_SET_OPTION], 80129384b2f3Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80139384b2f3Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80149384b2f3Smrg _LT_MANGLE_DEFUN([$1], [$2]), 80159384b2f3Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80169384b2f3Smrg]) 80179384b2f3Smrg 80189384b2f3Smrg 80199384b2f3Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80209384b2f3Smrg# ------------------------------------------------------------ 80219384b2f3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80229384b2f3Smrgm4_define([_LT_IF_OPTION], 80239384b2f3Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80249384b2f3Smrg 80259384b2f3Smrg 80269384b2f3Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80279384b2f3Smrg# ------------------------------------------------------- 80289384b2f3Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80299384b2f3Smrg# are set. 80309384b2f3Smrgm4_define([_LT_UNLESS_OPTIONS], 80319384b2f3Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80329384b2f3Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80339384b2f3Smrg [m4_define([$0_found])])])[]dnl 80349384b2f3Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80359384b2f3Smrg])[]dnl 80369384b2f3Smrg]) 80379384b2f3Smrg 80389384b2f3Smrg 80399384b2f3Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80409384b2f3Smrg# ---------------------------------------- 80419384b2f3Smrg# OPTION-LIST is a space-separated list of Libtool options associated 80429384b2f3Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80439384b2f3Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80449384b2f3Smrg# the unknown option and exit. 80459384b2f3Smrgm4_defun([_LT_SET_OPTIONS], 80469384b2f3Smrg[# Set options 80479384b2f3Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80489384b2f3Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 80499384b2f3Smrg 80509384b2f3Smrgm4_if([$1],[LT_INIT],[ 80519384b2f3Smrg dnl 80529384b2f3Smrg dnl Simply set some default values (i.e off) if boolean options were not 80539384b2f3Smrg dnl specified: 80549384b2f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80559384b2f3Smrg ]) 80569384b2f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80579384b2f3Smrg ]) 80589384b2f3Smrg dnl 80599384b2f3Smrg dnl If no reference was made to various pairs of opposing options, then 80609384b2f3Smrg dnl we run the default mode handler for the pair. For example, if neither 80619384b2f3Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80629384b2f3Smrg dnl archives by default: 80639384b2f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80649384b2f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80659384b2f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80669384b2f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80679384b2f3Smrg [_LT_ENABLE_FAST_INSTALL]) 80689384b2f3Smrg ]) 80699384b2f3Smrg])# _LT_SET_OPTIONS 80709384b2f3Smrg 80719384b2f3Smrg 80729384b2f3Smrg 80739384b2f3Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80749384b2f3Smrg# ----------------------------------------- 80759384b2f3Smrgm4_define([_LT_MANGLE_DEFUN], 80769384b2f3Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 80779384b2f3Smrg 80789384b2f3Smrg 80799384b2f3Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80809384b2f3Smrg# ----------------------------------------------- 80819384b2f3Smrgm4_define([LT_OPTION_DEFINE], 80829384b2f3Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80839384b2f3Smrg])# LT_OPTION_DEFINE 80849384b2f3Smrg 80859384b2f3Smrg 80869384b2f3Smrg# dlopen 80879384b2f3Smrg# ------ 80889384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 80899384b2f3Smrg]) 80909384b2f3Smrg 80919384b2f3SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 80929384b2f3Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 80939384b2f3SmrgAC_DIAGNOSE([obsolete], 80949384b2f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 80959384b2f3Smrgput the `dlopen' option into LT_INIT's first parameter.]) 80969384b2f3Smrg]) 80979384b2f3Smrg 80989384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 80999384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 81009384b2f3Smrg 81019384b2f3Smrg 81029384b2f3Smrg# win32-dll 81039384b2f3Smrg# --------- 81049384b2f3Smrg# Declare package support for building win32 dll's. 81059384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81069384b2f3Smrg[enable_win32_dll=yes 81079384b2f3Smrg 81089384b2f3Smrgcase $host in 81099384b2f3Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81109384b2f3Smrg AC_CHECK_TOOL(AS, as, false) 81119384b2f3Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81129384b2f3Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81139384b2f3Smrg ;; 81149384b2f3Smrgesac 81159384b2f3Smrg 81169384b2f3Smrgtest -z "$AS" && AS=as 81179384b2f3Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 81189384b2f3Smrg 81199384b2f3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 81209384b2f3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 81219384b2f3Smrg 81229384b2f3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81239384b2f3Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81249384b2f3Smrg])# win32-dll 81259384b2f3Smrg 81269384b2f3SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81279384b2f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81289384b2f3Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81299384b2f3SmrgAC_DIAGNOSE([obsolete], 81309384b2f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81319384b2f3Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 81329384b2f3Smrg]) 81339384b2f3Smrg 81349384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 81359384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 81369384b2f3Smrg 81379384b2f3Smrg 81389384b2f3Smrg# _LT_ENABLE_SHARED([DEFAULT]) 81399384b2f3Smrg# ---------------------------- 81409384b2f3Smrg# implement the --enable-shared flag, and supports the `shared' and 81419384b2f3Smrg# `disable-shared' LT_INIT options. 81429384b2f3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81439384b2f3Smrgm4_define([_LT_ENABLE_SHARED], 81449384b2f3Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81459384b2f3SmrgAC_ARG_ENABLE([shared], 81469384b2f3Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81479384b2f3Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81489384b2f3Smrg [p=${PACKAGE-default} 81499384b2f3Smrg case $enableval in 81509384b2f3Smrg yes) enable_shared=yes ;; 81519384b2f3Smrg no) enable_shared=no ;; 81529384b2f3Smrg *) 81539384b2f3Smrg enable_shared=no 81549384b2f3Smrg # Look at the argument we got. We use all the common list separators. 81559384b2f3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81569384b2f3Smrg for pkg in $enableval; do 81579384b2f3Smrg IFS="$lt_save_ifs" 81589384b2f3Smrg if test "X$pkg" = "X$p"; then 81599384b2f3Smrg enable_shared=yes 81609384b2f3Smrg fi 81619384b2f3Smrg done 81629384b2f3Smrg IFS="$lt_save_ifs" 81639384b2f3Smrg ;; 81649384b2f3Smrg esac], 81659384b2f3Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 81669384b2f3Smrg 81679384b2f3Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81689384b2f3Smrg [Whether or not to build shared libraries]) 81699384b2f3Smrg])# _LT_ENABLE_SHARED 81709384b2f3Smrg 81719384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81729384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 81739384b2f3Smrg 81749384b2f3Smrg# Old names: 81759384b2f3SmrgAC_DEFUN([AC_ENABLE_SHARED], 81769384b2f3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81779384b2f3Smrg]) 81789384b2f3Smrg 81799384b2f3SmrgAC_DEFUN([AC_DISABLE_SHARED], 81809384b2f3Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81819384b2f3Smrg]) 81829384b2f3Smrg 81839384b2f3SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81849384b2f3SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 81859384b2f3Smrg 81869384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 81879384b2f3Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 81889384b2f3Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 81899384b2f3Smrg 81909384b2f3Smrg 81919384b2f3Smrg 81929384b2f3Smrg# _LT_ENABLE_STATIC([DEFAULT]) 81939384b2f3Smrg# ---------------------------- 81949384b2f3Smrg# implement the --enable-static flag, and support the `static' and 81959384b2f3Smrg# `disable-static' LT_INIT options. 81969384b2f3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81979384b2f3Smrgm4_define([_LT_ENABLE_STATIC], 81989384b2f3Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 81999384b2f3SmrgAC_ARG_ENABLE([static], 82009384b2f3Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82019384b2f3Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82029384b2f3Smrg [p=${PACKAGE-default} 82039384b2f3Smrg case $enableval in 82049384b2f3Smrg yes) enable_static=yes ;; 82059384b2f3Smrg no) enable_static=no ;; 82069384b2f3Smrg *) 82079384b2f3Smrg enable_static=no 82089384b2f3Smrg # Look at the argument we got. We use all the common list separators. 82099384b2f3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82109384b2f3Smrg for pkg in $enableval; do 82119384b2f3Smrg IFS="$lt_save_ifs" 82129384b2f3Smrg if test "X$pkg" = "X$p"; then 82139384b2f3Smrg enable_static=yes 82149384b2f3Smrg fi 82159384b2f3Smrg done 82169384b2f3Smrg IFS="$lt_save_ifs" 82179384b2f3Smrg ;; 82189384b2f3Smrg esac], 82199384b2f3Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 82209384b2f3Smrg 82219384b2f3Smrg _LT_DECL([build_old_libs], [enable_static], [0], 82229384b2f3Smrg [Whether or not to build static libraries]) 82239384b2f3Smrg])# _LT_ENABLE_STATIC 82249384b2f3Smrg 82259384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82269384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 82279384b2f3Smrg 82289384b2f3Smrg# Old names: 82299384b2f3SmrgAC_DEFUN([AC_ENABLE_STATIC], 82309384b2f3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82319384b2f3Smrg]) 82329384b2f3Smrg 82339384b2f3SmrgAC_DEFUN([AC_DISABLE_STATIC], 82349384b2f3Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82359384b2f3Smrg]) 82369384b2f3Smrg 82379384b2f3SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82389384b2f3SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 82399384b2f3Smrg 82409384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 82419384b2f3Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82429384b2f3Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 82439384b2f3Smrg 82449384b2f3Smrg 82459384b2f3Smrg 82469384b2f3Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82479384b2f3Smrg# ---------------------------------- 82489384b2f3Smrg# implement the --enable-fast-install flag, and support the `fast-install' 82499384b2f3Smrg# and `disable-fast-install' LT_INIT options. 82509384b2f3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82519384b2f3Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 82529384b2f3Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82539384b2f3SmrgAC_ARG_ENABLE([fast-install], 82549384b2f3Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82559384b2f3Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82569384b2f3Smrg [p=${PACKAGE-default} 82579384b2f3Smrg case $enableval in 82589384b2f3Smrg yes) enable_fast_install=yes ;; 82599384b2f3Smrg no) enable_fast_install=no ;; 82609384b2f3Smrg *) 82619384b2f3Smrg enable_fast_install=no 82629384b2f3Smrg # Look at the argument we got. We use all the common list separators. 82639384b2f3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82649384b2f3Smrg for pkg in $enableval; do 82659384b2f3Smrg IFS="$lt_save_ifs" 82669384b2f3Smrg if test "X$pkg" = "X$p"; then 82679384b2f3Smrg enable_fast_install=yes 82689384b2f3Smrg fi 82699384b2f3Smrg done 82709384b2f3Smrg IFS="$lt_save_ifs" 82719384b2f3Smrg ;; 82729384b2f3Smrg esac], 82739384b2f3Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 82749384b2f3Smrg 82759384b2f3Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 82769384b2f3Smrg [Whether or not to optimize for fast installation])dnl 82779384b2f3Smrg])# _LT_ENABLE_FAST_INSTALL 82789384b2f3Smrg 82799384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82809384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 82819384b2f3Smrg 82829384b2f3Smrg# Old names: 82839384b2f3SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82849384b2f3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 82859384b2f3SmrgAC_DIAGNOSE([obsolete], 82869384b2f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82879384b2f3Smrgthe `fast-install' option into LT_INIT's first parameter.]) 82889384b2f3Smrg]) 82899384b2f3Smrg 82909384b2f3SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 82919384b2f3Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 82929384b2f3SmrgAC_DIAGNOSE([obsolete], 82939384b2f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82949384b2f3Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 82959384b2f3Smrg]) 82969384b2f3Smrg 82979384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 82989384b2f3Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 82999384b2f3Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83009384b2f3Smrg 83019384b2f3Smrg 83029384b2f3Smrg# _LT_WITH_PIC([MODE]) 83039384b2f3Smrg# -------------------- 83049384b2f3Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83059384b2f3Smrg# LT_INIT options. 83069384b2f3Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83079384b2f3Smrgm4_define([_LT_WITH_PIC], 83089384b2f3Smrg[AC_ARG_WITH([pic], 83099384b2f3Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83109384b2f3Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 83119384b2f3Smrg [lt_p=${PACKAGE-default} 83129384b2f3Smrg case $withval in 83139384b2f3Smrg yes|no) pic_mode=$withval ;; 83149384b2f3Smrg *) 83159384b2f3Smrg pic_mode=default 83169384b2f3Smrg # Look at the argument we got. We use all the common list separators. 83179384b2f3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 83189384b2f3Smrg for lt_pkg in $withval; do 83199384b2f3Smrg IFS="$lt_save_ifs" 83209384b2f3Smrg if test "X$lt_pkg" = "X$lt_p"; then 83219384b2f3Smrg pic_mode=yes 83229384b2f3Smrg fi 83239384b2f3Smrg done 83249384b2f3Smrg IFS="$lt_save_ifs" 83259384b2f3Smrg ;; 83269384b2f3Smrg esac], 83279384b2f3Smrg [pic_mode=default]) 83289384b2f3Smrg 83299384b2f3Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 83309384b2f3Smrg 83319384b2f3Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83329384b2f3Smrg])# _LT_WITH_PIC 83339384b2f3Smrg 83349384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83359384b2f3SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 83369384b2f3Smrg 83379384b2f3Smrg# Old name: 83389384b2f3SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83399384b2f3Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83409384b2f3SmrgAC_DIAGNOSE([obsolete], 83419384b2f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83429384b2f3Smrgput the `pic-only' option into LT_INIT's first parameter.]) 83439384b2f3Smrg]) 83449384b2f3Smrg 83459384b2f3Smrgdnl aclocal-1.4 backwards compatibility: 83469384b2f3Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 83479384b2f3Smrg 83489384b2f3Smrg 83499384b2f3Smrgm4_define([_LTDL_MODE], []) 83509384b2f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83519384b2f3Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83529384b2f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83539384b2f3Smrg [m4_define([_LTDL_MODE], [recursive])]) 83549384b2f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83559384b2f3Smrg [m4_define([_LTDL_MODE], [subproject])]) 83569384b2f3Smrg 83579384b2f3Smrgm4_define([_LTDL_TYPE], []) 83589384b2f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83599384b2f3Smrg [m4_define([_LTDL_TYPE], [installable])]) 83609384b2f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83619384b2f3Smrg [m4_define([_LTDL_TYPE], [convenience])]) 83629384b2f3Smrg 83639384b2f3Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 83649384b2f3Smrg# 83659384b2f3Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83669384b2f3Smrg# Written by Gary V. Vaughan, 2004 83679384b2f3Smrg# 83689384b2f3Smrg# This file is free software; the Free Software Foundation gives 83699384b2f3Smrg# unlimited permission to copy and/or distribute it, with or without 83709384b2f3Smrg# modifications, as long as this notice is preserved. 83719384b2f3Smrg 83729384b2f3Smrg# serial 6 ltsugar.m4 83739384b2f3Smrg 83749384b2f3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83759384b2f3SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83769384b2f3Smrg 83779384b2f3Smrg 83789384b2f3Smrg# lt_join(SEP, ARG1, [ARG2...]) 83799384b2f3Smrg# ----------------------------- 83809384b2f3Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83819384b2f3Smrg# associated separator. 83829384b2f3Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83839384b2f3Smrg# versions in m4sugar had bugs. 83849384b2f3Smrgm4_define([lt_join], 83859384b2f3Smrg[m4_if([$#], [1], [], 83869384b2f3Smrg [$#], [2], [[$2]], 83879384b2f3Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 83889384b2f3Smrgm4_define([_lt_join], 83899384b2f3Smrg[m4_if([$#$2], [2], [], 83909384b2f3Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 83919384b2f3Smrg 83929384b2f3Smrg 83939384b2f3Smrg# lt_car(LIST) 83949384b2f3Smrg# lt_cdr(LIST) 83959384b2f3Smrg# ------------ 83969384b2f3Smrg# Manipulate m4 lists. 83979384b2f3Smrg# These macros are necessary as long as will still need to support 83989384b2f3Smrg# Autoconf-2.59 which quotes differently. 83999384b2f3Smrgm4_define([lt_car], [[$1]]) 84009384b2f3Smrgm4_define([lt_cdr], 84019384b2f3Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84029384b2f3Smrg [$#], 1, [], 84039384b2f3Smrg [m4_dquote(m4_shift($@))])]) 84049384b2f3Smrgm4_define([lt_unquote], $1) 84059384b2f3Smrg 84069384b2f3Smrg 84079384b2f3Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84089384b2f3Smrg# ------------------------------------------ 84099384b2f3Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84109384b2f3Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84119384b2f3Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84129384b2f3Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84139384b2f3Smrg# than defined and empty). 84149384b2f3Smrg# 84159384b2f3Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84169384b2f3Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84179384b2f3Smrgm4_define([lt_append], 84189384b2f3Smrg[m4_define([$1], 84199384b2f3Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84209384b2f3Smrg 84219384b2f3Smrg 84229384b2f3Smrg 84239384b2f3Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84249384b2f3Smrg# ---------------------------------------------------------- 84259384b2f3Smrg# Produce a SEP delimited list of all paired combinations of elements of 84269384b2f3Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84279384b2f3Smrg# has the form PREFIXmINFIXSUFFIXn. 84289384b2f3Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84299384b2f3Smrgm4_define([lt_combine], 84309384b2f3Smrg[m4_if(m4_eval([$# > 3]), [1], 84319384b2f3Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84329384b2f3Smrg[[m4_foreach([_Lt_prefix], [$2], 84339384b2f3Smrg [m4_foreach([_Lt_suffix], 84349384b2f3Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84359384b2f3Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84369384b2f3Smrg 84379384b2f3Smrg 84389384b2f3Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84399384b2f3Smrg# ----------------------------------------------------------------------- 84409384b2f3Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84419384b2f3Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84429384b2f3Smrgm4_define([lt_if_append_uniq], 84439384b2f3Smrg[m4_ifdef([$1], 84449384b2f3Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84459384b2f3Smrg [lt_append([$1], [$2], [$3])$4], 84469384b2f3Smrg [$5])], 84479384b2f3Smrg [lt_append([$1], [$2], [$3])$4])]) 84489384b2f3Smrg 84499384b2f3Smrg 84509384b2f3Smrg# lt_dict_add(DICT, KEY, VALUE) 84519384b2f3Smrg# ----------------------------- 84529384b2f3Smrgm4_define([lt_dict_add], 84539384b2f3Smrg[m4_define([$1($2)], [$3])]) 84549384b2f3Smrg 84559384b2f3Smrg 84569384b2f3Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84579384b2f3Smrg# -------------------------------------------- 84589384b2f3Smrgm4_define([lt_dict_add_subkey], 84599384b2f3Smrg[m4_define([$1($2:$3)], [$4])]) 84609384b2f3Smrg 84619384b2f3Smrg 84629384b2f3Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84639384b2f3Smrg# ---------------------------------- 84649384b2f3Smrgm4_define([lt_dict_fetch], 84659384b2f3Smrg[m4_ifval([$3], 84669384b2f3Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84679384b2f3Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 84689384b2f3Smrg 84699384b2f3Smrg 84709384b2f3Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84719384b2f3Smrg# ----------------------------------------------------------------- 84729384b2f3Smrgm4_define([lt_if_dict_fetch], 84739384b2f3Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84749384b2f3Smrg [$5], 84759384b2f3Smrg [$6])]) 84769384b2f3Smrg 84779384b2f3Smrg 84789384b2f3Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84799384b2f3Smrg# -------------------------------------------------------------- 84809384b2f3Smrgm4_define([lt_dict_filter], 84819384b2f3Smrg[m4_if([$5], [], [], 84829384b2f3Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84839384b2f3Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84849384b2f3Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 84859384b2f3Smrg]) 84869384b2f3Smrg 84879384b2f3Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 84889384b2f3Smrg# 84899384b2f3Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 84909384b2f3Smrg# Written by Scott James Remnant, 2004 84919384b2f3Smrg# 84929384b2f3Smrg# This file is free software; the Free Software Foundation gives 84939384b2f3Smrg# unlimited permission to copy and/or distribute it, with or without 84949384b2f3Smrg# modifications, as long as this notice is preserved. 84959384b2f3Smrg 84969384b2f3Smrg# @configure_input@ 84979384b2f3Smrg 84989384b2f3Smrg# serial 3337 ltversion.m4 84999384b2f3Smrg# This file is part of GNU Libtool 85009384b2f3Smrg 85019384b2f3Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 85029384b2f3Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 85039384b2f3Smrg 85049384b2f3SmrgAC_DEFUN([LTVERSION_VERSION], 85059384b2f3Smrg[macro_version='2.4.2' 85069384b2f3Smrgmacro_revision='1.3337' 85079384b2f3Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85089384b2f3Smrg_LT_DECL(, macro_revision, 0) 85099384b2f3Smrg]) 85109384b2f3Smrg 85119384b2f3Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85129384b2f3Smrg# 85139384b2f3Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85149384b2f3Smrg# Written by Scott James Remnant, 2004. 85159384b2f3Smrg# 85169384b2f3Smrg# This file is free software; the Free Software Foundation gives 85179384b2f3Smrg# unlimited permission to copy and/or distribute it, with or without 85189384b2f3Smrg# modifications, as long as this notice is preserved. 85199384b2f3Smrg 85209384b2f3Smrg# serial 5 lt~obsolete.m4 85219384b2f3Smrg 85229384b2f3Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 85239384b2f3Smrg# 85249384b2f3Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85259384b2f3Smrg# which have later been changed to m4_define as they aren't part of the 85269384b2f3Smrg# exported API, or moved to Autoconf or Automake where they belong. 85279384b2f3Smrg# 85289384b2f3Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85299384b2f3Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85309384b2f3Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 85319384b2f3Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85329384b2f3Smrg# and doesn't know about Autoconf macros at all.) 85339384b2f3Smrg# 85349384b2f3Smrg# So we provide this file, which has a silly filename so it's always 85359384b2f3Smrg# included after everything else. This provides aclocal with the 85369384b2f3Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85379384b2f3Smrg# because those macros already exist, or will be overwritten later. 85389384b2f3Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85399384b2f3Smrg# 85409384b2f3Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85419384b2f3Smrg# Yes, that means every name once taken will need to remain here until 85429384b2f3Smrg# we give up compatibility with versions before 1.7, at which point 85439384b2f3Smrg# we need to keep only those names which we still refer to. 85449384b2f3Smrg 85459384b2f3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 85469384b2f3SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85479384b2f3Smrg 85489384b2f3Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85499384b2f3Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85509384b2f3Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85519384b2f3Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85529384b2f3Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85539384b2f3Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85549384b2f3Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85559384b2f3Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85569384b2f3Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85579384b2f3Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85589384b2f3Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85599384b2f3Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85609384b2f3Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85619384b2f3Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85629384b2f3Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85639384b2f3Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85649384b2f3Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85659384b2f3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85669384b2f3Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85679384b2f3Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85689384b2f3Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85699384b2f3Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85709384b2f3Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85719384b2f3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85729384b2f3Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85739384b2f3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85749384b2f3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85759384b2f3Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85769384b2f3Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85779384b2f3Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85789384b2f3Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85799384b2f3Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85809384b2f3Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85819384b2f3Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85829384b2f3Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85839384b2f3Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85849384b2f3Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 85859384b2f3Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 85869384b2f3Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 85879384b2f3Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 85889384b2f3Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 85899384b2f3Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 85909384b2f3Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 85919384b2f3Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 85929384b2f3Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 85939384b2f3Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 85949384b2f3Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 85959384b2f3Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 85969384b2f3Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 85979384b2f3Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 85989384b2f3Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 85999384b2f3Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86009384b2f3Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86019384b2f3Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 86029384b2f3Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 86039384b2f3Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 86049384b2f3Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 86059384b2f3Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 86069384b2f3Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 86079384b2f3Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 86089384b2f3Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86099384b2f3Smrg 86109384b2f3Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 86119384b2f3Smrg# serial 1 (pkg-config-0.24) 86129384b2f3Smrg# 86139384b2f3Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 86149384b2f3Smrg# 86159384b2f3Smrg# This program is free software; you can redistribute it and/or modify 86169384b2f3Smrg# it under the terms of the GNU General Public License as published by 86179384b2f3Smrg# the Free Software Foundation; either version 2 of the License, or 86189384b2f3Smrg# (at your option) any later version. 86199384b2f3Smrg# 86209384b2f3Smrg# This program is distributed in the hope that it will be useful, but 86219384b2f3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 86229384b2f3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 86239384b2f3Smrg# General Public License for more details. 86249384b2f3Smrg# 86259384b2f3Smrg# You should have received a copy of the GNU General Public License 86269384b2f3Smrg# along with this program; if not, write to the Free Software 86279384b2f3Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 86289384b2f3Smrg# 86299384b2f3Smrg# As a special exception to the GNU General Public License, if you 86309384b2f3Smrg# distribute this file as part of a program that contains a 86319384b2f3Smrg# configuration script generated by Autoconf, you may include it under 86329384b2f3Smrg# the same distribution terms that you use for the rest of that program. 86339384b2f3Smrg 86349384b2f3Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 86359384b2f3Smrg# ---------------------------------- 86369384b2f3SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 86379384b2f3Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 86389384b2f3Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 86399384b2f3Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 86409384b2f3SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 86419384b2f3SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86429384b2f3SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 86439384b2f3Smrg 86449384b2f3Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 86459384b2f3Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 86469384b2f3Smrgfi 86479384b2f3Smrgif test -n "$PKG_CONFIG"; then 86489384b2f3Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 86499384b2f3Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 86509384b2f3Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 86519384b2f3Smrg AC_MSG_RESULT([yes]) 86529384b2f3Smrg else 86539384b2f3Smrg AC_MSG_RESULT([no]) 86549384b2f3Smrg PKG_CONFIG="" 86559384b2f3Smrg fi 86569384b2f3Smrgfi[]dnl 86579384b2f3Smrg])# PKG_PROG_PKG_CONFIG 86589384b2f3Smrg 86599384b2f3Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 86609384b2f3Smrg# 86619384b2f3Smrg# Check to see whether a particular set of modules exists. Similar 86629384b2f3Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 86639384b2f3Smrg# 86649384b2f3Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86659384b2f3Smrg# only at the first occurence in configure.ac, so if the first place 86669384b2f3Smrg# it's called might be skipped (such as if it is within an "if", you 86679384b2f3Smrg# have to call PKG_CHECK_EXISTS manually 86689384b2f3Smrg# -------------------------------------------------------------- 86699384b2f3SmrgAC_DEFUN([PKG_CHECK_EXISTS], 86709384b2f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 86719384b2f3Smrgif test -n "$PKG_CONFIG" && \ 86729384b2f3Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 86739384b2f3Smrg m4_default([$2], [:]) 86749384b2f3Smrgm4_ifvaln([$3], [else 86759384b2f3Smrg $3])dnl 86769384b2f3Smrgfi]) 86779384b2f3Smrg 86789384b2f3Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 86799384b2f3Smrg# --------------------------------------------- 86809384b2f3Smrgm4_define([_PKG_CONFIG], 86819384b2f3Smrg[if test -n "$$1"; then 86829384b2f3Smrg pkg_cv_[]$1="$$1" 86839384b2f3Smrg elif test -n "$PKG_CONFIG"; then 86849384b2f3Smrg PKG_CHECK_EXISTS([$3], 86859384b2f3Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 86869384b2f3Smrg test "x$?" != "x0" && pkg_failed=yes ], 86879384b2f3Smrg [pkg_failed=yes]) 86889384b2f3Smrg else 86899384b2f3Smrg pkg_failed=untried 86909384b2f3Smrgfi[]dnl 86919384b2f3Smrg])# _PKG_CONFIG 86929384b2f3Smrg 86939384b2f3Smrg# _PKG_SHORT_ERRORS_SUPPORTED 86949384b2f3Smrg# ----------------------------- 86959384b2f3SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 86969384b2f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86979384b2f3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 86989384b2f3Smrg _pkg_short_errors_supported=yes 86999384b2f3Smrgelse 87009384b2f3Smrg _pkg_short_errors_supported=no 87019384b2f3Smrgfi[]dnl 87029384b2f3Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 87039384b2f3Smrg 87049384b2f3Smrg 87059384b2f3Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 87069384b2f3Smrg# [ACTION-IF-NOT-FOUND]) 87079384b2f3Smrg# 87089384b2f3Smrg# 87099384b2f3Smrg# Note that if there is a possibility the first call to 87109384b2f3Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 87119384b2f3Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 87129384b2f3Smrg# 87139384b2f3Smrg# 87149384b2f3Smrg# -------------------------------------------------------------- 87159384b2f3SmrgAC_DEFUN([PKG_CHECK_MODULES], 87169384b2f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 87179384b2f3SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 87189384b2f3SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 87199384b2f3Smrg 87209384b2f3Smrgpkg_failed=no 87219384b2f3SmrgAC_MSG_CHECKING([for $1]) 87229384b2f3Smrg 87239384b2f3Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 87249384b2f3Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 87259384b2f3Smrg 87269384b2f3Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 87279384b2f3Smrgand $1[]_LIBS to avoid the need to call pkg-config. 87289384b2f3SmrgSee the pkg-config man page for more details.]) 87299384b2f3Smrg 87309384b2f3Smrgif test $pkg_failed = yes; then 87319384b2f3Smrg AC_MSG_RESULT([no]) 87329384b2f3Smrg _PKG_SHORT_ERRORS_SUPPORTED 87339384b2f3Smrg if test $_pkg_short_errors_supported = yes; then 87349384b2f3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 87359384b2f3Smrg else 87369384b2f3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 87379384b2f3Smrg fi 87389384b2f3Smrg # Put the nasty error message in config.log where it belongs 87399384b2f3Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 87409384b2f3Smrg 87419384b2f3Smrg m4_default([$4], [AC_MSG_ERROR( 87429384b2f3Smrg[Package requirements ($2) were not met: 87439384b2f3Smrg 87449384b2f3Smrg$$1_PKG_ERRORS 87459384b2f3Smrg 87469384b2f3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 87479384b2f3Smrginstalled software in a non-standard prefix. 87489384b2f3Smrg 87499384b2f3Smrg_PKG_TEXT])[]dnl 87509384b2f3Smrg ]) 87519384b2f3Smrgelif test $pkg_failed = untried; then 87529384b2f3Smrg AC_MSG_RESULT([no]) 87539384b2f3Smrg m4_default([$4], [AC_MSG_FAILURE( 87549384b2f3Smrg[The pkg-config script could not be found or is too old. Make sure it 87559384b2f3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 87569384b2f3Smrgpath to pkg-config. 87579384b2f3Smrg 87589384b2f3Smrg_PKG_TEXT 87599384b2f3Smrg 87609384b2f3SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 87619384b2f3Smrg ]) 87629384b2f3Smrgelse 87639384b2f3Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 87649384b2f3Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 87659384b2f3Smrg AC_MSG_RESULT([yes]) 87669384b2f3Smrg $3 87679384b2f3Smrgfi[]dnl 87689384b2f3Smrg])# PKG_CHECK_MODULES 87699384b2f3Smrg 87709384b2f3Smrg 87719384b2f3Smrg# PKG_INSTALLDIR(DIRECTORY) 87729384b2f3Smrg# ------------------------- 87739384b2f3Smrg# Substitutes the variable pkgconfigdir as the location where a module 87749384b2f3Smrg# should install pkg-config .pc files. By default the directory is 87759384b2f3Smrg# $libdir/pkgconfig, but the default can be changed by passing 87769384b2f3Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 87779384b2f3Smrg# parameter. 87789384b2f3SmrgAC_DEFUN([PKG_INSTALLDIR], 87799384b2f3Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 87809384b2f3Smrgm4_pushdef([pkg_description], 87819384b2f3Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 87829384b2f3SmrgAC_ARG_WITH([pkgconfigdir], 87839384b2f3Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 87849384b2f3Smrg [with_pkgconfigdir=]pkg_default) 87859384b2f3SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 87869384b2f3Smrgm4_popdef([pkg_default]) 87879384b2f3Smrgm4_popdef([pkg_description]) 87889384b2f3Smrg]) dnl PKG_INSTALLDIR 87899384b2f3Smrg 87909384b2f3Smrg 87919384b2f3Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 87929384b2f3Smrg# ------------------------- 87939384b2f3Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 87949384b2f3Smrg# module should install arch-independent pkg-config .pc files. By 87959384b2f3Smrg# default the directory is $datadir/pkgconfig, but the default can be 87969384b2f3Smrg# changed by passing DIRECTORY. The user can override through the 87979384b2f3Smrg# --with-noarch-pkgconfigdir parameter. 87989384b2f3SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 87999384b2f3Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 88009384b2f3Smrgm4_pushdef([pkg_description], 88019384b2f3Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 88029384b2f3SmrgAC_ARG_WITH([noarch-pkgconfigdir], 88039384b2f3Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 88049384b2f3Smrg [with_noarch_pkgconfigdir=]pkg_default) 88059384b2f3SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 88069384b2f3Smrgm4_popdef([pkg_default]) 88079384b2f3Smrgm4_popdef([pkg_description]) 88089384b2f3Smrg]) dnl PKG_NOARCH_INSTALLDIR 88099384b2f3Smrg 88109384b2f3Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 88119384b2f3Smrg# 88129384b2f3Smrg# This file is free software; the Free Software Foundation 88139384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 88149384b2f3Smrg# with or without modifications, as long as this notice is preserved. 88159384b2f3Smrg 88169384b2f3Smrg# AM_AUTOMAKE_VERSION(VERSION) 88179384b2f3Smrg# ---------------------------- 88189384b2f3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 88199384b2f3Smrg# generated from the m4 files accompanying Automake X.Y. 88209384b2f3Smrg# (This private macro should not be called outside this file.) 88219384b2f3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 88229384b2f3Smrg[am__api_version='1.13' 88239384b2f3Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 88249384b2f3Smrgdnl require some minimum version. Point them to the right macro. 88259384b2f3Smrgm4_if([$1], [1.13.1], [], 88269384b2f3Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 88279384b2f3Smrg]) 88289384b2f3Smrg 88299384b2f3Smrg# _AM_AUTOCONF_VERSION(VERSION) 88309384b2f3Smrg# ----------------------------- 88319384b2f3Smrg# aclocal traces this macro to find the Autoconf version. 88329384b2f3Smrg# This is a private macro too. Using m4_define simplifies 88339384b2f3Smrg# the logic in aclocal, which can simply ignore this definition. 88349384b2f3Smrgm4_define([_AM_AUTOCONF_VERSION], []) 88359384b2f3Smrg 88369384b2f3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 88379384b2f3Smrg# ------------------------------- 88389384b2f3Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 88399384b2f3Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 88409384b2f3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 88419384b2f3Smrg[AM_AUTOMAKE_VERSION([1.13.1])dnl 88429384b2f3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 88439384b2f3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 88449384b2f3Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 88459384b2f3Smrg 88469384b2f3Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 88479384b2f3Smrg 88489384b2f3Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 88499384b2f3Smrg# 88509384b2f3Smrg# This file is free software; the Free Software Foundation 88519384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 88529384b2f3Smrg# with or without modifications, as long as this notice is preserved. 88539384b2f3Smrg 88549384b2f3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 88559384b2f3Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 88569384b2f3Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 88579384b2f3Smrg# 88589384b2f3Smrg# Of course, Automake must honor this variable whenever it calls a 88599384b2f3Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 88609384b2f3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 88619384b2f3Smrg# depending on how configure is run. This is pretty annoying, since 88629384b2f3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 88639384b2f3Smrg# source directory, any form will work fine, but in subdirectories a 88649384b2f3Smrg# relative path needs to be adjusted first. 88659384b2f3Smrg# 88669384b2f3Smrg# $ac_aux_dir/missing 88679384b2f3Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 88689384b2f3Smrg# $top_srcdir/$ac_aux_dir/missing 88699384b2f3Smrg# fails if $ac_aux_dir is absolute, 88709384b2f3Smrg# fails when called from a subdirectory in a VPATH build with 88719384b2f3Smrg# a relative $ac_aux_dir 88729384b2f3Smrg# 88739384b2f3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 88749384b2f3Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88759384b2f3Smrg# harmless because $srcdir is '.', but things will broke when you 88769384b2f3Smrg# start a VPATH build or use an absolute $srcdir. 88779384b2f3Smrg# 88789384b2f3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 88799384b2f3Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 88809384b2f3Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 88819384b2f3Smrg# and then we would define $MISSING as 88829384b2f3Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 88839384b2f3Smrg# This will work as long as MISSING is not called from configure, because 88849384b2f3Smrg# unfortunately $(top_srcdir) has no meaning in configure. 88859384b2f3Smrg# However there are other variables, like CC, which are often used in 88869384b2f3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 88879384b2f3Smrg# 88889384b2f3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 88899384b2f3Smrg# absolute PATH. The drawback is that using absolute paths prevent a 88909384b2f3Smrg# configured tree to be moved without reconfiguration. 88919384b2f3Smrg 88929384b2f3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 88939384b2f3Smrg[dnl Rely on autoconf to set up CDPATH properly. 88949384b2f3SmrgAC_PREREQ([2.50])dnl 88959384b2f3Smrg# expand $ac_aux_dir to an absolute path 88969384b2f3Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 88979384b2f3Smrg]) 88989384b2f3Smrg 88999384b2f3Smrg# AM_CONDITIONAL -*- Autoconf -*- 89009384b2f3Smrg 89019384b2f3Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 89029384b2f3Smrg# 89039384b2f3Smrg# This file is free software; the Free Software Foundation 89049384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 89059384b2f3Smrg# with or without modifications, as long as this notice is preserved. 89069384b2f3Smrg 89079384b2f3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 89089384b2f3Smrg# ------------------------------------- 89099384b2f3Smrg# Define a conditional. 89109384b2f3SmrgAC_DEFUN([AM_CONDITIONAL], 89119384b2f3Smrg[AC_PREREQ([2.52])dnl 89129384b2f3Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 89139384b2f3Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 89149384b2f3SmrgAC_SUBST([$1_TRUE])dnl 89159384b2f3SmrgAC_SUBST([$1_FALSE])dnl 89169384b2f3Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 89179384b2f3Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 89189384b2f3Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 89199384b2f3Smrgif $2; then 89209384b2f3Smrg $1_TRUE= 89219384b2f3Smrg $1_FALSE='#' 89229384b2f3Smrgelse 89239384b2f3Smrg $1_TRUE='#' 89249384b2f3Smrg $1_FALSE= 89259384b2f3Smrgfi 89269384b2f3SmrgAC_CONFIG_COMMANDS_PRE( 89279384b2f3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 89289384b2f3Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 89299384b2f3SmrgUsually this means the macro was only invoked conditionally.]]) 89309384b2f3Smrgfi])]) 89319384b2f3Smrg 89329384b2f3Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 89339384b2f3Smrg# 89349384b2f3Smrg# This file is free software; the Free Software Foundation 89359384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 89369384b2f3Smrg# with or without modifications, as long as this notice is preserved. 89379384b2f3Smrg 89389384b2f3Smrg 89399384b2f3Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 89409384b2f3Smrg# written in clear, in which case automake, when reading aclocal.m4, 89419384b2f3Smrg# will think it sees a *use*, and therefore will trigger all it's 89429384b2f3Smrg# C support machinery. Also note that it means that autoscan, seeing 89439384b2f3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 89449384b2f3Smrg 89459384b2f3Smrg 89469384b2f3Smrg# _AM_DEPENDENCIES(NAME) 89479384b2f3Smrg# ---------------------- 89489384b2f3Smrg# See how the compiler implements dependency checking. 89499384b2f3Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 89509384b2f3Smrg# We try a few techniques and use that to set a single cache variable. 89519384b2f3Smrg# 89529384b2f3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 89539384b2f3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 89549384b2f3Smrg# dependency, and given that the user is not expected to run this macro, 89559384b2f3Smrg# just rely on AC_PROG_CC. 89569384b2f3SmrgAC_DEFUN([_AM_DEPENDENCIES], 89579384b2f3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 89589384b2f3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 89599384b2f3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 89609384b2f3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 89619384b2f3Smrg 89629384b2f3Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 89639384b2f3Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 89649384b2f3Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 89659384b2f3Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 89669384b2f3Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 89679384b2f3Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 89689384b2f3Smrg [depcc="$$1" am_compiler_list=]) 89699384b2f3Smrg 89709384b2f3SmrgAC_CACHE_CHECK([dependency style of $depcc], 89719384b2f3Smrg [am_cv_$1_dependencies_compiler_type], 89729384b2f3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 89739384b2f3Smrg # We make a subdir and do the tests there. Otherwise we can end up 89749384b2f3Smrg # making bogus files that we don't know about and never remove. For 89759384b2f3Smrg # instance it was reported that on HP-UX the gcc test will end up 89769384b2f3Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 89779384b2f3Smrg # in D". 89789384b2f3Smrg rm -rf conftest.dir 89799384b2f3Smrg mkdir conftest.dir 89809384b2f3Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 89819384b2f3Smrg # using a relative directory. 89829384b2f3Smrg cp "$am_depcomp" conftest.dir 89839384b2f3Smrg cd conftest.dir 89849384b2f3Smrg # We will build objects and dependencies in a subdirectory because 89859384b2f3Smrg # it helps to detect inapplicable dependency modes. For instance 89869384b2f3Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 89879384b2f3Smrg # side effect of compilation, but ICC will put the dependencies in 89889384b2f3Smrg # the current directory while Tru64 will put them in the object 89899384b2f3Smrg # directory. 89909384b2f3Smrg mkdir sub 89919384b2f3Smrg 89929384b2f3Smrg am_cv_$1_dependencies_compiler_type=none 89939384b2f3Smrg if test "$am_compiler_list" = ""; then 89949384b2f3Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 89959384b2f3Smrg fi 89969384b2f3Smrg am__universal=false 89979384b2f3Smrg m4_case([$1], [CC], 89989384b2f3Smrg [case " $depcc " in #( 89999384b2f3Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 90009384b2f3Smrg esac], 90019384b2f3Smrg [CXX], 90029384b2f3Smrg [case " $depcc " in #( 90039384b2f3Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 90049384b2f3Smrg esac]) 90059384b2f3Smrg 90069384b2f3Smrg for depmode in $am_compiler_list; do 90079384b2f3Smrg # Setup a source with many dependencies, because some compilers 90089384b2f3Smrg # like to wrap large dependency lists on column 80 (with \), and 90099384b2f3Smrg # we should not choose a depcomp mode which is confused by this. 90109384b2f3Smrg # 90119384b2f3Smrg # We need to recreate these files for each test, as the compiler may 90129384b2f3Smrg # overwrite some of them when testing with obscure command lines. 90139384b2f3Smrg # This happens at least with the AIX C compiler. 90149384b2f3Smrg : > sub/conftest.c 90159384b2f3Smrg for i in 1 2 3 4 5 6; do 90169384b2f3Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 90179384b2f3Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 90189384b2f3Smrg # Solaris 10 /bin/sh. 90199384b2f3Smrg echo '/* dummy */' > sub/conftst$i.h 90209384b2f3Smrg done 90219384b2f3Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 90229384b2f3Smrg 90239384b2f3Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 90249384b2f3Smrg # mode. It turns out that the SunPro C++ compiler does not properly 90259384b2f3Smrg # handle '-M -o', and we need to detect this. Also, some Intel 90269384b2f3Smrg # versions had trouble with output in subdirs. 90279384b2f3Smrg am__obj=sub/conftest.${OBJEXT-o} 90289384b2f3Smrg am__minus_obj="-o $am__obj" 90299384b2f3Smrg case $depmode in 90309384b2f3Smrg gcc) 90319384b2f3Smrg # This depmode causes a compiler race in universal mode. 90329384b2f3Smrg test "$am__universal" = false || continue 90339384b2f3Smrg ;; 90349384b2f3Smrg nosideeffect) 90359384b2f3Smrg # After this tag, mechanisms are not by side-effect, so they'll 90369384b2f3Smrg # only be used when explicitly requested. 90379384b2f3Smrg if test "x$enable_dependency_tracking" = xyes; then 90389384b2f3Smrg continue 90399384b2f3Smrg else 90409384b2f3Smrg break 90419384b2f3Smrg fi 90429384b2f3Smrg ;; 90439384b2f3Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 90449384b2f3Smrg # This compiler won't grok '-c -o', but also, the minuso test has 90459384b2f3Smrg # not run yet. These depmodes are late enough in the game, and 90469384b2f3Smrg # so weak that their functioning should not be impacted. 90479384b2f3Smrg am__obj=conftest.${OBJEXT-o} 90489384b2f3Smrg am__minus_obj= 90499384b2f3Smrg ;; 90509384b2f3Smrg none) break ;; 90519384b2f3Smrg esac 90529384b2f3Smrg if depmode=$depmode \ 90539384b2f3Smrg source=sub/conftest.c object=$am__obj \ 90549384b2f3Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 90559384b2f3Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 90569384b2f3Smrg >/dev/null 2>conftest.err && 90579384b2f3Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 90589384b2f3Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 90599384b2f3Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 90609384b2f3Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 90619384b2f3Smrg # icc doesn't choke on unknown options, it will just issue warnings 90629384b2f3Smrg # or remarks (even with -Werror). So we grep stderr for any message 90639384b2f3Smrg # that says an option was ignored or not supported. 90649384b2f3Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 90659384b2f3Smrg # icc: Command line warning: ignoring option '-M'; no argument required 90669384b2f3Smrg # The diagnosis changed in icc 8.0: 90679384b2f3Smrg # icc: Command line remark: option '-MP' not supported 90689384b2f3Smrg if (grep 'ignoring option' conftest.err || 90699384b2f3Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 90709384b2f3Smrg am_cv_$1_dependencies_compiler_type=$depmode 90719384b2f3Smrg break 90729384b2f3Smrg fi 90739384b2f3Smrg fi 90749384b2f3Smrg done 90759384b2f3Smrg 90769384b2f3Smrg cd .. 90779384b2f3Smrg rm -rf conftest.dir 90789384b2f3Smrgelse 90799384b2f3Smrg am_cv_$1_dependencies_compiler_type=none 90809384b2f3Smrgfi 90819384b2f3Smrg]) 90829384b2f3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 90839384b2f3SmrgAM_CONDITIONAL([am__fastdep$1], [ 90849384b2f3Smrg test "x$enable_dependency_tracking" != xno \ 90859384b2f3Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 90869384b2f3Smrg]) 90879384b2f3Smrg 90889384b2f3Smrg 90899384b2f3Smrg# AM_SET_DEPDIR 90909384b2f3Smrg# ------------- 90919384b2f3Smrg# Choose a directory name for dependency files. 90929384b2f3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 90939384b2f3SmrgAC_DEFUN([AM_SET_DEPDIR], 90949384b2f3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 90959384b2f3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 90969384b2f3Smrg]) 90979384b2f3Smrg 90989384b2f3Smrg 90999384b2f3Smrg# AM_DEP_TRACK 91009384b2f3Smrg# ------------ 91019384b2f3SmrgAC_DEFUN([AM_DEP_TRACK], 91029384b2f3Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 91039384b2f3SmrgAS_HELP_STRING( 91049384b2f3Smrg [--enable-dependency-tracking], 91059384b2f3Smrg [do not reject slow dependency extractors]) 91069384b2f3SmrgAS_HELP_STRING( 91079384b2f3Smrg [--disable-dependency-tracking], 91089384b2f3Smrg [speeds up one-time build])]) 91099384b2f3Smrgif test "x$enable_dependency_tracking" != xno; then 91109384b2f3Smrg am_depcomp="$ac_aux_dir/depcomp" 91119384b2f3Smrg AMDEPBACKSLASH='\' 91129384b2f3Smrg am__nodep='_no' 91139384b2f3Smrgfi 91149384b2f3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 91159384b2f3SmrgAC_SUBST([AMDEPBACKSLASH])dnl 91169384b2f3Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 91179384b2f3SmrgAC_SUBST([am__nodep])dnl 91189384b2f3Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 91199384b2f3Smrg]) 91209384b2f3Smrg 91219384b2f3Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 91229384b2f3Smrg 91239384b2f3Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 91249384b2f3Smrg# 91259384b2f3Smrg# This file is free software; the Free Software Foundation 91269384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 91279384b2f3Smrg# with or without modifications, as long as this notice is preserved. 91289384b2f3Smrg 91299384b2f3Smrg 91309384b2f3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 91319384b2f3Smrg# ------------------------------ 91329384b2f3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 91339384b2f3Smrg[{ 91349384b2f3Smrg # Older Autoconf quotes --file arguments for eval, but not when files 91359384b2f3Smrg # are listed without --file. Let's play safe and only enable the eval 91369384b2f3Smrg # if we detect the quoting. 91379384b2f3Smrg case $CONFIG_FILES in 91389384b2f3Smrg *\'*) eval set x "$CONFIG_FILES" ;; 91399384b2f3Smrg *) set x $CONFIG_FILES ;; 91409384b2f3Smrg esac 91419384b2f3Smrg shift 91429384b2f3Smrg for mf 91439384b2f3Smrg do 91449384b2f3Smrg # Strip MF so we end up with the name of the file. 91459384b2f3Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 91469384b2f3Smrg # Check whether this is an Automake generated Makefile or not. 91479384b2f3Smrg # We used to match only the files named 'Makefile.in', but 91489384b2f3Smrg # some people rename them; so instead we look at the file content. 91499384b2f3Smrg # Grep'ing the first line is not enough: some people post-process 91509384b2f3Smrg # each Makefile.in and add a new line on top of each file to say so. 91519384b2f3Smrg # Grep'ing the whole file is not good either: AIX grep has a line 91529384b2f3Smrg # limit of 2048, but all sed's we know have understand at least 4000. 91539384b2f3Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 91549384b2f3Smrg dirpart=`AS_DIRNAME("$mf")` 91559384b2f3Smrg else 91569384b2f3Smrg continue 91579384b2f3Smrg fi 91589384b2f3Smrg # Extract the definition of DEPDIR, am__include, and am__quote 91599384b2f3Smrg # from the Makefile without running 'make'. 91609384b2f3Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 91619384b2f3Smrg test -z "$DEPDIR" && continue 91629384b2f3Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 91639384b2f3Smrg test -z "am__include" && continue 91649384b2f3Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 91659384b2f3Smrg # Find all dependency output files, they are included files with 91669384b2f3Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 91679384b2f3Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 91689384b2f3Smrg # expansion. 91699384b2f3Smrg for file in `sed -n " 91709384b2f3Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 91719384b2f3Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 91729384b2f3Smrg # Make sure the directory exists. 91739384b2f3Smrg test -f "$dirpart/$file" && continue 91749384b2f3Smrg fdir=`AS_DIRNAME(["$file"])` 91759384b2f3Smrg AS_MKDIR_P([$dirpart/$fdir]) 91769384b2f3Smrg # echo "creating $dirpart/$file" 91779384b2f3Smrg echo '# dummy' > "$dirpart/$file" 91789384b2f3Smrg done 91799384b2f3Smrg done 91809384b2f3Smrg} 91819384b2f3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 91829384b2f3Smrg 91839384b2f3Smrg 91849384b2f3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 91859384b2f3Smrg# ----------------------------- 91869384b2f3Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 91879384b2f3Smrg# 91889384b2f3Smrg# This code is only required when automatic dependency tracking 91899384b2f3Smrg# is enabled. FIXME. This creates each '.P' file that we will 91909384b2f3Smrg# need in order to bootstrap the dependency handling code. 91919384b2f3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 91929384b2f3Smrg[AC_CONFIG_COMMANDS([depfiles], 91939384b2f3Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 91949384b2f3Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 91959384b2f3Smrg]) 91969384b2f3Smrg 91979384b2f3Smrg# Do all the work for Automake. -*- Autoconf -*- 91989384b2f3Smrg 91999384b2f3Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 92009384b2f3Smrg# 92019384b2f3Smrg# This file is free software; the Free Software Foundation 92029384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 92039384b2f3Smrg# with or without modifications, as long as this notice is preserved. 92049384b2f3Smrg 92059384b2f3Smrg# This macro actually does too much. Some checks are only needed if 92069384b2f3Smrg# your package does certain things. But this isn't really a big deal. 92079384b2f3Smrg 92089384b2f3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 92099384b2f3Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 92109384b2f3Smrg# ----------------------------------------------- 92119384b2f3Smrg# The call with PACKAGE and VERSION arguments is the old style 92129384b2f3Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 92139384b2f3Smrg# and VERSION should now be passed to AC_INIT and removed from 92149384b2f3Smrg# the call to AM_INIT_AUTOMAKE. 92159384b2f3Smrg# We support both call styles for the transition. After 92169384b2f3Smrg# the next Automake release, Autoconf can make the AC_INIT 92179384b2f3Smrg# arguments mandatory, and then we can depend on a new Autoconf 92189384b2f3Smrg# release and drop the old call support. 92199384b2f3SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 92209384b2f3Smrg[AC_PREREQ([2.65])dnl 92219384b2f3Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 92229384b2f3Smrgdnl the ones we care about. 92239384b2f3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 92249384b2f3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 92259384b2f3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 92269384b2f3Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 92279384b2f3Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 92289384b2f3Smrg # is not polluted with repeated "-I." 92299384b2f3Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 92309384b2f3Smrg # test to see if srcdir already configured 92319384b2f3Smrg if test -f $srcdir/config.status; then 92329384b2f3Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 92339384b2f3Smrg fi 92349384b2f3Smrgfi 92359384b2f3Smrg 92369384b2f3Smrg# test whether we have cygpath 92379384b2f3Smrgif test -z "$CYGPATH_W"; then 92389384b2f3Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 92399384b2f3Smrg CYGPATH_W='cygpath -w' 92409384b2f3Smrg else 92419384b2f3Smrg CYGPATH_W=echo 92429384b2f3Smrg fi 92439384b2f3Smrgfi 92449384b2f3SmrgAC_SUBST([CYGPATH_W]) 92459384b2f3Smrg 92469384b2f3Smrg# Define the identity of the package. 92479384b2f3Smrgdnl Distinguish between old-style and new-style calls. 92489384b2f3Smrgm4_ifval([$2], 92499384b2f3Smrg[AC_DIAGNOSE([obsolete], 92509384b2f3Smrg [$0: two- and three-arguments forms are deprecated.]) 92519384b2f3Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 92529384b2f3Smrg AC_SUBST([PACKAGE], [$1])dnl 92539384b2f3Smrg AC_SUBST([VERSION], [$2])], 92549384b2f3Smrg[_AM_SET_OPTIONS([$1])dnl 92559384b2f3Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 92569384b2f3Smrgm4_if( 92579384b2f3Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 92589384b2f3Smrg [ok:ok],, 92599384b2f3Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 92609384b2f3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 92619384b2f3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 92629384b2f3Smrg 92639384b2f3Smrg_AM_IF_OPTION([no-define],, 92649384b2f3Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 92659384b2f3Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 92669384b2f3Smrg 92679384b2f3Smrg# Some tools Automake needs. 92689384b2f3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 92699384b2f3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 92709384b2f3SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 92719384b2f3SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 92729384b2f3SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 92739384b2f3SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 92749384b2f3SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 92759384b2f3SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 92769384b2f3SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 92779384b2f3SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 92789384b2f3Smrg# For better backward compatibility. To be removed once Automake 1.9.x 92799384b2f3Smrg# dies out for good. For more background, see: 92809384b2f3Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 92819384b2f3Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 92829384b2f3SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 92839384b2f3Smrg# We need awk for the "check" target. The system "awk" is bad on 92849384b2f3Smrg# some platforms. 92859384b2f3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 92869384b2f3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 92879384b2f3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 92889384b2f3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 92899384b2f3Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 92909384b2f3Smrg [_AM_PROG_TAR([v7])])]) 92919384b2f3Smrg_AM_IF_OPTION([no-dependencies],, 92929384b2f3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 92939384b2f3Smrg [_AM_DEPENDENCIES([CC])], 92949384b2f3Smrg [m4_define([AC_PROG_CC], 92959384b2f3Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 92969384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 92979384b2f3Smrg [_AM_DEPENDENCIES([CXX])], 92989384b2f3Smrg [m4_define([AC_PROG_CXX], 92999384b2f3Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 93009384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 93019384b2f3Smrg [_AM_DEPENDENCIES([OBJC])], 93029384b2f3Smrg [m4_define([AC_PROG_OBJC], 93039384b2f3Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 93049384b2f3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 93059384b2f3Smrg [_AM_DEPENDENCIES([OBJCXX])], 93069384b2f3Smrg [m4_define([AC_PROG_OBJCXX], 93079384b2f3Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 93089384b2f3Smrg]) 93099384b2f3SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 93109384b2f3Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 93119384b2f3Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 93129384b2f3Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 93139384b2f3SmrgAC_CONFIG_COMMANDS_PRE(dnl 93149384b2f3Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 93159384b2f3Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 93169384b2f3Smrg]) 93179384b2f3Smrg 93189384b2f3Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 93199384b2f3Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 93209384b2f3Smrgdnl mangled by Autoconf and run in a shell conditional statement. 93219384b2f3Smrgm4_define([_AC_COMPILER_EXEEXT], 93229384b2f3Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 93239384b2f3Smrg 93249384b2f3Smrg 93259384b2f3Smrg# When config.status generates a header, we must update the stamp-h file. 93269384b2f3Smrg# This file resides in the same directory as the config header 93279384b2f3Smrg# that is generated. The stamp files are numbered to have different names. 93289384b2f3Smrg 93299384b2f3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 93309384b2f3Smrg# loop where config.status creates the headers, so we can generate 93319384b2f3Smrg# our stamp files there. 93329384b2f3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 93339384b2f3Smrg[# Compute $1's index in $config_headers. 93349384b2f3Smrg_am_arg=$1 93359384b2f3Smrg_am_stamp_count=1 93369384b2f3Smrgfor _am_header in $config_headers :; do 93379384b2f3Smrg case $_am_header in 93389384b2f3Smrg $_am_arg | $_am_arg:* ) 93399384b2f3Smrg break ;; 93409384b2f3Smrg * ) 93419384b2f3Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 93429384b2f3Smrg esac 93439384b2f3Smrgdone 93449384b2f3Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 93459384b2f3Smrg 93469384b2f3Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 93479384b2f3Smrg# 93489384b2f3Smrg# This file is free software; the Free Software Foundation 93499384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 93509384b2f3Smrg# with or without modifications, as long as this notice is preserved. 93519384b2f3Smrg 93529384b2f3Smrg# AM_PROG_INSTALL_SH 93539384b2f3Smrg# ------------------ 93549384b2f3Smrg# Define $install_sh. 93559384b2f3SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 93569384b2f3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 93579384b2f3Smrgif test x"${install_sh}" != xset; then 93589384b2f3Smrg case $am_aux_dir in 93599384b2f3Smrg *\ * | *\ *) 93609384b2f3Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 93619384b2f3Smrg *) 93629384b2f3Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 93639384b2f3Smrg esac 93649384b2f3Smrgfi 93659384b2f3SmrgAC_SUBST([install_sh])]) 93669384b2f3Smrg 93679384b2f3Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 93689384b2f3Smrg# 93699384b2f3Smrg# This file is free software; the Free Software Foundation 93709384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 93719384b2f3Smrg# with or without modifications, as long as this notice is preserved. 93729384b2f3Smrg 93739384b2f3Smrg# Check whether the underlying file-system supports filenames 93749384b2f3Smrg# with a leading dot. For instance MS-DOS doesn't. 93759384b2f3SmrgAC_DEFUN([AM_SET_LEADING_DOT], 93769384b2f3Smrg[rm -rf .tst 2>/dev/null 93779384b2f3Smrgmkdir .tst 2>/dev/null 93789384b2f3Smrgif test -d .tst; then 93799384b2f3Smrg am__leading_dot=. 93809384b2f3Smrgelse 93819384b2f3Smrg am__leading_dot=_ 93829384b2f3Smrgfi 93839384b2f3Smrgrmdir .tst 2>/dev/null 93849384b2f3SmrgAC_SUBST([am__leading_dot])]) 93859384b2f3Smrg 93869384b2f3Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 93879384b2f3Smrg# From Jim Meyering 93889384b2f3Smrg 93899384b2f3Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 93909384b2f3Smrg# 93919384b2f3Smrg# This file is free software; the Free Software Foundation 93929384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 93939384b2f3Smrg# with or without modifications, as long as this notice is preserved. 93949384b2f3Smrg 93959384b2f3Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 93969384b2f3Smrg# ---------------------------------- 93979384b2f3Smrg# Control maintainer-specific portions of Makefiles. 93989384b2f3Smrg# Default is to disable them, unless 'enable' is passed literally. 93999384b2f3Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 94009384b2f3Smrg# can override the default with the --enable/--disable switch. 94019384b2f3SmrgAC_DEFUN([AM_MAINTAINER_MODE], 94029384b2f3Smrg[m4_case(m4_default([$1], [disable]), 94039384b2f3Smrg [enable], [m4_define([am_maintainer_other], [disable])], 94049384b2f3Smrg [disable], [m4_define([am_maintainer_other], [enable])], 94059384b2f3Smrg [m4_define([am_maintainer_other], [enable]) 94069384b2f3Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 94079384b2f3SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 94089384b2f3Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 94099384b2f3Smrg AC_ARG_ENABLE([maintainer-mode], 94109384b2f3Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 94119384b2f3Smrg am_maintainer_other[ make rules and dependencies not useful 94129384b2f3Smrg (and sometimes confusing) to the casual installer])], 94139384b2f3Smrg [USE_MAINTAINER_MODE=$enableval], 94149384b2f3Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 94159384b2f3Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 94169384b2f3Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 94179384b2f3Smrg MAINT=$MAINTAINER_MODE_TRUE 94189384b2f3Smrg AC_SUBST([MAINT])dnl 94199384b2f3Smrg] 94209384b2f3Smrg) 94219384b2f3Smrg 94229384b2f3Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 94239384b2f3Smrg 94249384b2f3Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 94259384b2f3Smrg# 94269384b2f3Smrg# This file is free software; the Free Software Foundation 94279384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 94289384b2f3Smrg# with or without modifications, as long as this notice is preserved. 94299384b2f3Smrg 94309384b2f3Smrg# AM_MAKE_INCLUDE() 94319384b2f3Smrg# ----------------- 94329384b2f3Smrg# Check to see how make treats includes. 94339384b2f3SmrgAC_DEFUN([AM_MAKE_INCLUDE], 94349384b2f3Smrg[am_make=${MAKE-make} 94359384b2f3Smrgcat > confinc << 'END' 94369384b2f3Smrgam__doit: 94379384b2f3Smrg @echo this is the am__doit target 94389384b2f3Smrg.PHONY: am__doit 94399384b2f3SmrgEND 94409384b2f3Smrg# If we don't find an include directive, just comment out the code. 94419384b2f3SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 94429384b2f3Smrgam__include="#" 94439384b2f3Smrgam__quote= 94449384b2f3Smrg_am_result=none 94459384b2f3Smrg# First try GNU make style include. 94469384b2f3Smrgecho "include confinc" > confmf 94479384b2f3Smrg# Ignore all kinds of additional output from 'make'. 94489384b2f3Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 94499384b2f3Smrg*the\ am__doit\ target*) 94509384b2f3Smrg am__include=include 94519384b2f3Smrg am__quote= 94529384b2f3Smrg _am_result=GNU 94539384b2f3Smrg ;; 94549384b2f3Smrgesac 94559384b2f3Smrg# Now try BSD make style include. 94569384b2f3Smrgif test "$am__include" = "#"; then 94579384b2f3Smrg echo '.include "confinc"' > confmf 94589384b2f3Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 94599384b2f3Smrg *the\ am__doit\ target*) 94609384b2f3Smrg am__include=.include 94619384b2f3Smrg am__quote="\"" 94629384b2f3Smrg _am_result=BSD 94639384b2f3Smrg ;; 94649384b2f3Smrg esac 94659384b2f3Smrgfi 94669384b2f3SmrgAC_SUBST([am__include]) 94679384b2f3SmrgAC_SUBST([am__quote]) 94689384b2f3SmrgAC_MSG_RESULT([$_am_result]) 94699384b2f3Smrgrm -f confinc confmf 94709384b2f3Smrg]) 94719384b2f3Smrg 94729384b2f3Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 94739384b2f3Smrg 94749384b2f3Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 94759384b2f3Smrg# 94769384b2f3Smrg# This file is free software; the Free Software Foundation 94779384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 94789384b2f3Smrg# with or without modifications, as long as this notice is preserved. 94799384b2f3Smrg 94809384b2f3Smrg# AM_MISSING_PROG(NAME, PROGRAM) 94819384b2f3Smrg# ------------------------------ 94829384b2f3SmrgAC_DEFUN([AM_MISSING_PROG], 94839384b2f3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 94849384b2f3Smrg$1=${$1-"${am_missing_run}$2"} 94859384b2f3SmrgAC_SUBST($1)]) 94869384b2f3Smrg 94879384b2f3Smrg# AM_MISSING_HAS_RUN 94889384b2f3Smrg# ------------------ 94899384b2f3Smrg# Define MISSING if not defined so far and test if it is modern enough. 94909384b2f3Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 94919384b2f3SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 94929384b2f3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 94939384b2f3SmrgAC_REQUIRE_AUX_FILE([missing])dnl 94949384b2f3Smrgif test x"${MISSING+set}" != xset; then 94959384b2f3Smrg case $am_aux_dir in 94969384b2f3Smrg *\ * | *\ *) 94979384b2f3Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 94989384b2f3Smrg *) 94999384b2f3Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 95009384b2f3Smrg esac 95019384b2f3Smrgfi 95029384b2f3Smrg# Use eval to expand $SHELL 95039384b2f3Smrgif eval "$MISSING --is-lightweight"; then 95049384b2f3Smrg am_missing_run="$MISSING " 95059384b2f3Smrgelse 95069384b2f3Smrg am_missing_run= 95079384b2f3Smrg AC_MSG_WARN(['missing' script is too old or missing]) 95089384b2f3Smrgfi 95099384b2f3Smrg]) 95109384b2f3Smrg 95119384b2f3Smrg# Helper functions for option handling. -*- Autoconf -*- 95129384b2f3Smrg 95139384b2f3Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 95149384b2f3Smrg# 95159384b2f3Smrg# This file is free software; the Free Software Foundation 95169384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 95179384b2f3Smrg# with or without modifications, as long as this notice is preserved. 95189384b2f3Smrg 95199384b2f3Smrg# _AM_MANGLE_OPTION(NAME) 95209384b2f3Smrg# ----------------------- 95219384b2f3SmrgAC_DEFUN([_AM_MANGLE_OPTION], 95229384b2f3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 95239384b2f3Smrg 95249384b2f3Smrg# _AM_SET_OPTION(NAME) 95259384b2f3Smrg# -------------------- 95269384b2f3Smrg# Set option NAME. Presently that only means defining a flag for this option. 95279384b2f3SmrgAC_DEFUN([_AM_SET_OPTION], 95289384b2f3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 9529966bf024Smrg 95309384b2f3Smrg# _AM_SET_OPTIONS(OPTIONS) 95319384b2f3Smrg# ------------------------ 95329384b2f3Smrg# OPTIONS is a space-separated list of Automake options. 95339384b2f3SmrgAC_DEFUN([_AM_SET_OPTIONS], 95349384b2f3Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9535966bf024Smrg 95369384b2f3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 95379384b2f3Smrg# ------------------------------------------- 95389384b2f3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 95399384b2f3SmrgAC_DEFUN([_AM_IF_OPTION], 95409384b2f3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9541966bf024Smrg 95429384b2f3Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9543966bf024Smrg 95449384b2f3Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 95459384b2f3Smrg# 95469384b2f3Smrg# This file is free software; the Free Software Foundation 95479384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 95489384b2f3Smrg# with or without modifications, as long as this notice is preserved. 9549966bf024Smrg 95509384b2f3Smrg# AM_SANITY_CHECK 95519384b2f3Smrg# --------------- 95529384b2f3SmrgAC_DEFUN([AM_SANITY_CHECK], 95539384b2f3Smrg[AC_MSG_CHECKING([whether build environment is sane]) 95549384b2f3Smrg# Reject unsafe characters in $srcdir or the absolute working directory 95559384b2f3Smrg# name. Accept space and tab only in the latter. 95569384b2f3Smrgam_lf=' 95579384b2f3Smrg' 95589384b2f3Smrgcase `pwd` in 95599384b2f3Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 95609384b2f3Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 95619384b2f3Smrgesac 95629384b2f3Smrgcase $srcdir in 95639384b2f3Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 95649384b2f3Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 95659384b2f3Smrgesac 9566966bf024Smrg 95679384b2f3Smrg# Do 'set' in a subshell so we don't clobber the current shell's 95689384b2f3Smrg# arguments. Must try -L first in case configure is actually a 95699384b2f3Smrg# symlink; some systems play weird games with the mod time of symlinks 95709384b2f3Smrg# (eg FreeBSD returns the mod time of the symlink's containing 95719384b2f3Smrg# directory). 95729384b2f3Smrgif ( 95739384b2f3Smrg am_has_slept=no 95749384b2f3Smrg for am_try in 1 2; do 95759384b2f3Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 95769384b2f3Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 95779384b2f3Smrg if test "$[*]" = "X"; then 95789384b2f3Smrg # -L didn't work. 95799384b2f3Smrg set X `ls -t "$srcdir/configure" conftest.file` 95809384b2f3Smrg fi 95819384b2f3Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 95829384b2f3Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 95839384b2f3Smrg 95849384b2f3Smrg # If neither matched, then we have a broken ls. This can happen 95859384b2f3Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 95869384b2f3Smrg # broken ls alias from the environment. This has actually 95879384b2f3Smrg # happened. Such a system could not be considered "sane". 95889384b2f3Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 95899384b2f3Smrg alias in your environment]) 95909384b2f3Smrg fi 95919384b2f3Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 95929384b2f3Smrg break 95939384b2f3Smrg fi 95949384b2f3Smrg # Just in case. 95959384b2f3Smrg sleep 1 95969384b2f3Smrg am_has_slept=yes 95979384b2f3Smrg done 95989384b2f3Smrg test "$[2]" = conftest.file 95999384b2f3Smrg ) 96009384b2f3Smrgthen 96019384b2f3Smrg # Ok. 96029384b2f3Smrg : 96039384b2f3Smrgelse 96049384b2f3Smrg AC_MSG_ERROR([newly created file is older than distributed files! 96059384b2f3SmrgCheck your system clock]) 96069384b2f3Smrgfi 96079384b2f3SmrgAC_MSG_RESULT([yes]) 96089384b2f3Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 96099384b2f3Smrg# generated files are strictly newer. 96109384b2f3Smrgam_sleep_pid= 96119384b2f3Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 96129384b2f3Smrg ( sleep 1 ) & 96139384b2f3Smrg am_sleep_pid=$! 96149384b2f3Smrgfi 96159384b2f3SmrgAC_CONFIG_COMMANDS_PRE( 96169384b2f3Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 96179384b2f3Smrg if test -n "$am_sleep_pid"; then 96189384b2f3Smrg # Hide warnings about reused PIDs. 96199384b2f3Smrg wait $am_sleep_pid 2>/dev/null 96209384b2f3Smrg fi 96219384b2f3Smrg AC_MSG_RESULT([done])]) 96229384b2f3Smrgrm -f conftest.file 96239384b2f3Smrg]) 9624966bf024Smrg 96259384b2f3Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 96269384b2f3Smrg# 96279384b2f3Smrg# This file is free software; the Free Software Foundation 96289384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 96299384b2f3Smrg# with or without modifications, as long as this notice is preserved. 9630966bf024Smrg 96319384b2f3Smrg# AM_SILENT_RULES([DEFAULT]) 96329384b2f3Smrg# -------------------------- 96339384b2f3Smrg# Enable less verbose build rules; with the default set to DEFAULT 96349384b2f3Smrg# ("yes" being less verbose, "no" or empty being verbose). 96359384b2f3SmrgAC_DEFUN([AM_SILENT_RULES], 96369384b2f3Smrg[AC_ARG_ENABLE([silent-rules], [dnl 96379384b2f3SmrgAS_HELP_STRING( 96389384b2f3Smrg [--enable-silent-rules], 96399384b2f3Smrg [less verbose build output (undo: "make V=1")]) 96409384b2f3SmrgAS_HELP_STRING( 96419384b2f3Smrg [--disable-silent-rules], 96429384b2f3Smrg [verbose build output (undo: "make V=0")])dnl 96439384b2f3Smrg]) 96449384b2f3Smrgcase $enable_silent_rules in @%:@ ((( 96459384b2f3Smrg yes) AM_DEFAULT_VERBOSITY=0;; 96469384b2f3Smrg no) AM_DEFAULT_VERBOSITY=1;; 96479384b2f3Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 96489384b2f3Smrgesac 96499384b2f3Smrgdnl 96509384b2f3Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 96519384b2f3Smrgdnl do not support nested variable expansions. 96529384b2f3Smrgdnl See automake bug#9928 and bug#10237. 96539384b2f3Smrgam_make=${MAKE-make} 96549384b2f3SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 96559384b2f3Smrg [am_cv_make_support_nested_variables], 96569384b2f3Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 96579384b2f3SmrgBAR0=false 96589384b2f3SmrgBAR1=true 96599384b2f3SmrgV=1 96609384b2f3Smrgam__doit: 96619384b2f3Smrg @$(TRUE) 96629384b2f3Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 96639384b2f3Smrg am_cv_make_support_nested_variables=yes 96649384b2f3Smrgelse 96659384b2f3Smrg am_cv_make_support_nested_variables=no 96669384b2f3Smrgfi]) 96679384b2f3Smrgif test $am_cv_make_support_nested_variables = yes; then 96689384b2f3Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 96699384b2f3Smrg AM_V='$(V)' 96709384b2f3Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 96719384b2f3Smrgelse 96729384b2f3Smrg AM_V=$AM_DEFAULT_VERBOSITY 96739384b2f3Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 96749384b2f3Smrgfi 96759384b2f3SmrgAC_SUBST([AM_V])dnl 96769384b2f3SmrgAM_SUBST_NOTMAKE([AM_V])dnl 96779384b2f3SmrgAC_SUBST([AM_DEFAULT_V])dnl 96789384b2f3SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 96799384b2f3SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 96809384b2f3SmrgAM_BACKSLASH='\' 96819384b2f3SmrgAC_SUBST([AM_BACKSLASH])dnl 96829384b2f3Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 96839384b2f3Smrg]) 9684966bf024Smrg 96859384b2f3Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 96869384b2f3Smrg# 96879384b2f3Smrg# This file is free software; the Free Software Foundation 96889384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 96899384b2f3Smrg# with or without modifications, as long as this notice is preserved. 9690966bf024Smrg 96919384b2f3Smrg# AM_PROG_INSTALL_STRIP 96929384b2f3Smrg# --------------------- 96939384b2f3Smrg# One issue with vendor 'install' (even GNU) is that you can't 96949384b2f3Smrg# specify the program used to strip binaries. This is especially 96959384b2f3Smrg# annoying in cross-compiling environments, where the build's strip 96969384b2f3Smrg# is unlikely to handle the host's binaries. 96979384b2f3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 96989384b2f3Smrg# always use install-sh in "make install-strip", and initialize 96999384b2f3Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 97009384b2f3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 97019384b2f3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 97029384b2f3Smrg# Installed binaries are usually stripped using 'strip' when the user 97039384b2f3Smrg# run "make install-strip". However 'strip' might not be the right 97049384b2f3Smrg# tool to use in cross-compilation environments, therefore Automake 97059384b2f3Smrg# will honor the 'STRIP' environment variable to overrule this program. 97069384b2f3Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 97079384b2f3Smrgif test "$cross_compiling" != no; then 97089384b2f3Smrg AC_CHECK_TOOL([STRIP], [strip], :) 97099384b2f3Smrgfi 97109384b2f3SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 97119384b2f3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9712966bf024Smrg 97139384b2f3Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 97149384b2f3Smrg# 97159384b2f3Smrg# This file is free software; the Free Software Foundation 97169384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 97179384b2f3Smrg# with or without modifications, as long as this notice is preserved. 9718966bf024Smrg 97199384b2f3Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 97209384b2f3Smrg# --------------------------- 97219384b2f3Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 97229384b2f3Smrg# This macro is traced by Automake. 97239384b2f3SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9724966bf024Smrg 97259384b2f3Smrg# AM_SUBST_NOTMAKE(VARIABLE) 97269384b2f3Smrg# -------------------------- 97279384b2f3Smrg# Public sister of _AM_SUBST_NOTMAKE. 97289384b2f3SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9729966bf024Smrg 97309384b2f3Smrg# Check how to create a tarball. -*- Autoconf -*- 9731966bf024Smrg 97329384b2f3Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 97339384b2f3Smrg# 97349384b2f3Smrg# This file is free software; the Free Software Foundation 97359384b2f3Smrg# gives unlimited permission to copy and/or distribute it, 97369384b2f3Smrg# with or without modifications, as long as this notice is preserved. 9737966bf024Smrg 97389384b2f3Smrg# _AM_PROG_TAR(FORMAT) 97399384b2f3Smrg# -------------------- 97409384b2f3Smrg# Check how to create a tarball in format FORMAT. 97419384b2f3Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 97429384b2f3Smrg# 97439384b2f3Smrg# Substitute a variable $(am__tar) that is a command 97449384b2f3Smrg# writing to stdout a FORMAT-tarball containing the directory 97459384b2f3Smrg# $tardir. 97469384b2f3Smrg# tardir=directory && $(am__tar) > result.tar 97479384b2f3Smrg# 97489384b2f3Smrg# Substitute a variable $(am__untar) that extract such 97499384b2f3Smrg# a tarball read from stdin. 97509384b2f3Smrg# $(am__untar) < result.tar 97519384b2f3SmrgAC_DEFUN([_AM_PROG_TAR], 97529384b2f3Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 97539384b2f3Smrg# in the wild :-( We should find a proper way to deprecate it ... 97549384b2f3SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 97559384b2f3Smrgm4_if([$1], [v7], 97569384b2f3Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 97579384b2f3Smrg [m4_case([$1], [ustar],, [pax],, 97589384b2f3Smrg [m4_fatal([Unknown tar format])]) 97599384b2f3SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 97609384b2f3Smrg# Loop over all known methods to create a tar archive until one works. 97619384b2f3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 97629384b2f3Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 97639384b2f3Smrg# Do not fold the above two line into one, because Tru64 sh and 97649384b2f3Smrg# Solaris sh will not grok spaces in the rhs of '-'. 97659384b2f3Smrgfor _am_tool in $_am_tools 97669384b2f3Smrgdo 97679384b2f3Smrg case $_am_tool in 97689384b2f3Smrg gnutar) 97699384b2f3Smrg for _am_tar in tar gnutar gtar; 97709384b2f3Smrg do 97719384b2f3Smrg AM_RUN_LOG([$_am_tar --version]) && break 97729384b2f3Smrg done 97739384b2f3Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 97749384b2f3Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 97759384b2f3Smrg am__untar="$_am_tar -xf -" 97769384b2f3Smrg ;; 97779384b2f3Smrg plaintar) 97789384b2f3Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 97799384b2f3Smrg # ustar tarball either. 97809384b2f3Smrg (tar --version) >/dev/null 2>&1 && continue 97819384b2f3Smrg am__tar='tar chf - "$$tardir"' 97829384b2f3Smrg am__tar_='tar chf - "$tardir"' 97839384b2f3Smrg am__untar='tar xf -' 97849384b2f3Smrg ;; 97859384b2f3Smrg pax) 97869384b2f3Smrg am__tar='pax -L -x $1 -w "$$tardir"' 97879384b2f3Smrg am__tar_='pax -L -x $1 -w "$tardir"' 97889384b2f3Smrg am__untar='pax -r' 97899384b2f3Smrg ;; 97909384b2f3Smrg cpio) 97919384b2f3Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 97929384b2f3Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 97939384b2f3Smrg am__untar='cpio -i -H $1 -d' 97949384b2f3Smrg ;; 97959384b2f3Smrg none) 97969384b2f3Smrg am__tar=false 97979384b2f3Smrg am__tar_=false 97989384b2f3Smrg am__untar=false 97999384b2f3Smrg ;; 98009384b2f3Smrg esac 9801966bf024Smrg 98029384b2f3Smrg # If the value was cached, stop now. We just wanted to have am__tar 98039384b2f3Smrg # and am__untar set. 98049384b2f3Smrg test -n "${am_cv_prog_tar_$1}" && break 9805966bf024Smrg 98069384b2f3Smrg # tar/untar a dummy directory, and stop if the command works 98079384b2f3Smrg rm -rf conftest.dir 98089384b2f3Smrg mkdir conftest.dir 98099384b2f3Smrg echo GrepMe > conftest.dir/file 98109384b2f3Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 98119384b2f3Smrg rm -rf conftest.dir 98129384b2f3Smrg if test -s conftest.tar; then 98139384b2f3Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 98149384b2f3Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9815966bf024Smrg fi 98169384b2f3Smrgdone 98179384b2f3Smrgrm -rf conftest.dir 9818966bf024Smrg 98199384b2f3SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 98209384b2f3SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 98219384b2f3SmrgAC_SUBST([am__tar]) 98229384b2f3SmrgAC_SUBST([am__untar]) 98239384b2f3Smrg]) # _AM_PROG_TAR 98249384b2f3Smrg 98259384b2f3Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98269384b2f3Smrgdnl 98279384b2f3Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 98289384b2f3Smrgdnl 98299384b2f3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 98309384b2f3Smrgdnl copy of this software and associated documentation files (the "Software"), 98319384b2f3Smrgdnl to deal in the Software without restriction, including without limitation 98329384b2f3Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 98339384b2f3Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 98349384b2f3Smrgdnl Software is furnished to do so, subject to the following conditions: 98359384b2f3Smrgdnl 98369384b2f3Smrgdnl The above copyright notice and this permission notice (including the next 98379384b2f3Smrgdnl paragraph) shall be included in all copies or substantial portions of the 98389384b2f3Smrgdnl Software. 98399384b2f3Smrgdnl 98409384b2f3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 98419384b2f3Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 98429384b2f3Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 98439384b2f3Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98449384b2f3Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 98459384b2f3Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 98469384b2f3Smrgdnl DEALINGS IN THE SOFTWARE. 98479384b2f3Smrg 98489384b2f3Smrg# XORG_MACROS_VERSION(required-version) 98499384b2f3Smrg# ------------------------------------- 98509384b2f3Smrg# Minimum version: 1.1.0 9851966bf024Smrg# 98529384b2f3Smrg# If you're using a macro added in Version 1.1 or newer, include this in 98539384b2f3Smrg# your configure.ac with the minimum required version, such as: 98549384b2f3Smrg# XORG_MACROS_VERSION(1.1) 9855966bf024Smrg# 98569384b2f3Smrg# To ensure that this macro is defined, also add: 98579384b2f3Smrg# m4_ifndef([XORG_MACROS_VERSION], 98589384b2f3Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 98599384b2f3Smrg# 98609384b2f3Smrg# 98619384b2f3Smrg# See the "minimum version" comment for each macro you use to see what 98629384b2f3Smrg# version you require. 98639384b2f3Smrgm4_defun([XORG_MACROS_VERSION],[ 98649384b2f3Smrgm4_define([vers_have], [1.17]) 98659384b2f3Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 98669384b2f3Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 98679384b2f3Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 98689384b2f3Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 98699384b2f3Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 98709384b2f3Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 98719384b2f3Smrgm4_undefine([vers_have]) 98729384b2f3Smrgm4_undefine([maj_have]) 98739384b2f3Smrgm4_undefine([maj_needed]) 98749384b2f3Smrg]) # XORG_MACROS_VERSION 98759384b2f3Smrg 98769384b2f3Smrg# XORG_PROG_RAWCPP() 98779384b2f3Smrg# ------------------ 98789384b2f3Smrg# Minimum version: 1.0.0 98799384b2f3Smrg# 98809384b2f3Smrg# Find cpp program and necessary flags for use in pre-processing text files 98819384b2f3Smrg# such as man pages and config files 98829384b2f3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 98839384b2f3SmrgAC_REQUIRE([AC_PROG_CPP]) 98849384b2f3SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 98859384b2f3Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 98869384b2f3Smrg 98879384b2f3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 98889384b2f3Smrg# which is not the best choice for supporting other OS'es, but covers most 98899384b2f3Smrg# of the ones we need for now. 98909384b2f3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 98919384b2f3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 98929384b2f3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98939384b2f3Smrg AC_MSG_RESULT([no]) 98949384b2f3Smrgelse 98959384b2f3Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98969384b2f3Smrg RAWCPPFLAGS=-undef 98979384b2f3Smrg AC_MSG_RESULT([yes]) 98989384b2f3Smrg # under Cygwin unix is still defined even with -undef 98999384b2f3Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99009384b2f3Smrg RAWCPPFLAGS="-undef -ansi" 99019384b2f3Smrg AC_MSG_RESULT([yes, with -ansi]) 99029384b2f3Smrg else 99039384b2f3Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99049384b2f3Smrg fi 9905966bf024Smrgfi 99069384b2f3Smrgrm -f conftest.$ac_ext 9907966bf024Smrg 99089384b2f3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99099384b2f3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99109384b2f3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99119384b2f3Smrg AC_MSG_RESULT([no]) 99129384b2f3Smrgelse 99139384b2f3Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99149384b2f3Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 99159384b2f3Smrg AC_MSG_RESULT([yes]) 99169384b2f3Smrg else 99179384b2f3Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 99189384b2f3Smrg fi 99199384b2f3Smrgfi 99209384b2f3Smrgrm -f conftest.$ac_ext 99219384b2f3SmrgAC_SUBST(RAWCPPFLAGS) 99229384b2f3Smrg]) # XORG_PROG_RAWCPP 9923966bf024Smrg 99249384b2f3Smrg# XORG_MANPAGE_SECTIONS() 99259384b2f3Smrg# ----------------------- 99269384b2f3Smrg# Minimum version: 1.0.0 99279384b2f3Smrg# 99289384b2f3Smrg# Determine which sections man pages go in for the different man page types 99299384b2f3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 99309384b2f3Smrg# Not sure if there's any better way than just hardcoding by OS name. 99319384b2f3Smrg# Override default settings by setting environment variables 99329384b2f3Smrg# Added MAN_SUBSTS in version 1.8 99339384b2f3Smrg# Added AC_PROG_SED in version 1.8 99349384b2f3Smrg 99359384b2f3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 99369384b2f3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 99379384b2f3SmrgAC_REQUIRE([AC_PROG_SED]) 99389384b2f3Smrg 99399384b2f3Smrgif test x$APP_MAN_SUFFIX = x ; then 99409384b2f3Smrg APP_MAN_SUFFIX=1 99419384b2f3Smrgfi 99429384b2f3Smrgif test x$APP_MAN_DIR = x ; then 99439384b2f3Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 99449384b2f3Smrgfi 9945966bf024Smrg 99469384b2f3Smrgif test x$LIB_MAN_SUFFIX = x ; then 99479384b2f3Smrg LIB_MAN_SUFFIX=3 99489384b2f3Smrgfi 99499384b2f3Smrgif test x$LIB_MAN_DIR = x ; then 99509384b2f3Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 99519384b2f3Smrgfi 9952966bf024Smrg 99539384b2f3Smrgif test x$FILE_MAN_SUFFIX = x ; then 99549384b2f3Smrg case $host_os in 99559384b2f3Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 99569384b2f3Smrg *) FILE_MAN_SUFFIX=5 ;; 99579384b2f3Smrg esac 99589384b2f3Smrgfi 99599384b2f3Smrgif test x$FILE_MAN_DIR = x ; then 99609384b2f3Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 99619384b2f3Smrgfi 9962966bf024Smrg 99639384b2f3Smrgif test x$MISC_MAN_SUFFIX = x ; then 9964966bf024Smrg case $host_os in 99659384b2f3Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 99669384b2f3Smrg *) MISC_MAN_SUFFIX=7 ;; 99679384b2f3Smrg esac 99689384b2f3Smrgfi 99699384b2f3Smrgif test x$MISC_MAN_DIR = x ; then 99709384b2f3Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 99719384b2f3Smrgfi 9972966bf024Smrg 99739384b2f3Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 99749384b2f3Smrg case $host_os in 99759384b2f3Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 99769384b2f3Smrg *) DRIVER_MAN_SUFFIX=4 ;; 99779384b2f3Smrg esac 99789384b2f3Smrgfi 99799384b2f3Smrgif test x$DRIVER_MAN_DIR = x ; then 99809384b2f3Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 99819384b2f3Smrgfi 9982966bf024Smrg 99839384b2f3Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 99849384b2f3Smrg case $host_os in 99859384b2f3Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 99869384b2f3Smrg *) ADMIN_MAN_SUFFIX=8 ;; 99879384b2f3Smrg esac 99889384b2f3Smrgfi 99899384b2f3Smrgif test x$ADMIN_MAN_DIR = x ; then 99909384b2f3Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 99919384b2f3Smrgfi 9992966bf024Smrg 9993966bf024Smrg 99949384b2f3SmrgAC_SUBST([APP_MAN_SUFFIX]) 99959384b2f3SmrgAC_SUBST([LIB_MAN_SUFFIX]) 99969384b2f3SmrgAC_SUBST([FILE_MAN_SUFFIX]) 99979384b2f3SmrgAC_SUBST([MISC_MAN_SUFFIX]) 99989384b2f3SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 99999384b2f3SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100009384b2f3SmrgAC_SUBST([APP_MAN_DIR]) 100019384b2f3SmrgAC_SUBST([LIB_MAN_DIR]) 100029384b2f3SmrgAC_SUBST([FILE_MAN_DIR]) 100039384b2f3SmrgAC_SUBST([MISC_MAN_DIR]) 100049384b2f3SmrgAC_SUBST([DRIVER_MAN_DIR]) 100059384b2f3SmrgAC_SUBST([ADMIN_MAN_DIR]) 100069384b2f3Smrg 100079384b2f3SmrgXORG_MAN_PAGE="X Version 11" 100089384b2f3SmrgAC_SUBST([XORG_MAN_PAGE]) 100099384b2f3SmrgMAN_SUBSTS="\ 100109384b2f3Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100119384b2f3Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100129384b2f3Smrg -e 's|__xservername__|Xorg|g' \ 100139384b2f3Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 100149384b2f3Smrg -e 's|__projectroot__|\$(prefix)|g' \ 100159384b2f3Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 100169384b2f3Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 100179384b2f3Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 100189384b2f3Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 100199384b2f3Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 100209384b2f3Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 100219384b2f3Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 100229384b2f3SmrgAC_SUBST([MAN_SUBSTS]) 100239384b2f3Smrg 100249384b2f3Smrg]) # XORG_MANPAGE_SECTIONS 100259384b2f3Smrg 100269384b2f3Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 100279384b2f3Smrg# ------------------------ 100289384b2f3Smrg# Minimum version: 1.7.0 100299384b2f3Smrg# 100309384b2f3Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 100319384b2f3Smrg# provided by xorg-sgml-doctools, if installed. 100329384b2f3SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 100339384b2f3SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 100349384b2f3SmrgXORG_SGML_PATH= 100359384b2f3SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 100369384b2f3Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 100379384b2f3Smrg [m4_ifval([$1],[:], 100389384b2f3Smrg [if test x"$cross_compiling" != x"yes" ; then 100399384b2f3Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 100409384b2f3Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 100419384b2f3Smrg fi]) 100429384b2f3Smrg ]) 10043966bf024Smrg 100449384b2f3Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 100459384b2f3Smrg# the path and the name of the doc stylesheet 100469384b2f3Smrgif test "x$XORG_SGML_PATH" != "x" ; then 100479384b2f3Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 100489384b2f3Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 100499384b2f3Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 100509384b2f3Smrgelse 100519384b2f3Smrg AC_MSG_RESULT([no]) 100529384b2f3Smrgfi 10053966bf024Smrg 100549384b2f3SmrgAC_SUBST(XORG_SGML_PATH) 100559384b2f3SmrgAC_SUBST(STYLESHEET_SRCDIR) 100569384b2f3SmrgAC_SUBST(XSL_STYLESHEET) 100579384b2f3SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 100589384b2f3Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10059966bf024Smrg 100609384b2f3Smrg# XORG_CHECK_LINUXDOC 100619384b2f3Smrg# ------------------- 100629384b2f3Smrg# Minimum version: 1.0.0 100639384b2f3Smrg# 100649384b2f3Smrg# Defines the variable MAKE_TEXT if the necessary tools and 100659384b2f3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 100669384b2f3Smrg# Whether or not the necessary tools and files are found can be checked 100679384b2f3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 100689384b2f3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 100699384b2f3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 100709384b2f3SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10071966bf024Smrg 100729384b2f3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10073966bf024Smrg 100749384b2f3SmrgAC_MSG_CHECKING([whether to build documentation]) 10075966bf024Smrg 100769384b2f3Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 100779384b2f3Smrg BUILDDOC=yes 100789384b2f3Smrgelse 100799384b2f3Smrg BUILDDOC=no 100809384b2f3Smrgfi 10081966bf024Smrg 100829384b2f3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10083966bf024Smrg 100849384b2f3SmrgAC_MSG_RESULT([$BUILDDOC]) 10085966bf024Smrg 100869384b2f3SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10087966bf024Smrg 100889384b2f3Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 100899384b2f3Smrg BUILDPDFDOC=yes 100909384b2f3Smrgelse 100919384b2f3Smrg BUILDPDFDOC=no 100929384b2f3Smrgfi 10093966bf024Smrg 100949384b2f3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10095966bf024Smrg 100969384b2f3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10097966bf024Smrg 100989384b2f3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 100999384b2f3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101009384b2f3SmrgMAKE_PDF="$PS2PDF" 101019384b2f3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10102966bf024Smrg 101039384b2f3SmrgAC_SUBST(MAKE_TEXT) 101049384b2f3SmrgAC_SUBST(MAKE_PS) 101059384b2f3SmrgAC_SUBST(MAKE_PDF) 101069384b2f3SmrgAC_SUBST(MAKE_HTML) 101079384b2f3Smrg]) # XORG_CHECK_LINUXDOC 10108966bf024Smrg 101099384b2f3Smrg# XORG_CHECK_DOCBOOK 101109384b2f3Smrg# ------------------- 101119384b2f3Smrg# Minimum version: 1.0.0 101129384b2f3Smrg# 101139384b2f3Smrg# Checks for the ability to build output formats from SGML DocBook source. 101149384b2f3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 101159384b2f3Smrg# indicates whether the necessary tools and files are found and, if set, 101169384b2f3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 101179384b2f3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 101189384b2f3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101199384b2f3Smrg 101209384b2f3SmrgBUILDTXTDOC=no 101219384b2f3SmrgBUILDPDFDOC=no 101229384b2f3SmrgBUILDPSDOC=no 101239384b2f3SmrgBUILDHTMLDOC=no 101249384b2f3Smrg 101259384b2f3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 101269384b2f3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 101279384b2f3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 101289384b2f3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 101299384b2f3Smrg 101309384b2f3SmrgAC_MSG_CHECKING([whether to build text documentation]) 101319384b2f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 101329384b2f3Smrg test x$BUILD_TXTDOC != xno; then 101339384b2f3Smrg BUILDTXTDOC=yes 101349384b2f3Smrgfi 101359384b2f3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 101369384b2f3SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10137966bf024Smrg 101389384b2f3SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 101399384b2f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 101409384b2f3Smrg test x$BUILD_PDFDOC != xno; then 101419384b2f3Smrg BUILDPDFDOC=yes 101429384b2f3Smrgfi 101439384b2f3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101449384b2f3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10145966bf024Smrg 101469384b2f3SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 101479384b2f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 101489384b2f3Smrg test x$BUILD_PSDOC != xno; then 101499384b2f3Smrg BUILDPSDOC=yes 101509384b2f3Smrgfi 101519384b2f3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 101529384b2f3SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10153966bf024Smrg 101549384b2f3SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 101559384b2f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 101569384b2f3Smrg test x$BUILD_HTMLDOC != xno; then 101579384b2f3Smrg BUILDHTMLDOC=yes 101589384b2f3Smrgfi 101599384b2f3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 101609384b2f3SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10161966bf024Smrg 101629384b2f3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 101639384b2f3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 101649384b2f3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 101659384b2f3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 101669384b2f3Smrg 101679384b2f3SmrgAC_SUBST(MAKE_TEXT) 101689384b2f3SmrgAC_SUBST(MAKE_PS) 101699384b2f3SmrgAC_SUBST(MAKE_PDF) 101709384b2f3SmrgAC_SUBST(MAKE_HTML) 101719384b2f3Smrg]) # XORG_CHECK_DOCBOOK 101729384b2f3Smrg 101739384b2f3Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 101749384b2f3Smrg# ---------------- 101759384b2f3Smrg# Minimum version: 1.5.0 101769384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101779384b2f3Smrg# 101789384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 101799384b2f3Smrg# not at the appropriate level. This macro enables a module to test for the 101809384b2f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101819384b2f3Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 101829384b2f3Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 101839384b2f3Smrg# --with-xmlto assumes 'auto'. 101849384b2f3Smrg# 101859384b2f3Smrg# Interface to module: 101869384b2f3Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 101879384b2f3Smrg# XMLTO: returns the path of the xmlto program found 101889384b2f3Smrg# returns the path set by the user in the environment 101899384b2f3Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 101909384b2f3Smrg# 'no' user instructs the module not to use xmlto 101919384b2f3Smrg# 101929384b2f3Smrg# Added in version 1.10.0 101939384b2f3Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 101949384b2f3Smrg# xmlto for text output requires either lynx, links, or w3m browsers 101959384b2f3Smrg# 101969384b2f3Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 101979384b2f3Smrg# 101989384b2f3SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 101999384b2f3SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102009384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 102019384b2f3SmrgAC_ARG_WITH(xmlto, 102029384b2f3Smrg AS_HELP_STRING([--with-xmlto], 102039384b2f3Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102049384b2f3Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102059384b2f3Smrgm4_undefine([_defopt]) 102069384b2f3Smrg 102079384b2f3Smrgif test "x$use_xmlto" = x"auto"; then 102089384b2f3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102099384b2f3Smrg if test "x$XMLTO" = "x"; then 102109384b2f3Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 102119384b2f3Smrg have_xmlto=no 102129384b2f3Smrg else 102139384b2f3Smrg have_xmlto=yes 102149384b2f3Smrg fi 102159384b2f3Smrgelif test "x$use_xmlto" = x"yes" ; then 102169384b2f3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102179384b2f3Smrg if test "x$XMLTO" = "x"; then 102189384b2f3Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 102199384b2f3Smrg fi 102209384b2f3Smrg have_xmlto=yes 102219384b2f3Smrgelif test "x$use_xmlto" = x"no" ; then 102229384b2f3Smrg if test "x$XMLTO" != "x"; then 102239384b2f3Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 102249384b2f3Smrg fi 102259384b2f3Smrg have_xmlto=no 102269384b2f3Smrgelse 102279384b2f3Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 102289384b2f3Smrgfi 102299384b2f3Smrg 102309384b2f3Smrg# Test for a minimum version of xmlto, if provided. 102319384b2f3Smrgm4_ifval([$1], 102329384b2f3Smrg[if test "$have_xmlto" = yes; then 102339384b2f3Smrg # scrape the xmlto version 102349384b2f3Smrg AC_MSG_CHECKING([the xmlto version]) 102359384b2f3Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 102369384b2f3Smrg AC_MSG_RESULT([$xmlto_version]) 102379384b2f3Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 102389384b2f3Smrg [if test "x$use_xmlto" = xauto; then 102399384b2f3Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 102409384b2f3Smrg have_xmlto=no 102419384b2f3Smrg else 102429384b2f3Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 102439384b2f3Smrg fi]) 102449384b2f3Smrgfi]) 102459384b2f3Smrg 102469384b2f3Smrg# Test for the ability of xmlto to generate a text target 102479384b2f3Smrghave_xmlto_text=no 102489384b2f3Smrgcat > conftest.xml << "EOF" 102499384b2f3SmrgEOF 102509384b2f3SmrgAS_IF([test "$have_xmlto" = yes], 102519384b2f3Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 102529384b2f3Smrg [have_xmlto_text=yes], 102539384b2f3Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 102549384b2f3Smrgrm -f conftest.xml 102559384b2f3SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 102569384b2f3SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 102579384b2f3Smrg]) # XORG_WITH_XMLTO 102589384b2f3Smrg 102599384b2f3Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 102609384b2f3Smrg# -------------------------------------------- 102619384b2f3Smrg# Minimum version: 1.12.0 102629384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.12.0 102639384b2f3Smrg# 102649384b2f3Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 102659384b2f3Smrg# XML-based language used for the transformation of XML documents. 102669384b2f3Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 102679384b2f3Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 102689384b2f3Smrg# The XSLT processor is often used as a standalone tool for transformations. 102699384b2f3Smrg# It should not be assumed that this tool is used only to work with documnetation. 102709384b2f3Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 102719384b2f3Smrg# 102729384b2f3Smrg# Interface to module: 102739384b2f3Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 102749384b2f3Smrg# XSLTPROC: returns the path of the xsltproc program found 102759384b2f3Smrg# returns the path set by the user in the environment 102769384b2f3Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 102779384b2f3Smrg# 'no' user instructs the module not to use xsltproc 102789384b2f3Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 102799384b2f3Smrg# 102809384b2f3Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 102819384b2f3Smrg# 102829384b2f3SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 102839384b2f3SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 102849384b2f3Smrg# Preserves the interface, should it be implemented later 102859384b2f3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 102869384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 102879384b2f3SmrgAC_ARG_WITH(xsltproc, 102889384b2f3Smrg AS_HELP_STRING([--with-xsltproc], 102899384b2f3Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 102909384b2f3Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 102919384b2f3Smrgm4_undefine([_defopt]) 102929384b2f3Smrg 102939384b2f3Smrgif test "x$use_xsltproc" = x"auto"; then 102949384b2f3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102959384b2f3Smrg if test "x$XSLTPROC" = "x"; then 102969384b2f3Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 102979384b2f3Smrg have_xsltproc=no 102989384b2f3Smrg else 102999384b2f3Smrg have_xsltproc=yes 103009384b2f3Smrg fi 103019384b2f3Smrgelif test "x$use_xsltproc" = x"yes" ; then 103029384b2f3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103039384b2f3Smrg if test "x$XSLTPROC" = "x"; then 103049384b2f3Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 103059384b2f3Smrg fi 103069384b2f3Smrg have_xsltproc=yes 103079384b2f3Smrgelif test "x$use_xsltproc" = x"no" ; then 103089384b2f3Smrg if test "x$XSLTPROC" != "x"; then 103099384b2f3Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 103109384b2f3Smrg fi 103119384b2f3Smrg have_xsltproc=no 103129384b2f3Smrgelse 103139384b2f3Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 103149384b2f3Smrgfi 103159384b2f3Smrg 103169384b2f3SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 103179384b2f3Smrg]) # XORG_WITH_XSLTPROC 103189384b2f3Smrg 103199384b2f3Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 103209384b2f3Smrg# ---------------------------------------- 103219384b2f3Smrg# Minimum version: 1.15.0 103229384b2f3Smrg# 103239384b2f3Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 103249384b2f3Smrg# scanning arbitrary text files, extracting information from those text files, 103259384b2f3Smrg# and printing reports based on that information. 103269384b2f3Smrg# 103279384b2f3Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 103289384b2f3Smrg# 103299384b2f3Smrg# Interface to module: 103309384b2f3Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 103319384b2f3Smrg# PERL: returns the path of the perl program found 103329384b2f3Smrg# returns the path set by the user in the environment 103339384b2f3Smrg# --with-perl: 'yes' user instructs the module to use perl 103349384b2f3Smrg# 'no' user instructs the module not to use perl 103359384b2f3Smrg# have_perl: returns yes if perl found in PATH or no 103369384b2f3Smrg# 103379384b2f3Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 103389384b2f3Smrg# 103399384b2f3SmrgAC_DEFUN([XORG_WITH_PERL],[ 103409384b2f3SmrgAC_ARG_VAR([PERL], [Path to perl command]) 103419384b2f3Smrg# Preserves the interface, should it be implemented later 103429384b2f3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 103439384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 103449384b2f3SmrgAC_ARG_WITH(perl, 103459384b2f3Smrg AS_HELP_STRING([--with-perl], 103469384b2f3Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 103479384b2f3Smrg [use_perl=$withval], [use_perl=]_defopt) 103489384b2f3Smrgm4_undefine([_defopt]) 103499384b2f3Smrg 103509384b2f3Smrgif test "x$use_perl" = x"auto"; then 103519384b2f3Smrg AC_PATH_PROG([PERL], [perl]) 103529384b2f3Smrg if test "x$PERL" = "x"; then 103539384b2f3Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 103549384b2f3Smrg have_perl=no 103559384b2f3Smrg else 103569384b2f3Smrg have_perl=yes 103579384b2f3Smrg fi 103589384b2f3Smrgelif test "x$use_perl" = x"yes" ; then 103599384b2f3Smrg AC_PATH_PROG([PERL], [perl]) 103609384b2f3Smrg if test "x$PERL" = "x"; then 103619384b2f3Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 103629384b2f3Smrg fi 103639384b2f3Smrg have_perl=yes 103649384b2f3Smrgelif test "x$use_perl" = x"no" ; then 103659384b2f3Smrg if test "x$PERL" != "x"; then 103669384b2f3Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 103679384b2f3Smrg fi 103689384b2f3Smrg have_perl=no 103699384b2f3Smrgelse 103709384b2f3Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 103719384b2f3Smrgfi 103729384b2f3Smrg 103739384b2f3SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 103749384b2f3Smrg]) # XORG_WITH_PERL 103759384b2f3Smrg 103769384b2f3Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 103779384b2f3Smrg# ---------------- 103789384b2f3Smrg# Minimum version: 1.5.0 103799384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 103809384b2f3Smrg# 103819384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 103829384b2f3Smrg# not at the appropriate level. This macro enables a module to test for the 103839384b2f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 103849384b2f3Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 103859384b2f3Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 103869384b2f3Smrg# --with-asciidoc assumes 'auto'. 103879384b2f3Smrg# 103889384b2f3Smrg# Interface to module: 103899384b2f3Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 103909384b2f3Smrg# ASCIIDOC: returns the path of the asciidoc program found 103919384b2f3Smrg# returns the path set by the user in the environment 103929384b2f3Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 103939384b2f3Smrg# 'no' user instructs the module not to use asciidoc 103949384b2f3Smrg# 103959384b2f3Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 103969384b2f3Smrg# 103979384b2f3SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 103989384b2f3SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 103999384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 104009384b2f3SmrgAC_ARG_WITH(asciidoc, 104019384b2f3Smrg AS_HELP_STRING([--with-asciidoc], 104029384b2f3Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 104039384b2f3Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 104049384b2f3Smrgm4_undefine([_defopt]) 104059384b2f3Smrg 104069384b2f3Smrgif test "x$use_asciidoc" = x"auto"; then 104079384b2f3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104089384b2f3Smrg if test "x$ASCIIDOC" = "x"; then 104099384b2f3Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 104109384b2f3Smrg have_asciidoc=no 104119384b2f3Smrg else 104129384b2f3Smrg have_asciidoc=yes 104139384b2f3Smrg fi 104149384b2f3Smrgelif test "x$use_asciidoc" = x"yes" ; then 104159384b2f3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104169384b2f3Smrg if test "x$ASCIIDOC" = "x"; then 104179384b2f3Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 104189384b2f3Smrg fi 104199384b2f3Smrg have_asciidoc=yes 104209384b2f3Smrgelif test "x$use_asciidoc" = x"no" ; then 104219384b2f3Smrg if test "x$ASCIIDOC" != "x"; then 104229384b2f3Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 104239384b2f3Smrg fi 104249384b2f3Smrg have_asciidoc=no 104259384b2f3Smrgelse 104269384b2f3Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 104279384b2f3Smrgfi 104289384b2f3Smrgm4_ifval([$1], 104299384b2f3Smrg[if test "$have_asciidoc" = yes; then 104309384b2f3Smrg # scrape the asciidoc version 104319384b2f3Smrg AC_MSG_CHECKING([the asciidoc version]) 104329384b2f3Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 104339384b2f3Smrg AC_MSG_RESULT([$asciidoc_version]) 104349384b2f3Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 104359384b2f3Smrg [if test "x$use_asciidoc" = xauto; then 104369384b2f3Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 104379384b2f3Smrg have_asciidoc=no 104389384b2f3Smrg else 104399384b2f3Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 104409384b2f3Smrg fi]) 104419384b2f3Smrgfi]) 104429384b2f3SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 104439384b2f3Smrg]) # XORG_WITH_ASCIIDOC 104449384b2f3Smrg 104459384b2f3Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 104469384b2f3Smrg# -------------------------------- 104479384b2f3Smrg# Minimum version: 1.5.0 104489384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 104499384b2f3Smrg# 104509384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 104519384b2f3Smrg# not at the appropriate level. This macro enables a module to test for the 104529384b2f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104539384b2f3Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 104549384b2f3Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 104559384b2f3Smrg# --with-doxygen assumes 'auto'. 104569384b2f3Smrg# 104579384b2f3Smrg# Interface to module: 104589384b2f3Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 104599384b2f3Smrg# DOXYGEN: returns the path of the doxygen program found 104609384b2f3Smrg# returns the path set by the user in the environment 104619384b2f3Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 104629384b2f3Smrg# 'no' user instructs the module not to use doxygen 104639384b2f3Smrg# 104649384b2f3Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 104659384b2f3Smrg# 104669384b2f3SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 104679384b2f3SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 104689384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 104699384b2f3SmrgAC_ARG_WITH(doxygen, 104709384b2f3Smrg AS_HELP_STRING([--with-doxygen], 104719384b2f3Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 104729384b2f3Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 104739384b2f3Smrgm4_undefine([_defopt]) 104749384b2f3Smrg 104759384b2f3Smrgif test "x$use_doxygen" = x"auto"; then 104769384b2f3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 104779384b2f3Smrg if test "x$DOXYGEN" = "x"; then 104789384b2f3Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 104799384b2f3Smrg have_doxygen=no 104809384b2f3Smrg else 104819384b2f3Smrg have_doxygen=yes 104829384b2f3Smrg fi 104839384b2f3Smrgelif test "x$use_doxygen" = x"yes" ; then 104849384b2f3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 104859384b2f3Smrg if test "x$DOXYGEN" = "x"; then 104869384b2f3Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 104879384b2f3Smrg fi 104889384b2f3Smrg have_doxygen=yes 104899384b2f3Smrgelif test "x$use_doxygen" = x"no" ; then 104909384b2f3Smrg if test "x$DOXYGEN" != "x"; then 104919384b2f3Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 104929384b2f3Smrg fi 104939384b2f3Smrg have_doxygen=no 104949384b2f3Smrgelse 104959384b2f3Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 104969384b2f3Smrgfi 104979384b2f3Smrgm4_ifval([$1], 104989384b2f3Smrg[if test "$have_doxygen" = yes; then 104999384b2f3Smrg # scrape the doxygen version 105009384b2f3Smrg AC_MSG_CHECKING([the doxygen version]) 105019384b2f3Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 105029384b2f3Smrg AC_MSG_RESULT([$doxygen_version]) 105039384b2f3Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 105049384b2f3Smrg [if test "x$use_doxygen" = xauto; then 105059384b2f3Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 105069384b2f3Smrg have_doxygen=no 105079384b2f3Smrg else 105089384b2f3Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 105099384b2f3Smrg fi]) 105109384b2f3Smrgfi]) 105119384b2f3SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 105129384b2f3Smrg]) # XORG_WITH_DOXYGEN 105139384b2f3Smrg 105149384b2f3Smrg# XORG_WITH_GROFF([DEFAULT]) 105159384b2f3Smrg# ---------------- 105169384b2f3Smrg# Minimum version: 1.6.0 105179384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 105189384b2f3Smrg# 105199384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 105209384b2f3Smrg# not at the appropriate level. This macro enables a module to test for the 105219384b2f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105229384b2f3Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 105239384b2f3Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 105249384b2f3Smrg# --with-groff assumes 'auto'. 105259384b2f3Smrg# 105269384b2f3Smrg# Interface to module: 105279384b2f3Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 105289384b2f3Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 105299384b2f3Smrg# HAVE_GROFF_MS: the -ms macros package 105309384b2f3Smrg# GROFF: returns the path of the groff program found 105319384b2f3Smrg# returns the path set by the user in the environment 105329384b2f3Smrg# --with-groff: 'yes' user instructs the module to use groff 105339384b2f3Smrg# 'no' user instructs the module not to use groff 105349384b2f3Smrg# 105359384b2f3Smrg# Added in version 1.9.0: 105369384b2f3Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 105379384b2f3Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 105389384b2f3Smrg# psselect from the psutils package. 105399384b2f3Smrg# the ghostcript package. Refer to the grohtml man pages 105409384b2f3Smrg# 105419384b2f3Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 105429384b2f3Smrg# 105439384b2f3Smrg# OS and distros often splits groff in a basic and full package, the former 105449384b2f3Smrg# having the groff program and the later having devices, fonts and macros 105459384b2f3Smrg# Checking for the groff executable is not enough. 105469384b2f3Smrg# 105479384b2f3Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 105489384b2f3Smrg# unset HAVE_GROFF or GROFF env variables. 105499384b2f3Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 105509384b2f3Smrg# 105519384b2f3SmrgAC_DEFUN([XORG_WITH_GROFF],[ 105529384b2f3SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 105539384b2f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 105549384b2f3SmrgAC_ARG_WITH(groff, 105559384b2f3Smrg AS_HELP_STRING([--with-groff], 105569384b2f3Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 105579384b2f3Smrg [use_groff=$withval], [use_groff=]_defopt) 105589384b2f3Smrgm4_undefine([_defopt]) 105599384b2f3Smrg 105609384b2f3Smrgif test "x$use_groff" = x"auto"; then 105619384b2f3Smrg AC_PATH_PROG([GROFF], [groff]) 105629384b2f3Smrg if test "x$GROFF" = "x"; then 105639384b2f3Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 105649384b2f3Smrg have_groff=no 105659384b2f3Smrg else 105669384b2f3Smrg have_groff=yes 105679384b2f3Smrg fi 105689384b2f3Smrgelif test "x$use_groff" = x"yes" ; then 105699384b2f3Smrg AC_PATH_PROG([GROFF], [groff]) 105709384b2f3Smrg if test "x$GROFF" = "x"; then 105719384b2f3Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 105729384b2f3Smrg fi 105739384b2f3Smrg have_groff=yes 105749384b2f3Smrgelif test "x$use_groff" = x"no" ; then 105759384b2f3Smrg if test "x$GROFF" != "x"; then 105769384b2f3Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 105779384b2f3Smrg fi 105789384b2f3Smrg have_groff=no 105799384b2f3Smrgelse 105809384b2f3Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 105819384b2f3Smrgfi 10582966bf024Smrg 105839384b2f3Smrg# We have groff, test for the presence of the macro packages 105849384b2f3Smrgif test "x$have_groff" = x"yes"; then 105859384b2f3Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 105869384b2f3Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 105879384b2f3Smrg groff_ms_works=yes 10588966bf024Smrg else 105899384b2f3Smrg groff_ms_works=no 10590966bf024Smrg fi 105919384b2f3Smrg AC_MSG_RESULT([$groff_ms_works]) 105929384b2f3Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 105939384b2f3Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 105949384b2f3Smrg groff_mm_works=yes 105959384b2f3Smrg else 105969384b2f3Smrg groff_mm_works=no 105979384b2f3Smrg fi 105989384b2f3Smrg AC_MSG_RESULT([$groff_mm_works]) 105999384b2f3Smrgfi 10600966bf024Smrg 106019384b2f3Smrg# We have groff, test for HTML dependencies, one command per package 106029384b2f3Smrgif test "x$have_groff" = x"yes"; then 106039384b2f3Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 106049384b2f3Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 106059384b2f3Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 106069384b2f3Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 106079384b2f3Smrg have_groff_html=yes 106089384b2f3Smrg else 106099384b2f3Smrg have_groff_html=no 106109384b2f3Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 106119384b2f3Smrg fi 106129384b2f3Smrgfi 10613966bf024Smrg 106149384b2f3Smrg# Set Automake conditionals for Makefiles 106159384b2f3SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 106169384b2f3SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 106179384b2f3SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 106189384b2f3SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 106199384b2f3Smrg]) # XORG_WITH_GROFF 10620966bf024Smrg 106219384b2f3Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 106229384b2f3Smrg# --------------------------------------- 106239384b2f3Smrg# Minimum version: 1.6.0 106249384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 106259384b2f3Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 106269384b2f3Smrg# 106279384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 106289384b2f3Smrg# not at the appropriate level. This macro enables a module to test for the 106299384b2f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 106309384b2f3Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 106319384b2f3Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 106329384b2f3Smrg# --with-fop assumes 'auto'. 106339384b2f3Smrg# 106349384b2f3Smrg# Interface to module: 106359384b2f3Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 106369384b2f3Smrg# FOP: returns the path of the fop program found 106379384b2f3Smrg# returns the path set by the user in the environment 106389384b2f3Smrg# --with-fop: 'yes' user instructs the module to use fop 106399384b2f3Smrg# 'no' user instructs the module not to use fop 106409384b2f3Smrg# 106419384b2f3Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 106429384b2f3Smrg# 106439384b2f3SmrgAC_DEFUN([XORG_WITH_FOP],[ 106449384b2f3SmrgAC_ARG_VAR([FOP], [Path to fop command]) 106459384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 106469384b2f3SmrgAC_ARG_WITH(fop, 106479384b2f3Smrg AS_HELP_STRING([--with-fop], 106489384b2f3Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 106499384b2f3Smrg [use_fop=$withval], [use_fop=]_defopt) 106509384b2f3Smrgm4_undefine([_defopt]) 106519384b2f3Smrg 106529384b2f3Smrgif test "x$use_fop" = x"auto"; then 106539384b2f3Smrg AC_PATH_PROG([FOP], [fop]) 106549384b2f3Smrg if test "x$FOP" = "x"; then 106559384b2f3Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 106569384b2f3Smrg have_fop=no 106579384b2f3Smrg else 106589384b2f3Smrg have_fop=yes 106599384b2f3Smrg fi 106609384b2f3Smrgelif test "x$use_fop" = x"yes" ; then 106619384b2f3Smrg AC_PATH_PROG([FOP], [fop]) 106629384b2f3Smrg if test "x$FOP" = "x"; then 106639384b2f3Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 106649384b2f3Smrg fi 106659384b2f3Smrg have_fop=yes 106669384b2f3Smrgelif test "x$use_fop" = x"no" ; then 106679384b2f3Smrg if test "x$FOP" != "x"; then 106689384b2f3Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 106699384b2f3Smrg fi 106709384b2f3Smrg have_fop=no 106719384b2f3Smrgelse 106729384b2f3Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 106739384b2f3Smrgfi 10674966bf024Smrg 106759384b2f3Smrg# Test for a minimum version of fop, if provided. 106769384b2f3Smrgm4_ifval([$1], 106779384b2f3Smrg[if test "$have_fop" = yes; then 106789384b2f3Smrg # scrape the fop version 106799384b2f3Smrg AC_MSG_CHECKING([for fop minimum version]) 106809384b2f3Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 106819384b2f3Smrg AC_MSG_RESULT([$fop_version]) 106829384b2f3Smrg AS_VERSION_COMPARE([$fop_version], [$1], 106839384b2f3Smrg [if test "x$use_fop" = xauto; then 106849384b2f3Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 106859384b2f3Smrg have_fop=no 106869384b2f3Smrg else 106879384b2f3Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 106889384b2f3Smrg fi]) 106899384b2f3Smrgfi]) 106909384b2f3SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 106919384b2f3Smrg]) # XORG_WITH_FOP 10692966bf024Smrg 106939384b2f3Smrg# XORG_WITH_PS2PDF([DEFAULT]) 106949384b2f3Smrg# ---------------- 106959384b2f3Smrg# Minimum version: 1.6.0 106969384b2f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 106979384b2f3Smrg# 106989384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 106999384b2f3Smrg# not at the appropriate level. This macro enables a module to test for the 107009384b2f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 107019384b2f3Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 107029384b2f3Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 107039384b2f3Smrg# --with-ps2pdf assumes 'auto'. 107049384b2f3Smrg# 107059384b2f3Smrg# Interface to module: 107069384b2f3Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 107079384b2f3Smrg# PS2PDF: returns the path of the ps2pdf program found 107089384b2f3Smrg# returns the path set by the user in the environment 107099384b2f3Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 107109384b2f3Smrg# 'no' user instructs the module not to use ps2pdf 107119384b2f3Smrg# 107129384b2f3Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 107139384b2f3Smrg# 107149384b2f3SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 107159384b2f3SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 107169384b2f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 107179384b2f3SmrgAC_ARG_WITH(ps2pdf, 107189384b2f3Smrg AS_HELP_STRING([--with-ps2pdf], 107199384b2f3Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 107209384b2f3Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 107219384b2f3Smrgm4_undefine([_defopt]) 107229384b2f3Smrg 107239384b2f3Smrgif test "x$use_ps2pdf" = x"auto"; then 107249384b2f3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 107259384b2f3Smrg if test "x$PS2PDF" = "x"; then 107269384b2f3Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 107279384b2f3Smrg have_ps2pdf=no 107289384b2f3Smrg else 107299384b2f3Smrg have_ps2pdf=yes 107309384b2f3Smrg fi 107319384b2f3Smrgelif test "x$use_ps2pdf" = x"yes" ; then 107329384b2f3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 107339384b2f3Smrg if test "x$PS2PDF" = "x"; then 107349384b2f3Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 107359384b2f3Smrg fi 107369384b2f3Smrg have_ps2pdf=yes 107379384b2f3Smrgelif test "x$use_ps2pdf" = x"no" ; then 107389384b2f3Smrg if test "x$PS2PDF" != "x"; then 107399384b2f3Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 107409384b2f3Smrg fi 107419384b2f3Smrg have_ps2pdf=no 107429384b2f3Smrgelse 107439384b2f3Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 107449384b2f3Smrgfi 107459384b2f3SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 107469384b2f3Smrg]) # XORG_WITH_PS2PDF 10747966bf024Smrg 107489384b2f3Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 107499384b2f3Smrg# ---------------- 107509384b2f3Smrg# Minimum version: 1.6.0 107519384b2f3Smrg# 107529384b2f3Smrg# Documentation tools are not always available on all platforms and sometimes 107539384b2f3Smrg# not at the appropriate level. This macro enables a builder to skip all 107549384b2f3Smrg# documentation targets except traditional man pages. 107559384b2f3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107569384b2f3Smrg# maximum flexibilty in controlling documentation building. 107579384b2f3Smrg# Refer to: 107589384b2f3Smrg# XORG_WITH_XMLTO --with-xmlto 107599384b2f3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 107609384b2f3Smrg# XORG_WITH_DOXYGEN --with-doxygen 107619384b2f3Smrg# XORG_WITH_FOP --with-fop 107629384b2f3Smrg# XORG_WITH_GROFF --with-groff 107639384b2f3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 107649384b2f3Smrg# 107659384b2f3Smrg# Interface to module: 107669384b2f3Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 107679384b2f3Smrg# --enable-docs: 'yes' user instructs the module to generate docs 107689384b2f3Smrg# 'no' user instructs the module not to generate docs 107699384b2f3Smrg# parm1: specify the default value, yes or no. 107709384b2f3Smrg# 107719384b2f3SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 107729384b2f3Smrgm4_define([docs_default], m4_default([$1], [yes])) 107739384b2f3SmrgAC_ARG_ENABLE(docs, 107749384b2f3Smrg AS_HELP_STRING([--enable-docs], 107759384b2f3Smrg [Enable building the documentation (default: ]docs_default[)]), 107769384b2f3Smrg [build_docs=$enableval], [build_docs=]docs_default) 107779384b2f3Smrgm4_undefine([docs_default]) 107789384b2f3SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 107799384b2f3SmrgAC_MSG_CHECKING([whether to build documentation]) 107809384b2f3SmrgAC_MSG_RESULT([$build_docs]) 107819384b2f3Smrg]) # XORG_ENABLE_DOCS 107829384b2f3Smrg 107839384b2f3Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 107849384b2f3Smrg# ---------------- 107859384b2f3Smrg# Minimum version: 1.6.0 107869384b2f3Smrg# 107879384b2f3Smrg# This macro enables a builder to skip all developer documentation. 107889384b2f3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 107899384b2f3Smrg# maximum flexibilty in controlling documentation building. 107909384b2f3Smrg# Refer to: 107919384b2f3Smrg# XORG_WITH_XMLTO --with-xmlto 107929384b2f3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 107939384b2f3Smrg# XORG_WITH_DOXYGEN --with-doxygen 107949384b2f3Smrg# XORG_WITH_FOP --with-fop 107959384b2f3Smrg# XORG_WITH_GROFF --with-groff 107969384b2f3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 107979384b2f3Smrg# 107989384b2f3Smrg# Interface to module: 107999384b2f3Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 108009384b2f3Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 108019384b2f3Smrg# 'no' user instructs the module not to generate developer docs 108029384b2f3Smrg# parm1: specify the default value, yes or no. 108039384b2f3Smrg# 108049384b2f3SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 108059384b2f3Smrgm4_define([devel_default], m4_default([$1], [yes])) 108069384b2f3SmrgAC_ARG_ENABLE(devel-docs, 108079384b2f3Smrg AS_HELP_STRING([--enable-devel-docs], 108089384b2f3Smrg [Enable building the developer documentation (default: ]devel_default[)]), 108099384b2f3Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 108109384b2f3Smrgm4_undefine([devel_default]) 108119384b2f3SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 108129384b2f3SmrgAC_MSG_CHECKING([whether to build developer documentation]) 108139384b2f3SmrgAC_MSG_RESULT([$build_devel_docs]) 108149384b2f3Smrg]) # XORG_ENABLE_DEVEL_DOCS 108159384b2f3Smrg 108169384b2f3Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 108179384b2f3Smrg# ---------------- 108189384b2f3Smrg# Minimum version: 1.6.0 108199384b2f3Smrg# 108209384b2f3Smrg# This macro enables a builder to skip all functional specification targets. 108219384b2f3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108229384b2f3Smrg# maximum flexibilty in controlling documentation building. 108239384b2f3Smrg# Refer to: 108249384b2f3Smrg# XORG_WITH_XMLTO --with-xmlto 108259384b2f3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108269384b2f3Smrg# XORG_WITH_DOXYGEN --with-doxygen 108279384b2f3Smrg# XORG_WITH_FOP --with-fop 108289384b2f3Smrg# XORG_WITH_GROFF --with-groff 108299384b2f3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108309384b2f3Smrg# 108319384b2f3Smrg# Interface to module: 108329384b2f3Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 108339384b2f3Smrg# --enable-specs: 'yes' user instructs the module to generate specs 108349384b2f3Smrg# 'no' user instructs the module not to generate specs 108359384b2f3Smrg# parm1: specify the default value, yes or no. 108369384b2f3Smrg# 108379384b2f3SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 108389384b2f3Smrgm4_define([spec_default], m4_default([$1], [yes])) 108399384b2f3SmrgAC_ARG_ENABLE(specs, 108409384b2f3Smrg AS_HELP_STRING([--enable-specs], 108419384b2f3Smrg [Enable building the specs (default: ]spec_default[)]), 108429384b2f3Smrg [build_specs=$enableval], [build_specs=]spec_default) 108439384b2f3Smrgm4_undefine([spec_default]) 108449384b2f3SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 108459384b2f3SmrgAC_MSG_CHECKING([whether to build functional specifications]) 108469384b2f3SmrgAC_MSG_RESULT([$build_specs]) 108479384b2f3Smrg]) # XORG_ENABLE_SPECS 108489384b2f3Smrg 108499384b2f3Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 108509384b2f3Smrg# ---------------------------------------------- 108519384b2f3Smrg# Minimum version: 1.13.0 108529384b2f3Smrg# 108539384b2f3Smrg# This macro enables a builder to enable/disable unit testing 108549384b2f3Smrg# It makes no assumption about the test cases implementation 108559384b2f3Smrg# Test cases may or may not use Automake "Support for test suites" 108569384b2f3Smrg# They may or may not use the software utility library GLib 108579384b2f3Smrg# 108589384b2f3Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 108599384b2f3Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 108609384b2f3Smrg# The variable enable_unit_tests is used by other macros in this file. 108619384b2f3Smrg# 108629384b2f3Smrg# Interface to module: 108639384b2f3Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 108649384b2f3Smrg# enable_unit_tests: used in configure.ac for additional configuration 108659384b2f3Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 108669384b2f3Smrg# 'no' user instructs the module not to build tests 108679384b2f3Smrg# parm1: specify the default value, yes or no. 108689384b2f3Smrg# 108699384b2f3SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 108709384b2f3SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 108719384b2f3SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 108729384b2f3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108739384b2f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 108749384b2f3SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 108759384b2f3Smrg [Enable building unit test cases (default: ]_defopt[)]), 108769384b2f3Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 108779384b2f3Smrgm4_undefine([_defopt]) 108789384b2f3SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 108799384b2f3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 108809384b2f3SmrgAC_MSG_RESULT([$enable_unit_tests]) 108819384b2f3Smrg]) # XORG_ENABLE_UNIT_TESTS 108829384b2f3Smrg 108839384b2f3Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 108849384b2f3Smrg# ------------------------------------------------------ 108859384b2f3Smrg# Minimum version: 1.17.0 108869384b2f3Smrg# 108879384b2f3Smrg# This macro enables a builder to enable/disable integration testing 108889384b2f3Smrg# It makes no assumption about the test cases' implementation 108899384b2f3Smrg# Test cases may or may not use Automake "Support for test suites" 108909384b2f3Smrg# 108919384b2f3Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 108929384b2f3Smrg# usually requires less dependencies and may be built and run under less 108939384b2f3Smrg# stringent environments than integration tests. 108949384b2f3Smrg# 108959384b2f3Smrg# Interface to module: 108969384b2f3Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 108979384b2f3Smrg# enable_integration_tests: used in configure.ac for additional configuration 108989384b2f3Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 108999384b2f3Smrg# 'no' user instructs the module not to build tests 109009384b2f3Smrg# parm1: specify the default value, yes or no. 109019384b2f3Smrg# 109029384b2f3SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 109039384b2f3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109049384b2f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 109059384b2f3SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 109069384b2f3Smrg [Enable building integration test cases (default: ]_defopt[)]), 109079384b2f3Smrg [enable_integration_tests=$enableval], 109089384b2f3Smrg [enable_integration_tests=]_defopt) 109099384b2f3Smrgm4_undefine([_defopt]) 109109384b2f3SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 109119384b2f3Smrg [test "x$enable_integration_tests" != xno]) 109129384b2f3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109139384b2f3SmrgAC_MSG_RESULT([$enable_integration_tests]) 109149384b2f3Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 109159384b2f3Smrg 109169384b2f3Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 109179384b2f3Smrg# ---------------------------------------- 109189384b2f3Smrg# Minimum version: 1.13.0 109199384b2f3Smrg# 109209384b2f3Smrg# GLib is a library which provides advanced data structures and functions. 109219384b2f3Smrg# This macro enables a module to test for the presence of Glib. 109229384b2f3Smrg# 109239384b2f3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 109249384b2f3Smrg# Otherwise the value of $enable_unit_tests is blank. 109259384b2f3Smrg# 109269384b2f3Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 109279384b2f3Smrg# test support usually requires less dependencies and may be built and run under 109289384b2f3Smrg# less stringent environments than integration tests. 109299384b2f3Smrg# 109309384b2f3Smrg# Interface to module: 109319384b2f3Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 109329384b2f3Smrg# with_glib: used in configure.ac to know if GLib has been found 109339384b2f3Smrg# --with-glib: 'yes' user instructs the module to use glib 109349384b2f3Smrg# 'no' user instructs the module not to use glib 109359384b2f3Smrg# 109369384b2f3SmrgAC_DEFUN([XORG_WITH_GLIB],[ 109379384b2f3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 109389384b2f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 109399384b2f3SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 109409384b2f3Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 109419384b2f3Smrg [with_glib=$withval], [with_glib=]_defopt) 109429384b2f3Smrgm4_undefine([_defopt]) 109439384b2f3Smrg 109449384b2f3Smrghave_glib=no 109459384b2f3Smrg# Do not probe GLib if user explicitly disabled unit testing 109469384b2f3Smrgif test "x$enable_unit_tests" != x"no"; then 109479384b2f3Smrg # Do not probe GLib if user explicitly disabled it 109489384b2f3Smrg if test "x$with_glib" != x"no"; then 109499384b2f3Smrg m4_ifval( 109509384b2f3Smrg [$1], 109519384b2f3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 109529384b2f3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 109539384b2f3Smrg ) 109549384b2f3Smrg fi 109559384b2f3Smrgfi 10956966bf024Smrg 109579384b2f3Smrg# Not having GLib when unit testing has been explicitly requested is an error 109589384b2f3Smrgif test "x$enable_unit_tests" = x"yes"; then 109599384b2f3Smrg if test "x$have_glib" = x"no"; then 109609384b2f3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109619384b2f3Smrg fi 109629384b2f3Smrgfi 10963966bf024Smrg 109649384b2f3Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 109659384b2f3Smrgif test "x$enable_unit_tests" = x"no"; then 109669384b2f3Smrg if test "x$with_glib" = x"yes"; then 109679384b2f3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109689384b2f3Smrg fi 109699384b2f3Smrgfi 10970966bf024Smrg 109719384b2f3Smrg# Not having GLib when it has been explicitly requested is an error 109729384b2f3Smrgif test "x$with_glib" = x"yes"; then 109739384b2f3Smrg if test "x$have_glib" = x"no"; then 109749384b2f3Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 109759384b2f3Smrg fi 109769384b2f3Smrgfi 10977966bf024Smrg 109789384b2f3SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 109799384b2f3Smrg]) # XORG_WITH_GLIB 10980966bf024Smrg 109819384b2f3Smrg# XORG_LD_WRAP([required|optional]) 109829384b2f3Smrg# --------------------------------- 109839384b2f3Smrg# Minimum version: 1.13.0 109849384b2f3Smrg# 109859384b2f3Smrg# Check if linker supports -wrap, passed via compiler flags 109869384b2f3Smrg# 109879384b2f3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 109889384b2f3Smrg# Otherwise the value of $enable_unit_tests is blank. 109899384b2f3Smrg# 109909384b2f3Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 109919384b2f3Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 109929384b2f3Smrg# available, an argument of "optional" allows use when some unit tests require 109939384b2f3Smrg# ld -wrap and others do not. 109949384b2f3Smrg# 109959384b2f3SmrgAC_DEFUN([XORG_LD_WRAP],[ 109969384b2f3SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 109979384b2f3Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 109989384b2f3Smrg void __wrap_exit(int status) { return; }], 109999384b2f3Smrg [exit(0);])]) 110009384b2f3Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 110019384b2f3Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 110029384b2f3Smrg if test "x$have_ld_wrap" = x"no"; then 110039384b2f3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 110049384b2f3Smrg fi 110059384b2f3Smrgfi 110069384b2f3SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 110079384b2f3Smrg# 110089384b2f3Smrg]) # XORG_LD_WRAP 11009966bf024Smrg 110109384b2f3Smrg# XORG_CHECK_LINKER_FLAGS 110119384b2f3Smrg# ----------------------- 110129384b2f3Smrg# SYNOPSIS 110139384b2f3Smrg# 110149384b2f3Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 110159384b2f3Smrg# 110169384b2f3Smrg# DESCRIPTION 110179384b2f3Smrg# 110189384b2f3Smrg# Check whether the given linker FLAGS work with the current language's 110199384b2f3Smrg# linker, or whether they give an error. 110209384b2f3Smrg# 110219384b2f3Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 110229384b2f3Smrg# success/failure. 110239384b2f3Smrg# 110249384b2f3Smrg# PROGRAM-SOURCE is the program source to link with, if needed 110259384b2f3Smrg# 110269384b2f3Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 110279384b2f3Smrg# 110289384b2f3Smrg# LICENSE 110299384b2f3Smrg# 110309384b2f3Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 110319384b2f3Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 110329384b2f3Smrg# Copyright (c) 2009 Matteo Frigo 110339384b2f3Smrg# 110349384b2f3Smrg# This program is free software: you can redistribute it and/or modify it 110359384b2f3Smrg# under the terms of the GNU General Public License as published by the 110369384b2f3Smrg# Free Software Foundation, either version 3 of the License, or (at your 110379384b2f3Smrg# option) any later version. 110389384b2f3Smrg# 110399384b2f3Smrg# This program is distributed in the hope that it will be useful, but 110409384b2f3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 110419384b2f3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 110429384b2f3Smrg# Public License for more details. 110439384b2f3Smrg# 110449384b2f3Smrg# You should have received a copy of the GNU General Public License along 110459384b2f3Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 110469384b2f3Smrg# 110479384b2f3Smrg# As a special exception, the respective Autoconf Macro's copyright owner 110489384b2f3Smrg# gives unlimited permission to copy, distribute and modify the configure 110499384b2f3Smrg# scripts that are the output of Autoconf when processing the Macro. You 110509384b2f3Smrg# need not follow the terms of the GNU General Public License when using 110519384b2f3Smrg# or distributing such scripts, even though portions of the text of the 110529384b2f3Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 110539384b2f3Smrg# all other use of the material that constitutes the Autoconf Macro. 110549384b2f3Smrg# 110559384b2f3Smrg# This special exception to the GPL applies to versions of the Autoconf 110569384b2f3Smrg# Macro released by the Autoconf Archive. When you make and distribute a 110579384b2f3Smrg# modified version of the Autoconf Macro, you may extend this special 110589384b2f3Smrg# exception to the GPL to apply to your modified version as well.# 110599384b2f3SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 110609384b2f3Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 110619384b2f3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 110629384b2f3SmrgAS_LITERAL_IF([$1], 110639384b2f3Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 110649384b2f3Smrg ax_save_FLAGS=$LDFLAGS 110659384b2f3Smrg LDFLAGS="$1" 110669384b2f3Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 110679384b2f3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110689384b2f3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110699384b2f3Smrg LDFLAGS=$ax_save_FLAGS])], 110709384b2f3Smrg [ax_save_FLAGS=$LDFLAGS 110719384b2f3Smrg LDFLAGS="$1" 110729384b2f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 110739384b2f3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110749384b2f3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110759384b2f3Smrg LDFLAGS=$ax_save_FLAGS]) 110769384b2f3Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 110779384b2f3SmrgAC_MSG_RESULT($xorg_check_linker_flags) 110789384b2f3Smrgif test "x$xorg_check_linker_flags" = xyes; then 110799384b2f3Smrg m4_default([$2], :) 110809384b2f3Smrgelse 110819384b2f3Smrg m4_default([$3], :) 110829384b2f3Smrgfi 110839384b2f3Smrg]) # XORG_CHECK_LINKER_FLAGS 11084966bf024Smrg 110859384b2f3Smrg# XORG_MEMORY_CHECK_FLAGS 110869384b2f3Smrg# ----------------------- 110879384b2f3Smrg# Minimum version: 1.16.0 110889384b2f3Smrg# 110899384b2f3Smrg# This macro attempts to find appropriate memory checking functionality 110909384b2f3Smrg# for various platforms which unit testing code may use to catch various 110919384b2f3Smrg# forms of memory allocation and access errors in testing. 110929384b2f3Smrg# 110939384b2f3Smrg# Interface to module: 110949384b2f3Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 110959384b2f3Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 110969384b2f3Smrg# 110979384b2f3Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 110989384b2f3Smrg# 110999384b2f3SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11100966bf024Smrg 111019384b2f3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 111029384b2f3SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 111039384b2f3Smrg [Environment variables to enable memory checking in tests]) 11104966bf024Smrg 111059384b2f3Smrg# Check for different types of support on different platforms 111069384b2f3Smrgcase $host_os in 11107966bf024Smrg solaris*) 111089384b2f3Smrg AC_CHECK_LIB([umem], [umem_alloc], 111099384b2f3Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11110966bf024Smrg ;; 111119384b2f3Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 111129384b2f3Smrg # both directly and inverted, so should not be 0 or 255. 111139384b2f3Smrg malloc_debug_env='MALLOC_PERTURB_=15' 111149384b2f3Smrg ;; 111159384b2f3Smrg darwin*) 111169384b2f3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 111179384b2f3Smrg ;; 111189384b2f3Smrg *bsd*) 111199384b2f3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 111209384b2f3Smrg ;; 111219384b2f3Smrgesac 11122966bf024Smrg 111239384b2f3Smrg# User supplied flags override default flags 111249384b2f3Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 111259384b2f3Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 111269384b2f3Smrgfi 11127966bf024Smrg 111289384b2f3SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 111299384b2f3Smrg]) # XORG_WITH_LINT 11130966bf024Smrg 111319384b2f3Smrg# XORG_CHECK_MALLOC_ZERO 111329384b2f3Smrg# ---------------------- 111339384b2f3Smrg# Minimum version: 1.0.0 111349384b2f3Smrg# 111359384b2f3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 111369384b2f3Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 111379384b2f3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 111389384b2f3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 111399384b2f3SmrgAC_ARG_ENABLE(malloc0returnsnull, 111409384b2f3Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 111419384b2f3Smrg [malloc(0) returns NULL (default: auto)]), 111429384b2f3Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 111439384b2f3Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 111449384b2f3Smrg 111459384b2f3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 111469384b2f3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 111479384b2f3Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 111489384b2f3Smrg#include <stdlib.h> 111499384b2f3Smrg],[ 111509384b2f3Smrg char *m0, *r0, *c0, *p; 111519384b2f3Smrg m0 = malloc(0); 111529384b2f3Smrg p = malloc(10); 111539384b2f3Smrg r0 = realloc(p,0); 111549384b2f3Smrg c0 = calloc(0,10); 111559384b2f3Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 111569384b2f3Smrg])], 111579384b2f3Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 111589384b2f3Smrg [MALLOC_ZERO_RETURNS_NULL=no], 111599384b2f3Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 111609384b2f3Smrgfi 111619384b2f3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11162966bf024Smrg 111639384b2f3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 111649384b2f3Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 111659384b2f3Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 111669384b2f3Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 111679384b2f3Smrgelse 111689384b2f3Smrg MALLOC_ZERO_CFLAGS="" 111699384b2f3Smrg XMALLOC_ZERO_CFLAGS="" 111709384b2f3Smrg XTMALLOC_ZERO_CFLAGS="" 11171966bf024Smrgfi 11172966bf024Smrg 111739384b2f3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 111749384b2f3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 111759384b2f3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 111769384b2f3Smrg]) # XORG_CHECK_MALLOC_ZERO 111779384b2f3Smrg 111789384b2f3Smrg# XORG_WITH_LINT() 111799384b2f3Smrg# ---------------- 111809384b2f3Smrg# Minimum version: 1.1.0 11181966bf024Smrg# 111829384b2f3Smrg# This macro enables the use of a tool that flags some suspicious and 111839384b2f3Smrg# non-portable constructs (likely to be bugs) in C language source code. 111849384b2f3Smrg# It will attempt to locate the tool and use appropriate options. 111859384b2f3Smrg# There are various lint type tools on different platforms. 11186966bf024Smrg# 111879384b2f3Smrg# Interface to module: 111889384b2f3Smrg# LINT: returns the path to the tool found on the platform 111899384b2f3Smrg# or the value set to LINT on the configure cmd line 111909384b2f3Smrg# also an Automake conditional 111919384b2f3Smrg# LINT_FLAGS: an Automake variable with appropriate flags 111929384b2f3Smrg# 111939384b2f3Smrg# --with-lint: 'yes' user instructs the module to use lint 111949384b2f3Smrg# 'no' user instructs the module not to use lint (default) 111959384b2f3Smrg# 111969384b2f3Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 111979384b2f3Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 111989384b2f3Smrg# 111999384b2f3SmrgAC_DEFUN([XORG_WITH_LINT],[ 11200966bf024Smrg 112019384b2f3SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 112029384b2f3SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 112039384b2f3SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 112049384b2f3Smrg [Use a lint-style source code checker (default: disabled)])], 112059384b2f3Smrg [use_lint=$withval], [use_lint=no]) 11206966bf024Smrg 112079384b2f3Smrg# Obtain platform specific info like program name and options 112089384b2f3Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 112099384b2f3Smrgcase $host_os in 112109384b2f3Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 112119384b2f3Smrg lint_name=splint 112129384b2f3Smrg lint_options="-badflag" 112139384b2f3Smrg ;; 112149384b2f3Smrg *freebsd* | *netbsd*) 112159384b2f3Smrg lint_name=lint 112169384b2f3Smrg lint_options="-u -b" 112179384b2f3Smrg ;; 112189384b2f3Smrg *solaris*) 112199384b2f3Smrg lint_name=lint 112209384b2f3Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 112219384b2f3Smrg ;; 112229384b2f3Smrgesac 11223966bf024Smrg 112249384b2f3Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 112259384b2f3Smrgif test "x$use_lint" = x"yes" ; then 112269384b2f3Smrg AC_PATH_PROG([LINT], [$lint_name]) 112279384b2f3Smrg if test "x$LINT" = "x"; then 112289384b2f3Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 112299384b2f3Smrg fi 112309384b2f3Smrgelif test "x$use_lint" = x"no" ; then 112319384b2f3Smrg if test "x$LINT" != "x"; then 112329384b2f3Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 112339384b2f3Smrg fi 112349384b2f3Smrgelse 112359384b2f3Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 112369384b2f3Smrgfi 11237966bf024Smrg 112389384b2f3Smrg# User supplied flags override default flags 112399384b2f3Smrgif test "x$LINT_FLAGS" != "x"; then 112409384b2f3Smrg lint_options=$LINT_FLAGS 112419384b2f3Smrgfi 11242966bf024Smrg 112439384b2f3SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 112449384b2f3SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11245966bf024Smrg 112469384b2f3Smrg]) # XORG_WITH_LINT 11247966bf024Smrg 112489384b2f3Smrg# XORG_LINT_LIBRARY(LIBNAME) 112499384b2f3Smrg# -------------------------- 112509384b2f3Smrg# Minimum version: 1.1.0 112519384b2f3Smrg# 112529384b2f3Smrg# Sets up flags for building lint libraries for checking programs that call 112539384b2f3Smrg# functions in the library. 112549384b2f3Smrg# 112559384b2f3Smrg# Interface to module: 112569384b2f3Smrg# LINTLIB - Automake variable with the name of lint library file to make 112579384b2f3Smrg# MAKE_LINT_LIB - Automake conditional 112589384b2f3Smrg# 112599384b2f3Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 112609384b2f3Smrg# - 'no' user instructs the module not to create a lint library (default) 112619384b2f3Smrg 112629384b2f3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 112639384b2f3SmrgAC_REQUIRE([XORG_WITH_LINT]) 112649384b2f3SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 112659384b2f3Smrg [Create lint library (default: disabled)])], 112669384b2f3Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 112679384b2f3Smrg 112689384b2f3Smrgif test "x$make_lint_lib" = x"yes" ; then 112699384b2f3Smrg LINTLIB=llib-l$1.ln 112709384b2f3Smrg if test "x$LINT" = "x"; then 112719384b2f3Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 112729384b2f3Smrg fi 112739384b2f3Smrgelif test "x$make_lint_lib" != x"no" ; then 112749384b2f3Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 112759384b2f3Smrgfi 11276966bf024Smrg 112779384b2f3SmrgAC_SUBST(LINTLIB) 112789384b2f3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11279966bf024Smrg 112809384b2f3Smrg]) # XORG_LINT_LIBRARY 11281966bf024Smrg 112829384b2f3Smrg# XORG_COMPILER_BRAND 112839384b2f3Smrg# ------------------- 112849384b2f3Smrg# Minimum version: 1.14.0 11285966bf024Smrg# 112869384b2f3Smrg# Checks for various brands of compilers and sets flags as appropriate: 112879384b2f3Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 112889384b2f3Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 112899384b2f3Smrg# clang compiler - sets CLANGCC to "yes" 112909384b2f3Smrg# Intel compiler - sets INTELCC to "yes" 112919384b2f3Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11292966bf024Smrg# 112939384b2f3SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 112949384b2f3SmrgAC_LANG_CASE( 112959384b2f3Smrg [C], [ 112969384b2f3Smrg AC_REQUIRE([AC_PROG_CC_C99]) 112979384b2f3Smrg ], 112989384b2f3Smrg [C++], [ 112999384b2f3Smrg AC_REQUIRE([AC_PROG_CXX]) 113009384b2f3Smrg ] 113019384b2f3Smrg) 113029384b2f3SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 113039384b2f3SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 113049384b2f3SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 113059384b2f3Smrg]) # XORG_COMPILER_BRAND 113069384b2f3Smrg 113079384b2f3Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 113089384b2f3Smrg# --------------- 113099384b2f3Smrg# Minimum version: 1.16.0 11310966bf024Smrg# 113119384b2f3Smrg# Test if the compiler works when passed the given flag as a command line argument. 113129384b2f3Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 113139384b2f3Smrg# next flag in the list until there are no more options. 11314966bf024Smrg# 113159384b2f3Smrg# Note that this does not guarantee that the compiler supports the flag as some 113169384b2f3Smrg# compilers will simply ignore arguments that they do not understand, but we do 113179384b2f3Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 113189384b2f3Smrg# -Werror=unused-command-line-argument 113199384b2f3Smrg# 113209384b2f3SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 113219384b2f3Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 113229384b2f3Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 113239384b2f3Smrg 113249384b2f3SmrgAC_LANG_COMPILER_REQUIRE 113259384b2f3Smrg 113269384b2f3SmrgAC_LANG_CASE( 113279384b2f3Smrg [C], [ 113289384b2f3Smrg AC_REQUIRE([AC_PROG_CC_C99]) 113299384b2f3Smrg define([PREFIX], [C]) 113309384b2f3Smrg define([CACHE_PREFIX], [cc]) 113319384b2f3Smrg define([COMPILER], [$CC]) 113329384b2f3Smrg ], 113339384b2f3Smrg [C++], [ 113349384b2f3Smrg define([PREFIX], [CXX]) 113359384b2f3Smrg define([CACHE_PREFIX], [cxx]) 113369384b2f3Smrg define([COMPILER], [$CXX]) 113379384b2f3Smrg ] 113389384b2f3Smrg) 11339966bf024Smrg 113409384b2f3Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 113419384b2f3Smrg 113429384b2f3Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 113439384b2f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113449384b2f3Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 113459384b2f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 113469384b2f3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113479384b2f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 113489384b2f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 113499384b2f3Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 113509384b2f3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 11351966bf024Smrgfi 113529384b2f3Smrg 113539384b2f3Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 113549384b2f3Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 113559384b2f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11356966bf024Smrg fi 113579384b2f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113589384b2f3Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 113599384b2f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 113609384b2f3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113619384b2f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 113629384b2f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 113639384b2f3Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 113649384b2f3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113659384b2f3Smrgfi 11366966bf024Smrg 113679384b2f3Smrgfound="no" 113689384b2f3Smrgm4_foreach([flag], m4_cdr($@), [ 113699384b2f3Smrg if test $found = "no" ; then 113709384b2f3Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 113719384b2f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113729384b2f3Smrg fi 113739384b2f3Smrg 113749384b2f3Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 113759384b2f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113769384b2f3Smrg fi 113779384b2f3Smrg 113789384b2f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 113799384b2f3Smrg 113809384b2f3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 113819384b2f3Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 113829384b2f3Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 113839384b2f3Smrg AC_CACHE_VAL($cacheid, 113849384b2f3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 113859384b2f3Smrg [eval $cacheid=yes], 113869384b2f3Smrg [eval $cacheid=no])]) 113879384b2f3Smrg 113889384b2f3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113899384b2f3Smrg 113909384b2f3Smrg eval supported=\$$cacheid 113919384b2f3Smrg AC_MSG_RESULT([$supported]) 113929384b2f3Smrg if test "$supported" = "yes" ; then 113939384b2f3Smrg $1="$$1 ]flag[" 113949384b2f3Smrg found="yes" 113959384b2f3Smrg fi 113969384b2f3Smrg fi 113979384b2f3Smrg]) 113989384b2f3Smrg]) # XORG_TESTSET_CFLAG 113999384b2f3Smrg 114009384b2f3Smrg# XORG_COMPILER_FLAGS 114019384b2f3Smrg# --------------- 114029384b2f3Smrg# Minimum version: 1.16.0 11403966bf024Smrg# 114049384b2f3Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 114059384b2f3Smrg# arguments supported by the selected compiler which do NOT alter the generated 114069384b2f3Smrg# code. These arguments will cause the compiler to print various warnings 114079384b2f3Smrg# during compilation AND turn a conservative set of warnings into errors. 11408966bf024Smrg# 114099384b2f3Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 114109384b2f3Smrg# future versions of util-macros as options are added to new compilers. 11411966bf024Smrg# 114129384b2f3SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 114139384b2f3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 114149384b2f3Smrg 114159384b2f3SmrgAC_ARG_ENABLE(selective-werror, 114169384b2f3Smrg AS_HELP_STRING([--disable-selective-werror], 114179384b2f3Smrg [Turn off selective compiler errors. (default: enabled)]), 114189384b2f3Smrg [SELECTIVE_WERROR=$enableval], 114199384b2f3Smrg [SELECTIVE_WERROR=yes]) 114209384b2f3Smrg 114219384b2f3SmrgAC_LANG_CASE( 114229384b2f3Smrg [C], [ 114239384b2f3Smrg define([PREFIX], [C]) 114249384b2f3Smrg ], 114259384b2f3Smrg [C++], [ 114269384b2f3Smrg define([PREFIX], [CXX]) 114279384b2f3Smrg ] 114289384b2f3Smrg) 114299384b2f3Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 114309384b2f3Smrgif test "x$SUNCC" = "xyes"; then 114319384b2f3Smrg [BASE_]PREFIX[FLAGS]="-v" 11432966bf024Smrgelse 114339384b2f3Smrg [BASE_]PREFIX[FLAGS]="" 114349384b2f3Smrgfi 11435966bf024Smrg 114369384b2f3Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 114379384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 114389384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 114399384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 114409384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 114419384b2f3Smrg 114429384b2f3SmrgAC_LANG_CASE( 114439384b2f3Smrg [C], [ 114449384b2f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 114459384b2f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 114469384b2f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 114479384b2f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 114489384b2f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 114499384b2f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 114509384b2f3Smrg ] 114519384b2f3Smrg) 114529384b2f3Smrg 114539384b2f3Smrg# This chunk adds additional warnings that could catch undesired effects. 114549384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 114559384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 114569384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 114579384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 114589384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 114599384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 114609384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 114619384b2f3Smrg 114629384b2f3Smrg# These are currently disabled because they are noisy. They will be enabled 114639384b2f3Smrg# in the future once the codebase is sufficiently modernized to silence 114649384b2f3Smrg# them. For now, I don't want them to drown out the other warnings. 114659384b2f3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 114669384b2f3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 114679384b2f3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 114689384b2f3Smrg 114699384b2f3Smrg# Turn some warnings into errors, so we don't accidently get successful builds 114709384b2f3Smrg# when there are problems that should be fixed. 114719384b2f3Smrg 114729384b2f3Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 114739384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 114749384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 114759384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 114769384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 114779384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 114789384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 114799384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 114809384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 114819384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 114829384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 114839384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 114849384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 114859384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11486966bf024Smrgelse 114879384b2f3SmrgAC_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]) 114889384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 114899384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 114909384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 114919384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 114929384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 114939384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 114949384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 114959384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 114969384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 114979384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 114989384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 114999384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 115009384b2f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 115019384b2f3Smrgfi 11502966bf024Smrg 115039384b2f3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115049384b2f3Smrg]) # XORG_COMPILER_FLAGS 11505966bf024Smrg 115069384b2f3Smrg# XORG_CWARNFLAGS 115079384b2f3Smrg# --------------- 115089384b2f3Smrg# Minimum version: 1.2.0 115099384b2f3Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11510966bf024Smrg# 115119384b2f3Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11512966bf024Smrg# 115139384b2f3Smrg# This function is deprecated because it defines -fno-strict-aliasing 115149384b2f3Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 115159384b2f3Smrg# is needed, then it should be added explicitly in the module when 115169384b2f3Smrg# it is updated to use BASE_CFLAGS. 11517966bf024Smrg# 115189384b2f3SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 115199384b2f3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 115209384b2f3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 115219384b2f3SmrgAC_LANG_CASE( 115229384b2f3Smrg [C], [ 115239384b2f3Smrg CWARNFLAGS="$BASE_CFLAGS" 115249384b2f3Smrg if test "x$GCC" = xyes ; then 115259384b2f3Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 115269384b2f3Smrg fi 115279384b2f3Smrg AC_SUBST(CWARNFLAGS) 115289384b2f3Smrg ] 115299384b2f3Smrg) 115309384b2f3Smrg]) # XORG_CWARNFLAGS 11531966bf024Smrg 115329384b2f3Smrg# XORG_STRICT_OPTION 115339384b2f3Smrg# ----------------------- 115349384b2f3Smrg# Minimum version: 1.3.0 115359384b2f3Smrg# 115369384b2f3Smrg# Add configure option to enable strict compilation flags, such as treating 115379384b2f3Smrg# warnings as fatal errors. 115389384b2f3Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 115399384b2f3Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 115409384b2f3Smrg# 115419384b2f3Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 115429384b2f3Smrg# when strict compilation is unconditionally desired. 115439384b2f3SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 115449384b2f3SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 115459384b2f3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 115469384b2f3Smrg 115479384b2f3SmrgAC_ARG_ENABLE(strict-compilation, 115489384b2f3Smrg AS_HELP_STRING([--enable-strict-compilation], 115499384b2f3Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 115509384b2f3Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 115519384b2f3Smrg 115529384b2f3SmrgAC_LANG_CASE( 115539384b2f3Smrg [C], [ 115549384b2f3Smrg define([PREFIX], [C]) 115559384b2f3Smrg ], 115569384b2f3Smrg [C++], [ 115579384b2f3Smrg define([PREFIX], [CXX]) 115589384b2f3Smrg ] 115599384b2f3Smrg) 11560966bf024Smrg 115619384b2f3Smrg[STRICT_]PREFIX[FLAGS]="" 115629384b2f3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 115639384b2f3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11564966bf024Smrg 115659384b2f3Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 115669384b2f3Smrg# activate it with -Werror, so we add it here explicitly. 115679384b2f3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11568966bf024Smrg 115699384b2f3Smrgif test "x$STRICT_COMPILE" = "xyes"; then 115709384b2f3Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 115719384b2f3Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 115729384b2f3Smrgfi 115739384b2f3SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 115749384b2f3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115759384b2f3SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 115769384b2f3Smrg]) # XORG_STRICT_OPTION 11577966bf024Smrg 115789384b2f3Smrg# XORG_DEFAULT_OPTIONS 115799384b2f3Smrg# -------------------- 115809384b2f3Smrg# Minimum version: 1.3.0 115819384b2f3Smrg# 115829384b2f3Smrg# Defines default options for X.Org modules. 115839384b2f3Smrg# 115849384b2f3SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 115859384b2f3SmrgAC_REQUIRE([AC_PROG_INSTALL]) 115869384b2f3SmrgXORG_COMPILER_FLAGS 115879384b2f3SmrgXORG_CWARNFLAGS 115889384b2f3SmrgXORG_STRICT_OPTION 115899384b2f3SmrgXORG_RELEASE_VERSION 115909384b2f3SmrgXORG_CHANGELOG 115919384b2f3SmrgXORG_INSTALL 115929384b2f3SmrgXORG_MANPAGE_SECTIONS 115939384b2f3Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 115949384b2f3Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 115959384b2f3Smrg]) # XORG_DEFAULT_OPTIONS 115969384b2f3Smrg 115979384b2f3Smrg# XORG_INSTALL() 115989384b2f3Smrg# ---------------- 115999384b2f3Smrg# Minimum version: 1.4.0 116009384b2f3Smrg# 116019384b2f3Smrg# Defines the variable INSTALL_CMD as the command to copy 116029384b2f3Smrg# INSTALL from $prefix/share/util-macros. 116039384b2f3Smrg# 116049384b2f3SmrgAC_DEFUN([XORG_INSTALL], [ 116059384b2f3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 116069384b2f3Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 116079384b2f3SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 116089384b2f3Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 116099384b2f3Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 116109384b2f3Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 116119384b2f3SmrgAC_SUBST([INSTALL_CMD]) 116129384b2f3Smrg]) # XORG_INSTALL 11613966bf024Smrgdnl Copyright 2005 Red Hat, Inc 11614966bf024Smrgdnl 11615966bf024Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11616966bf024Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11617966bf024Smrgdnl the above copyright notice appear in all copies and that both that 11618966bf024Smrgdnl copyright notice and this permission notice appear in supporting 11619966bf024Smrgdnl documentation. 11620966bf024Smrgdnl 11621966bf024Smrgdnl The above copyright notice and this permission notice shall be included 11622966bf024Smrgdnl in all copies or substantial portions of the Software. 11623966bf024Smrgdnl 11624966bf024Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11625966bf024Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11626966bf024Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11627966bf024Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11628966bf024Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11629966bf024Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11630966bf024Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11631966bf024Smrgdnl 11632966bf024Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11633966bf024Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11634966bf024Smrgdnl other dealings in this Software without prior written authorization 11635966bf024Smrgdnl from the copyright holders. 11636966bf024Smrgdnl 11637966bf024Smrg 11638966bf024Smrg# XORG_RELEASE_VERSION 11639966bf024Smrg# -------------------- 116409384b2f3Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11641966bf024Smrg 11642966bf024SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 116439384b2f3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 116449384b2f3Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 116459384b2f3Smrg [Major version of this package]) 116469384b2f3Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 116479384b2f3Smrg if test "x$PVM" = "x"; then 116489384b2f3Smrg PVM="0" 11649966bf024Smrg fi 116509384b2f3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 116519384b2f3Smrg [$PVM], 116529384b2f3Smrg [Minor version of this package]) 116539384b2f3Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 116549384b2f3Smrg if test "x$PVP" = "x"; then 116559384b2f3Smrg PVP="0" 116569384b2f3Smrg fi 116579384b2f3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 116589384b2f3Smrg [$PVP], 116599384b2f3Smrg [Patch version of this package]) 11660966bf024Smrg]) 11661966bf024Smrg 116629384b2f3Smrg# XORG_CHANGELOG() 116639384b2f3Smrg# ---------------- 116649384b2f3Smrg# Minimum version: 1.2.0 116659384b2f3Smrg# 116669384b2f3Smrg# Defines the variable CHANGELOG_CMD as the command to generate 116679384b2f3Smrg# ChangeLog from git. 116689384b2f3Smrg# 116699384b2f3Smrg# 116709384b2f3SmrgAC_DEFUN([XORG_CHANGELOG], [ 116719384b2f3SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 116729384b2f3Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 116739384b2f3Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 116749384b2f3Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 116759384b2f3SmrgAC_SUBST([CHANGELOG_CMD]) 116769384b2f3Smrg]) # XORG_CHANGELOG 116779384b2f3Smrg 11678