aclocal.m4 revision 1e449e82
11e449e82Smrg# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 21e449e82Smrg 31e449e82Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4ab47cfaaSmrg 5ab47cfaaSmrg# This file is free software; the Free Software Foundation 6ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 8ab47cfaaSmrg 9ab47cfaaSmrg# This program is distributed in the hope that it will be useful, 10ab47cfaaSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ab47cfaaSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ab47cfaaSmrg# PARTICULAR PURPOSE. 13ab47cfaaSmrg 141e449e82Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 158697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 168697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1738770048Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1838770048Smrg[m4_warning([this file was generated for autoconf 2.69. 198697ee19SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 208697ee19SmrgIf you have problems, you may need to regenerate the build system entirely. 211e449e82SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 228697ee19Smrg 23ab47cfaaSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 246aec45a7Smrg# 256aec45a7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26aa9e3350Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27aa9e3350Smrg# Foundation, Inc. 286aec45a7Smrg# Written by Gordon Matzigkeit, 1996 296aec45a7Smrg# 306aec45a7Smrg# This file is free software; the Free Software Foundation gives 316aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 326aec45a7Smrg# modifications, as long as this notice is preserved. 336aec45a7Smrg 346aec45a7Smrgm4_define([_LT_COPYING], [dnl 356aec45a7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36aa9e3350Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37aa9e3350Smrg# Foundation, Inc. 386aec45a7Smrg# Written by Gordon Matzigkeit, 1996 396aec45a7Smrg# 406aec45a7Smrg# This file is part of GNU Libtool. 416aec45a7Smrg# 426aec45a7Smrg# GNU Libtool is free software; you can redistribute it and/or 436aec45a7Smrg# modify it under the terms of the GNU General Public License as 446aec45a7Smrg# published by the Free Software Foundation; either version 2 of 456aec45a7Smrg# the License, or (at your option) any later version. 466aec45a7Smrg# 476aec45a7Smrg# As a special exception to the GNU General Public License, 486aec45a7Smrg# if you distribute this file as part of a program or library that 496aec45a7Smrg# is built using GNU Libtool, you may include this file under the 506aec45a7Smrg# same distribution terms that you use for the rest of that program. 516aec45a7Smrg# 526aec45a7Smrg# GNU Libtool is distributed in the hope that it will be useful, 536aec45a7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 546aec45a7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 556aec45a7Smrg# GNU General Public License for more details. 566aec45a7Smrg# 576aec45a7Smrg# You should have received a copy of the GNU General Public License 586aec45a7Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 596aec45a7Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 606aec45a7Smrg# obtained by writing to the Free Software Foundation, Inc., 616aec45a7Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 626aec45a7Smrg]) 63ab47cfaaSmrg 646aec45a7Smrg# serial 57 LT_INIT 65ab47cfaaSmrg 66ab47cfaaSmrg 676aec45a7Smrg# LT_PREREQ(VERSION) 686aec45a7Smrg# ------------------ 696aec45a7Smrg# Complain and exit if this libtool version is less that VERSION. 706aec45a7Smrgm4_defun([LT_PREREQ], 716aec45a7Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 726aec45a7Smrg [m4_default([$3], 736aec45a7Smrg [m4_fatal([Libtool version $1 or higher is required], 746aec45a7Smrg 63)])], 756aec45a7Smrg [$2])]) 761473d951Smrg 771473d951Smrg 786aec45a7Smrg# _LT_CHECK_BUILDDIR 796aec45a7Smrg# ------------------ 806aec45a7Smrg# Complain if the absolute build directory name contains unusual characters 816aec45a7Smrgm4_defun([_LT_CHECK_BUILDDIR], 826aec45a7Smrg[case `pwd` in 836aec45a7Smrg *\ * | *\ *) 846aec45a7Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 856aec45a7Smrgesac 866aec45a7Smrg]) 876aec45a7Smrg 886aec45a7Smrg 896aec45a7Smrg# LT_INIT([OPTIONS]) 906aec45a7Smrg# ------------------ 916aec45a7SmrgAC_DEFUN([LT_INIT], 926aec45a7Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 936aec45a7SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 946aec45a7SmrgAC_BEFORE([$0], [LT_LANG])dnl 956aec45a7SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 966aec45a7SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 976aec45a7Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 986aec45a7Smrg 996aec45a7Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1006aec45a7Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1016aec45a7Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1026aec45a7Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1036aec45a7Smrgdnl unless we require an AC_DEFUNed macro: 1046aec45a7SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1056aec45a7SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1066aec45a7SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1076aec45a7SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1086aec45a7Smrgm4_require([_LT_PROG_LTMAIN])dnl 1096aec45a7Smrg 1106aec45a7Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1116aec45a7Smrg 1126aec45a7Smrgdnl Parse OPTIONS 1136aec45a7Smrg_LT_SET_OPTIONS([$0], [$1]) 114ab47cfaaSmrg 115ab47cfaaSmrg# This can be used to rebuild libtool when needed 1166aec45a7SmrgLIBTOOL_DEPS="$ltmain" 117ab47cfaaSmrg 118ab47cfaaSmrg# Always use our own libtool. 119ab47cfaaSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120ab47cfaaSmrgAC_SUBST(LIBTOOL)dnl 121ab47cfaaSmrg 1226aec45a7Smrg_LT_SETUP 1231473d951Smrg 1246aec45a7Smrg# Only expand once: 1256aec45a7Smrgm4_define([LT_INIT]) 1266aec45a7Smrg])# LT_INIT 1271473d951Smrg 1286aec45a7Smrg# Old names: 1296aec45a7SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1306aec45a7SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1316aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 1326aec45a7Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1336aec45a7Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1346aec45a7Smrg 1356aec45a7Smrg 1366aec45a7Smrg# _LT_CC_BASENAME(CC) 1376aec45a7Smrg# ------------------- 1386aec45a7Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1396aec45a7Smrgm4_defun([_LT_CC_BASENAME], 1406aec45a7Smrg[for cc_temp in $1""; do 1416aec45a7Smrg case $cc_temp in 1426aec45a7Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1436aec45a7Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1446aec45a7Smrg \-*) ;; 1456aec45a7Smrg *) break;; 1466aec45a7Smrg esac 1476aec45a7Smrgdone 1486aec45a7Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1496aec45a7Smrg]) 1506aec45a7Smrg 1516aec45a7Smrg 1526aec45a7Smrg# _LT_FILEUTILS_DEFAULTS 1536aec45a7Smrg# ---------------------- 1546aec45a7Smrg# It is okay to use these file commands and assume they have been set 1556aec45a7Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1566aec45a7Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1576aec45a7Smrg[: ${CP="cp -f"} 1586aec45a7Smrg: ${MV="mv -f"} 1596aec45a7Smrg: ${RM="rm -f"} 1606aec45a7Smrg])# _LT_FILEUTILS_DEFAULTS 1616aec45a7Smrg 1626aec45a7Smrg 1636aec45a7Smrg# _LT_SETUP 1646aec45a7Smrg# --------- 1656aec45a7Smrgm4_defun([_LT_SETUP], 1666aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1686aec45a7SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1696aec45a7SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1705c42550eSmrg 171aa9e3350Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172aa9e3350Smrgdnl 1736aec45a7Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1746aec45a7Smrg_LT_DECL([], [host], [0])dnl 1756aec45a7Smrg_LT_DECL([], [host_os], [0])dnl 1766aec45a7Smrgdnl 1776aec45a7Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1786aec45a7Smrg_LT_DECL([], [build], [0])dnl 1796aec45a7Smrg_LT_DECL([], [build_os], [0])dnl 1806aec45a7Smrgdnl 1816aec45a7SmrgAC_REQUIRE([AC_PROG_CC])dnl 1826aec45a7SmrgAC_REQUIRE([LT_PATH_LD])dnl 1836aec45a7SmrgAC_REQUIRE([LT_PATH_NM])dnl 1846aec45a7Smrgdnl 185ab47cfaaSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1866aec45a7Smrgtest -z "$LN_S" && LN_S="ln -s" 1876aec45a7Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1886aec45a7Smrgdnl 1896aec45a7SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1906aec45a7Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1916aec45a7Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1921473d951Smrgdnl 1936aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1946aec45a7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195aa9e3350Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1966aec45a7Smrgm4_require([_LT_CMD_RELOAD])dnl 1976aec45a7Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198aa9e3350Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1996aec45a7Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2006aec45a7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201aa9e3350Smrgm4_require([_LT_WITH_SYSROOT])dnl 2026aec45a7Smrg 2036aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([ 2046aec45a7Smrg# See if we are running on zsh, and set the options which allow our 2056aec45a7Smrg# commands through without removal of \ escapes INIT. 2066aec45a7Smrgif test -n "\${ZSH_VERSION+set}" ; then 2076aec45a7Smrg setopt NO_GLOB_SUBST 2086aec45a7Smrgfi 2096aec45a7Smrg]) 2106aec45a7Smrgif test -n "${ZSH_VERSION+set}" ; then 2116aec45a7Smrg setopt NO_GLOB_SUBST 2126aec45a7Smrgfi 2136aec45a7Smrg 2146aec45a7Smrg_LT_CHECK_OBJDIR 215ab47cfaaSmrg 2166aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 217ab47cfaaSmrg 218ab47cfaaSmrgcase $host_os in 219ab47cfaaSmrgaix3*) 220ab47cfaaSmrg # AIX sometimes has problems with the GCC collect2 program. For some 221ab47cfaaSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222ab47cfaaSmrg # vanish in a puff of smoke. 223ab47cfaaSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 224ab47cfaaSmrg COLLECT_NAMES= 225ab47cfaaSmrg export COLLECT_NAMES 226ab47cfaaSmrg fi 227ab47cfaaSmrg ;; 228ab47cfaaSmrgesac 229ab47cfaaSmrg 230ab47cfaaSmrg# Global variables: 2316aec45a7Smrgofile=libtool 232ab47cfaaSmrgcan_build_shared=yes 233ab47cfaaSmrg 234ab47cfaaSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 235ab47cfaaSmrg# which needs '.lib'). 236ab47cfaaSmrglibext=a 237ab47cfaaSmrg 2386aec45a7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2395c42550eSmrg 240ab47cfaaSmrgold_CC="$CC" 241ab47cfaaSmrgold_CFLAGS="$CFLAGS" 242ab47cfaaSmrg 243ab47cfaaSmrg# Set sane defaults for various variables 244ab47cfaaSmrgtest -z "$CC" && CC=cc 245ab47cfaaSmrgtest -z "$LTCC" && LTCC=$CC 246ab47cfaaSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247ab47cfaaSmrgtest -z "$LD" && LD=ld 248ab47cfaaSmrgtest -z "$ac_objext" && ac_objext=o 249ab47cfaaSmrg 250ab47cfaaSmrg_LT_CC_BASENAME([$compiler]) 251ab47cfaaSmrg 252ab47cfaaSmrg# Only perform the check for file, if the check method requires it 2536aec45a7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254ab47cfaaSmrgcase $deplibs_check_method in 255ab47cfaaSmrgfile_magic*) 256ab47cfaaSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2576aec45a7Smrg _LT_PATH_MAGIC 258ab47cfaaSmrg fi 259ab47cfaaSmrg ;; 260ab47cfaaSmrgesac 261ab47cfaaSmrg 2626aec45a7Smrg# Use C for the default configuration in the libtool script 2636aec45a7SmrgLT_SUPPORTED_TAG([CC]) 2646aec45a7Smrg_LT_LANG_C_CONFIG 2656aec45a7Smrg_LT_LANG_DEFAULT_CONFIG 2666aec45a7Smrg_LT_CONFIG_COMMANDS 2676aec45a7Smrg])# _LT_SETUP 2681473d951Smrg 2691473d951Smrg 2706aec45a7Smrg# _LT_PREPARE_SED_QUOTE_VARS 2716aec45a7Smrg# -------------------------- 2726aec45a7Smrg# Define a few sed substitution that help us do robust quoting. 2736aec45a7Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2746aec45a7Smrg[# Backslashify metacharacters that are still active within 2756aec45a7Smrg# double-quoted strings. 2766aec45a7Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2771473d951Smrg 2786aec45a7Smrg# Same as above, but do not quote variable references. 2796aec45a7Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2801473d951Smrg 2816aec45a7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2826aec45a7Smrg# double_quote_subst'ed string. 2836aec45a7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2841473d951Smrg 2856aec45a7Smrg# Sed substitution to delay expansion of an escaped single quote. 2866aec45a7Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2871473d951Smrg 2886aec45a7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2896aec45a7Smrgno_glob_subst='s/\*/\\\*/g' 2906aec45a7Smrg]) 291ab47cfaaSmrg 2926aec45a7Smrg# _LT_PROG_LTMAIN 2936aec45a7Smrg# --------------- 2946aec45a7Smrg# Note that this code is called both from `configure', and `config.status' 2956aec45a7Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2966aec45a7Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2976aec45a7Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2986aec45a7Smrgm4_defun([_LT_PROG_LTMAIN], 2996aec45a7Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3006aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3016aec45a7Smrgltmain="$ac_aux_dir/ltmain.sh" 3026aec45a7Smrg])# _LT_PROG_LTMAIN 303ab47cfaaSmrg 304ab47cfaaSmrg 3055c42550eSmrg 3066aec45a7Smrg# So that we can recreate a full libtool script including additional 3076aec45a7Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3086aec45a7Smrg# in macros and then make a single call at the end using the `libtool' 3096aec45a7Smrg# label. 3105c42550eSmrg 311ab47cfaaSmrg 3126aec45a7Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3136aec45a7Smrg# ---------------------------------------- 3146aec45a7Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3156aec45a7Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3166aec45a7Smrg[m4_ifval([$1], 3176aec45a7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3186aec45a7Smrg [$1 3196aec45a7Smrg])])]) 320ab47cfaaSmrg 3216aec45a7Smrg# Initialize. 3226aec45a7Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323ab47cfaaSmrg 324ab47cfaaSmrg 3256aec45a7Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3266aec45a7Smrg# ------------------------------ 3276aec45a7Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3286aec45a7Smrgm4_define([_LT_CONFIG_LIBTOOL], 3296aec45a7Smrg[m4_ifval([$1], 3306aec45a7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3316aec45a7Smrg [$1 3326aec45a7Smrg])])]) 3336aec45a7Smrg 3346aec45a7Smrg# Initialize. 3356aec45a7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3366aec45a7Smrg 3376aec45a7Smrg 3386aec45a7Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3396aec45a7Smrg# ----------------------------------------------------- 3406aec45a7Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3416aec45a7Smrg[_LT_CONFIG_LIBTOOL([$1]) 3426aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3436aec45a7Smrg]) 344ab47cfaaSmrg 3451473d951Smrg 3466aec45a7Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3476aec45a7Smrg# ----------------------------- 3486aec45a7Smrg# Add leading comment marks to the start of each line, and a trailing 3496aec45a7Smrg# full-stop to the whole comment if one is not present already. 3506aec45a7Smrgm4_define([_LT_FORMAT_COMMENT], 3516aec45a7Smrg[m4_ifval([$1], [ 3526aec45a7Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3536aec45a7Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3546aec45a7Smrg)]) 3556aec45a7Smrg 3566aec45a7Smrg 3576aec45a7Smrg 3586aec45a7Smrg 3596aec45a7Smrg 3606aec45a7Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3616aec45a7Smrg# ------------------------------------------------------------------- 3626aec45a7Smrg# CONFIGNAME is the name given to the value in the libtool script. 3636aec45a7Smrg# VARNAME is the (base) name used in the configure script. 3646aec45a7Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3656aec45a7Smrg# VARNAME. Any other value will be used directly. 3666aec45a7Smrgm4_define([_LT_DECL], 3676aec45a7Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3686aec45a7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3696aec45a7Smrg [m4_ifval([$1], [$1], [$2])]) 3706aec45a7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3716aec45a7Smrg m4_ifval([$4], 3726aec45a7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3736aec45a7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3746aec45a7Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3751473d951Smrg]) 3761473d951Smrg 377ab47cfaaSmrg 3786aec45a7Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3796aec45a7Smrg# -------------------------------------------------------- 3806aec45a7Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381ab47cfaaSmrg 382ab47cfaaSmrg 3836aec45a7Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3846aec45a7Smrg# ------------------------------------------------ 3856aec45a7Smrgm4_define([lt_decl_tag_varnames], 3866aec45a7Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 387ab47cfaaSmrg 388ab47cfaaSmrg 3896aec45a7Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3906aec45a7Smrg# --------------------------------------------------------- 3916aec45a7Smrgm4_define([_lt_decl_filter], 3926aec45a7Smrg[m4_case([$#], 3936aec45a7Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3946aec45a7Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3956aec45a7Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3966aec45a7Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3976aec45a7Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3986aec45a7Smrg]) 399ab47cfaaSmrg 400ab47cfaaSmrg 4016aec45a7Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4026aec45a7Smrg# -------------------------------------------------- 4036aec45a7Smrgm4_define([lt_decl_quote_varnames], 4046aec45a7Smrg[_lt_decl_filter([value], [1], $@)]) 405ab47cfaaSmrg 406ab47cfaaSmrg 4076aec45a7Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4086aec45a7Smrg# --------------------------------------------------- 4096aec45a7Smrgm4_define([lt_decl_dquote_varnames], 4106aec45a7Smrg[_lt_decl_filter([value], [2], $@)]) 411ab47cfaaSmrg 412ab47cfaaSmrg 4136aec45a7Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4146aec45a7Smrg# --------------------------------------------------- 4156aec45a7Smrgm4_define([lt_decl_varnames_tagged], 4166aec45a7Smrg[m4_assert([$# <= 2])dnl 4176aec45a7Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4186aec45a7Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4196aec45a7Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4206aec45a7Smrgm4_define([_lt_decl_varnames_tagged], 4216aec45a7Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422ab47cfaaSmrg 4235c42550eSmrg 4246aec45a7Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4256aec45a7Smrg# ------------------------------------------------ 4266aec45a7Smrgm4_define([lt_decl_all_varnames], 4276aec45a7Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4286aec45a7Smrg m4_if([$2], [], 4296aec45a7Smrg m4_quote(lt_decl_varnames), 4306aec45a7Smrg m4_quote(m4_shift($@))))[]dnl 4316aec45a7Smrg]) 4326aec45a7Smrgm4_define([_lt_decl_all_varnames], 4336aec45a7Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4346aec45a7Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4356aec45a7Smrg]) 436ab47cfaaSmrg 437ab47cfaaSmrg 4386aec45a7Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4396aec45a7Smrg# ------------------------------------ 4406aec45a7Smrg# Quote a variable value, and forward it to `config.status' so that its 4416aec45a7Smrg# declaration there will have the same value as in `configure'. VARNAME 4426aec45a7Smrg# must have a single quote delimited value for this to work. 4436aec45a7Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4446aec45a7Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445ab47cfaaSmrg 446ab47cfaaSmrg 4476aec45a7Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4486aec45a7Smrg# ------------------------------ 4496aec45a7Smrg# We delimit libtool config variables with single quotes, so when 4506aec45a7Smrg# we write them to config.status, we have to be sure to quote all 4516aec45a7Smrg# embedded single quotes properly. In configure, this macro expands 4526aec45a7Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4536aec45a7Smrg# 4546aec45a7Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4556aec45a7Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4566aec45a7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4576aec45a7Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458ab47cfaaSmrg 4596aec45a7Smrg 4606aec45a7Smrg# _LT_LIBTOOL_TAGS 4616aec45a7Smrg# ---------------- 4626aec45a7Smrg# Output comment and list of tags supported by the script 4636aec45a7Smrgm4_defun([_LT_LIBTOOL_TAGS], 4646aec45a7Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4656aec45a7Smrgavailable_tags="_LT_TAGS"dnl 4666aec45a7Smrg]) 4676aec45a7Smrg 4686aec45a7Smrg 4696aec45a7Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4706aec45a7Smrg# ----------------------------------- 4716aec45a7Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4726aec45a7Smrg# expand to a commented shell variable setting: 4736aec45a7Smrg# 4746aec45a7Smrg# # Some comment about what VAR is for. 4756aec45a7Smrg# visible_name=$lt_internal_name 4766aec45a7Smrgm4_define([_LT_LIBTOOL_DECLARE], 4776aec45a7Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4786aec45a7Smrg [description])))[]dnl 4796aec45a7Smrgm4_pushdef([_libtool_name], 4806aec45a7Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4816aec45a7Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4826aec45a7Smrg [0], [_libtool_name=[$]$1], 4836aec45a7Smrg [1], [_libtool_name=$lt_[]$1], 4846aec45a7Smrg [2], [_libtool_name=$lt_[]$1], 4856aec45a7Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4866aec45a7Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4876aec45a7Smrg]) 4886aec45a7Smrg 4896aec45a7Smrg 4906aec45a7Smrg# _LT_LIBTOOL_CONFIG_VARS 4916aec45a7Smrg# ----------------------- 4926aec45a7Smrg# Produce commented declarations of non-tagged libtool config variables 4936aec45a7Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4946aec45a7Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4956aec45a7Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4966aec45a7Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4976aec45a7Smrg[m4_foreach([_lt_var], 4986aec45a7Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4996aec45a7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5006aec45a7Smrg 5016aec45a7Smrg 5026aec45a7Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5036aec45a7Smrg# ------------------------- 5046aec45a7Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5056aec45a7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5066aec45a7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5076aec45a7Smrg 5086aec45a7Smrg 5096aec45a7Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5106aec45a7Smrg# ------------------------------ 5116aec45a7Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5126aec45a7Smrg 5136aec45a7Smrg 5146aec45a7Smrg# _LT_CONFIG_COMMANDS 5156aec45a7Smrg# ------------------- 5166aec45a7Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5176aec45a7Smrg# variables for single and double quote escaping we saved from calls 5186aec45a7Smrg# to _LT_DECL, we can put quote escaped variables declarations 5196aec45a7Smrg# into `config.status', and then the shell code to quote escape them in 5206aec45a7Smrg# for loops in `config.status'. Finally, any additional code accumulated 5216aec45a7Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5226aec45a7Smrgm4_defun([_LT_CONFIG_COMMANDS], 5236aec45a7Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5246aec45a7Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5256aec45a7Smrg dnl instead of duplicating it all over again into config.status, 5266aec45a7Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5276aec45a7Smrg dnl needs to know what name is stored there: 5286aec45a7Smrg [AC_CONFIG_COMMANDS([libtool], 5296aec45a7Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5306aec45a7Smrg dnl If the libtool generation code is destined for config.status, 5316aec45a7Smrg dnl expand the accumulated commands and init code now: 5326aec45a7Smrg [AC_CONFIG_COMMANDS([libtool], 5336aec45a7Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5346aec45a7Smrg])#_LT_CONFIG_COMMANDS 5356aec45a7Smrg 5366aec45a7Smrg 5376aec45a7Smrg# Initialize. 5386aec45a7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5396aec45a7Smrg[ 5406aec45a7Smrg 5416aec45a7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5426aec45a7Smrg# if CDPATH is set. 5436aec45a7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5446aec45a7Smrg 5456aec45a7Smrgsed_quote_subst='$sed_quote_subst' 5466aec45a7Smrgdouble_quote_subst='$double_quote_subst' 5476aec45a7Smrgdelay_variable_subst='$delay_variable_subst' 5486aec45a7Smrg_LT_CONFIG_STATUS_DECLARATIONS 5496aec45a7SmrgLTCC='$LTCC' 5506aec45a7SmrgLTCFLAGS='$LTCFLAGS' 5516aec45a7Smrgcompiler='$compiler_DEFAULT' 5526aec45a7Smrg 5536aec45a7Smrg# A function that is used when there is no print builtin or printf. 5546aec45a7Smrgfunc_fallback_echo () 5556aec45a7Smrg{ 5566aec45a7Smrg eval 'cat <<_LTECHO_EOF 5576aec45a7Smrg\$[]1 5586aec45a7Smrg_LTECHO_EOF' 5596aec45a7Smrg} 5606aec45a7Smrg 5616aec45a7Smrg# Quote evaled strings. 5626aec45a7Smrgfor var in lt_decl_all_varnames([[ \ 5636aec45a7Smrg]], lt_decl_quote_varnames); do 5646aec45a7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5656aec45a7Smrg *[[\\\\\\\`\\"\\\$]]*) 5666aec45a7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5675c42550eSmrg ;; 5686aec45a7Smrg *) 5696aec45a7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5705c42550eSmrg ;; 5715c42550eSmrg esac 5726aec45a7Smrgdone 573ab47cfaaSmrg 5746aec45a7Smrg# Double-quote double-evaled strings. 5756aec45a7Smrgfor var in lt_decl_all_varnames([[ \ 5766aec45a7Smrg]], lt_decl_dquote_varnames); do 5776aec45a7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5786aec45a7Smrg *[[\\\\\\\`\\"\\\$]]*) 5796aec45a7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5805c42550eSmrg ;; 5816aec45a7Smrg *) 5826aec45a7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5835c42550eSmrg ;; 584ab47cfaaSmrg esac 5856aec45a7Smrgdone 586ab47cfaaSmrg 5876aec45a7Smrg_LT_OUTPUT_LIBTOOL_INIT 5886aec45a7Smrg]) 5895c42550eSmrg 5906aec45a7Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5916aec45a7Smrg# ------------------------------------ 5926aec45a7Smrg# Generate a child script FILE with all initialization necessary to 5936aec45a7Smrg# reuse the environment learned by the parent script, and make the 5946aec45a7Smrg# file executable. If COMMENT is supplied, it is inserted after the 5956aec45a7Smrg# `#!' sequence but before initialization text begins. After this 5966aec45a7Smrg# macro, additional text can be appended to FILE to form the body of 5976aec45a7Smrg# the child script. The macro ends with non-zero status if the 5986aec45a7Smrg# file could not be fully written (such as if the disk is full). 5996aec45a7Smrgm4_ifdef([AS_INIT_GENERATED], 6006aec45a7Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6016aec45a7Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6026aec45a7Smrg[m4_require([AS_PREPARE])]dnl 6036aec45a7Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6046aec45a7Smrg[lt_write_fail=0 6056aec45a7Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6066aec45a7Smrg#! $SHELL 6076aec45a7Smrg# Generated by $as_me. 6086aec45a7Smrg$2 6096aec45a7SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6106aec45a7Smrgexport SHELL 6116aec45a7Smrg_ASEOF 6126aec45a7Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6136aec45a7SmrgAS_SHELL_SANITIZE 6146aec45a7Smrg_AS_PREPARE 6156aec45a7Smrgexec AS_MESSAGE_FD>&1 6166aec45a7Smrg_ASEOF 6176aec45a7Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 6186aec45a7Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6196aec45a7Smrg 6206aec45a7Smrg# LT_OUTPUT 6216aec45a7Smrg# --------- 6226aec45a7Smrg# This macro allows early generation of the libtool script (before 6236aec45a7Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6246aec45a7Smrg# tests. 6256aec45a7SmrgAC_DEFUN([LT_OUTPUT], 6266aec45a7Smrg[: ${CONFIG_LT=./config.lt} 6276aec45a7SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6286aec45a7Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6296aec45a7Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6306aec45a7Smrg 6316aec45a7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6326aec45a7Smrglt_cl_silent=false 6336aec45a7Smrgexec AS_MESSAGE_LOG_FD>>config.log 6346aec45a7Smrg{ 6356aec45a7Smrg echo 6366aec45a7Smrg AS_BOX([Running $as_me.]) 6376aec45a7Smrg} >&AS_MESSAGE_LOG_FD 638ab47cfaaSmrg 6396aec45a7Smrglt_cl_help="\ 6406aec45a7Smrg\`$as_me' creates a local libtool stub from the current configuration, 6416aec45a7Smrgfor use in further configure time tests before the real libtool is 6426aec45a7Smrggenerated. 6431473d951Smrg 6446aec45a7SmrgUsage: $[0] [[OPTIONS]] 645ab47cfaaSmrg 6466aec45a7Smrg -h, --help print this help, then exit 6476aec45a7Smrg -V, --version print version number, then exit 6486aec45a7Smrg -q, --quiet do not print progress messages 6496aec45a7Smrg -d, --debug don't remove temporary files 650ab47cfaaSmrg 6516aec45a7SmrgReport bugs to <bug-libtool@gnu.org>." 652ab47cfaaSmrg 6536aec45a7Smrglt_cl_version="\ 6546aec45a7Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6556aec45a7Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6566aec45a7Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657ab47cfaaSmrg 658aa9e3350SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6596aec45a7SmrgThis config.lt script is free software; the Free Software Foundation 6606aec45a7Smrggives unlimited permision to copy, distribute and modify it." 6611473d951Smrg 6626aec45a7Smrgwhile test $[#] != 0 6636aec45a7Smrgdo 6646aec45a7Smrg case $[1] in 6656aec45a7Smrg --version | --v* | -V ) 6666aec45a7Smrg echo "$lt_cl_version"; exit 0 ;; 6676aec45a7Smrg --help | --h* | -h ) 6686aec45a7Smrg echo "$lt_cl_help"; exit 0 ;; 6696aec45a7Smrg --debug | --d* | -d ) 6706aec45a7Smrg debug=: ;; 6716aec45a7Smrg --quiet | --q* | --silent | --s* | -q ) 6726aec45a7Smrg lt_cl_silent=: ;; 6736aec45a7Smrg 6746aec45a7Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6756aec45a7SmrgTry \`$[0] --help' for more information.]) ;; 6766aec45a7Smrg 6776aec45a7Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6786aec45a7SmrgTry \`$[0] --help' for more information.]) ;; 6796aec45a7Smrg esac 6806aec45a7Smrg shift 6816aec45a7Smrgdone 682ab47cfaaSmrg 6836aec45a7Smrgif $lt_cl_silent; then 6846aec45a7Smrg exec AS_MESSAGE_FD>/dev/null 685ab47cfaaSmrgfi 6866aec45a7Smrg_LTEOF 6876aec45a7Smrg 6886aec45a7Smrgcat >>"$CONFIG_LT" <<_LTEOF 6896aec45a7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6906aec45a7Smrg_LTEOF 6916aec45a7Smrg 6926aec45a7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6936aec45a7SmrgAC_MSG_NOTICE([creating $ofile]) 6946aec45a7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6956aec45a7SmrgAS_EXIT(0) 6966aec45a7Smrg_LTEOF 6976aec45a7Smrgchmod +x "$CONFIG_LT" 6986aec45a7Smrg 6996aec45a7Smrg# configure is writing to config.log, but config.lt does its own redirection, 7006aec45a7Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7016aec45a7Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7026aec45a7Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7036aec45a7Smrglt_cl_success=: 7046aec45a7Smrgtest "$silent" = yes && 7056aec45a7Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7066aec45a7Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7076aec45a7Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7086aec45a7Smrgexec AS_MESSAGE_LOG_FD>>config.log 7096aec45a7Smrg$lt_cl_success || AS_EXIT(1) 7106aec45a7Smrg])# LT_OUTPUT 7116aec45a7Smrg 7126aec45a7Smrg 7136aec45a7Smrg# _LT_CONFIG(TAG) 7146aec45a7Smrg# --------------- 7156aec45a7Smrg# If TAG is the built-in tag, create an initial libtool script with a 7166aec45a7Smrg# default configuration from the untagged config vars. Otherwise add code 7176aec45a7Smrg# to config.status for appending the configuration named by TAG from the 7186aec45a7Smrg# matching tagged config vars. 7196aec45a7Smrgm4_defun([_LT_CONFIG], 7206aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7216aec45a7Smrg_LT_CONFIG_SAVE_COMMANDS([ 7226aec45a7Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7236aec45a7Smrg m4_if(_LT_TAG, [C], [ 7246aec45a7Smrg # See if we are running on zsh, and set the options which allow our 7256aec45a7Smrg # commands through without removal of \ escapes. 7266aec45a7Smrg if test -n "${ZSH_VERSION+set}" ; then 7276aec45a7Smrg setopt NO_GLOB_SUBST 7286aec45a7Smrg fi 729ab47cfaaSmrg 7306aec45a7Smrg cfgfile="${ofile}T" 7316aec45a7Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7326aec45a7Smrg $RM "$cfgfile" 733ab47cfaaSmrg 7346aec45a7Smrg cat <<_LT_EOF >> "$cfgfile" 7356aec45a7Smrg#! $SHELL 736ab47cfaaSmrg 7376aec45a7Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7386aec45a7Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7396aec45a7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7406aec45a7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7416aec45a7Smrg# 7426aec45a7Smrg_LT_COPYING 7436aec45a7Smrg_LT_LIBTOOL_TAGS 744ab47cfaaSmrg 7456aec45a7Smrg# ### BEGIN LIBTOOL CONFIG 7466aec45a7Smrg_LT_LIBTOOL_CONFIG_VARS 7476aec45a7Smrg_LT_LIBTOOL_TAG_VARS 7486aec45a7Smrg# ### END LIBTOOL CONFIG 749ab47cfaaSmrg 7506aec45a7Smrg_LT_EOF 751ab47cfaaSmrg 7526aec45a7Smrg case $host_os in 7536aec45a7Smrg aix3*) 7546aec45a7Smrg cat <<\_LT_EOF >> "$cfgfile" 7556aec45a7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7566aec45a7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7576aec45a7Smrg# vanish in a puff of smoke. 7586aec45a7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7596aec45a7Smrg COLLECT_NAMES= 7606aec45a7Smrg export COLLECT_NAMES 7616aec45a7Smrgfi 7626aec45a7Smrg_LT_EOF 763ab47cfaaSmrg ;; 7646aec45a7Smrg esac 765ab47cfaaSmrg 7666aec45a7Smrg _LT_PROG_LTMAIN 767ab47cfaaSmrg 7686aec45a7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7696aec45a7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7706aec45a7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7716aec45a7Smrg # is reportedly fixed, but why not run on old versions too? 772aa9e3350Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 773aa9e3350Smrg || (rm -f "$cfgfile"; exit 1) 774ab47cfaaSmrg 775aa9e3350Smrg _LT_PROG_REPLACE_SHELLFNS 776ab47cfaaSmrg 777aa9e3350Smrg mv -f "$cfgfile" "$ofile" || 7786aec45a7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7796aec45a7Smrg chmod +x "$ofile" 7806aec45a7Smrg], 7816aec45a7Smrg[cat <<_LT_EOF >> "$ofile" 782ab47cfaaSmrg 7836aec45a7Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7846aec45a7Smrgdnl in a comment (ie after a #). 7856aec45a7Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7866aec45a7Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7876aec45a7Smrg# ### END LIBTOOL TAG CONFIG: $1 7886aec45a7Smrg_LT_EOF 7896aec45a7Smrg])dnl /m4_if 7906aec45a7Smrg], 7916aec45a7Smrg[m4_if([$1], [], [ 7926aec45a7Smrg PACKAGE='$PACKAGE' 7936aec45a7Smrg VERSION='$VERSION' 7946aec45a7Smrg TIMESTAMP='$TIMESTAMP' 7956aec45a7Smrg RM='$RM' 7966aec45a7Smrg ofile='$ofile'], []) 7976aec45a7Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7986aec45a7Smrg])# _LT_CONFIG 799ab47cfaaSmrg 800ab47cfaaSmrg 8016aec45a7Smrg# LT_SUPPORTED_TAG(TAG) 8026aec45a7Smrg# --------------------- 8036aec45a7Smrg# Trace this macro to discover what tags are supported by the libtool 8046aec45a7Smrg# --tag option, using: 8056aec45a7Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8066aec45a7SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807ab47cfaaSmrg 808ab47cfaaSmrg 8096aec45a7Smrg# C support is built-in for now 8106aec45a7Smrgm4_define([_LT_LANG_C_enabled], []) 8116aec45a7Smrgm4_define([_LT_TAGS], []) 812ab47cfaaSmrg 8135c42550eSmrg 8146aec45a7Smrg# LT_LANG(LANG) 8156aec45a7Smrg# ------------- 8166aec45a7Smrg# Enable libtool support for the given language if not already enabled. 8176aec45a7SmrgAC_DEFUN([LT_LANG], 8186aec45a7Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8196aec45a7Smrgm4_case([$1], 8206aec45a7Smrg [C], [_LT_LANG(C)], 8216aec45a7Smrg [C++], [_LT_LANG(CXX)], 822aa9e3350Smrg [Go], [_LT_LANG(GO)], 8236aec45a7Smrg [Java], [_LT_LANG(GCJ)], 8246aec45a7Smrg [Fortran 77], [_LT_LANG(F77)], 8256aec45a7Smrg [Fortran], [_LT_LANG(FC)], 8266aec45a7Smrg [Windows Resource], [_LT_LANG(RC)], 8276aec45a7Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8286aec45a7Smrg [_LT_LANG($1)], 8296aec45a7Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8306aec45a7Smrg])# LT_LANG 8316aec45a7Smrg 8326aec45a7Smrg 8336aec45a7Smrg# _LT_LANG(LANGNAME) 8346aec45a7Smrg# ------------------ 8356aec45a7Smrgm4_defun([_LT_LANG], 8366aec45a7Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8376aec45a7Smrg [LT_SUPPORTED_TAG([$1])dnl 8386aec45a7Smrg m4_append([_LT_TAGS], [$1 ])dnl 8396aec45a7Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8406aec45a7Smrg _LT_LANG_$1_CONFIG($1)])dnl 8416aec45a7Smrg])# _LT_LANG 842ab47cfaaSmrg 843ab47cfaaSmrg 844aa9e3350Smrgm4_ifndef([AC_PROG_GO], [ 845aa9e3350Smrg# NOTE: This macro has been submitted for inclusion into # 846aa9e3350Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847aa9e3350Smrg# a released version of Autoconf we should remove this # 848aa9e3350Smrg# macro and use it instead. # 849aa9e3350Smrgm4_defun([AC_PROG_GO], 850aa9e3350Smrg[AC_LANG_PUSH(Go)dnl 851aa9e3350SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852aa9e3350SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853aa9e3350Smrg_AC_ARG_VAR_LDFLAGS()dnl 854aa9e3350SmrgAC_CHECK_TOOL(GOC, gccgo) 855aa9e3350Smrgif test -z "$GOC"; then 856aa9e3350Smrg if test -n "$ac_tool_prefix"; then 857aa9e3350Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858aa9e3350Smrg fi 859aa9e3350Smrgfi 860aa9e3350Smrgif test -z "$GOC"; then 861aa9e3350Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862aa9e3350Smrgfi 863aa9e3350Smrg])#m4_defun 864aa9e3350Smrg])#m4_ifndef 865aa9e3350Smrg 866aa9e3350Smrg 8676aec45a7Smrg# _LT_LANG_DEFAULT_CONFIG 8686aec45a7Smrg# ----------------------- 8696aec45a7Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8706aec45a7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8716aec45a7Smrg [LT_LANG(CXX)], 8726aec45a7Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8736aec45a7Smrg 8746aec45a7SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8756aec45a7Smrg [LT_LANG(F77)], 8766aec45a7Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8776aec45a7Smrg 8786aec45a7SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8796aec45a7Smrg [LT_LANG(FC)], 8806aec45a7Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8816aec45a7Smrg 8826aec45a7Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8836aec45a7Smrgdnl pulling things in needlessly. 8846aec45a7SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8856aec45a7Smrg [LT_LANG(GCJ)], 8866aec45a7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8876aec45a7Smrg [LT_LANG(GCJ)], 8886aec45a7Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8896aec45a7Smrg [LT_LANG(GCJ)], 8906aec45a7Smrg [m4_ifdef([AC_PROG_GCJ], 8916aec45a7Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8926aec45a7Smrg m4_ifdef([A][M_PROG_GCJ], 8936aec45a7Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8946aec45a7Smrg m4_ifdef([LT_PROG_GCJ], 8956aec45a7Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8966aec45a7Smrg 897aa9e3350SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898aa9e3350Smrg [LT_LANG(GO)], 899aa9e3350Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900aa9e3350Smrg 9016aec45a7SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9026aec45a7Smrg [LT_LANG(RC)], 9036aec45a7Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9046aec45a7Smrg])# _LT_LANG_DEFAULT_CONFIG 9056aec45a7Smrg 9066aec45a7Smrg# Obsolete macros: 9076aec45a7SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9086aec45a7SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9096aec45a7SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9106aec45a7SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9116aec45a7SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9126aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 9136aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9146aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9156aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9166aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9176aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9186aec45a7Smrg 9196aec45a7Smrg 9206aec45a7Smrg# _LT_TAG_COMPILER 9216aec45a7Smrg# ---------------- 9226aec45a7Smrgm4_defun([_LT_TAG_COMPILER], 9236aec45a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 924ab47cfaaSmrg 9256aec45a7Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9266aec45a7Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9276aec45a7Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9286aec45a7Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929ab47cfaaSmrg 9306aec45a7Smrg# If no C compiler was specified, use CC. 9316aec45a7SmrgLTCC=${LTCC-"$CC"} 932ab47cfaaSmrg 9336aec45a7Smrg# If no C compiler flags were specified, use CFLAGS. 9346aec45a7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935ab47cfaaSmrg 9366aec45a7Smrg# Allow CC to be a program name with arguments. 9376aec45a7Smrgcompiler=$CC 9386aec45a7Smrg])# _LT_TAG_COMPILER 939ab47cfaaSmrg 940ab47cfaaSmrg 9416aec45a7Smrg# _LT_COMPILER_BOILERPLATE 9426aec45a7Smrg# ------------------------ 9436aec45a7Smrg# Check for compiler boilerplate output or warnings with 9446aec45a7Smrg# the simple compiler test code. 9456aec45a7Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9466aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 9476aec45a7Smrgac_outfile=conftest.$ac_objext 9486aec45a7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9496aec45a7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9506aec45a7Smrg_lt_compiler_boilerplate=`cat conftest.err` 9516aec45a7Smrg$RM conftest* 9526aec45a7Smrg])# _LT_COMPILER_BOILERPLATE 953ab47cfaaSmrg 9546aec45a7Smrg 9556aec45a7Smrg# _LT_LINKER_BOILERPLATE 9566aec45a7Smrg# ---------------------- 9576aec45a7Smrg# Check for linker boilerplate output or warnings with 9586aec45a7Smrg# the simple link test code. 9596aec45a7Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9606aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 9616aec45a7Smrgac_outfile=conftest.$ac_objext 9626aec45a7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9636aec45a7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9646aec45a7Smrg_lt_linker_boilerplate=`cat conftest.err` 9656aec45a7Smrg$RM -r conftest* 9666aec45a7Smrg])# _LT_LINKER_BOILERPLATE 9676aec45a7Smrg 9686aec45a7Smrg# _LT_REQUIRED_DARWIN_CHECKS 9696aec45a7Smrg# ------------------------- 9706aec45a7Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9716aec45a7Smrg case $host_os in 9726aec45a7Smrg rhapsody* | darwin*) 9736aec45a7Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9746aec45a7Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9756aec45a7Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9766aec45a7Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9776aec45a7Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9786aec45a7Smrg _LT_DECL([], [DSYMUTIL], [1], 9796aec45a7Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9806aec45a7Smrg _LT_DECL([], [NMEDIT], [1], 9816aec45a7Smrg [Tool to change global to local symbols on Mac OS X]) 9826aec45a7Smrg _LT_DECL([], [LIPO], [1], 9836aec45a7Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9846aec45a7Smrg _LT_DECL([], [OTOOL], [1], 9856aec45a7Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9866aec45a7Smrg _LT_DECL([], [OTOOL64], [1], 9876aec45a7Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9886aec45a7Smrg 9896aec45a7Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9906aec45a7Smrg [lt_cv_apple_cc_single_mod=no 9916aec45a7Smrg if test -z "${LT_MULTI_MODULE}"; then 9926aec45a7Smrg # By default we will add the -single_module flag. You can override 9936aec45a7Smrg # by either setting the environment variable LT_MULTI_MODULE 9946aec45a7Smrg # non-empty at configure time, or by adding -multi_module to the 9956aec45a7Smrg # link flags. 9966aec45a7Smrg rm -rf libconftest.dylib* 9976aec45a7Smrg echo "int foo(void){return 1;}" > conftest.c 9986aec45a7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9996aec45a7Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10006aec45a7Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10016aec45a7Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10026aec45a7Smrg _lt_result=$? 1003aa9e3350Smrg # If there is a non-empty error log, and "single_module" 1004aa9e3350Smrg # appears in it, assume the flag caused a linker warning 1005aa9e3350Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1006aa9e3350Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007aa9e3350Smrg # Otherwise, if the output was created with a 0 exit code from 1008aa9e3350Smrg # the compiler, it worked. 1009aa9e3350Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10106aec45a7Smrg lt_cv_apple_cc_single_mod=yes 10116aec45a7Smrg else 10126aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10136aec45a7Smrg fi 10146aec45a7Smrg rm -rf libconftest.dylib* 10156aec45a7Smrg rm -f conftest.* 10166aec45a7Smrg fi]) 1017aa9e3350Smrg 10186aec45a7Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10196aec45a7Smrg [lt_cv_ld_exported_symbols_list], 10206aec45a7Smrg [lt_cv_ld_exported_symbols_list=no 10216aec45a7Smrg save_LDFLAGS=$LDFLAGS 10226aec45a7Smrg echo "_main" > conftest.sym 10236aec45a7Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10246aec45a7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10256aec45a7Smrg [lt_cv_ld_exported_symbols_list=yes], 10266aec45a7Smrg [lt_cv_ld_exported_symbols_list=no]) 10276aec45a7Smrg LDFLAGS="$save_LDFLAGS" 10286aec45a7Smrg ]) 1029aa9e3350Smrg 10306aec45a7Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10316aec45a7Smrg [lt_cv_ld_force_load=no 10326aec45a7Smrg cat > conftest.c << _LT_EOF 10336aec45a7Smrgint forced_loaded() { return 2;} 10346aec45a7Smrg_LT_EOF 10356aec45a7Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10366aec45a7Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10376aec45a7Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10386aec45a7Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10396aec45a7Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10406aec45a7Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10416aec45a7Smrg cat > conftest.c << _LT_EOF 10426aec45a7Smrgint main() { return 0;} 10436aec45a7Smrg_LT_EOF 10446aec45a7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10456aec45a7Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10466aec45a7Smrg _lt_result=$? 1047aa9e3350Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1048aa9e3350Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049aa9e3350Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 10506aec45a7Smrg lt_cv_ld_force_load=yes 10516aec45a7Smrg else 10526aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10536aec45a7Smrg fi 10546aec45a7Smrg rm -f conftest.err libconftest.a conftest conftest.c 10556aec45a7Smrg rm -rf conftest.dSYM 10566aec45a7Smrg ]) 10576aec45a7Smrg case $host_os in 10586aec45a7Smrg rhapsody* | darwin1.[[012]]) 10596aec45a7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10606aec45a7Smrg darwin1.*) 10616aec45a7Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10626aec45a7Smrg darwin*) # darwin 5.x on 10636aec45a7Smrg # if running on 10.5 or later, the deployment target defaults 10646aec45a7Smrg # to the OS version, if on x86, and 10.4, the deployment 10656aec45a7Smrg # target defaults to 10.4. Don't you love it? 10666aec45a7Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10676aec45a7Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10686aec45a7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10696aec45a7Smrg 10.[[012]]*) 10706aec45a7Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10716aec45a7Smrg 10.*) 10726aec45a7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10736aec45a7Smrg esac 10746aec45a7Smrg ;; 10756aec45a7Smrg esac 10766aec45a7Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10776aec45a7Smrg _lt_dar_single_mod='$single_module' 10786aec45a7Smrg fi 10796aec45a7Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10806aec45a7Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10816aec45a7Smrg else 10826aec45a7Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10836aec45a7Smrg fi 10846aec45a7Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10856aec45a7Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10866aec45a7Smrg else 10876aec45a7Smrg _lt_dsymutil= 10886aec45a7Smrg fi 1089ab47cfaaSmrg ;; 1090ab47cfaaSmrg esac 10916aec45a7Smrg]) 1092ab47cfaaSmrg 10936aec45a7Smrg 1094aa9e3350Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095aa9e3350Smrg# --------------------------------- 10966aec45a7Smrg# Checks for linker and compiler features on darwin 10976aec45a7Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10986aec45a7Smrg[ 10996aec45a7Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11006aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11016aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11026aec45a7Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11036aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11046aec45a7Smrg if test "$lt_cv_ld_force_load" = "yes"; then 11056aec45a7Smrg _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\"`' 1106aa9e3350Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107aa9e3350Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108ab47cfaaSmrg else 11096aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110ab47cfaaSmrg fi 11116aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11126aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11136aec45a7Smrg case $cc_basename in 11146aec45a7Smrg ifort*) _lt_dar_can_shared=yes ;; 11156aec45a7Smrg *) _lt_dar_can_shared=$GCC ;; 11166aec45a7Smrg esac 11176aec45a7Smrg if test "$_lt_dar_can_shared" = "yes"; then 11186aec45a7Smrg output_verbose_link_cmd=func_echo_all 11196aec45a7Smrg _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}" 11206aec45a7Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11216aec45a7Smrg _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}" 11226aec45a7Smrg _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}" 11236aec45a7Smrg m4_if([$1], [CXX], 11246aec45a7Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11256aec45a7Smrg _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}" 11266aec45a7Smrg _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}" 11276aec45a7Smrg fi 11286aec45a7Smrg],[]) 11296aec45a7Smrg else 11306aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11316aec45a7Smrg fi 11326aec45a7Smrg]) 1133ab47cfaaSmrg 1134aa9e3350Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135aa9e3350Smrg# ---------------------------------- 11366aec45a7Smrg# Links a minimal program and checks the executable 11376aec45a7Smrg# for the system default hardcoded library path. In most cases, 11386aec45a7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11396aec45a7Smrg# the location of the communication and MPI libs are included too. 11406aec45a7Smrg# If we don't find anything, use the default library path according 11416aec45a7Smrg# to the aix ld manual. 1142aa9e3350Smrg# Store the results from the different compilers for each TAGNAME. 1143aa9e3350Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11446aec45a7Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11456aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 1146aa9e3350Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1147aa9e3350Smrg aix_libpath=$lt_cv_aix_libpath 1148aa9e3350Smrgelse 1149aa9e3350Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150aa9e3350Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151aa9e3350Smrg lt_aix_libpath_sed='[ 1152aa9e3350Smrg /Import File Strings/,/^$/ { 1153aa9e3350Smrg /^0/ { 1154aa9e3350Smrg s/^0 *\([^ ]*\) *$/\1/ 1155aa9e3350Smrg p 1156aa9e3350Smrg } 1157aa9e3350Smrg }]' 1158aa9e3350Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159aa9e3350Smrg # Check for a 64-bit object if we didn't find anything. 1160aa9e3350Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161aa9e3350Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162aa9e3350Smrg fi],[]) 1163aa9e3350Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164aa9e3350Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165aa9e3350Smrg fi 1166aa9e3350Smrg ]) 1167aa9e3350Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168aa9e3350Smrgfi 11696aec45a7Smrg])# _LT_SYS_MODULE_PATH_AIX 1170ab47cfaaSmrg 1171ab47cfaaSmrg 11726aec45a7Smrg# _LT_SHELL_INIT(ARG) 11736aec45a7Smrg# ------------------- 11746aec45a7Smrgm4_define([_LT_SHELL_INIT], 11756aec45a7Smrg[m4_divert_text([M4SH-INIT], [$1 11766aec45a7Smrg])])# _LT_SHELL_INIT 1177ab47cfaaSmrg 11786aec45a7Smrg 11796aec45a7Smrg 11806aec45a7Smrg# _LT_PROG_ECHO_BACKSLASH 11816aec45a7Smrg# ----------------------- 11826aec45a7Smrg# Find how we can fake an echo command that does not interpret backslash. 11836aec45a7Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 11846aec45a7Smrg# of the generated configure script which will find a shell with a builtin 11856aec45a7Smrg# printf (which we can use as an echo command). 11866aec45a7Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11876aec45a7Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11886aec45a7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11896aec45a7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11906aec45a7Smrg 11916aec45a7SmrgAC_MSG_CHECKING([how to print strings]) 11926aec45a7Smrg# Test print first, because it will be a builtin if present. 1193aa9e3350Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11946aec45a7Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 11956aec45a7Smrg ECHO='print -r --' 11966aec45a7Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 11976aec45a7Smrg ECHO='printf %s\n' 11986aec45a7Smrgelse 11996aec45a7Smrg # Use this function as a fallback that always works. 12006aec45a7Smrg func_fallback_echo () 12016aec45a7Smrg { 12026aec45a7Smrg eval 'cat <<_LTECHO_EOF 12036aec45a7Smrg$[]1 12046aec45a7Smrg_LTECHO_EOF' 12056aec45a7Smrg } 12066aec45a7Smrg ECHO='func_fallback_echo' 12076aec45a7Smrgfi 12086aec45a7Smrg 12096aec45a7Smrg# func_echo_all arg... 12106aec45a7Smrg# Invoke $ECHO with all args, space-separated. 12116aec45a7Smrgfunc_echo_all () 12126aec45a7Smrg{ 12136aec45a7Smrg $ECHO "$*" 12146aec45a7Smrg} 12156aec45a7Smrg 12166aec45a7Smrgcase "$ECHO" in 12176aec45a7Smrg printf*) AC_MSG_RESULT([printf]) ;; 12186aec45a7Smrg print*) AC_MSG_RESULT([print -r]) ;; 12196aec45a7Smrg *) AC_MSG_RESULT([cat]) ;; 12206aec45a7Smrgesac 12216aec45a7Smrg 12226aec45a7Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12236aec45a7Smrg[_AS_DETECT_SUGGESTED([ 12246aec45a7Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12256aec45a7Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12266aec45a7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12276aec45a7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12286aec45a7Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12296aec45a7Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12306aec45a7Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12316aec45a7Smrg 12326aec45a7Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12336aec45a7Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12346aec45a7Smrg])# _LT_PROG_ECHO_BACKSLASH 12356aec45a7Smrg 12366aec45a7Smrg 1237aa9e3350Smrg# _LT_WITH_SYSROOT 1238aa9e3350Smrg# ---------------- 1239aa9e3350SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240aa9e3350Smrg[AC_MSG_CHECKING([for sysroot]) 1241aa9e3350SmrgAC_ARG_WITH([sysroot], 1242aa9e3350Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243aa9e3350Smrg (or the compiler's sysroot if not specified).], 1244aa9e3350Smrg[], [with_sysroot=no]) 1245aa9e3350Smrg 1246aa9e3350Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247aa9e3350Smrgdnl in case the user passed a directory name. 1248aa9e3350Smrglt_sysroot= 1249aa9e3350Smrgcase ${with_sysroot} in #( 1250aa9e3350Smrg yes) 1251aa9e3350Smrg if test "$GCC" = yes; then 1252aa9e3350Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253aa9e3350Smrg fi 1254aa9e3350Smrg ;; #( 1255aa9e3350Smrg /*) 1256aa9e3350Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257aa9e3350Smrg ;; #( 1258aa9e3350Smrg no|'') 1259aa9e3350Smrg ;; #( 1260aa9e3350Smrg *) 1261aa9e3350Smrg AC_MSG_RESULT([${with_sysroot}]) 1262aa9e3350Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263aa9e3350Smrg ;; 1264aa9e3350Smrgesac 1265aa9e3350Smrg 1266aa9e3350Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267aa9e3350Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268aa9e3350Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269aa9e3350Smrg 12706aec45a7Smrg# _LT_ENABLE_LOCK 12716aec45a7Smrg# --------------- 12726aec45a7Smrgm4_defun([_LT_ENABLE_LOCK], 12736aec45a7Smrg[AC_ARG_ENABLE([libtool-lock], 12746aec45a7Smrg [AS_HELP_STRING([--disable-libtool-lock], 12756aec45a7Smrg [avoid locking (might break parallel builds)])]) 12766aec45a7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12776aec45a7Smrg 12786aec45a7Smrg# Some flags need to be propagated to the compiler or linker for good 12796aec45a7Smrg# libtool support. 12806aec45a7Smrgcase $host in 12816aec45a7Smrgia64-*-hpux*) 12826aec45a7Smrg # Find out which ABI we are using. 12836aec45a7Smrg echo 'int i;' > conftest.$ac_ext 12846aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 12856aec45a7Smrg case `/usr/bin/file conftest.$ac_objext` in 12866aec45a7Smrg *ELF-32*) 12876aec45a7Smrg HPUX_IA64_MODE="32" 12886aec45a7Smrg ;; 12896aec45a7Smrg *ELF-64*) 12906aec45a7Smrg HPUX_IA64_MODE="64" 12916aec45a7Smrg ;; 12926aec45a7Smrg esac 12936aec45a7Smrg fi 12946aec45a7Smrg rm -rf conftest* 12956aec45a7Smrg ;; 12966aec45a7Smrg*-*-irix6*) 12976aec45a7Smrg # Find out which ABI we are using. 12986aec45a7Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12996aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 13006aec45a7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 13016aec45a7Smrg case `/usr/bin/file conftest.$ac_objext` in 13026aec45a7Smrg *32-bit*) 13036aec45a7Smrg LD="${LD-ld} -melf32bsmip" 13046aec45a7Smrg ;; 13056aec45a7Smrg *N32*) 13066aec45a7Smrg LD="${LD-ld} -melf32bmipn32" 13076aec45a7Smrg ;; 13086aec45a7Smrg *64-bit*) 13096aec45a7Smrg LD="${LD-ld} -melf64bmip" 13106aec45a7Smrg ;; 13116aec45a7Smrg esac 13126aec45a7Smrg else 13136aec45a7Smrg case `/usr/bin/file conftest.$ac_objext` in 13146aec45a7Smrg *32-bit*) 13156aec45a7Smrg LD="${LD-ld} -32" 13166aec45a7Smrg ;; 13176aec45a7Smrg *N32*) 13186aec45a7Smrg LD="${LD-ld} -n32" 13196aec45a7Smrg ;; 13206aec45a7Smrg *64-bit*) 13216aec45a7Smrg LD="${LD-ld} -64" 13226aec45a7Smrg ;; 13236aec45a7Smrg esac 1324ab47cfaaSmrg fi 13256aec45a7Smrg fi 13266aec45a7Smrg rm -rf conftest* 13276aec45a7Smrg ;; 1328ab47cfaaSmrg 13291e449e82Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13306aec45a7Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13316aec45a7Smrg # Find out which ABI we are using. 13326aec45a7Smrg echo 'int i;' > conftest.$ac_ext 13336aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 13346aec45a7Smrg case `/usr/bin/file conftest.o` in 13356aec45a7Smrg *32-bit*) 13366aec45a7Smrg case $host in 13376aec45a7Smrg x86_64-*kfreebsd*-gnu) 13386aec45a7Smrg LD="${LD-ld} -m elf_i386_fbsd" 13396aec45a7Smrg ;; 13406aec45a7Smrg x86_64-*linux*) 134138770048Smrg case `/usr/bin/file conftest.o` in 134238770048Smrg *x86-64*) 134338770048Smrg LD="${LD-ld} -m elf32_x86_64" 134438770048Smrg ;; 134538770048Smrg *) 134638770048Smrg LD="${LD-ld} -m elf_i386" 134738770048Smrg ;; 134838770048Smrg esac 13496aec45a7Smrg ;; 13501e449e82Smrg powerpc64le-*) 13511e449e82Smrg LD="${LD-ld} -m elf32lppclinux" 13521e449e82Smrg ;; 13531e449e82Smrg powerpc64-*) 13546aec45a7Smrg LD="${LD-ld} -m elf32ppclinux" 13556aec45a7Smrg ;; 13566aec45a7Smrg s390x-*linux*) 13576aec45a7Smrg LD="${LD-ld} -m elf_s390" 13586aec45a7Smrg ;; 13596aec45a7Smrg sparc64-*linux*) 13606aec45a7Smrg LD="${LD-ld} -m elf32_sparc" 13616aec45a7Smrg ;; 13626aec45a7Smrg esac 13636aec45a7Smrg ;; 13646aec45a7Smrg *64-bit*) 13656aec45a7Smrg case $host in 13666aec45a7Smrg x86_64-*kfreebsd*-gnu) 13676aec45a7Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13686aec45a7Smrg ;; 13696aec45a7Smrg x86_64-*linux*) 13706aec45a7Smrg LD="${LD-ld} -m elf_x86_64" 13716aec45a7Smrg ;; 13721e449e82Smrg powerpcle-*) 13731e449e82Smrg LD="${LD-ld} -m elf64lppc" 13741e449e82Smrg ;; 13751e449e82Smrg powerpc-*) 13766aec45a7Smrg LD="${LD-ld} -m elf64ppc" 13776aec45a7Smrg ;; 13786aec45a7Smrg s390*-*linux*|s390*-*tpf*) 13796aec45a7Smrg LD="${LD-ld} -m elf64_s390" 13806aec45a7Smrg ;; 13816aec45a7Smrg sparc*-*linux*) 13826aec45a7Smrg LD="${LD-ld} -m elf64_sparc" 13836aec45a7Smrg ;; 13846aec45a7Smrg esac 13856aec45a7Smrg ;; 13866aec45a7Smrg esac 13876aec45a7Smrg fi 13886aec45a7Smrg rm -rf conftest* 13896aec45a7Smrg ;; 1390ab47cfaaSmrg 13916aec45a7Smrg*-*-sco3.2v5*) 13926aec45a7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13936aec45a7Smrg SAVE_CFLAGS="$CFLAGS" 13946aec45a7Smrg CFLAGS="$CFLAGS -belf" 13956aec45a7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13966aec45a7Smrg [AC_LANG_PUSH(C) 13976aec45a7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13986aec45a7Smrg AC_LANG_POP]) 13996aec45a7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 14006aec45a7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14016aec45a7Smrg CFLAGS="$SAVE_CFLAGS" 14026aec45a7Smrg fi 14036aec45a7Smrg ;; 1404aa9e3350Smrg*-*solaris*) 14056aec45a7Smrg # Find out which ABI we are using. 14066aec45a7Smrg echo 'int i;' > conftest.$ac_ext 14076aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 14086aec45a7Smrg case `/usr/bin/file conftest.o` in 14096aec45a7Smrg *64-bit*) 14106aec45a7Smrg case $lt_cv_prog_gnu_ld in 1411aa9e3350Smrg yes*) 1412aa9e3350Smrg case $host in 1413aa9e3350Smrg i?86-*-solaris*) 1414aa9e3350Smrg LD="${LD-ld} -m elf_x86_64" 1415aa9e3350Smrg ;; 1416aa9e3350Smrg sparc*-*-solaris*) 1417aa9e3350Smrg LD="${LD-ld} -m elf64_sparc" 1418aa9e3350Smrg ;; 1419aa9e3350Smrg esac 1420aa9e3350Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1421aa9e3350Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1422aa9e3350Smrg LD="${LD-ld}_sol2" 1423aa9e3350Smrg fi 1424aa9e3350Smrg ;; 14256aec45a7Smrg *) 14266aec45a7Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14276aec45a7Smrg LD="${LD-ld} -64" 14286aec45a7Smrg fi 14296aec45a7Smrg ;; 14306aec45a7Smrg esac 14316aec45a7Smrg ;; 14326aec45a7Smrg esac 14336aec45a7Smrg fi 14346aec45a7Smrg rm -rf conftest* 14356aec45a7Smrg ;; 14366aec45a7Smrgesac 1437ab47cfaaSmrg 14386aec45a7Smrgneed_locks="$enable_libtool_lock" 14396aec45a7Smrg])# _LT_ENABLE_LOCK 14406aec45a7Smrg 14416aec45a7Smrg 1442aa9e3350Smrg# _LT_PROG_AR 1443aa9e3350Smrg# ----------- 1444aa9e3350Smrgm4_defun([_LT_PROG_AR], 1445aa9e3350Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1446aa9e3350Smrg: ${AR=ar} 1447aa9e3350Smrg: ${AR_FLAGS=cru} 1448aa9e3350Smrg_LT_DECL([], [AR], [1], [The archiver]) 1449aa9e3350Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1450aa9e3350Smrg 1451aa9e3350SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1452aa9e3350Smrg [lt_cv_ar_at_file=no 1453aa9e3350Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1454aa9e3350Smrg [echo conftest.$ac_objext > conftest.lst 1455aa9e3350Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1456aa9e3350Smrg AC_TRY_EVAL([lt_ar_try]) 1457aa9e3350Smrg if test "$ac_status" -eq 0; then 1458aa9e3350Smrg # Ensure the archiver fails upon bogus file names. 1459aa9e3350Smrg rm -f conftest.$ac_objext libconftest.a 1460aa9e3350Smrg AC_TRY_EVAL([lt_ar_try]) 1461aa9e3350Smrg if test "$ac_status" -ne 0; then 1462aa9e3350Smrg lt_cv_ar_at_file=@ 1463aa9e3350Smrg fi 1464aa9e3350Smrg fi 1465aa9e3350Smrg rm -f conftest.* libconftest.a 1466aa9e3350Smrg ]) 1467aa9e3350Smrg ]) 1468aa9e3350Smrg 1469aa9e3350Smrgif test "x$lt_cv_ar_at_file" = xno; then 1470aa9e3350Smrg archiver_list_spec= 1471aa9e3350Smrgelse 1472aa9e3350Smrg archiver_list_spec=$lt_cv_ar_at_file 1473aa9e3350Smrgfi 1474aa9e3350Smrg_LT_DECL([], [archiver_list_spec], [1], 1475aa9e3350Smrg [How to feed a file listing to the archiver]) 1476aa9e3350Smrg])# _LT_PROG_AR 1477aa9e3350Smrg 1478aa9e3350Smrg 14796aec45a7Smrg# _LT_CMD_OLD_ARCHIVE 14806aec45a7Smrg# ------------------- 14816aec45a7Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1482aa9e3350Smrg[_LT_PROG_AR 14836aec45a7Smrg 14846aec45a7SmrgAC_CHECK_TOOL(STRIP, strip, :) 14856aec45a7Smrgtest -z "$STRIP" && STRIP=: 14866aec45a7Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 14876aec45a7Smrg 14886aec45a7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14896aec45a7Smrgtest -z "$RANLIB" && RANLIB=: 14906aec45a7Smrg_LT_DECL([], [RANLIB], [1], 14916aec45a7Smrg [Commands used to install an old-style archive]) 14926aec45a7Smrg 14936aec45a7Smrg# Determine commands to create old-style static archives. 14946aec45a7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14956aec45a7Smrgold_postinstall_cmds='chmod 644 $oldlib' 14966aec45a7Smrgold_postuninstall_cmds= 14976aec45a7Smrg 14986aec45a7Smrgif test -n "$RANLIB"; then 14996aec45a7Smrg case $host_os in 15006aec45a7Smrg openbsd*) 1501aa9e3350Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15026aec45a7Smrg ;; 15036aec45a7Smrg *) 1504aa9e3350Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15056aec45a7Smrg ;; 1506ab47cfaaSmrg esac 1507aa9e3350Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1508ab47cfaaSmrgfi 1509ab47cfaaSmrg 15106aec45a7Smrgcase $host_os in 15116aec45a7Smrg darwin*) 15126aec45a7Smrg lock_old_archive_extraction=yes ;; 15136aec45a7Smrg *) 15146aec45a7Smrg lock_old_archive_extraction=no ;; 15156aec45a7Smrgesac 15166aec45a7Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15176aec45a7Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15186aec45a7Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15196aec45a7Smrg [Commands used to build an old-style archive]) 15206aec45a7Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15216aec45a7Smrg [Whether to use a lock for old archive extraction]) 15226aec45a7Smrg])# _LT_CMD_OLD_ARCHIVE 15231473d951Smrg 1524ab47cfaaSmrg 15256aec45a7Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15266aec45a7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15276aec45a7Smrg# ---------------------------------------------------------------- 15286aec45a7Smrg# Check whether the given compiler option works 15296aec45a7SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15306aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15316aec45a7Smrgm4_require([_LT_DECL_SED])dnl 15326aec45a7SmrgAC_CACHE_CHECK([$1], [$2], 15336aec45a7Smrg [$2=no 15346aec45a7Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15356aec45a7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15366aec45a7Smrg lt_compiler_flag="$3" 1537ab47cfaaSmrg # Insert the option either (1) after the last *FLAGS variable, or 1538ab47cfaaSmrg # (2) before a word containing "conftest.", or (3) at the end. 1539ab47cfaaSmrg # Note that $ac_compile itself does not contain backslashes and begins 1540ab47cfaaSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 15416aec45a7Smrg # The option is referenced via a variable to avoid confusing sed. 1542ab47cfaaSmrg lt_compile=`echo "$ac_compile" | $SED \ 1543ab47cfaaSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1544ab47cfaaSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1545ab47cfaaSmrg -e 's:$: $lt_compiler_flag:'` 15466aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15476aec45a7Smrg (eval "$lt_compile" 2>conftest.err) 1548ab47cfaaSmrg ac_status=$? 15496aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 15506aec45a7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15516aec45a7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1552ab47cfaaSmrg # The compiler can only warn and ignore the option if not recognized 15536aec45a7Smrg # So say no if there are warnings other than the usual output. 15546aec45a7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15556aec45a7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15566aec45a7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15576aec45a7Smrg $2=yes 1558ab47cfaaSmrg fi 1559ab47cfaaSmrg fi 15606aec45a7Smrg $RM conftest* 1561ab47cfaaSmrg]) 1562ab47cfaaSmrg 15636aec45a7Smrgif test x"[$]$2" = xyes; then 15646aec45a7Smrg m4_if([$5], , :, [$5]) 1565ab47cfaaSmrgelse 15666aec45a7Smrg m4_if([$6], , :, [$6]) 1567ab47cfaaSmrgfi 15686aec45a7Smrg])# _LT_COMPILER_OPTION 1569ab47cfaaSmrg 15706aec45a7Smrg# Old name: 15716aec45a7SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15726aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 15736aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1574ab47cfaaSmrg 1575ab47cfaaSmrg 15766aec45a7Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15776aec45a7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15786aec45a7Smrg# ---------------------------------------------------- 15796aec45a7Smrg# Check whether the given linker option works 15806aec45a7SmrgAC_DEFUN([_LT_LINKER_OPTION], 15816aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15826aec45a7Smrgm4_require([_LT_DECL_SED])dnl 15836aec45a7SmrgAC_CACHE_CHECK([$1], [$2], 15846aec45a7Smrg [$2=no 15856aec45a7Smrg save_LDFLAGS="$LDFLAGS" 15866aec45a7Smrg LDFLAGS="$LDFLAGS $3" 15876aec45a7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 15886aec45a7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15896aec45a7Smrg # The linker can only warn and ignore the option if not recognized 15906aec45a7Smrg # So say no if there are warnings 15916aec45a7Smrg if test -s conftest.err; then 15926aec45a7Smrg # Append any errors to the config.log. 15936aec45a7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 15946aec45a7Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15956aec45a7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15966aec45a7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 15976aec45a7Smrg $2=yes 15986aec45a7Smrg fi 15996aec45a7Smrg else 16006aec45a7Smrg $2=yes 16016aec45a7Smrg fi 16026aec45a7Smrg fi 16036aec45a7Smrg $RM -r conftest* 16046aec45a7Smrg LDFLAGS="$save_LDFLAGS" 16056aec45a7Smrg]) 1606ab47cfaaSmrg 16076aec45a7Smrgif test x"[$]$2" = xyes; then 16086aec45a7Smrg m4_if([$4], , :, [$4]) 1609ab47cfaaSmrgelse 16106aec45a7Smrg m4_if([$5], , :, [$5]) 1611ab47cfaaSmrgfi 16126aec45a7Smrg])# _LT_LINKER_OPTION 1613ab47cfaaSmrg 16146aec45a7Smrg# Old name: 16156aec45a7SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16166aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 16176aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1618ab47cfaaSmrg 1619ab47cfaaSmrg 16206aec45a7Smrg# LT_CMD_MAX_LEN 16216aec45a7Smrg#--------------- 16226aec45a7SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16236aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16246aec45a7Smrg# find the maximum length of command line arguments 16256aec45a7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16266aec45a7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16276aec45a7Smrg i=0 16286aec45a7Smrg teststring="ABCD" 1629ab47cfaaSmrg 16306aec45a7Smrg case $build_os in 16316aec45a7Smrg msdosdjgpp*) 16326aec45a7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16336aec45a7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16346aec45a7Smrg # during glob expansion). Even if it were fixed, the result of this 16356aec45a7Smrg # check would be larger than it should be. 16366aec45a7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16376aec45a7Smrg ;; 1638ab47cfaaSmrg 16396aec45a7Smrg gnu*) 16406aec45a7Smrg # Under GNU Hurd, this test is not required because there is 16416aec45a7Smrg # no limit to the length of command line arguments. 16426aec45a7Smrg # Libtool will interpret -1 as no limit whatsoever 16436aec45a7Smrg lt_cv_sys_max_cmd_len=-1; 16446aec45a7Smrg ;; 1645ab47cfaaSmrg 16466aec45a7Smrg cygwin* | mingw* | cegcc*) 16476aec45a7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 16486aec45a7Smrg # about 5 minutes as the teststring grows exponentially. 16496aec45a7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 16506aec45a7Smrg # you end up with a "frozen" computer, even though with patience 16516aec45a7Smrg # the test eventually succeeds (with a max line length of 256k). 16526aec45a7Smrg # Instead, let's just punt: use the minimum linelength reported by 16536aec45a7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 16546aec45a7Smrg lt_cv_sys_max_cmd_len=8192; 16556aec45a7Smrg ;; 1656ab47cfaaSmrg 16576aec45a7Smrg mint*) 16586aec45a7Smrg # On MiNT this can take a long time and run out of memory. 16596aec45a7Smrg lt_cv_sys_max_cmd_len=8192; 16606aec45a7Smrg ;; 1661ab47cfaaSmrg 16626aec45a7Smrg amigaos*) 16636aec45a7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 16646aec45a7Smrg # So we just punt and use a minimum line length of 8192. 16656aec45a7Smrg lt_cv_sys_max_cmd_len=8192; 16666aec45a7Smrg ;; 1667ab47cfaaSmrg 16686aec45a7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16696aec45a7Smrg # This has been around since 386BSD, at least. Likely further. 16706aec45a7Smrg if test -x /sbin/sysctl; then 16716aec45a7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16726aec45a7Smrg elif test -x /usr/sbin/sysctl; then 16736aec45a7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1674ab47cfaaSmrg else 16756aec45a7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1676ab47cfaaSmrg fi 16776aec45a7Smrg # And add a safety zone 16786aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16796aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16806aec45a7Smrg ;; 1681ab47cfaaSmrg 16826aec45a7Smrg interix*) 16836aec45a7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 16846aec45a7Smrg lt_cv_sys_max_cmd_len=196608 16856aec45a7Smrg ;; 1686ab47cfaaSmrg 1687aa9e3350Smrg os2*) 1688aa9e3350Smrg # The test takes a long time on OS/2. 1689aa9e3350Smrg lt_cv_sys_max_cmd_len=8192 1690aa9e3350Smrg ;; 1691aa9e3350Smrg 16926aec45a7Smrg osf*) 16936aec45a7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16946aec45a7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16956aec45a7Smrg # nice to cause kernel panics so lets avoid the loop below. 16966aec45a7Smrg # First set a reasonable default. 16976aec45a7Smrg lt_cv_sys_max_cmd_len=16384 16986aec45a7Smrg # 16996aec45a7Smrg if test -x /sbin/sysconfig; then 17006aec45a7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17016aec45a7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17026aec45a7Smrg esac 17036aec45a7Smrg fi 17046aec45a7Smrg ;; 17056aec45a7Smrg sco3.2v5*) 17066aec45a7Smrg lt_cv_sys_max_cmd_len=102400 17076aec45a7Smrg ;; 17086aec45a7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17096aec45a7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17106aec45a7Smrg if test -n "$kargmax"; then 17116aec45a7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17126aec45a7Smrg else 17136aec45a7Smrg lt_cv_sys_max_cmd_len=32768 17146aec45a7Smrg fi 1715ab47cfaaSmrg ;; 1716ab47cfaaSmrg *) 17176aec45a7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 171838770048Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 171938770048Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17206aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17216aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17226aec45a7Smrg else 17236aec45a7Smrg # Make teststring a little bigger before we do anything with it. 17246aec45a7Smrg # a 1K string should be a reasonable start. 17256aec45a7Smrg for i in 1 2 3 4 5 6 7 8 ; do 17266aec45a7Smrg teststring=$teststring$teststring 17276aec45a7Smrg done 17286aec45a7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17296aec45a7Smrg # If test is not a shell built-in, we'll probably end up computing a 17306aec45a7Smrg # maximum length that is only half of the actual maximum length, but 17316aec45a7Smrg # we can't tell. 1732aa9e3350Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 17336aec45a7Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17346aec45a7Smrg test $i != 17 # 1/2 MB should be enough 17356aec45a7Smrg do 17366aec45a7Smrg i=`expr $i + 1` 17376aec45a7Smrg teststring=$teststring$teststring 17386aec45a7Smrg done 17396aec45a7Smrg # Only check the string length outside the loop. 17406aec45a7Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17416aec45a7Smrg teststring= 17426aec45a7Smrg # Add a significant safety factor because C++ compilers can tack on 17436aec45a7Smrg # massive amounts of additional arguments before passing them to the 17446aec45a7Smrg # linker. It appears as though 1/2 is a usable value. 17456aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17466aec45a7Smrg fi 1747ab47cfaaSmrg ;; 1748ab47cfaaSmrg esac 17496aec45a7Smrg]) 17506aec45a7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 17516aec45a7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17526aec45a7Smrgelse 17536aec45a7Smrg AC_MSG_RESULT(none) 17546aec45a7Smrgfi 17556aec45a7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17566aec45a7Smrg_LT_DECL([], [max_cmd_len], [0], 17576aec45a7Smrg [What is the maximum length of a command?]) 17586aec45a7Smrg])# LT_CMD_MAX_LEN 1759ab47cfaaSmrg 17606aec45a7Smrg# Old name: 17616aec45a7SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17626aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 17636aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1764ab47cfaaSmrg 1765ab47cfaaSmrg 17666aec45a7Smrg# _LT_HEADER_DLFCN 17676aec45a7Smrg# ---------------- 17686aec45a7Smrgm4_defun([_LT_HEADER_DLFCN], 17696aec45a7Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17706aec45a7Smrg])# _LT_HEADER_DLFCN 1771ab47cfaaSmrg 17726aec45a7Smrg 17736aec45a7Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17746aec45a7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17756aec45a7Smrg# ---------------------------------------------------------------- 17766aec45a7Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 17776aec45a7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17786aec45a7Smrgif test "$cross_compiling" = yes; then : 17796aec45a7Smrg [$4] 17806aec45a7Smrgelse 17816aec45a7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17826aec45a7Smrg lt_status=$lt_dlunknown 17836aec45a7Smrg cat > conftest.$ac_ext <<_LT_EOF 17846aec45a7Smrg[#line $LINENO "configure" 17856aec45a7Smrg#include "confdefs.h" 17866aec45a7Smrg 17876aec45a7Smrg#if HAVE_DLFCN_H 17886aec45a7Smrg#include <dlfcn.h> 17896aec45a7Smrg#endif 17906aec45a7Smrg 17916aec45a7Smrg#include <stdio.h> 17926aec45a7Smrg 17936aec45a7Smrg#ifdef RTLD_GLOBAL 17946aec45a7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 17956aec45a7Smrg#else 17966aec45a7Smrg# ifdef DL_GLOBAL 17976aec45a7Smrg# define LT_DLGLOBAL DL_GLOBAL 17986aec45a7Smrg# else 17996aec45a7Smrg# define LT_DLGLOBAL 0 18006aec45a7Smrg# endif 18016aec45a7Smrg#endif 18026aec45a7Smrg 18036aec45a7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18046aec45a7Smrg find out it does not work in some platform. */ 18056aec45a7Smrg#ifndef LT_DLLAZY_OR_NOW 18066aec45a7Smrg# ifdef RTLD_LAZY 18076aec45a7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18086aec45a7Smrg# else 18096aec45a7Smrg# ifdef DL_LAZY 18106aec45a7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18116aec45a7Smrg# else 18126aec45a7Smrg# ifdef RTLD_NOW 18136aec45a7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18146aec45a7Smrg# else 18156aec45a7Smrg# ifdef DL_NOW 18166aec45a7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18176aec45a7Smrg# else 18186aec45a7Smrg# define LT_DLLAZY_OR_NOW 0 18196aec45a7Smrg# endif 18206aec45a7Smrg# endif 18216aec45a7Smrg# endif 18226aec45a7Smrg# endif 18236aec45a7Smrg#endif 18246aec45a7Smrg 18256aec45a7Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 18266aec45a7Smrg correspondingly for the symbols needed. */ 18276aec45a7Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1828aa9e3350Smrgint fnord () __attribute__((visibility("default"))); 18296aec45a7Smrg#endif 18306aec45a7Smrg 1831aa9e3350Smrgint fnord () { return 42; } 18326aec45a7Smrgint main () 18336aec45a7Smrg{ 18346aec45a7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18356aec45a7Smrg int status = $lt_dlunknown; 18366aec45a7Smrg 18376aec45a7Smrg if (self) 18386aec45a7Smrg { 18396aec45a7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18406aec45a7Smrg else 18416aec45a7Smrg { 18426aec45a7Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 18436aec45a7Smrg else puts (dlerror ()); 18446aec45a7Smrg } 18456aec45a7Smrg /* dlclose (self); */ 18466aec45a7Smrg } 1847ab47cfaaSmrg else 18486aec45a7Smrg puts (dlerror ()); 18496aec45a7Smrg 18506aec45a7Smrg return status; 18516aec45a7Smrg}] 18526aec45a7Smrg_LT_EOF 18536aec45a7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18546aec45a7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 18556aec45a7Smrg lt_status=$? 18566aec45a7Smrg case x$lt_status in 18576aec45a7Smrg x$lt_dlno_uscore) $1 ;; 18586aec45a7Smrg x$lt_dlneed_uscore) $2 ;; 18596aec45a7Smrg x$lt_dlunknown|x*) $3 ;; 1860ab47cfaaSmrg esac 18616aec45a7Smrg else : 18626aec45a7Smrg # compilation failed 18636aec45a7Smrg $3 1864ab47cfaaSmrg fi 18656aec45a7Smrgfi 18666aec45a7Smrgrm -fr conftest* 18676aec45a7Smrg])# _LT_TRY_DLOPEN_SELF 18686aec45a7Smrg 18696aec45a7Smrg 18706aec45a7Smrg# LT_SYS_DLOPEN_SELF 18716aec45a7Smrg# ------------------ 18726aec45a7SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18736aec45a7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18746aec45a7Smrgif test "x$enable_dlopen" != xyes; then 18756aec45a7Smrg enable_dlopen=unknown 18766aec45a7Smrg enable_dlopen_self=unknown 18776aec45a7Smrg enable_dlopen_self_static=unknown 18786aec45a7Smrgelse 18796aec45a7Smrg lt_cv_dlopen=no 18806aec45a7Smrg lt_cv_dlopen_libs= 18816aec45a7Smrg 1882ab47cfaaSmrg case $host_os in 18836aec45a7Smrg beos*) 18846aec45a7Smrg lt_cv_dlopen="load_add_on" 18856aec45a7Smrg lt_cv_dlopen_libs= 18866aec45a7Smrg lt_cv_dlopen_self=yes 1887ab47cfaaSmrg ;; 18886aec45a7Smrg 18896aec45a7Smrg mingw* | pw32* | cegcc*) 18906aec45a7Smrg lt_cv_dlopen="LoadLibrary" 18916aec45a7Smrg lt_cv_dlopen_libs= 1892ab47cfaaSmrg ;; 18936aec45a7Smrg 18946aec45a7Smrg cygwin*) 18956aec45a7Smrg lt_cv_dlopen="dlopen" 18966aec45a7Smrg lt_cv_dlopen_libs= 1897ab47cfaaSmrg ;; 18986aec45a7Smrg 18996aec45a7Smrg darwin*) 19006aec45a7Smrg # if libdl is installed we need to link against it 19016aec45a7Smrg AC_CHECK_LIB([dl], [dlopen], 19026aec45a7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 19036aec45a7Smrg lt_cv_dlopen="dyld" 19046aec45a7Smrg lt_cv_dlopen_libs= 19056aec45a7Smrg lt_cv_dlopen_self=yes 19066aec45a7Smrg ]) 19076aec45a7Smrg ;; 19086aec45a7Smrg 19096aec45a7Smrg *) 19106aec45a7Smrg AC_CHECK_FUNC([shl_load], 19116aec45a7Smrg [lt_cv_dlopen="shl_load"], 19126aec45a7Smrg [AC_CHECK_LIB([dld], [shl_load], 19136aec45a7Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 19146aec45a7Smrg [AC_CHECK_FUNC([dlopen], 19156aec45a7Smrg [lt_cv_dlopen="dlopen"], 19166aec45a7Smrg [AC_CHECK_LIB([dl], [dlopen], 19176aec45a7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 19186aec45a7Smrg [AC_CHECK_LIB([svld], [dlopen], 19196aec45a7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 19206aec45a7Smrg [AC_CHECK_LIB([dld], [dld_link], 19216aec45a7Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 19226aec45a7Smrg ]) 19236aec45a7Smrg ]) 19246aec45a7Smrg ]) 19256aec45a7Smrg ]) 19266aec45a7Smrg ]) 1927ab47cfaaSmrg ;; 1928ab47cfaaSmrg esac 1929ab47cfaaSmrg 19306aec45a7Smrg if test "x$lt_cv_dlopen" != xno; then 19316aec45a7Smrg enable_dlopen=yes 19326aec45a7Smrg else 19336aec45a7Smrg enable_dlopen=no 19346aec45a7Smrg fi 1935ab47cfaaSmrg 19366aec45a7Smrg case $lt_cv_dlopen in 19376aec45a7Smrg dlopen) 19386aec45a7Smrg save_CPPFLAGS="$CPPFLAGS" 19396aec45a7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 19406aec45a7Smrg 19416aec45a7Smrg save_LDFLAGS="$LDFLAGS" 19426aec45a7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 19436aec45a7Smrg 19446aec45a7Smrg save_LIBS="$LIBS" 19456aec45a7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 19466aec45a7Smrg 19476aec45a7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 19486aec45a7Smrg lt_cv_dlopen_self, [dnl 19496aec45a7Smrg _LT_TRY_DLOPEN_SELF( 19506aec45a7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 19516aec45a7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 19526aec45a7Smrg ]) 19536aec45a7Smrg 19546aec45a7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 19556aec45a7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 19566aec45a7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19576aec45a7Smrg lt_cv_dlopen_self_static, [dnl 19586aec45a7Smrg _LT_TRY_DLOPEN_SELF( 19596aec45a7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 19606aec45a7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 19616aec45a7Smrg ]) 1962ab47cfaaSmrg fi 19636aec45a7Smrg 19646aec45a7Smrg CPPFLAGS="$save_CPPFLAGS" 19656aec45a7Smrg LDFLAGS="$save_LDFLAGS" 19666aec45a7Smrg LIBS="$save_LIBS" 1967ab47cfaaSmrg ;; 1968ab47cfaaSmrg esac 1969ab47cfaaSmrg 19706aec45a7Smrg case $lt_cv_dlopen_self in 19716aec45a7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 19726aec45a7Smrg *) enable_dlopen_self=unknown ;; 1973ab47cfaaSmrg esac 19746aec45a7Smrg 19756aec45a7Smrg case $lt_cv_dlopen_self_static in 19766aec45a7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19776aec45a7Smrg *) enable_dlopen_self_static=unknown ;; 1978ab47cfaaSmrg esac 19796aec45a7Smrgfi 19806aec45a7Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19816aec45a7Smrg [Whether dlopen is supported]) 19826aec45a7Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19836aec45a7Smrg [Whether dlopen of programs is supported]) 19846aec45a7Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19856aec45a7Smrg [Whether dlopen of statically linked programs is supported]) 19866aec45a7Smrg])# LT_SYS_DLOPEN_SELF 1987ab47cfaaSmrg 19886aec45a7Smrg# Old name: 19896aec45a7SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19906aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 19916aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1992ab47cfaaSmrg 1993ab47cfaaSmrg 19946aec45a7Smrg# _LT_COMPILER_C_O([TAGNAME]) 19956aec45a7Smrg# --------------------------- 19966aec45a7Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 19976aec45a7Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19986aec45a7Smrgm4_defun([_LT_COMPILER_C_O], 19996aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 20006aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20016aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 20026aec45a7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20036aec45a7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20046aec45a7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20056aec45a7Smrg $RM -r conftest 2>/dev/null 20066aec45a7Smrg mkdir conftest 20076aec45a7Smrg cd conftest 20086aec45a7Smrg mkdir out 20096aec45a7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20106aec45a7Smrg 20116aec45a7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20126aec45a7Smrg # Insert the option either (1) after the last *FLAGS variable, or 20136aec45a7Smrg # (2) before a word containing "conftest.", or (3) at the end. 20146aec45a7Smrg # Note that $ac_compile itself does not contain backslashes and begins 20156aec45a7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20166aec45a7Smrg lt_compile=`echo "$ac_compile" | $SED \ 20176aec45a7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20186aec45a7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20196aec45a7Smrg -e 's:$: $lt_compiler_flag:'` 20206aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20216aec45a7Smrg (eval "$lt_compile" 2>out/conftest.err) 20226aec45a7Smrg ac_status=$? 20236aec45a7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20246aec45a7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20256aec45a7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20266aec45a7Smrg then 20276aec45a7Smrg # The compiler can only warn and ignore the option if not recognized 20286aec45a7Smrg # So say no if there are warnings 20296aec45a7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20306aec45a7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20316aec45a7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20326aec45a7Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20336aec45a7Smrg fi 20346aec45a7Smrg fi 20356aec45a7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20366aec45a7Smrg $RM conftest* 20376aec45a7Smrg # SGI C++ compiler will create directory out/ii_files/ for 20386aec45a7Smrg # template instantiation 20396aec45a7Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20406aec45a7Smrg $RM out/* && rmdir out 20416aec45a7Smrg cd .. 20426aec45a7Smrg $RM -r conftest 20436aec45a7Smrg $RM conftest* 20446aec45a7Smrg]) 20456aec45a7Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20466aec45a7Smrg [Does compiler simultaneously support -c and -o options?]) 20476aec45a7Smrg])# _LT_COMPILER_C_O 20486aec45a7Smrg 20496aec45a7Smrg 20506aec45a7Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20516aec45a7Smrg# ---------------------------------- 20526aec45a7Smrg# Check to see if we can do hard links to lock some files if needed 20536aec45a7Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20546aec45a7Smrg[m4_require([_LT_ENABLE_LOCK])dnl 20556aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20566aec45a7Smrg_LT_COMPILER_C_O([$1]) 20576aec45a7Smrg 20586aec45a7Smrghard_links="nottested" 20596aec45a7Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 20606aec45a7Smrg # do not overwrite the value of need_locks provided by the user 20616aec45a7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 20626aec45a7Smrg hard_links=yes 20636aec45a7Smrg $RM conftest* 20646aec45a7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20656aec45a7Smrg touch conftest.a 20666aec45a7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 20676aec45a7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 20686aec45a7Smrg AC_MSG_RESULT([$hard_links]) 20696aec45a7Smrg if test "$hard_links" = no; then 20706aec45a7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 20716aec45a7Smrg need_locks=warn 2072ab47cfaaSmrg fi 20736aec45a7Smrgelse 20746aec45a7Smrg need_locks=no 20756aec45a7Smrgfi 20766aec45a7Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20776aec45a7Smrg])# _LT_COMPILER_FILE_LOCKS 2078ab47cfaaSmrg 2079ab47cfaaSmrg 20806aec45a7Smrg# _LT_CHECK_OBJDIR 20816aec45a7Smrg# ---------------- 20826aec45a7Smrgm4_defun([_LT_CHECK_OBJDIR], 20836aec45a7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20846aec45a7Smrg[rm -f .libs 2>/dev/null 20856aec45a7Smrgmkdir .libs 2>/dev/null 20866aec45a7Smrgif test -d .libs; then 20876aec45a7Smrg lt_cv_objdir=.libs 20886aec45a7Smrgelse 20896aec45a7Smrg # MS-DOS does not allow filenames that begin with a dot. 20906aec45a7Smrg lt_cv_objdir=_libs 20916aec45a7Smrgfi 20926aec45a7Smrgrmdir .libs 2>/dev/null]) 20936aec45a7Smrgobjdir=$lt_cv_objdir 20946aec45a7Smrg_LT_DECL([], [objdir], [0], 20956aec45a7Smrg [The name of the directory that contains temporary libtool files])dnl 20966aec45a7Smrgm4_pattern_allow([LT_OBJDIR])dnl 20976aec45a7SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20986aec45a7Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20996aec45a7Smrg])# _LT_CHECK_OBJDIR 21006aec45a7Smrg 21016aec45a7Smrg 21026aec45a7Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21036aec45a7Smrg# -------------------------------------- 21046aec45a7Smrg# Check hardcoding attributes. 21056aec45a7Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21066aec45a7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21076aec45a7Smrg_LT_TAGVAR(hardcode_action, $1)= 21086aec45a7Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21096aec45a7Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21106aec45a7Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 21116aec45a7Smrg 21126aec45a7Smrg # We can hardcode non-existent directories. 21136aec45a7Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21146aec45a7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21156aec45a7Smrg # have to relink, otherwise we might link with an installed library 21166aec45a7Smrg # when we should be linking with a yet-to-be-installed one 21176aec45a7Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21186aec45a7Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21196aec45a7Smrg # Linking always hardcodes the temporary library directory. 21206aec45a7Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2121ab47cfaaSmrg else 21226aec45a7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21236aec45a7Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2124ab47cfaaSmrg fi 21256aec45a7Smrgelse 21266aec45a7Smrg # We cannot hardcode anything, or else we can only hardcode existing 21276aec45a7Smrg # directories. 21286aec45a7Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21296aec45a7Smrgfi 21306aec45a7SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2131ab47cfaaSmrg 21326aec45a7Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21336aec45a7Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21346aec45a7Smrg # Fast installation is not supported 21356aec45a7Smrg enable_fast_install=no 21366aec45a7Smrgelif test "$shlibpath_overrides_runpath" = yes || 21376aec45a7Smrg test "$enable_shared" = no; then 21386aec45a7Smrg # Fast installation is not necessary 21396aec45a7Smrg enable_fast_install=needless 21406aec45a7Smrgfi 21416aec45a7Smrg_LT_TAGDECL([], [hardcode_action], [0], 21426aec45a7Smrg [How to hardcode a shared library path into an executable]) 21436aec45a7Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2144ab47cfaaSmrg 21456aec45a7Smrg 21466aec45a7Smrg# _LT_CMD_STRIPLIB 21476aec45a7Smrg# ---------------- 21486aec45a7Smrgm4_defun([_LT_CMD_STRIPLIB], 21496aec45a7Smrg[m4_require([_LT_DECL_EGREP]) 21506aec45a7Smrgstriplib= 21516aec45a7Smrgold_striplib= 21526aec45a7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21536aec45a7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21546aec45a7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21556aec45a7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21566aec45a7Smrg AC_MSG_RESULT([yes]) 21576aec45a7Smrgelse 21586aec45a7Smrg# FIXME - insert some real tests, host_os isn't really good enough 21596aec45a7Smrg case $host_os in 21606aec45a7Smrg darwin*) 21616aec45a7Smrg if test -n "$STRIP" ; then 21626aec45a7Smrg striplib="$STRIP -x" 21636aec45a7Smrg old_striplib="$STRIP -S" 21646aec45a7Smrg AC_MSG_RESULT([yes]) 21656aec45a7Smrg else 21666aec45a7Smrg AC_MSG_RESULT([no]) 21676aec45a7Smrg fi 21686aec45a7Smrg ;; 21696aec45a7Smrg *) 21706aec45a7Smrg AC_MSG_RESULT([no]) 21716aec45a7Smrg ;; 21726aec45a7Smrg esac 21736aec45a7Smrgfi 21746aec45a7Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21756aec45a7Smrg_LT_DECL([], [striplib], [1]) 21766aec45a7Smrg])# _LT_CMD_STRIPLIB 21776aec45a7Smrg 21786aec45a7Smrg 21796aec45a7Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21806aec45a7Smrg# ----------------------------- 21816aec45a7Smrg# PORTME Fill in your ld.so characteristics 21826aec45a7Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21836aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21846aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 21856aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21866aec45a7Smrgm4_require([_LT_DECL_OBJDUMP])dnl 21876aec45a7Smrgm4_require([_LT_DECL_SED])dnl 21886aec45a7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21896aec45a7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21906aec45a7Smrgm4_if([$1], 21916aec45a7Smrg [], [ 21926aec45a7Smrgif test "$GCC" = yes; then 21936aec45a7Smrg case $host_os in 21946aec45a7Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21956aec45a7Smrg *) lt_awk_arg="/^libraries:/" ;; 21966aec45a7Smrg esac 21976aec45a7Smrg case $host_os in 21986aec45a7Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 21996aec45a7Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 22006aec45a7Smrg esac 22016aec45a7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 22026aec45a7Smrg case $lt_search_path_spec in 22036aec45a7Smrg *\;*) 22046aec45a7Smrg # if the path contains ";" then we assume it to be the separator 22056aec45a7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 22066aec45a7Smrg # assumed that no part of a normal pathname contains ";" but that should 22076aec45a7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 22086aec45a7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 22096aec45a7Smrg ;; 22106aec45a7Smrg *) 22116aec45a7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 22126aec45a7Smrg ;; 22136aec45a7Smrg esac 22146aec45a7Smrg # Ok, now we have the path, separated by spaces, we can step through it 22156aec45a7Smrg # and add multilib dir if necessary. 22166aec45a7Smrg lt_tmp_lt_search_path_spec= 22176aec45a7Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22186aec45a7Smrg for lt_sys_path in $lt_search_path_spec; do 22196aec45a7Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22206aec45a7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22216aec45a7Smrg else 22226aec45a7Smrg test -d "$lt_sys_path" && \ 22236aec45a7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22246aec45a7Smrg fi 22256aec45a7Smrg done 22266aec45a7Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22276aec45a7SmrgBEGIN {RS=" "; FS="/|\n";} { 22286aec45a7Smrg lt_foo=""; 22296aec45a7Smrg lt_count=0; 22306aec45a7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 22316aec45a7Smrg if ($lt_i != "" && $lt_i != ".") { 22326aec45a7Smrg if ($lt_i == "..") { 22336aec45a7Smrg lt_count++; 22346aec45a7Smrg } else { 22356aec45a7Smrg if (lt_count == 0) { 22366aec45a7Smrg lt_foo="/" $lt_i lt_foo; 22376aec45a7Smrg } else { 22386aec45a7Smrg lt_count--; 22396aec45a7Smrg } 22406aec45a7Smrg } 22416aec45a7Smrg } 22426aec45a7Smrg } 22436aec45a7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22446aec45a7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22456aec45a7Smrg}'` 22466aec45a7Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 22476aec45a7Smrg # for these hosts. 22486aec45a7Smrg case $host_os in 22496aec45a7Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 22506aec45a7Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 22516aec45a7Smrg esac 22526aec45a7Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22536aec45a7Smrgelse 22546aec45a7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22556aec45a7Smrgfi]) 22566aec45a7Smrglibrary_names_spec= 22576aec45a7Smrglibname_spec='lib$name' 22586aec45a7Smrgsoname_spec= 22596aec45a7Smrgshrext_cmds=".so" 22606aec45a7Smrgpostinstall_cmds= 22616aec45a7Smrgpostuninstall_cmds= 22626aec45a7Smrgfinish_cmds= 22636aec45a7Smrgfinish_eval= 22646aec45a7Smrgshlibpath_var= 22656aec45a7Smrgshlibpath_overrides_runpath=unknown 22666aec45a7Smrgversion_type=none 22676aec45a7Smrgdynamic_linker="$host_os ld.so" 22686aec45a7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22696aec45a7Smrgneed_lib_prefix=unknown 22706aec45a7Smrghardcode_into_libs=no 22716aec45a7Smrg 22726aec45a7Smrg# when you set need_version to no, make sure it does not cause -set_version 22736aec45a7Smrg# flags to be left without arguments 22746aec45a7Smrgneed_version=unknown 22756aec45a7Smrg 22766aec45a7Smrgcase $host_os in 22776aec45a7Smrgaix3*) 2278aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 22796aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22806aec45a7Smrg shlibpath_var=LIBPATH 22816aec45a7Smrg 22826aec45a7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2283ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 2284ab47cfaaSmrg ;; 2285ab47cfaaSmrg 22866aec45a7Smrgaix[[4-9]]*) 2287aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2288ab47cfaaSmrg need_lib_prefix=no 22896aec45a7Smrg need_version=no 22906aec45a7Smrg hardcode_into_libs=yes 22916aec45a7Smrg if test "$host_cpu" = ia64; then 22926aec45a7Smrg # AIX 5 supports IA64 22936aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22946aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 2295ab47cfaaSmrg else 22966aec45a7Smrg # With GCC up to 2.95.x, collect2 would create an import file 22976aec45a7Smrg # for dependence libraries. The import file would start with 22986aec45a7Smrg # the line `#! .'. This would cause the generated library to 22996aec45a7Smrg # depend on `.', always an invalid library. This was fixed in 23006aec45a7Smrg # development snapshots of GCC prior to 3.0. 23016aec45a7Smrg case $host_os in 23026aec45a7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 23036aec45a7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 23046aec45a7Smrg echo ' yes ' 23056aec45a7Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 23066aec45a7Smrg : 23076aec45a7Smrg else 23086aec45a7Smrg can_build_shared=no 23096aec45a7Smrg fi 23106aec45a7Smrg ;; 23116aec45a7Smrg esac 23126aec45a7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 23136aec45a7Smrg # soname into executable. Probably we can add versioning support to 23146aec45a7Smrg # collect2, so additional links can be useful in future. 23156aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 23166aec45a7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23176aec45a7Smrg # instead of lib<name>.a to let people know that these are not 23186aec45a7Smrg # typical AIX shared libraries. 23196aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23206aec45a7Smrg else 23216aec45a7Smrg # We preserve .a as extension for shared libraries through AIX4.2 23226aec45a7Smrg # and later when we are not doing run time linking. 23236aec45a7Smrg library_names_spec='${libname}${release}.a $libname.a' 23246aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 23256aec45a7Smrg fi 23266aec45a7Smrg shlibpath_var=LIBPATH 2327ab47cfaaSmrg fi 2328ab47cfaaSmrg ;; 2329ab47cfaaSmrg 23306aec45a7Smrgamigaos*) 23316aec45a7Smrg case $host_cpu in 23326aec45a7Smrg powerpc) 23336aec45a7Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23346aec45a7Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23356aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23366aec45a7Smrg ;; 23376aec45a7Smrg m68k) 23386aec45a7Smrg library_names_spec='$libname.ixlibrary $libname.a' 23396aec45a7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 23406aec45a7Smrg 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' 23416aec45a7Smrg ;; 23426aec45a7Smrg esac 2343ab47cfaaSmrg ;; 2344ab47cfaaSmrg 23456aec45a7Smrgbeos*) 23466aec45a7Smrg library_names_spec='${libname}${shared_ext}' 23476aec45a7Smrg dynamic_linker="$host_os ld.so" 23486aec45a7Smrg shlibpath_var=LIBRARY_PATH 23496aec45a7Smrg ;; 23506aec45a7Smrg 23516aec45a7Smrgbsdi[[45]]*) 2352aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2353ab47cfaaSmrg need_version=no 2354ab47cfaaSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23556aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 23566aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2357ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 23586aec45a7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23596aec45a7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23606aec45a7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 23616aec45a7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23626aec45a7Smrg # libtool to hard-code these into programs 2363ab47cfaaSmrg ;; 2364ab47cfaaSmrg 23656aec45a7Smrgcygwin* | mingw* | pw32* | cegcc*) 23666aec45a7Smrg version_type=windows 23676aec45a7Smrg shrext_cmds=".dll" 23686aec45a7Smrg need_version=no 23696aec45a7Smrg need_lib_prefix=no 23706aec45a7Smrg 2371aa9e3350Smrg case $GCC,$cc_basename in 2372aa9e3350Smrg yes,*) 2373aa9e3350Smrg # gcc 23746aec45a7Smrg library_names_spec='$libname.dll.a' 23756aec45a7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 23766aec45a7Smrg postinstall_cmds='base_file=`basename \${file}`~ 23776aec45a7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23786aec45a7Smrg dldir=$destdir/`dirname \$dlpath`~ 23796aec45a7Smrg test -d \$dldir || mkdir -p \$dldir~ 23806aec45a7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23816aec45a7Smrg chmod a+x \$dldir/$dlname~ 23826aec45a7Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23836aec45a7Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23846aec45a7Smrg fi' 23856aec45a7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23866aec45a7Smrg dlpath=$dir/\$dldll~ 23876aec45a7Smrg $RM \$dlpath' 23886aec45a7Smrg shlibpath_overrides_runpath=yes 23896aec45a7Smrg 23906aec45a7Smrg case $host_os in 23916aec45a7Smrg cygwin*) 23926aec45a7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23936aec45a7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23946aec45a7Smrgm4_if([$1], [],[ 23956aec45a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23966aec45a7Smrg ;; 23976aec45a7Smrg mingw* | cegcc*) 23986aec45a7Smrg # MinGW DLLs use traditional 'lib' prefix 23996aec45a7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24006aec45a7Smrg ;; 24016aec45a7Smrg pw32*) 24026aec45a7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 24036aec45a7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 24046aec45a7Smrg ;; 24056aec45a7Smrg esac 2406aa9e3350Smrg dynamic_linker='Win32 ld.exe' 2407aa9e3350Smrg ;; 2408aa9e3350Smrg 2409aa9e3350Smrg *,cl*) 2410aa9e3350Smrg # Native MSVC 2411aa9e3350Smrg libname_spec='$name' 2412aa9e3350Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2413aa9e3350Smrg library_names_spec='${libname}.dll.lib' 2414aa9e3350Smrg 2415aa9e3350Smrg case $build_os in 2416aa9e3350Smrg mingw*) 2417aa9e3350Smrg sys_lib_search_path_spec= 2418aa9e3350Smrg lt_save_ifs=$IFS 2419aa9e3350Smrg IFS=';' 2420aa9e3350Smrg for lt_path in $LIB 2421aa9e3350Smrg do 2422aa9e3350Smrg IFS=$lt_save_ifs 2423aa9e3350Smrg # Let DOS variable expansion print the short 8.3 style file name. 2424aa9e3350Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2425aa9e3350Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2426aa9e3350Smrg done 2427aa9e3350Smrg IFS=$lt_save_ifs 2428aa9e3350Smrg # Convert to MSYS style. 2429aa9e3350Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2430aa9e3350Smrg ;; 2431aa9e3350Smrg cygwin*) 2432aa9e3350Smrg # Convert to unix form, then to dos form, then back to unix form 2433aa9e3350Smrg # but this time dos style (no spaces!) so that the unix form looks 2434aa9e3350Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2435aa9e3350Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2436aa9e3350Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2437aa9e3350Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2438aa9e3350Smrg ;; 2439aa9e3350Smrg *) 2440aa9e3350Smrg sys_lib_search_path_spec="$LIB" 2441aa9e3350Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2442aa9e3350Smrg # It is most probably a Windows format PATH. 2443aa9e3350Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2444aa9e3350Smrg else 2445aa9e3350Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2446aa9e3350Smrg fi 2447aa9e3350Smrg # FIXME: find the short name or the path components, as spaces are 2448aa9e3350Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2449aa9e3350Smrg ;; 2450aa9e3350Smrg esac 2451aa9e3350Smrg 2452aa9e3350Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2453aa9e3350Smrg postinstall_cmds='base_file=`basename \${file}`~ 2454aa9e3350Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2455aa9e3350Smrg dldir=$destdir/`dirname \$dlpath`~ 2456aa9e3350Smrg test -d \$dldir || mkdir -p \$dldir~ 2457aa9e3350Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2458aa9e3350Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2459aa9e3350Smrg dlpath=$dir/\$dldll~ 2460aa9e3350Smrg $RM \$dlpath' 2461aa9e3350Smrg shlibpath_overrides_runpath=yes 2462aa9e3350Smrg dynamic_linker='Win32 link.exe' 24636aec45a7Smrg ;; 24646aec45a7Smrg 24656aec45a7Smrg *) 2466aa9e3350Smrg # Assume MSVC wrapper 24676aec45a7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2468aa9e3350Smrg dynamic_linker='Win32 ld.exe' 24696aec45a7Smrg ;; 24706aec45a7Smrg esac 24716aec45a7Smrg # FIXME: first we should search . and the directory the executable is in 24726aec45a7Smrg shlibpath_var=PATH 24738697ee19Smrg ;; 24748697ee19Smrg 24756aec45a7Smrgdarwin* | rhapsody*) 24766aec45a7Smrg dynamic_linker="$host_os dyld" 24776aec45a7Smrg version_type=darwin 24786aec45a7Smrg need_lib_prefix=no 24796aec45a7Smrg need_version=no 24806aec45a7Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24816aec45a7Smrg soname_spec='${libname}${release}${major}$shared_ext' 24826aec45a7Smrg shlibpath_overrides_runpath=yes 24836aec45a7Smrg shlibpath_var=DYLD_LIBRARY_PATH 24846aec45a7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24856aec45a7Smrgm4_if([$1], [],[ 24866aec45a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24876aec45a7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24886aec45a7Smrg ;; 24896aec45a7Smrg 24906aec45a7Smrgdgux*) 2491aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2492ab47cfaaSmrg need_lib_prefix=no 2493ab47cfaaSmrg need_version=no 24946aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2495ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 2496ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 2497ab47cfaaSmrg ;; 2498ab47cfaaSmrg 24996aec45a7Smrgfreebsd* | dragonfly*) 25006aec45a7Smrg # DragonFly does not have aout. When/if they implement a new 25016aec45a7Smrg # versioning mechanism, adjust this. 25026aec45a7Smrg if test -x /usr/bin/objformat; then 25036aec45a7Smrg objformat=`/usr/bin/objformat` 25046aec45a7Smrg else 25056aec45a7Smrg case $host_os in 2506aa9e3350Smrg freebsd[[23]].*) objformat=aout ;; 25076aec45a7Smrg *) objformat=elf ;; 25086aec45a7Smrg esac 25096aec45a7Smrg fi 25106aec45a7Smrg version_type=freebsd-$objformat 25116aec45a7Smrg case $version_type in 25126aec45a7Smrg freebsd-elf*) 25136aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25146aec45a7Smrg need_version=no 2515ab47cfaaSmrg need_lib_prefix=no 2516ab47cfaaSmrg ;; 25176aec45a7Smrg freebsd-*) 25186aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25196aec45a7Smrg need_version=yes 2520ab47cfaaSmrg ;; 2521ab47cfaaSmrg esac 25226aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 25236aec45a7Smrg case $host_os in 2524aa9e3350Smrg freebsd2.*) 25256aec45a7Smrg shlibpath_overrides_runpath=yes 25266aec45a7Smrg ;; 25276aec45a7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25286aec45a7Smrg shlibpath_overrides_runpath=yes 25296aec45a7Smrg hardcode_into_libs=yes 25306aec45a7Smrg ;; 25316aec45a7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25326aec45a7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25336aec45a7Smrg shlibpath_overrides_runpath=no 25346aec45a7Smrg hardcode_into_libs=yes 25356aec45a7Smrg ;; 25366aec45a7Smrg *) # from 4.6 on, and DragonFly 25376aec45a7Smrg shlibpath_overrides_runpath=yes 25386aec45a7Smrg hardcode_into_libs=yes 25396aec45a7Smrg ;; 25406aec45a7Smrg esac 2541ab47cfaaSmrg ;; 2542ab47cfaaSmrg 25436aec45a7Smrghaiku*) 2544aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 25456aec45a7Smrg need_lib_prefix=no 25466aec45a7Smrg need_version=no 25476aec45a7Smrg dynamic_linker="$host_os runtime_loader" 25486aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2549ab47cfaaSmrg soname_spec='${libname}${release}${shared_ext}$major' 25506aec45a7Smrg shlibpath_var=LIBRARY_PATH 25516aec45a7Smrg shlibpath_overrides_runpath=yes 25526aec45a7Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 25536aec45a7Smrg hardcode_into_libs=yes 2554ab47cfaaSmrg ;; 25555c42550eSmrg 25566aec45a7Smrghpux9* | hpux10* | hpux11*) 25576aec45a7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 25586aec45a7Smrg # link against other versions. 25596aec45a7Smrg version_type=sunos 25606aec45a7Smrg need_lib_prefix=no 25616aec45a7Smrg need_version=no 25626aec45a7Smrg case $host_cpu in 25636aec45a7Smrg ia64*) 25646aec45a7Smrg shrext_cmds='.so' 25656aec45a7Smrg hardcode_into_libs=yes 25666aec45a7Smrg dynamic_linker="$host_os dld.so" 25676aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 25686aec45a7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25696aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25706aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25716aec45a7Smrg if test "X$HPUX_IA64_MODE" = X32; then 25726aec45a7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25735c42550eSmrg else 25746aec45a7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25755c42550eSmrg fi 25766aec45a7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25776aec45a7Smrg ;; 25786aec45a7Smrg hppa*64*) 25796aec45a7Smrg shrext_cmds='.sl' 25806aec45a7Smrg hardcode_into_libs=yes 25816aec45a7Smrg dynamic_linker="$host_os dld.sl" 25826aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25836aec45a7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25846aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25856aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25866aec45a7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25876aec45a7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25886aec45a7Smrg ;; 25896aec45a7Smrg *) 25906aec45a7Smrg shrext_cmds='.sl' 25916aec45a7Smrg dynamic_linker="$host_os dld.sl" 25926aec45a7Smrg shlibpath_var=SHLIB_PATH 25936aec45a7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25946aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25956aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 25966aec45a7Smrg ;; 25976aec45a7Smrg esac 25986aec45a7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25996aec45a7Smrg postinstall_cmds='chmod 555 $lib' 26006aec45a7Smrg # or fails outright, so override atomically: 26016aec45a7Smrg install_override_mode=555 26026aec45a7Smrg ;; 26035c42550eSmrg 26046aec45a7Smrginterix[[3-9]]*) 2605aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 26066aec45a7Smrg need_lib_prefix=no 26076aec45a7Smrg need_version=no 26086aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26096aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 26106aec45a7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26116aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 26126aec45a7Smrg shlibpath_overrides_runpath=no 26136aec45a7Smrg hardcode_into_libs=yes 26146aec45a7Smrg ;; 26155c42550eSmrg 26166aec45a7Smrgirix5* | irix6* | nonstopux*) 26176aec45a7Smrg case $host_os in 26186aec45a7Smrg nonstopux*) version_type=nonstopux ;; 26196aec45a7Smrg *) 26206aec45a7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2621aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 26226aec45a7Smrg else 26236aec45a7Smrg version_type=irix 26246aec45a7Smrg fi ;; 26256aec45a7Smrg esac 26266aec45a7Smrg need_lib_prefix=no 26276aec45a7Smrg need_version=no 26286aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 26296aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26306aec45a7Smrg case $host_os in 26316aec45a7Smrg irix5* | nonstopux*) 26326aec45a7Smrg libsuff= shlibsuff= 26336aec45a7Smrg ;; 26346aec45a7Smrg *) 26356aec45a7Smrg case $LD in # libtool.m4 will add one of these switches to LD 26366aec45a7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26376aec45a7Smrg libsuff= shlibsuff= libmagic=32-bit;; 26386aec45a7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26396aec45a7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 26406aec45a7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26416aec45a7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 26426aec45a7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 26435c42550eSmrg esac 26446aec45a7Smrg ;; 26456aec45a7Smrg esac 26466aec45a7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26476aec45a7Smrg shlibpath_overrides_runpath=no 26486aec45a7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26496aec45a7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26506aec45a7Smrg hardcode_into_libs=yes 26516aec45a7Smrg ;; 26525c42550eSmrg 26536aec45a7Smrg# No shared lib support for Linux oldld, aout, or coff. 26546aec45a7Smrglinux*oldld* | linux*aout* | linux*coff*) 26556aec45a7Smrg dynamic_linker=no 26566aec45a7Smrg ;; 26575c42550eSmrg 2658aa9e3350Smrg# This must be glibc/ELF. 265938770048Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2660aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 26616aec45a7Smrg need_lib_prefix=no 26626aec45a7Smrg need_version=no 26636aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26646aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 26656aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26666aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 26676aec45a7Smrg shlibpath_overrides_runpath=no 26685c42550eSmrg 26696aec45a7Smrg # Some binutils ld are patched to set DT_RUNPATH 26706aec45a7Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 26716aec45a7Smrg [lt_cv_shlibpath_overrides_runpath=no 26726aec45a7Smrg save_LDFLAGS=$LDFLAGS 26736aec45a7Smrg save_libdir=$libdir 26746aec45a7Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 26756aec45a7Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 26766aec45a7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 26776aec45a7Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 26786aec45a7Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 26796aec45a7Smrg LDFLAGS=$save_LDFLAGS 26806aec45a7Smrg libdir=$save_libdir 26816aec45a7Smrg ]) 26826aec45a7Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26835c42550eSmrg 26846aec45a7Smrg # This implies no fast_install, which is unacceptable. 26856aec45a7Smrg # Some rework will be needed to allow for fast_install 26866aec45a7Smrg # before this can be enabled. 26876aec45a7Smrg hardcode_into_libs=yes 26885c42550eSmrg 26896aec45a7Smrg # Append ld.so.conf contents to the search path 26906aec45a7Smrg if test -f /etc/ld.so.conf; then 26916aec45a7Smrg 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' ' '` 269238770048Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 26935c42550eSmrg fi 26945c42550eSmrg 26956aec45a7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 26966aec45a7Smrg # powerpc, because MkLinux only supported shared libraries with the 26976aec45a7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 26986aec45a7Smrg # most powerpc-linux boxes support dynamic linking these days and 26996aec45a7Smrg # people can always --disable-shared, the test was removed, and we 27006aec45a7Smrg # assume the GNU/Linux dynamic linker is in use. 27016aec45a7Smrg dynamic_linker='GNU/Linux ld.so' 27026aec45a7Smrg ;; 27035c42550eSmrg 270438770048Smrgnetbsdelf*-gnu) 270538770048Smrg version_type=linux 270638770048Smrg need_lib_prefix=no 270738770048Smrg need_version=no 270838770048Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 270938770048Smrg soname_spec='${libname}${release}${shared_ext}$major' 271038770048Smrg shlibpath_var=LD_LIBRARY_PATH 271138770048Smrg shlibpath_overrides_runpath=no 271238770048Smrg hardcode_into_libs=yes 271338770048Smrg dynamic_linker='NetBSD ld.elf_so' 271438770048Smrg ;; 271538770048Smrg 27166aec45a7Smrgnetbsd*) 27176aec45a7Smrg version_type=sunos 27186aec45a7Smrg need_lib_prefix=no 27196aec45a7Smrg need_version=no 27206aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27216aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27226aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27236aec45a7Smrg dynamic_linker='NetBSD (a.out) ld.so' 27246aec45a7Smrg else 27256aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27266aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27276aec45a7Smrg dynamic_linker='NetBSD ld.elf_so' 27286aec45a7Smrg fi 27296aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27306aec45a7Smrg shlibpath_overrides_runpath=yes 27316aec45a7Smrg hardcode_into_libs=yes 27326aec45a7Smrg ;; 27335c42550eSmrg 27346aec45a7Smrgnewsos6) 2735aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 27366aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27376aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27386aec45a7Smrg shlibpath_overrides_runpath=yes 27396aec45a7Smrg ;; 27405c42550eSmrg 27416aec45a7Smrg*nto* | *qnx*) 27426aec45a7Smrg version_type=qnx 27436aec45a7Smrg need_lib_prefix=no 27446aec45a7Smrg need_version=no 27456aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27466aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27476aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27486aec45a7Smrg shlibpath_overrides_runpath=no 27496aec45a7Smrg hardcode_into_libs=yes 27506aec45a7Smrg dynamic_linker='ldqnx.so' 27516aec45a7Smrg ;; 27525c42550eSmrg 27536aec45a7Smrgopenbsd*) 27546aec45a7Smrg version_type=sunos 27556aec45a7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 27566aec45a7Smrg need_lib_prefix=no 27576aec45a7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27586aec45a7Smrg case $host_os in 27596aec45a7Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27606aec45a7Smrg *) need_version=no ;; 27616aec45a7Smrg esac 27626aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27636aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27646aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27656aec45a7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27666aec45a7Smrg case $host_os in 27676aec45a7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 27686aec45a7Smrg shlibpath_overrides_runpath=no 27696aec45a7Smrg ;; 27706aec45a7Smrg *) 27716aec45a7Smrg shlibpath_overrides_runpath=yes 27726aec45a7Smrg ;; 27736aec45a7Smrg esac 27746aec45a7Smrg else 27756aec45a7Smrg shlibpath_overrides_runpath=yes 27766aec45a7Smrg fi 27776aec45a7Smrg ;; 27785c42550eSmrg 27796aec45a7Smrgos2*) 27806aec45a7Smrg libname_spec='$name' 27816aec45a7Smrg shrext_cmds=".dll" 27826aec45a7Smrg need_lib_prefix=no 27836aec45a7Smrg library_names_spec='$libname${shared_ext} $libname.a' 27846aec45a7Smrg dynamic_linker='OS/2 ld.exe' 27856aec45a7Smrg shlibpath_var=LIBPATH 27866aec45a7Smrg ;; 27875c42550eSmrg 27886aec45a7Smrgosf3* | osf4* | osf5*) 27896aec45a7Smrg version_type=osf 27906aec45a7Smrg need_lib_prefix=no 27916aec45a7Smrg need_version=no 27926aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 27936aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27946aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27956aec45a7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27966aec45a7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27976aec45a7Smrg ;; 27985c42550eSmrg 27996aec45a7Smrgrdos*) 28006aec45a7Smrg dynamic_linker=no 28016aec45a7Smrg ;; 28025c42550eSmrg 28036aec45a7Smrgsolaris*) 2804aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28056aec45a7Smrg need_lib_prefix=no 28066aec45a7Smrg need_version=no 28076aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28086aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28096aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28106aec45a7Smrg shlibpath_overrides_runpath=yes 28116aec45a7Smrg hardcode_into_libs=yes 28126aec45a7Smrg # ldd complains unless libraries are executable 28136aec45a7Smrg postinstall_cmds='chmod +x $lib' 28146aec45a7Smrg ;; 28155c42550eSmrg 28166aec45a7Smrgsunos4*) 28176aec45a7Smrg version_type=sunos 28186aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28196aec45a7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28206aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28216aec45a7Smrg shlibpath_overrides_runpath=yes 28226aec45a7Smrg if test "$with_gnu_ld" = yes; then 28236aec45a7Smrg need_lib_prefix=no 28246aec45a7Smrg fi 28256aec45a7Smrg need_version=yes 28266aec45a7Smrg ;; 28275c42550eSmrg 28286aec45a7Smrgsysv4 | sysv4.3*) 2829aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28306aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28316aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28326aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28336aec45a7Smrg case $host_vendor in 28346aec45a7Smrg sni) 28356aec45a7Smrg shlibpath_overrides_runpath=no 28366aec45a7Smrg need_lib_prefix=no 28376aec45a7Smrg runpath_var=LD_RUN_PATH 28386aec45a7Smrg ;; 28396aec45a7Smrg siemens) 28406aec45a7Smrg need_lib_prefix=no 28416aec45a7Smrg ;; 28426aec45a7Smrg motorola) 28436aec45a7Smrg need_lib_prefix=no 28446aec45a7Smrg need_version=no 28456aec45a7Smrg shlibpath_overrides_runpath=no 28466aec45a7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28476aec45a7Smrg ;; 28486aec45a7Smrg esac 28496aec45a7Smrg ;; 28505c42550eSmrg 28516aec45a7Smrgsysv4*MP*) 28526aec45a7Smrg if test -d /usr/nec ;then 2853aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28546aec45a7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28556aec45a7Smrg soname_spec='$libname${shared_ext}.$major' 28566aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28576aec45a7Smrg fi 28586aec45a7Smrg ;; 28595c42550eSmrg 28606aec45a7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28616aec45a7Smrg version_type=freebsd-elf 28626aec45a7Smrg need_lib_prefix=no 28636aec45a7Smrg need_version=no 28646aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28656aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28666aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28676aec45a7Smrg shlibpath_overrides_runpath=yes 28686aec45a7Smrg hardcode_into_libs=yes 28696aec45a7Smrg if test "$with_gnu_ld" = yes; then 28706aec45a7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28716aec45a7Smrg else 28726aec45a7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28736aec45a7Smrg case $host_os in 28746aec45a7Smrg sco3.2v5*) 28756aec45a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28766aec45a7Smrg ;; 28776aec45a7Smrg esac 28786aec45a7Smrg fi 28796aec45a7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 28806aec45a7Smrg ;; 28815c42550eSmrg 28826aec45a7Smrgtpf*) 28836aec45a7Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2884aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28856aec45a7Smrg need_lib_prefix=no 28866aec45a7Smrg need_version=no 28876aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28886aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28896aec45a7Smrg shlibpath_overrides_runpath=no 28906aec45a7Smrg hardcode_into_libs=yes 28916aec45a7Smrg ;; 28925c42550eSmrg 28936aec45a7Smrguts4*) 2894aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28956aec45a7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28966aec45a7Smrg soname_spec='${libname}${release}${shared_ext}$major' 28976aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28986aec45a7Smrg ;; 28995c42550eSmrg 29006aec45a7Smrg*) 29016aec45a7Smrg dynamic_linker=no 29026aec45a7Smrg ;; 29036aec45a7Smrgesac 29046aec45a7SmrgAC_MSG_RESULT([$dynamic_linker]) 29056aec45a7Smrgtest "$dynamic_linker" = no && can_build_shared=no 29065c42550eSmrg 29076aec45a7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 29086aec45a7Smrgif test "$GCC" = yes; then 29096aec45a7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 29106aec45a7Smrgfi 29115c42550eSmrg 29126aec45a7Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29136aec45a7Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29146aec45a7Smrgfi 29156aec45a7Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29166aec45a7Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29176aec45a7Smrgfi 29185c42550eSmrg 29196aec45a7Smrg_LT_DECL([], [variables_saved_for_relink], [1], 29206aec45a7Smrg [Variables whose values should be saved in libtool wrapper scripts and 29216aec45a7Smrg restored at link time]) 29226aec45a7Smrg_LT_DECL([], [need_lib_prefix], [0], 29236aec45a7Smrg [Do we need the "lib" prefix for modules?]) 29246aec45a7Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29256aec45a7Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29266aec45a7Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29276aec45a7Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29286aec45a7Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29296aec45a7Smrg [Is shlibpath searched before the hard-coded library search path?]) 29306aec45a7Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29316aec45a7Smrg_LT_DECL([], [library_names_spec], [1], 29326aec45a7Smrg [[List of archive names. First name is the real one, the rest are links. 29336aec45a7Smrg The last name is the one that the linker finds with -lNAME]]) 29346aec45a7Smrg_LT_DECL([], [soname_spec], [1], 29356aec45a7Smrg [[The coded name of the library, if different from the real name]]) 29366aec45a7Smrg_LT_DECL([], [install_override_mode], [1], 29376aec45a7Smrg [Permission mode override for installation of shared libraries]) 29386aec45a7Smrg_LT_DECL([], [postinstall_cmds], [2], 29396aec45a7Smrg [Command to use after installation of a shared archive]) 29406aec45a7Smrg_LT_DECL([], [postuninstall_cmds], [2], 29416aec45a7Smrg [Command to use after uninstallation of a shared archive]) 29426aec45a7Smrg_LT_DECL([], [finish_cmds], [2], 29436aec45a7Smrg [Commands used to finish a libtool library installation in a directory]) 29446aec45a7Smrg_LT_DECL([], [finish_eval], [1], 29456aec45a7Smrg [[As "finish_cmds", except a single script fragment to be evaled but 29466aec45a7Smrg not shown]]) 29476aec45a7Smrg_LT_DECL([], [hardcode_into_libs], [0], 29486aec45a7Smrg [Whether we should hardcode library paths into libraries]) 29496aec45a7Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29506aec45a7Smrg [Compile-time system search path for libraries]) 29516aec45a7Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29526aec45a7Smrg [Run-time system search path for libraries]) 29536aec45a7Smrg])# _LT_SYS_DYNAMIC_LINKER 29546aec45a7Smrg 29556aec45a7Smrg 29566aec45a7Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 29576aec45a7Smrg# -------------------------- 29585c42550eSmrg# find a file program which can recognize shared library 29596aec45a7SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29606aec45a7Smrg[m4_require([_LT_DECL_EGREP])dnl 29615c42550eSmrgAC_MSG_CHECKING([for $1]) 29625c42550eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29635c42550eSmrg[case $MAGIC_CMD in 2964ab47cfaaSmrg[[\\/*] | ?:[\\/]*]) 2965ab47cfaaSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2966ab47cfaaSmrg ;; 2967ab47cfaaSmrg*) 2968ab47cfaaSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2969ab47cfaaSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2970ab47cfaaSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2971ab47cfaaSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2972ab47cfaaSmrgdnl not every word. This closes a longstanding sh security hole. 29736aec45a7Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2974ab47cfaaSmrg for ac_dir in $ac_dummy; do 2975ab47cfaaSmrg IFS="$lt_save_ifs" 2976ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 2977ab47cfaaSmrg if test -f $ac_dir/$1; then 2978ab47cfaaSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2979ab47cfaaSmrg if test -n "$file_magic_test_file"; then 2980ab47cfaaSmrg case $deplibs_check_method in 2981ab47cfaaSmrg "file_magic "*) 2982ab47cfaaSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2983ab47cfaaSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2984ab47cfaaSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2985ab47cfaaSmrg $EGREP "$file_magic_regex" > /dev/null; then 2986ab47cfaaSmrg : 2987ab47cfaaSmrg else 29886aec45a7Smrg cat <<_LT_EOF 1>&2 2989ab47cfaaSmrg 2990ab47cfaaSmrg*** Warning: the command libtool uses to detect shared libraries, 2991ab47cfaaSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2992ab47cfaaSmrg*** The result is that libtool may fail to recognize shared libraries 2993ab47cfaaSmrg*** as such. This will affect the creation of libtool libraries that 2994ab47cfaaSmrg*** depend on shared libraries, but programs linked with such libtool 2995ab47cfaaSmrg*** libraries will work regardless of this problem. Nevertheless, you 2996ab47cfaaSmrg*** may want to report the problem to your system manager and/or to 2997ab47cfaaSmrg*** bug-libtool@gnu.org 2998ab47cfaaSmrg 29996aec45a7Smrg_LT_EOF 3000ab47cfaaSmrg fi ;; 3001ab47cfaaSmrg esac 3002ab47cfaaSmrg fi 3003ab47cfaaSmrg break 3004ab47cfaaSmrg fi 3005ab47cfaaSmrg done 3006ab47cfaaSmrg IFS="$lt_save_ifs" 3007ab47cfaaSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 3008ab47cfaaSmrg ;; 3009ab47cfaaSmrgesac]) 3010ab47cfaaSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3011ab47cfaaSmrgif test -n "$MAGIC_CMD"; then 3012ab47cfaaSmrg AC_MSG_RESULT($MAGIC_CMD) 3013ab47cfaaSmrgelse 3014ab47cfaaSmrg AC_MSG_RESULT(no) 3015ab47cfaaSmrgfi 30166aec45a7Smrg_LT_DECL([], [MAGIC_CMD], [0], 30176aec45a7Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30186aec45a7Smrg])# _LT_PATH_TOOL_PREFIX 3019ab47cfaaSmrg 30206aec45a7Smrg# Old name: 30216aec45a7SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30226aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 30236aec45a7Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 30241473d951Smrg 30256aec45a7Smrg 30266aec45a7Smrg# _LT_PATH_MAGIC 30276aec45a7Smrg# -------------- 30288697ee19Smrg# find a file program which can recognize a shared library 30296aec45a7Smrgm4_defun([_LT_PATH_MAGIC], 30306aec45a7Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3031ab47cfaaSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3032ab47cfaaSmrg if test -n "$ac_tool_prefix"; then 30336aec45a7Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3034ab47cfaaSmrg else 3035ab47cfaaSmrg MAGIC_CMD=: 3036ab47cfaaSmrg fi 3037ab47cfaaSmrgfi 30386aec45a7Smrg])# _LT_PATH_MAGIC 3039ab47cfaaSmrg 3040ab47cfaaSmrg 30416aec45a7Smrg# LT_PATH_LD 3042ab47cfaaSmrg# ---------- 3043ab47cfaaSmrg# find the pathname to the GNU or non-GNU linker 30446aec45a7SmrgAC_DEFUN([LT_PATH_LD], 30456aec45a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 30465c42550eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30475c42550eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30486aec45a7Smrgm4_require([_LT_DECL_SED])dnl 30496aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 30506aec45a7Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30516aec45a7Smrg 30526aec45a7SmrgAC_ARG_WITH([gnu-ld], 30536aec45a7Smrg [AS_HELP_STRING([--with-gnu-ld], 30546aec45a7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30556aec45a7Smrg [test "$withval" = no || with_gnu_ld=yes], 30566aec45a7Smrg [with_gnu_ld=no])dnl 30576aec45a7Smrg 3058ab47cfaaSmrgac_prog=ld 3059ab47cfaaSmrgif test "$GCC" = yes; then 3060ab47cfaaSmrg # Check if gcc -print-prog-name=ld gives a path. 3061ab47cfaaSmrg AC_MSG_CHECKING([for ld used by $CC]) 3062ab47cfaaSmrg case $host in 3063ab47cfaaSmrg *-*-mingw*) 3064ab47cfaaSmrg # gcc leaves a trailing carriage return which upsets mingw 3065ab47cfaaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3066ab47cfaaSmrg *) 3067ab47cfaaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3068ab47cfaaSmrg esac 3069ab47cfaaSmrg case $ac_prog in 3070ab47cfaaSmrg # Accept absolute paths. 3071ab47cfaaSmrg [[\\/]]* | ?:[[\\/]]*) 3072ab47cfaaSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3073ab47cfaaSmrg # Canonicalize the pathname of ld 30746aec45a7Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30756aec45a7Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30766aec45a7Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3077ab47cfaaSmrg done 3078ab47cfaaSmrg test -z "$LD" && LD="$ac_prog" 3079ab47cfaaSmrg ;; 3080ab47cfaaSmrg "") 3081ab47cfaaSmrg # If it fails, then pretend we aren't using GCC. 3082ab47cfaaSmrg ac_prog=ld 3083ab47cfaaSmrg ;; 3084ab47cfaaSmrg *) 3085ab47cfaaSmrg # If it is relative, then search for the first ld in PATH. 3086ab47cfaaSmrg with_gnu_ld=unknown 3087ab47cfaaSmrg ;; 3088ab47cfaaSmrg esac 3089ab47cfaaSmrgelif test "$with_gnu_ld" = yes; then 3090ab47cfaaSmrg AC_MSG_CHECKING([for GNU ld]) 3091ab47cfaaSmrgelse 3092ab47cfaaSmrg AC_MSG_CHECKING([for non-GNU ld]) 3093ab47cfaaSmrgfi 3094ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_LD, 3095ab47cfaaSmrg[if test -z "$LD"; then 3096ab47cfaaSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3097ab47cfaaSmrg for ac_dir in $PATH; do 3098ab47cfaaSmrg IFS="$lt_save_ifs" 3099ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 3100ab47cfaaSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3101ab47cfaaSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3102ab47cfaaSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3103ab47cfaaSmrg # but apparently some variants of GNU ld only accept -v. 3104ab47cfaaSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3105ab47cfaaSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3106ab47cfaaSmrg *GNU* | *'with BFD'*) 3107ab47cfaaSmrg test "$with_gnu_ld" != no && break 3108ab47cfaaSmrg ;; 3109ab47cfaaSmrg *) 3110ab47cfaaSmrg test "$with_gnu_ld" != yes && break 3111ab47cfaaSmrg ;; 3112ab47cfaaSmrg esac 3113ab47cfaaSmrg fi 3114ab47cfaaSmrg done 3115ab47cfaaSmrg IFS="$lt_save_ifs" 3116ab47cfaaSmrgelse 3117ab47cfaaSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3118ab47cfaaSmrgfi]) 3119ab47cfaaSmrgLD="$lt_cv_path_LD" 3120ab47cfaaSmrgif test -n "$LD"; then 3121ab47cfaaSmrg AC_MSG_RESULT($LD) 3122ab47cfaaSmrgelse 3123ab47cfaaSmrg AC_MSG_RESULT(no) 3124ab47cfaaSmrgfi 3125ab47cfaaSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31266aec45a7Smrg_LT_PATH_LD_GNU 31276aec45a7SmrgAC_SUBST([LD]) 3128ab47cfaaSmrg 31296aec45a7Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31306aec45a7Smrg])# LT_PATH_LD 3131ab47cfaaSmrg 31326aec45a7Smrg# Old names: 31336aec45a7SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31346aec45a7SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31356aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 31366aec45a7Smrgdnl AC_DEFUN([AM_PROG_LD], []) 31376aec45a7Smrgdnl AC_DEFUN([AC_PROG_LD], []) 31386aec45a7Smrg 31396aec45a7Smrg 31406aec45a7Smrg# _LT_PATH_LD_GNU 31416aec45a7Smrg#- -------------- 31426aec45a7Smrgm4_defun([_LT_PATH_LD_GNU], 31436aec45a7Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3144ab47cfaaSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3145ab47cfaaSmrgcase `$LD -v 2>&1 </dev/null` in 3146ab47cfaaSmrg*GNU* | *'with BFD'*) 3147ab47cfaaSmrg lt_cv_prog_gnu_ld=yes 3148ab47cfaaSmrg ;; 3149ab47cfaaSmrg*) 3150ab47cfaaSmrg lt_cv_prog_gnu_ld=no 3151ab47cfaaSmrg ;; 3152ab47cfaaSmrgesac]) 3153ab47cfaaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31546aec45a7Smrg])# _LT_PATH_LD_GNU 3155ab47cfaaSmrg 3156ab47cfaaSmrg 31576aec45a7Smrg# _LT_CMD_RELOAD 31586aec45a7Smrg# -------------- 3159ab47cfaaSmrg# find reload flag for linker 3160ab47cfaaSmrg# -- PORTME Some linkers may need a different reload flag. 31616aec45a7Smrgm4_defun([_LT_CMD_RELOAD], 3162ab47cfaaSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3163ab47cfaaSmrg lt_cv_ld_reload_flag, 3164ab47cfaaSmrg [lt_cv_ld_reload_flag='-r']) 3165ab47cfaaSmrgreload_flag=$lt_cv_ld_reload_flag 3166ab47cfaaSmrgcase $reload_flag in 3167ab47cfaaSmrg"" | " "*) ;; 3168ab47cfaaSmrg*) reload_flag=" $reload_flag" ;; 3169ab47cfaaSmrgesac 3170ab47cfaaSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3171ab47cfaaSmrgcase $host_os in 3172aa9e3350Smrg cygwin* | mingw* | pw32* | cegcc*) 3173aa9e3350Smrg if test "$GCC" != yes; then 3174aa9e3350Smrg reload_cmds=false 3175aa9e3350Smrg fi 3176aa9e3350Smrg ;; 3177ab47cfaaSmrg darwin*) 3178ab47cfaaSmrg if test "$GCC" = yes; then 3179ab47cfaaSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3180ab47cfaaSmrg else 3181ab47cfaaSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3182ab47cfaaSmrg fi 3183ab47cfaaSmrg ;; 3184ab47cfaaSmrgesac 31856aec45a7Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 31866aec45a7Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31876aec45a7Smrg])# _LT_CMD_RELOAD 3188ab47cfaaSmrg 3189ab47cfaaSmrg 31906aec45a7Smrg# _LT_CHECK_MAGIC_METHOD 31916aec45a7Smrg# ---------------------- 3192ab47cfaaSmrg# how to check for library dependencies 3193ab47cfaaSmrg# -- PORTME fill in with the dynamic library characteristics 31946aec45a7Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31956aec45a7Smrg[m4_require([_LT_DECL_EGREP]) 31966aec45a7Smrgm4_require([_LT_DECL_OBJDUMP]) 31976aec45a7SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3198ab47cfaaSmrglt_cv_deplibs_check_method, 3199ab47cfaaSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3200ab47cfaaSmrglt_cv_file_magic_test_file= 3201ab47cfaaSmrglt_cv_deplibs_check_method='unknown' 3202ab47cfaaSmrg# Need to set the preceding variable on all platforms that support 3203ab47cfaaSmrg# interlibrary dependencies. 3204ab47cfaaSmrg# 'none' -- dependencies not supported. 3205ab47cfaaSmrg# `unknown' -- same as none, but documents that we really don't know. 3206ab47cfaaSmrg# 'pass_all' -- all dependencies passed with no checks. 3207ab47cfaaSmrg# 'test_compile' -- check by making test program. 3208ab47cfaaSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3209ab47cfaaSmrg# which responds to the $file_magic_cmd with a given extended regex. 3210ab47cfaaSmrg# If you have `file' or equivalent on your system and you're not sure 3211ab47cfaaSmrg# whether `pass_all' will *always* work, you probably want this one. 3212ab47cfaaSmrg 3213ab47cfaaSmrgcase $host_os in 32141473d951Smrgaix[[4-9]]*) 3215ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3216ab47cfaaSmrg ;; 3217ab47cfaaSmrg 3218ab47cfaaSmrgbeos*) 3219ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3220ab47cfaaSmrg ;; 3221ab47cfaaSmrg 3222ab47cfaaSmrgbsdi[[45]]*) 3223ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3224ab47cfaaSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3225ab47cfaaSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3226ab47cfaaSmrg ;; 3227ab47cfaaSmrg 3228ab47cfaaSmrgcygwin*) 3229ab47cfaaSmrg # func_win32_libid is a shell function defined in ltmain.sh 3230ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3231ab47cfaaSmrg lt_cv_file_magic_cmd='func_win32_libid' 3232ab47cfaaSmrg ;; 3233ab47cfaaSmrg 3234ab47cfaaSmrgmingw* | pw32*) 3235ab47cfaaSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 32368697ee19Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 32378697ee19Smrg # unless we find 'file', for example because we are cross-compiling. 32386aec45a7Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 32396aec45a7Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32408697ee19Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32418697ee19Smrg lt_cv_file_magic_cmd='func_win32_libid' 32428697ee19Smrg else 32436aec45a7Smrg # Keep this pattern in sync with the one in func_win32_libid. 32446aec45a7Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32458697ee19Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32468697ee19Smrg fi 3247ab47cfaaSmrg ;; 3248ab47cfaaSmrg 32496aec45a7Smrgcegcc*) 32506aec45a7Smrg # use the weaker test based on 'objdump'. See mingw*. 32516aec45a7Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32526aec45a7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32536aec45a7Smrg ;; 32546aec45a7Smrg 3255ab47cfaaSmrgdarwin* | rhapsody*) 3256ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3257ab47cfaaSmrg ;; 3258ab47cfaaSmrg 3259ab47cfaaSmrgfreebsd* | dragonfly*) 32606aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3261ab47cfaaSmrg case $host_cpu in 3262ab47cfaaSmrg i*86 ) 3263ab47cfaaSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3264ab47cfaaSmrg # Let's accept both of them until this is cleared up. 3265ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3266ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 3267ab47cfaaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3268ab47cfaaSmrg ;; 3269ab47cfaaSmrg esac 3270ab47cfaaSmrg else 3271ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3272ab47cfaaSmrg fi 3273ab47cfaaSmrg ;; 3274ab47cfaaSmrg 32756aec45a7Smrghaiku*) 32766aec45a7Smrg lt_cv_deplibs_check_method=pass_all 32776aec45a7Smrg ;; 32786aec45a7Smrg 3279ab47cfaaSmrghpux10.20* | hpux11*) 3280ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 3281ab47cfaaSmrg case $host_cpu in 3282ab47cfaaSmrg ia64*) 3283ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3284ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3285ab47cfaaSmrg ;; 3286ab47cfaaSmrg hppa*64*) 32876aec45a7Smrg [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]'] 3288ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3289ab47cfaaSmrg ;; 3290ab47cfaaSmrg *) 32916aec45a7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3292ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3293ab47cfaaSmrg ;; 3294ab47cfaaSmrg esac 3295ab47cfaaSmrg ;; 3296ab47cfaaSmrg 32978697ee19Smrginterix[[3-9]]*) 3298ab47cfaaSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3299ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3300ab47cfaaSmrg ;; 3301ab47cfaaSmrg 3302ab47cfaaSmrgirix5* | irix6* | nonstopux*) 3303ab47cfaaSmrg case $LD in 3304ab47cfaaSmrg *-32|*"-32 ") libmagic=32-bit;; 3305ab47cfaaSmrg *-n32|*"-n32 ") libmagic=N32;; 3306ab47cfaaSmrg *-64|*"-64 ") libmagic=64-bit;; 3307ab47cfaaSmrg *) libmagic=never-match;; 3308ab47cfaaSmrg esac 3309ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3310ab47cfaaSmrg ;; 3311ab47cfaaSmrg 3312aa9e3350Smrg# This must be glibc/ELF. 331338770048Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3314ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3315ab47cfaaSmrg ;; 3316ab47cfaaSmrg 331738770048Smrgnetbsd* | netbsdelf*-gnu) 33186aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3319ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3320ab47cfaaSmrg else 3321ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3322ab47cfaaSmrg fi 3323ab47cfaaSmrg ;; 3324ab47cfaaSmrg 3325ab47cfaaSmrgnewos6*) 3326ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3327ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 3328ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3329ab47cfaaSmrg ;; 3330ab47cfaaSmrg 33316aec45a7Smrg*nto* | *qnx*) 33326aec45a7Smrg lt_cv_deplibs_check_method=pass_all 3333ab47cfaaSmrg ;; 3334ab47cfaaSmrg 3335ab47cfaaSmrgopenbsd*) 33366aec45a7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3337ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3338ab47cfaaSmrg else 3339ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3340ab47cfaaSmrg fi 3341ab47cfaaSmrg ;; 3342ab47cfaaSmrg 3343ab47cfaaSmrgosf3* | osf4* | osf5*) 3344ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3345ab47cfaaSmrg ;; 3346ab47cfaaSmrg 33478697ee19Smrgrdos*) 33488697ee19Smrg lt_cv_deplibs_check_method=pass_all 33498697ee19Smrg ;; 33508697ee19Smrg 3351ab47cfaaSmrgsolaris*) 3352ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3353ab47cfaaSmrg ;; 3354ab47cfaaSmrg 33556aec45a7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33566aec45a7Smrg lt_cv_deplibs_check_method=pass_all 33576aec45a7Smrg ;; 33586aec45a7Smrg 3359ab47cfaaSmrgsysv4 | sysv4.3*) 3360ab47cfaaSmrg case $host_vendor in 3361ab47cfaaSmrg motorola) 3362ab47cfaaSmrg 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]]' 3363ab47cfaaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3364ab47cfaaSmrg ;; 3365ab47cfaaSmrg ncr) 3366ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3367ab47cfaaSmrg ;; 3368ab47cfaaSmrg sequent) 3369ab47cfaaSmrg lt_cv_file_magic_cmd='/bin/file' 3370ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3371ab47cfaaSmrg ;; 3372ab47cfaaSmrg sni) 3373ab47cfaaSmrg lt_cv_file_magic_cmd='/bin/file' 3374ab47cfaaSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3375ab47cfaaSmrg lt_cv_file_magic_test_file=/lib/libc.so 3376ab47cfaaSmrg ;; 3377ab47cfaaSmrg siemens) 3378ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3379ab47cfaaSmrg ;; 3380ab47cfaaSmrg pc) 3381ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3382ab47cfaaSmrg ;; 3383ab47cfaaSmrg esac 3384ab47cfaaSmrg ;; 3385ab47cfaaSmrg 33866aec45a7Smrgtpf*) 3387ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3388ab47cfaaSmrg ;; 3389ab47cfaaSmrgesac 3390ab47cfaaSmrg]) 3391aa9e3350Smrg 3392aa9e3350Smrgfile_magic_glob= 3393aa9e3350Smrgwant_nocaseglob=no 3394aa9e3350Smrgif test "$build" = "$host"; then 3395aa9e3350Smrg case $host_os in 3396aa9e3350Smrg mingw* | pw32*) 3397aa9e3350Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3398aa9e3350Smrg want_nocaseglob=yes 3399aa9e3350Smrg else 3400aa9e3350Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3401aa9e3350Smrg fi 3402aa9e3350Smrg ;; 3403aa9e3350Smrg esac 3404aa9e3350Smrgfi 3405aa9e3350Smrg 3406ab47cfaaSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3407ab47cfaaSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3408ab47cfaaSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 34096aec45a7Smrg 34106aec45a7Smrg_LT_DECL([], [deplibs_check_method], [1], 34116aec45a7Smrg [Method to check whether dependent libraries are shared objects]) 34126aec45a7Smrg_LT_DECL([], [file_magic_cmd], [1], 3413aa9e3350Smrg [Command to use when deplibs_check_method = "file_magic"]) 3414aa9e3350Smrg_LT_DECL([], [file_magic_glob], [1], 3415aa9e3350Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3416aa9e3350Smrg_LT_DECL([], [want_nocaseglob], [1], 3417aa9e3350Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34186aec45a7Smrg])# _LT_CHECK_MAGIC_METHOD 3419ab47cfaaSmrg 3420ab47cfaaSmrg 34216aec45a7Smrg# LT_PATH_NM 3422ab47cfaaSmrg# ---------- 34236aec45a7Smrg# find the pathname to a BSD- or MS-compatible name lister 34246aec45a7SmrgAC_DEFUN([LT_PATH_NM], 34256aec45a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 34266aec45a7SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3427ab47cfaaSmrg[if test -n "$NM"; then 3428ab47cfaaSmrg # Let the user override the test. 3429ab47cfaaSmrg lt_cv_path_NM="$NM" 3430ab47cfaaSmrgelse 3431ab47cfaaSmrg lt_nm_to_check="${ac_tool_prefix}nm" 34328697ee19Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3433ab47cfaaSmrg lt_nm_to_check="$lt_nm_to_check nm" 3434ab47cfaaSmrg fi 3435ab47cfaaSmrg for lt_tmp_nm in $lt_nm_to_check; do 3436ab47cfaaSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3437ab47cfaaSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3438ab47cfaaSmrg IFS="$lt_save_ifs" 3439ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 3440ab47cfaaSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3441ab47cfaaSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3442ab47cfaaSmrg # Check to see if the nm accepts a BSD-compat flag. 3443ab47cfaaSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3444ab47cfaaSmrg # nm: unknown option "B" ignored 3445ab47cfaaSmrg # Tru64's nm complains that /dev/null is an invalid object file 3446ab47cfaaSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3447ab47cfaaSmrg */dev/null* | *'Invalid file or object type'*) 3448ab47cfaaSmrg lt_cv_path_NM="$tmp_nm -B" 3449ab47cfaaSmrg break 3450ab47cfaaSmrg ;; 3451ab47cfaaSmrg *) 3452ab47cfaaSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3453ab47cfaaSmrg */dev/null*) 3454ab47cfaaSmrg lt_cv_path_NM="$tmp_nm -p" 3455ab47cfaaSmrg break 3456ab47cfaaSmrg ;; 3457ab47cfaaSmrg *) 3458ab47cfaaSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3459ab47cfaaSmrg continue # so that we can try to find one that supports BSD flags 3460ab47cfaaSmrg ;; 3461ab47cfaaSmrg esac 3462ab47cfaaSmrg ;; 3463ab47cfaaSmrg esac 3464ab47cfaaSmrg fi 3465ab47cfaaSmrg done 3466ab47cfaaSmrg IFS="$lt_save_ifs" 3467ab47cfaaSmrg done 34686aec45a7Smrg : ${lt_cv_path_NM=no} 3469ab47cfaaSmrgfi]) 34706aec45a7Smrgif test "$lt_cv_path_NM" != "no"; then 34716aec45a7Smrg NM="$lt_cv_path_NM" 34726aec45a7Smrgelse 34736aec45a7Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 34746aec45a7Smrg if test -n "$DUMPBIN"; then : 34756aec45a7Smrg # Let the user override the test. 34766aec45a7Smrg else 34776aec45a7Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 34786aec45a7Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 34796aec45a7Smrg *COFF*) 34806aec45a7Smrg DUMPBIN="$DUMPBIN -symbols" 34816aec45a7Smrg ;; 34826aec45a7Smrg *) 34836aec45a7Smrg DUMPBIN=: 34846aec45a7Smrg ;; 34856aec45a7Smrg esac 34866aec45a7Smrg fi 34876aec45a7Smrg AC_SUBST([DUMPBIN]) 34886aec45a7Smrg if test "$DUMPBIN" != ":"; then 34896aec45a7Smrg NM="$DUMPBIN" 34906aec45a7Smrg fi 34916aec45a7Smrgfi 34926aec45a7Smrgtest -z "$NM" && NM=nm 34936aec45a7SmrgAC_SUBST([NM]) 34946aec45a7Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34956aec45a7Smrg 34966aec45a7SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34976aec45a7Smrg [lt_cv_nm_interface="BSD nm" 34986aec45a7Smrg echo "int some_variable = 0;" > conftest.$ac_ext 34996aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 35006aec45a7Smrg (eval "$ac_compile" 2>conftest.err) 35016aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35026aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 35036aec45a7Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 35046aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 35056aec45a7Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 35066aec45a7Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 35076aec45a7Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35086aec45a7Smrg lt_cv_nm_interface="MS dumpbin" 35096aec45a7Smrg fi 35106aec45a7Smrg rm -f conftest*]) 35116aec45a7Smrg])# LT_PATH_NM 3512ab47cfaaSmrg 35136aec45a7Smrg# Old names: 35146aec45a7SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35156aec45a7SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35166aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 35176aec45a7Smrgdnl AC_DEFUN([AM_PROG_NM], []) 35186aec45a7Smrgdnl AC_DEFUN([AC_PROG_NM], []) 35191473d951Smrg 3520aa9e3350Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3521aa9e3350Smrg# -------------------------------- 3522aa9e3350Smrg# how to determine the name of the shared library 3523aa9e3350Smrg# associated with a specific link library. 3524aa9e3350Smrg# -- PORTME fill in with the dynamic library characteristics 3525aa9e3350Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3526aa9e3350Smrg[m4_require([_LT_DECL_EGREP]) 3527aa9e3350Smrgm4_require([_LT_DECL_OBJDUMP]) 3528aa9e3350Smrgm4_require([_LT_DECL_DLLTOOL]) 3529aa9e3350SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3530aa9e3350Smrglt_cv_sharedlib_from_linklib_cmd, 3531aa9e3350Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3532aa9e3350Smrg 3533aa9e3350Smrgcase $host_os in 3534aa9e3350Smrgcygwin* | mingw* | pw32* | cegcc*) 3535aa9e3350Smrg # two different shell functions defined in ltmain.sh 3536aa9e3350Smrg # decide which to use based on capabilities of $DLLTOOL 3537aa9e3350Smrg case `$DLLTOOL --help 2>&1` in 3538aa9e3350Smrg *--identify-strict*) 3539aa9e3350Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3540aa9e3350Smrg ;; 3541aa9e3350Smrg *) 3542aa9e3350Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3543aa9e3350Smrg ;; 3544aa9e3350Smrg esac 3545aa9e3350Smrg ;; 3546aa9e3350Smrg*) 3547aa9e3350Smrg # fallback: assume linklib IS sharedlib 3548aa9e3350Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3549aa9e3350Smrg ;; 3550aa9e3350Smrgesac 3551aa9e3350Smrg]) 3552aa9e3350Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3553aa9e3350Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3554aa9e3350Smrg 3555aa9e3350Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3556aa9e3350Smrg [Command to associate shared and link libraries]) 3557aa9e3350Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3558aa9e3350Smrg 3559aa9e3350Smrg 3560aa9e3350Smrg# _LT_PATH_MANIFEST_TOOL 3561aa9e3350Smrg# ---------------------- 3562aa9e3350Smrg# locate the manifest tool 3563aa9e3350Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3564aa9e3350Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3565aa9e3350Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3566aa9e3350SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3567aa9e3350Smrg [lt_cv_path_mainfest_tool=no 3568aa9e3350Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3569aa9e3350Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3570aa9e3350Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3571aa9e3350Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3572aa9e3350Smrg lt_cv_path_mainfest_tool=yes 3573aa9e3350Smrg fi 3574aa9e3350Smrg rm -f conftest*]) 3575aa9e3350Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3576aa9e3350Smrg MANIFEST_TOOL=: 3577aa9e3350Smrgfi 3578aa9e3350Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3579aa9e3350Smrg])# _LT_PATH_MANIFEST_TOOL 3580aa9e3350Smrg 35816aec45a7Smrg 35826aec45a7Smrg# LT_LIB_M 35836aec45a7Smrg# -------- 3584ab47cfaaSmrg# check for math library 35856aec45a7SmrgAC_DEFUN([LT_LIB_M], 3586ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3587ab47cfaaSmrgLIBM= 3588ab47cfaaSmrgcase $host in 35896aec45a7Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3590ab47cfaaSmrg # These system don't have libm, or don't need it 3591ab47cfaaSmrg ;; 3592ab47cfaaSmrg*-ncr-sysv4.3*) 3593ab47cfaaSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3594ab47cfaaSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3595ab47cfaaSmrg ;; 3596ab47cfaaSmrg*) 3597ab47cfaaSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3598ab47cfaaSmrg ;; 3599ab47cfaaSmrgesac 36006aec45a7SmrgAC_SUBST([LIBM]) 36016aec45a7Smrg])# LT_LIB_M 3602ab47cfaaSmrg 36036aec45a7Smrg# Old name: 36046aec45a7SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 36056aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 36066aec45a7Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3607ab47cfaaSmrg 3608ab47cfaaSmrg 36096aec45a7Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36106aec45a7Smrg# ------------------------------- 36116aec45a7Smrgm4_defun([_LT_COMPILER_NO_RTTI], 36126aec45a7Smrg[m4_require([_LT_TAG_COMPILER])dnl 3613ab47cfaaSmrg 36146aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3615ab47cfaaSmrg 36166aec45a7Smrgif test "$GCC" = yes; then 36176aec45a7Smrg case $cc_basename in 36186aec45a7Smrg nvcc*) 36196aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 36206aec45a7Smrg *) 36216aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 36226aec45a7Smrg esac 3623ab47cfaaSmrg 36246aec45a7Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36256aec45a7Smrg lt_cv_prog_compiler_rtti_exceptions, 36266aec45a7Smrg [-fno-rtti -fno-exceptions], [], 36276aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36285c42550eSmrgfi 36296aec45a7Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36306aec45a7Smrg [Compiler flag to turn off builtin functions]) 36316aec45a7Smrg])# _LT_COMPILER_NO_RTTI 3632ab47cfaaSmrg 3633ab47cfaaSmrg 36346aec45a7Smrg# _LT_CMD_GLOBAL_SYMBOLS 36356aec45a7Smrg# ---------------------- 36366aec45a7Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36376aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36386aec45a7SmrgAC_REQUIRE([AC_PROG_CC])dnl 36396aec45a7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36406aec45a7SmrgAC_REQUIRE([LT_PATH_NM])dnl 36416aec45a7SmrgAC_REQUIRE([LT_PATH_LD])dnl 36426aec45a7Smrgm4_require([_LT_DECL_SED])dnl 36436aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 36446aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 36455c42550eSmrg 36466aec45a7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36476aec45a7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36486aec45a7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36496aec45a7Smrg[ 36506aec45a7Smrg# These are sane defaults that work on at least a few old systems. 36516aec45a7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 36525c42550eSmrg 36536aec45a7Smrg# Character class describing NM global symbol codes. 36546aec45a7Smrgsymcode='[[BCDEGRST]]' 36555c42550eSmrg 36566aec45a7Smrg# Regexp to match symbols that can be accessed directly from C. 36576aec45a7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 36585c42550eSmrg 36596aec45a7Smrg# Define system-specific variables. 36605c42550eSmrgcase $host_os in 36616aec45a7Smrgaix*) 36626aec45a7Smrg symcode='[[BCDT]]' 36635c42550eSmrg ;; 36646aec45a7Smrgcygwin* | mingw* | pw32* | cegcc*) 36656aec45a7Smrg symcode='[[ABCDGISTW]]' 36666aec45a7Smrg ;; 36676aec45a7Smrghpux*) 36686aec45a7Smrg if test "$host_cpu" = ia64; then 36696aec45a7Smrg symcode='[[ABCDEGRST]]' 36705c42550eSmrg fi 36716aec45a7Smrg ;; 36726aec45a7Smrgirix* | nonstopux*) 36736aec45a7Smrg symcode='[[BCDEGRST]]' 36746aec45a7Smrg ;; 36756aec45a7Smrgosf*) 36766aec45a7Smrg symcode='[[BCDEGQRST]]' 36776aec45a7Smrg ;; 36786aec45a7Smrgsolaris*) 36796aec45a7Smrg symcode='[[BDRT]]' 36806aec45a7Smrg ;; 36816aec45a7Smrgsco3.2v5*) 36826aec45a7Smrg symcode='[[DT]]' 36836aec45a7Smrg ;; 36846aec45a7Smrgsysv4.2uw2*) 36856aec45a7Smrg symcode='[[DT]]' 36866aec45a7Smrg ;; 36876aec45a7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36886aec45a7Smrg symcode='[[ABDT]]' 36896aec45a7Smrg ;; 36906aec45a7Smrgsysv4) 36916aec45a7Smrg symcode='[[DFNSTU]]' 36926aec45a7Smrg ;; 36935c42550eSmrgesac 3694ab47cfaaSmrg 36956aec45a7Smrg# If we're using GNU nm, then use its standard symbol codes. 36966aec45a7Smrgcase `$NM -V 2>&1` in 36976aec45a7Smrg*GNU* | *'with BFD'*) 36986aec45a7Smrg symcode='[[ABCDGIRSTW]]' ;; 36996aec45a7Smrgesac 3700ab47cfaaSmrg 37016aec45a7Smrg# Transform an extracted symbol line into a proper C declaration. 37026aec45a7Smrg# Some systems (esp. on ia64) link data and code symbols differently, 37036aec45a7Smrg# so use this general approach. 37046aec45a7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3705ab47cfaaSmrg 37066aec45a7Smrg# Transform an extracted symbol line into symbol name and symbol address 3707aa9e3350Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3708aa9e3350Smrglt_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'" 3709ab47cfaaSmrg 37106aec45a7Smrg# Handle CRLF in mingw tool chain 37116aec45a7Smrgopt_cr= 37126aec45a7Smrgcase $build_os in 37136aec45a7Smrgmingw*) 37146aec45a7Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37156aec45a7Smrg ;; 37166aec45a7Smrgesac 37175c42550eSmrg 37186aec45a7Smrg# Try without a prefix underscore, then with it. 37196aec45a7Smrgfor ac_symprfx in "" "_"; do 37205c42550eSmrg 37216aec45a7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37226aec45a7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37235c42550eSmrg 37246aec45a7Smrg # Write the raw and C identifiers. 37256aec45a7Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37266aec45a7Smrg # Fake it for dumpbin and say T for any non-static function 37276aec45a7Smrg # and D for any global variable. 37286aec45a7Smrg # Also find C++ and __fastcall symbols from MSVC++, 37296aec45a7Smrg # which start with @ or ?. 37306aec45a7Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37316aec45a7Smrg" {last_section=section; section=\$ 3};"\ 3732aa9e3350Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37336aec45a7Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37346aec45a7Smrg" \$ 0!~/External *\|/{next};"\ 37356aec45a7Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37366aec45a7Smrg" {if(hide[section]) next};"\ 37376aec45a7Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37386aec45a7Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37396aec45a7Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37406aec45a7Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37416aec45a7Smrg" ' prfx=^$ac_symprfx]" 37426aec45a7Smrg else 37436aec45a7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37446aec45a7Smrg fi 3745aa9e3350Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 37465c42550eSmrg 37476aec45a7Smrg # Check to see that the pipe works correctly. 37486aec45a7Smrg pipe_works=no 37495c42550eSmrg 37506aec45a7Smrg rm -f conftest* 37516aec45a7Smrg cat > conftest.$ac_ext <<_LT_EOF 37526aec45a7Smrg#ifdef __cplusplus 37536aec45a7Smrgextern "C" { 37546aec45a7Smrg#endif 37556aec45a7Smrgchar nm_test_var; 37566aec45a7Smrgvoid nm_test_func(void); 37576aec45a7Smrgvoid nm_test_func(void){} 37586aec45a7Smrg#ifdef __cplusplus 37596aec45a7Smrg} 37606aec45a7Smrg#endif 37616aec45a7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 37626aec45a7Smrg_LT_EOF 37635c42550eSmrg 37646aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 37656aec45a7Smrg # Now try to grab the symbols. 37666aec45a7Smrg nlist=conftest.nm 37676aec45a7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37686aec45a7Smrg # Try sorting and uniquifying the output. 37696aec45a7Smrg if sort "$nlist" | uniq > "$nlist"T; then 37706aec45a7Smrg mv -f "$nlist"T "$nlist" 37716aec45a7Smrg else 37726aec45a7Smrg rm -f "$nlist"T 37736aec45a7Smrg fi 37745c42550eSmrg 37756aec45a7Smrg # Make sure that we snagged all the symbols we need. 37766aec45a7Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37776aec45a7Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37786aec45a7Smrg cat <<_LT_EOF > conftest.$ac_ext 3779aa9e3350Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3780aa9e3350Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3781aa9e3350Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3782aa9e3350Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3783aa9e3350Smrg# define LT@&t@_DLSYM_CONST 3784aa9e3350Smrg#elif defined(__osf__) 3785aa9e3350Smrg/* This system does not cope well with relocations in const data. */ 3786aa9e3350Smrg# define LT@&t@_DLSYM_CONST 3787aa9e3350Smrg#else 3788aa9e3350Smrg# define LT@&t@_DLSYM_CONST const 3789aa9e3350Smrg#endif 3790aa9e3350Smrg 37916aec45a7Smrg#ifdef __cplusplus 37926aec45a7Smrgextern "C" { 37936aec45a7Smrg#endif 37945c42550eSmrg 37956aec45a7Smrg_LT_EOF 37966aec45a7Smrg # Now generate the symbol file. 37976aec45a7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37985c42550eSmrg 37996aec45a7Smrg cat <<_LT_EOF >> conftest.$ac_ext 38005c42550eSmrg 38016aec45a7Smrg/* The mapping between symbol names and symbols. */ 3802aa9e3350SmrgLT@&t@_DLSYM_CONST struct { 38036aec45a7Smrg const char *name; 38046aec45a7Smrg void *address; 38056aec45a7Smrg} 38066aec45a7Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38076aec45a7Smrg{ 38086aec45a7Smrg { "@PROGRAM@", (void *) 0 }, 38096aec45a7Smrg_LT_EOF 38106aec45a7Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38116aec45a7Smrg cat <<\_LT_EOF >> conftest.$ac_ext 38126aec45a7Smrg {0, (void *) 0} 38136aec45a7Smrg}; 38145c42550eSmrg 38156aec45a7Smrg/* This works around a problem in FreeBSD linker */ 38166aec45a7Smrg#ifdef FREEBSD_WORKAROUND 38176aec45a7Smrgstatic const void *lt_preloaded_setup() { 38186aec45a7Smrg return lt__PROGRAM__LTX_preloaded_symbols; 38196aec45a7Smrg} 38206aec45a7Smrg#endif 38215c42550eSmrg 38226aec45a7Smrg#ifdef __cplusplus 38236aec45a7Smrg} 38246aec45a7Smrg#endif 38256aec45a7Smrg_LT_EOF 38266aec45a7Smrg # Now try linking the two files. 38276aec45a7Smrg mv conftest.$ac_objext conftstm.$ac_objext 3828aa9e3350Smrg lt_globsym_save_LIBS=$LIBS 3829aa9e3350Smrg lt_globsym_save_CFLAGS=$CFLAGS 38306aec45a7Smrg LIBS="conftstm.$ac_objext" 38316aec45a7Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38326aec45a7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38336aec45a7Smrg pipe_works=yes 38346aec45a7Smrg fi 3835aa9e3350Smrg LIBS=$lt_globsym_save_LIBS 3836aa9e3350Smrg CFLAGS=$lt_globsym_save_CFLAGS 38376aec45a7Smrg else 38386aec45a7Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38396aec45a7Smrg fi 38406aec45a7Smrg else 38416aec45a7Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38426aec45a7Smrg fi 3843ab47cfaaSmrg else 38446aec45a7Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3845ab47cfaaSmrg fi 3846ab47cfaaSmrg else 38476aec45a7Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38486aec45a7Smrg cat conftest.$ac_ext >&5 3849ab47cfaaSmrg fi 38506aec45a7Smrg rm -rf conftest* conftst* 3851ab47cfaaSmrg 38526aec45a7Smrg # Do not use the global_symbol_pipe unless it works. 38536aec45a7Smrg if test "$pipe_works" = yes; then 38546aec45a7Smrg break 38556aec45a7Smrg else 38566aec45a7Smrg lt_cv_sys_global_symbol_pipe= 38576aec45a7Smrg fi 38586aec45a7Smrgdone 38596aec45a7Smrg]) 38606aec45a7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38616aec45a7Smrg lt_cv_sys_global_symbol_to_cdecl= 38626aec45a7Smrgfi 38636aec45a7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38646aec45a7Smrg AC_MSG_RESULT(failed) 3865ab47cfaaSmrgelse 38666aec45a7Smrg AC_MSG_RESULT(ok) 3867ab47cfaaSmrgfi 3868ab47cfaaSmrg 3869aa9e3350Smrg# Response file support. 3870aa9e3350Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3871aa9e3350Smrg nm_file_list_spec='@' 3872aa9e3350Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3873aa9e3350Smrg nm_file_list_spec='@' 3874aa9e3350Smrgfi 3875aa9e3350Smrg 38766aec45a7Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38776aec45a7Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 38786aec45a7Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38796aec45a7Smrg [Transform the output of nm in a proper C declaration]) 38806aec45a7Smrg_LT_DECL([global_symbol_to_c_name_address], 38816aec45a7Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38826aec45a7Smrg [Transform the output of nm in a C name address pair]) 38836aec45a7Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38846aec45a7Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38856aec45a7Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3886aa9e3350Smrg_LT_DECL([], [nm_file_list_spec], [1], 3887aa9e3350Smrg [Specify filename containing input files for $NM]) 38886aec45a7Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3889ab47cfaaSmrg 3890ab47cfaaSmrg 38916aec45a7Smrg# _LT_COMPILER_PIC([TAGNAME]) 38926aec45a7Smrg# --------------------------- 38936aec45a7Smrgm4_defun([_LT_COMPILER_PIC], 38946aec45a7Smrg[m4_require([_LT_TAG_COMPILER])dnl 38956aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38966aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38976aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3898ab47cfaaSmrg 38996aec45a7Smrgm4_if([$1], [CXX], [ 39006aec45a7Smrg # C++ specific cases for pic, static, wl, etc. 39016aec45a7Smrg if test "$GXX" = yes; then 39026aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39036aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 39045c42550eSmrg 39056aec45a7Smrg case $host_os in 39066aec45a7Smrg aix*) 39076aec45a7Smrg # All AIX code is PIC. 39085c42550eSmrg if test "$host_cpu" = ia64; then 39096aec45a7Smrg # AIX 5 now supports IA64 processor 39106aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39115c42550eSmrg fi 39126aec45a7Smrg ;; 39135c42550eSmrg 39146aec45a7Smrg amigaos*) 39156aec45a7Smrg case $host_cpu in 39166aec45a7Smrg powerpc) 39176aec45a7Smrg # see comment about AmigaOS4 .so support 39186aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39195c42550eSmrg ;; 39206aec45a7Smrg m68k) 39216aec45a7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 39226aec45a7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 39236aec45a7Smrg # like `-m68040'. 39246aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39256aec45a7Smrg ;; 39266aec45a7Smrg esac 39276aec45a7Smrg ;; 39285c42550eSmrg 39296aec45a7Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39306aec45a7Smrg # PIC is the default for these OSes. 39315c42550eSmrg ;; 39326aec45a7Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39336aec45a7Smrg # This hack is so that the source file can tell whether it is being 39346aec45a7Smrg # built for inclusion in a dll (and should export symbols for example). 39356aec45a7Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39366aec45a7Smrg # (--disable-auto-import) libraries 39376aec45a7Smrg m4_if([$1], [GCJ], [], 39386aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39395c42550eSmrg ;; 39406aec45a7Smrg darwin* | rhapsody*) 39416aec45a7Smrg # PIC is the default on this platform 39426aec45a7Smrg # Common symbols not allowed in MH_DYLIB files 39436aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39446aec45a7Smrg ;; 39456aec45a7Smrg *djgpp*) 39466aec45a7Smrg # DJGPP does not support shared libraries at all 39476aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39486aec45a7Smrg ;; 39496aec45a7Smrg haiku*) 39506aec45a7Smrg # PIC is the default for Haiku. 39516aec45a7Smrg # The "-static" flag exists, but is broken. 39526aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 39536aec45a7Smrg ;; 39546aec45a7Smrg interix[[3-9]]*) 39556aec45a7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39566aec45a7Smrg # Instead, we relocate shared libraries at runtime. 39576aec45a7Smrg ;; 39586aec45a7Smrg sysv4*MP*) 39596aec45a7Smrg if test -d /usr/nec; then 39606aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3961ab47cfaaSmrg fi 3962ab47cfaaSmrg ;; 39636aec45a7Smrg hpux*) 39646aec45a7Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39656aec45a7Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39666aec45a7Smrg # sets the default TLS model and affects inlining. 3967ab47cfaaSmrg case $host_cpu in 39686aec45a7Smrg hppa*64*) 39696aec45a7Smrg ;; 39705c42550eSmrg *) 39716aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39726aec45a7Smrg ;; 3973ab47cfaaSmrg esac 39746aec45a7Smrg ;; 39756aec45a7Smrg *qnx* | *nto*) 39766aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39776aec45a7Smrg # it will coredump. 39786aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39795c42550eSmrg ;; 39805c42550eSmrg *) 39816aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3982ab47cfaaSmrg ;; 39835c42550eSmrg esac 39846aec45a7Smrg else 39856aec45a7Smrg case $host_os in 39866aec45a7Smrg aix[[4-9]]*) 39876aec45a7Smrg # All AIX code is PIC. 39886aec45a7Smrg if test "$host_cpu" = ia64; then 39896aec45a7Smrg # AIX 5 now supports IA64 processor 39906aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39916aec45a7Smrg else 39926aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39936aec45a7Smrg fi 3994ab47cfaaSmrg ;; 39956aec45a7Smrg chorus*) 39966aec45a7Smrg case $cc_basename in 39976aec45a7Smrg cxch68*) 39986aec45a7Smrg # Green Hills C++ Compiler 39996aec45a7Smrg # _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" 4000ab47cfaaSmrg ;; 4001ab47cfaaSmrg esac 4002ab47cfaaSmrg ;; 4003aa9e3350Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4004aa9e3350Smrg # This hack is so that the source file can tell whether it is being 4005aa9e3350Smrg # built for inclusion in a dll (and should export symbols for example). 4006aa9e3350Smrg m4_if([$1], [GCJ], [], 4007aa9e3350Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4008aa9e3350Smrg ;; 40096aec45a7Smrg dgux*) 40106aec45a7Smrg case $cc_basename in 40116aec45a7Smrg ec++*) 40126aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40136aec45a7Smrg ;; 40146aec45a7Smrg ghcx*) 40156aec45a7Smrg # Green Hills C++ Compiler 40166aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40176aec45a7Smrg ;; 40186aec45a7Smrg *) 40196aec45a7Smrg ;; 40206aec45a7Smrg esac 40216aec45a7Smrg ;; 40226aec45a7Smrg freebsd* | dragonfly*) 40236aec45a7Smrg # FreeBSD uses GNU C++ 40246aec45a7Smrg ;; 40256aec45a7Smrg hpux9* | hpux10* | hpux11*) 40266aec45a7Smrg case $cc_basename in 40276aec45a7Smrg CC*) 40286aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40296aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40306aec45a7Smrg if test "$host_cpu" != ia64; then 40316aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40326aec45a7Smrg fi 40336aec45a7Smrg ;; 40346aec45a7Smrg aCC*) 40356aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40366aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4037ab47cfaaSmrg case $host_cpu in 40386aec45a7Smrg hppa*64*|ia64*) 40396aec45a7Smrg # +Z the default 4040ab47cfaaSmrg ;; 4041ab47cfaaSmrg *) 40426aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4043ab47cfaaSmrg ;; 4044ab47cfaaSmrg esac 40456aec45a7Smrg ;; 40466aec45a7Smrg *) 40476aec45a7Smrg ;; 40486aec45a7Smrg esac 4049ab47cfaaSmrg ;; 40506aec45a7Smrg interix*) 40516aec45a7Smrg # This is c89, which is MS Visual C++ (no shared libs) 40526aec45a7Smrg # Anyone wants to do a port? 40535c42550eSmrg ;; 40546aec45a7Smrg irix5* | irix6* | nonstopux*) 40556aec45a7Smrg case $cc_basename in 40566aec45a7Smrg CC*) 40576aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40586aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40596aec45a7Smrg # CC pic flag -KPIC is the default. 40606aec45a7Smrg ;; 40616aec45a7Smrg *) 40626aec45a7Smrg ;; 40636aec45a7Smrg esac 40645c42550eSmrg ;; 406538770048Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 40666aec45a7Smrg case $cc_basename in 40676aec45a7Smrg KCC*) 40686aec45a7Smrg # KAI C++ Compiler 40696aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40706aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40716aec45a7Smrg ;; 40726aec45a7Smrg ecpc* ) 40736aec45a7Smrg # old Intel C++ for x86_64 which still supported -KPIC. 40746aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40756aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40766aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40776aec45a7Smrg ;; 40786aec45a7Smrg icpc* ) 40796aec45a7Smrg # Intel C++, used to be incompatible with GCC. 40806aec45a7Smrg # ICC 10 doesn't accept -KPIC any more. 40816aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40826aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40836aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40846aec45a7Smrg ;; 40856aec45a7Smrg pgCC* | pgcpp*) 40866aec45a7Smrg # Portland Group C++ compiler 40876aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40886aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40896aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40906aec45a7Smrg ;; 40916aec45a7Smrg cxx*) 40926aec45a7Smrg # Compaq C++ 40936aec45a7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 40946aec45a7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 40956aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40966aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40976aec45a7Smrg ;; 40986aec45a7Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 40996aec45a7Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 41006aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 41026aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 41036aec45a7Smrg ;; 41046aec45a7Smrg *) 41056aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 41066aec45a7Smrg *Sun\ C*) 41076aec45a7Smrg # Sun C++ 5.9 41086aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41096aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41106aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41116aec45a7Smrg ;; 41126aec45a7Smrg esac 41136aec45a7Smrg ;; 41148697ee19Smrg esac 41158697ee19Smrg ;; 41166aec45a7Smrg lynxos*) 41175c42550eSmrg ;; 41186aec45a7Smrg m88k*) 41196aec45a7Smrg ;; 41206aec45a7Smrg mvs*) 41216aec45a7Smrg case $cc_basename in 41226aec45a7Smrg cxx*) 41236aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41246aec45a7Smrg ;; 41256aec45a7Smrg *) 41266aec45a7Smrg ;; 41271473d951Smrg esac 4128ab47cfaaSmrg ;; 412938770048Smrg netbsd* | netbsdelf*-gnu) 4130ab47cfaaSmrg ;; 41316aec45a7Smrg *qnx* | *nto*) 41326aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41336aec45a7Smrg # it will coredump. 41346aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41356aec45a7Smrg ;; 41366aec45a7Smrg osf3* | osf4* | osf5*) 41376aec45a7Smrg case $cc_basename in 41386aec45a7Smrg KCC*) 41396aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41406aec45a7Smrg ;; 41416aec45a7Smrg RCC*) 41426aec45a7Smrg # Rational C++ 2.4.1 41436aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41446aec45a7Smrg ;; 41456aec45a7Smrg cxx*) 41466aec45a7Smrg # Digital/Compaq C++ 41476aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41486aec45a7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 41496aec45a7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 41506aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41516aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41526aec45a7Smrg ;; 41536aec45a7Smrg *) 41546aec45a7Smrg ;; 41556aec45a7Smrg esac 4156ab47cfaaSmrg ;; 41576aec45a7Smrg psos*) 41586aec45a7Smrg ;; 41596aec45a7Smrg solaris*) 41606aec45a7Smrg case $cc_basename in 41616aec45a7Smrg CC* | sunCC*) 41626aec45a7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 41636aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41646aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41656aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41666aec45a7Smrg ;; 41676aec45a7Smrg gcx*) 41686aec45a7Smrg # Green Hills C++ Compiler 41696aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41706aec45a7Smrg ;; 41716aec45a7Smrg *) 41726aec45a7Smrg ;; 41736aec45a7Smrg esac 41746aec45a7Smrg ;; 41756aec45a7Smrg sunos4*) 41766aec45a7Smrg case $cc_basename in 41776aec45a7Smrg CC*) 41786aec45a7Smrg # Sun C++ 4.x 41796aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41806aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41816aec45a7Smrg ;; 41826aec45a7Smrg lcc*) 41836aec45a7Smrg # Lucid 41846aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41856aec45a7Smrg ;; 41866aec45a7Smrg *) 41876aec45a7Smrg ;; 41886aec45a7Smrg esac 4189ab47cfaaSmrg ;; 41906aec45a7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41916aec45a7Smrg case $cc_basename in 41926aec45a7Smrg CC*) 41936aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41946aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41956aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41966aec45a7Smrg ;; 41976aec45a7Smrg esac 41986aec45a7Smrg ;; 41996aec45a7Smrg tandem*) 42006aec45a7Smrg case $cc_basename in 42016aec45a7Smrg NCC*) 42026aec45a7Smrg # NonStop-UX NCC 3.20 42036aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 42046aec45a7Smrg ;; 42056aec45a7Smrg *) 42066aec45a7Smrg ;; 42076aec45a7Smrg esac 4208ab47cfaaSmrg ;; 42096aec45a7Smrg vxworks*) 4210ab47cfaaSmrg ;; 42115c42550eSmrg *) 42126aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4213ab47cfaaSmrg ;; 42145c42550eSmrg esac 42156aec45a7Smrg fi 42166aec45a7Smrg], 42176aec45a7Smrg[ 42186aec45a7Smrg if test "$GCC" = yes; then 42196aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42206aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42216aec45a7Smrg 42226aec45a7Smrg case $host_os in 42236aec45a7Smrg aix*) 42246aec45a7Smrg # All AIX code is PIC. 42256aec45a7Smrg if test "$host_cpu" = ia64; then 42266aec45a7Smrg # AIX 5 now supports IA64 processor 42276aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42286aec45a7Smrg fi 42296aec45a7Smrg ;; 42305c42550eSmrg 42316aec45a7Smrg amigaos*) 42326aec45a7Smrg case $host_cpu in 42336aec45a7Smrg powerpc) 42346aec45a7Smrg # see comment about AmigaOS4 .so support 42356aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42366aec45a7Smrg ;; 42376aec45a7Smrg m68k) 42386aec45a7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42396aec45a7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 42406aec45a7Smrg # like `-m68040'. 42416aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42426aec45a7Smrg ;; 42436aec45a7Smrg esac 42446aec45a7Smrg ;; 42455c42550eSmrg 42466aec45a7Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42476aec45a7Smrg # PIC is the default for these OSes. 42486aec45a7Smrg ;; 42495c42550eSmrg 42506aec45a7Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42516aec45a7Smrg # This hack is so that the source file can tell whether it is being 42526aec45a7Smrg # built for inclusion in a dll (and should export symbols for example). 42536aec45a7Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42546aec45a7Smrg # (--disable-auto-import) libraries 42556aec45a7Smrg m4_if([$1], [GCJ], [], 42566aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42576aec45a7Smrg ;; 42585c42550eSmrg 42596aec45a7Smrg darwin* | rhapsody*) 42606aec45a7Smrg # PIC is the default on this platform 42616aec45a7Smrg # Common symbols not allowed in MH_DYLIB files 42626aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42636aec45a7Smrg ;; 42645c42550eSmrg 42656aec45a7Smrg haiku*) 42666aec45a7Smrg # PIC is the default for Haiku. 42676aec45a7Smrg # The "-static" flag exists, but is broken. 42686aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42696aec45a7Smrg ;; 42705c42550eSmrg 42716aec45a7Smrg hpux*) 42726aec45a7Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42736aec45a7Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42746aec45a7Smrg # sets the default TLS model and affects inlining. 42756aec45a7Smrg case $host_cpu in 42766aec45a7Smrg hppa*64*) 42776aec45a7Smrg # +Z the default 42785c42550eSmrg ;; 42795c42550eSmrg *) 42806aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42815c42550eSmrg ;; 42826aec45a7Smrg esac 42836aec45a7Smrg ;; 42845c42550eSmrg 42856aec45a7Smrg interix[[3-9]]*) 42866aec45a7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42876aec45a7Smrg # Instead, we relocate shared libraries at runtime. 42886aec45a7Smrg ;; 42895c42550eSmrg 42906aec45a7Smrg msdosdjgpp*) 42916aec45a7Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42926aec45a7Smrg # on systems that don't support them. 42936aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42946aec45a7Smrg enable_shared=no 42956aec45a7Smrg ;; 4296ab47cfaaSmrg 42976aec45a7Smrg *nto* | *qnx*) 42986aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42996aec45a7Smrg # it will coredump. 43006aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43016aec45a7Smrg ;; 43021473d951Smrg 43036aec45a7Smrg sysv4*MP*) 43046aec45a7Smrg if test -d /usr/nec; then 43056aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43066aec45a7Smrg fi 43076aec45a7Smrg ;; 43081473d951Smrg 43096aec45a7Smrg *) 43106aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43116aec45a7Smrg ;; 43125c42550eSmrg esac 43135c42550eSmrg 43145c42550eSmrg case $cc_basename in 43156aec45a7Smrg nvcc*) # Cuda Compiler Driver 2.2 43166aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4317aa9e3350Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4318aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4319aa9e3350Smrg fi 43206aec45a7Smrg ;; 4321ab47cfaaSmrg esac 43226aec45a7Smrg else 43236aec45a7Smrg # PORTME Check for flag to pass linker flags through the system compiler. 43246aec45a7Smrg case $host_os in 43256aec45a7Smrg aix*) 43266aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43276aec45a7Smrg if test "$host_cpu" = ia64; then 43286aec45a7Smrg # AIX 5 now supports IA64 processor 43296aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43306aec45a7Smrg else 43316aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43326aec45a7Smrg fi 43336aec45a7Smrg ;; 43345c42550eSmrg 43356aec45a7Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43366aec45a7Smrg # This hack is so that the source file can tell whether it is being 43376aec45a7Smrg # built for inclusion in a dll (and should export symbols for example). 43386aec45a7Smrg m4_if([$1], [GCJ], [], 43396aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43406aec45a7Smrg ;; 43416aec45a7Smrg 43426aec45a7Smrg hpux9* | hpux10* | hpux11*) 43436aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43446aec45a7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43456aec45a7Smrg # not for PA HP-UX. 43466aec45a7Smrg case $host_cpu in 43476aec45a7Smrg hppa*64*|ia64*) 43486aec45a7Smrg # +Z the default 4349ab47cfaaSmrg ;; 4350ab47cfaaSmrg *) 43516aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43521473d951Smrg ;; 43536aec45a7Smrg esac 43546aec45a7Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43556aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43566aec45a7Smrg ;; 43576aec45a7Smrg 43586aec45a7Smrg irix5* | irix6* | nonstopux*) 43596aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43606aec45a7Smrg # PIC (with -KPIC) is the default. 43616aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43626aec45a7Smrg ;; 43636aec45a7Smrg 436438770048Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43656aec45a7Smrg case $cc_basename in 43666aec45a7Smrg # old Intel for x86_64 which still supported -KPIC. 43676aec45a7Smrg ecc*) 43686aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43696aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43706aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43716aec45a7Smrg ;; 43726aec45a7Smrg # icc used to be incompatible with GCC. 43736aec45a7Smrg # ICC 10 doesn't accept -KPIC any more. 43746aec45a7Smrg icc* | ifort*) 43756aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43766aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43776aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43786aec45a7Smrg ;; 43796aec45a7Smrg # Lahey Fortran 8.1. 43806aec45a7Smrg lf95*) 43816aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43826aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43836aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43846aec45a7Smrg ;; 4385aa9e3350Smrg nagfor*) 4386aa9e3350Smrg # NAG Fortran compiler 4387aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4388aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4389aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390aa9e3350Smrg ;; 43916aec45a7Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43926aec45a7Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 43936aec45a7Smrg # which looks to be a dead project) 43946aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43956aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43966aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43976aec45a7Smrg ;; 43986aec45a7Smrg ccc*) 43996aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44006aec45a7Smrg # All Alpha code is PIC. 44016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44026aec45a7Smrg ;; 44036aec45a7Smrg xl* | bgxl* | bgf* | mpixl*) 44046aec45a7Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 44056aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44066aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44076aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4408ab47cfaaSmrg ;; 4409ab47cfaaSmrg *) 44106aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 4411aa9e3350Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 44126aec45a7Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 44136aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44146aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44156aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 44166aec45a7Smrg ;; 4417aa9e3350Smrg *Sun\ F* | *Sun*Fortran*) 4418aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4419aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4420aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4421aa9e3350Smrg ;; 44226aec45a7Smrg *Sun\ C*) 44236aec45a7Smrg # Sun C 5.9 44246aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44256aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44266aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44276aec45a7Smrg ;; 4428aa9e3350Smrg *Intel*\ [[CF]]*Compiler*) 4429aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4430aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4431aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4432aa9e3350Smrg ;; 4433aa9e3350Smrg *Portland\ Group*) 4434aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4435aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4436aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4437aa9e3350Smrg ;; 44386aec45a7Smrg esac 4439ab47cfaaSmrg ;; 44406aec45a7Smrg esac 44416aec45a7Smrg ;; 4442ab47cfaaSmrg 44436aec45a7Smrg newsos6) 44446aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44456aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44466aec45a7Smrg ;; 4447ab47cfaaSmrg 44486aec45a7Smrg *nto* | *qnx*) 44496aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44506aec45a7Smrg # it will coredump. 44516aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44526aec45a7Smrg ;; 4453ab47cfaaSmrg 44546aec45a7Smrg osf3* | osf4* | osf5*) 44556aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44566aec45a7Smrg # All OSF/1 code is PIC. 44576aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44586aec45a7Smrg ;; 4459ab47cfaaSmrg 44606aec45a7Smrg rdos*) 44616aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44626aec45a7Smrg ;; 4463ab47cfaaSmrg 44646aec45a7Smrg solaris*) 44656aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44666aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44676aec45a7Smrg case $cc_basename in 44686aec45a7Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44696aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44706aec45a7Smrg *) 44716aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44726aec45a7Smrg esac 44736aec45a7Smrg ;; 4474ab47cfaaSmrg 44756aec45a7Smrg sunos4*) 44766aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44776aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44786aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44796aec45a7Smrg ;; 4480ab47cfaaSmrg 44816aec45a7Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 44826aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44836aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44846aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44856aec45a7Smrg ;; 4486ab47cfaaSmrg 44876aec45a7Smrg sysv4*MP*) 44886aec45a7Smrg if test -d /usr/nec ;then 44896aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44906aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44916aec45a7Smrg fi 44926aec45a7Smrg ;; 4493ab47cfaaSmrg 44946aec45a7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44956aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44966aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44976aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44986aec45a7Smrg ;; 4499ab47cfaaSmrg 45006aec45a7Smrg unicos*) 45016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45026aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45036aec45a7Smrg ;; 45045c42550eSmrg 45056aec45a7Smrg uts4*) 45066aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45076aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45086aec45a7Smrg ;; 4509ab47cfaaSmrg 45106aec45a7Smrg *) 45116aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45126aec45a7Smrg ;; 4513ab47cfaaSmrg esac 45146aec45a7Smrg fi 45156aec45a7Smrg]) 45166aec45a7Smrgcase $host_os in 45176aec45a7Smrg # For platforms which do not support PIC, -DPIC is meaningless: 45186aec45a7Smrg *djgpp*) 45196aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45206aec45a7Smrg ;; 45216aec45a7Smrg *) 45226aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45236aec45a7Smrg ;; 45246aec45a7Smrgesac 4525aa9e3350Smrg 4526aa9e3350SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4527aa9e3350Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4528aa9e3350Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4529aa9e3350Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4530ab47cfaaSmrg 45316aec45a7Smrg# 45326aec45a7Smrg# Check to make sure the PIC flag actually works. 45336aec45a7Smrg# 45346aec45a7Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45356aec45a7Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45366aec45a7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45376aec45a7Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45386aec45a7Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45396aec45a7Smrg "" | " "*) ;; 45406aec45a7Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45416aec45a7Smrg esac], 45426aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45436aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45441473d951Smrgfi 45456aec45a7Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45466aec45a7Smrg [Additional compiler flags for building library objects]) 4547ab47cfaaSmrg 4548aa9e3350Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4549aa9e3350Smrg [How to pass a linker flag through the compiler]) 45506aec45a7Smrg# 45516aec45a7Smrg# Check to make sure the static flag actually works. 45526aec45a7Smrg# 45536aec45a7Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45546aec45a7Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45556aec45a7Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45566aec45a7Smrg $lt_tmp_static_flag, 45576aec45a7Smrg [], 45586aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45596aec45a7Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45606aec45a7Smrg [Compiler flag to prevent dynamic linking]) 45616aec45a7Smrg])# _LT_COMPILER_PIC 4562ab47cfaaSmrg 45635c42550eSmrg 45646aec45a7Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 45656aec45a7Smrg# ---------------------------- 45666aec45a7Smrg# See if the linker supports building shared libraries. 45676aec45a7Smrgm4_defun([_LT_LINKER_SHLIBS], 45686aec45a7Smrg[AC_REQUIRE([LT_PATH_LD])dnl 45696aec45a7SmrgAC_REQUIRE([LT_PATH_NM])dnl 4570aa9e3350Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45716aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45726aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 45736aec45a7Smrgm4_require([_LT_DECL_SED])dnl 45746aec45a7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45756aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 45766aec45a7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45776aec45a7Smrgm4_if([$1], [CXX], [ 45786aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4579aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45806aec45a7Smrg case $host_os in 45816aec45a7Smrg aix[[4-9]]*) 45826aec45a7Smrg # If we're using GNU nm, then we don't want the "-C" option. 45836aec45a7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45846aec45a7Smrg # Also, AIX nm treats weak defined symbols like other global defined 45856aec45a7Smrg # symbols, whereas GNU nm marks them as "W". 45866aec45a7Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45876aec45a7Smrg _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' 45886aec45a7Smrg else 45896aec45a7Smrg _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' 45908697ee19Smrg fi 45918697ee19Smrg ;; 45926aec45a7Smrg pw32*) 45936aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4594aa9e3350Smrg ;; 45956aec45a7Smrg cygwin* | mingw* | cegcc*) 4596aa9e3350Smrg case $cc_basename in 4597aa9e3350Smrg cl*) 4598aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4599aa9e3350Smrg ;; 4600aa9e3350Smrg *) 4601aa9e3350Smrg _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' 4602aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4603aa9e3350Smrg ;; 4604aa9e3350Smrg esac 4605aa9e3350Smrg ;; 460638770048Smrg linux* | k*bsd*-gnu | gnu*) 460738770048Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 460838770048Smrg ;; 46096aec45a7Smrg *) 46106aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4611aa9e3350Smrg ;; 46126aec45a7Smrg esac 46136aec45a7Smrg], [ 46146aec45a7Smrg runpath_var= 46156aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 46166aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 46176aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)= 46186aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46196aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 46206aec45a7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46216aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46226aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46236aec45a7Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 46246aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 46256aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46266aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46276aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46286aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46296aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46306aec45a7Smrg _LT_TAGVAR(inherit_rpath, $1)=no 46316aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46326aec45a7Smrg _LT_TAGVAR(module_cmds, $1)= 46336aec45a7Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 46346aec45a7Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46356aec45a7Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46366aec45a7Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46376aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46386aec45a7Smrg # include_expsyms should be a list of space-separated symbols to be *always* 46396aec45a7Smrg # included in the symbol list 46406aec45a7Smrg _LT_TAGVAR(include_expsyms, $1)= 46416aec45a7Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 46426aec45a7Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46436aec45a7Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46446aec45a7Smrg # as well as any symbol that contains `d'. 46456aec45a7Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46466aec45a7Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46476aec45a7Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 46486aec45a7Smrg # the symbol is explicitly referenced. Since portable code cannot 46496aec45a7Smrg # rely on this symbol name, it's probably fine to never include it in 46506aec45a7Smrg # preloaded symbol tables. 46516aec45a7Smrg # Exclude shared library initialization/finalization symbols. 46526aec45a7Smrgdnl Note also adjust exclude_expsyms for C++ above. 46536aec45a7Smrg extract_expsyms_cmds= 46548697ee19Smrg 46556aec45a7Smrg case $host_os in 46566aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 46576aec45a7Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46586aec45a7Smrg # When not using gcc, we currently assume that we are using 46596aec45a7Smrg # Microsoft Visual C++. 46606aec45a7Smrg if test "$GCC" != yes; then 46616aec45a7Smrg with_gnu_ld=no 46628697ee19Smrg fi 4663ab47cfaaSmrg ;; 46646aec45a7Smrg interix*) 46656aec45a7Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46666aec45a7Smrg with_gnu_ld=yes 46676aec45a7Smrg ;; 46686aec45a7Smrg openbsd*) 46696aec45a7Smrg with_gnu_ld=no 46706aec45a7Smrg ;; 467138770048Smrg linux* | k*bsd*-gnu | gnu*) 467238770048Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 467338770048Smrg ;; 4674ab47cfaaSmrg esac 4675ab47cfaaSmrg 46766aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4677ab47cfaaSmrg 46786aec45a7Smrg # On some targets, GNU ld is compatible enough with the native linker 46796aec45a7Smrg # that we're better off using the native interface for both. 46806aec45a7Smrg lt_use_gnu_ld_interface=no 46816aec45a7Smrg if test "$with_gnu_ld" = yes; then 46826aec45a7Smrg case $host_os in 46836aec45a7Smrg aix*) 46846aec45a7Smrg # The AIX port of GNU ld has always aspired to compatibility 46856aec45a7Smrg # with the native linker. However, as the warning in the GNU ld 46866aec45a7Smrg # block says, versions before 2.19.5* couldn't really create working 46876aec45a7Smrg # shared libraries, regardless of the interface used. 46886aec45a7Smrg case `$LD -v 2>&1` in 46896aec45a7Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 46906aec45a7Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 46916aec45a7Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 46926aec45a7Smrg *) 46936aec45a7Smrg lt_use_gnu_ld_interface=yes 46946aec45a7Smrg ;; 46956aec45a7Smrg esac 46966aec45a7Smrg ;; 46976aec45a7Smrg *) 46986aec45a7Smrg lt_use_gnu_ld_interface=yes 46996aec45a7Smrg ;; 47006aec45a7Smrg esac 47016aec45a7Smrg fi 4702ab47cfaaSmrg 47036aec45a7Smrg if test "$lt_use_gnu_ld_interface" = yes; then 47046aec45a7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 47056aec45a7Smrg wlarc='${wl}' 4706ab47cfaaSmrg 47076aec45a7Smrg # Set some defaults for GNU ld with shared library support. These 47086aec45a7Smrg # are reset later if shared libraries are not supported. Putting them 47096aec45a7Smrg # here allows them to be overridden if necessary. 47106aec45a7Smrg runpath_var=LD_RUN_PATH 47116aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47126aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47136aec45a7Smrg # ancient GNU ld didn't support --whole-archive et. al. 47146aec45a7Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47156aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47166aec45a7Smrg else 47176aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47186aec45a7Smrg fi 47196aec45a7Smrg supports_anon_versioning=no 47206aec45a7Smrg case `$LD -v 2>&1` in 47216aec45a7Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47226aec45a7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47236aec45a7Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47246aec45a7Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47256aec45a7Smrg *\ 2.11.*) ;; # other 2.11 versions 47266aec45a7Smrg *) supports_anon_versioning=yes ;; 47276aec45a7Smrg esac 4728ab47cfaaSmrg 47296aec45a7Smrg # See if GNU ld supports shared libraries. 47306aec45a7Smrg case $host_os in 47316aec45a7Smrg aix[[3-9]]*) 47326aec45a7Smrg # On AIX/PPC, the GNU linker is very broken 47336aec45a7Smrg if test "$host_cpu" != ia64; then 47346aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47356aec45a7Smrg cat <<_LT_EOF 1>&2 4736ab47cfaaSmrg 47376aec45a7Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47386aec45a7Smrg*** to be unable to reliably create shared libraries on AIX. 47396aec45a7Smrg*** Therefore, libtool is disabling shared libraries support. If you 47406aec45a7Smrg*** really care for shared libraries, you may want to install binutils 47416aec45a7Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 47426aec45a7Smrg*** You will then need to restart the configuration process. 4743ab47cfaaSmrg 47446aec45a7Smrg_LT_EOF 47456aec45a7Smrg fi 47466aec45a7Smrg ;; 4747ab47cfaaSmrg 47486aec45a7Smrg amigaos*) 47496aec45a7Smrg case $host_cpu in 47506aec45a7Smrg powerpc) 47516aec45a7Smrg # see comment about AmigaOS4 .so support 47526aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47536aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47546aec45a7Smrg ;; 47556aec45a7Smrg m68k) 47566aec45a7Smrg _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)' 47576aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47586aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47596aec45a7Smrg ;; 47606aec45a7Smrg esac 47616aec45a7Smrg ;; 4762ab47cfaaSmrg 47636aec45a7Smrg beos*) 47646aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47656aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47666aec45a7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47676aec45a7Smrg # support --undefined. This deserves some investigation. FIXME 47686aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47696aec45a7Smrg else 47706aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47716aec45a7Smrg fi 47726aec45a7Smrg ;; 4773ab47cfaaSmrg 47746aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 47756aec45a7Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47766aec45a7Smrg # as there is no search path for DLLs. 47776aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47786aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47796aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47806aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 47816aec45a7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4782aa9e3350Smrg _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' 4783aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47846aec45a7Smrg 47856aec45a7Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47866aec45a7Smrg _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' 47876aec45a7Smrg # If the export-symbols file already is a .def file (1st line 47886aec45a7Smrg # is EXPORTS), use it as is; otherwise, prepend... 47896aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47906aec45a7Smrg cp $export_symbols $output_objdir/$soname.def; 47916aec45a7Smrg else 47926aec45a7Smrg echo EXPORTS > $output_objdir/$soname.def; 47936aec45a7Smrg cat $export_symbols >> $output_objdir/$soname.def; 47946aec45a7Smrg fi~ 47956aec45a7Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47966aec45a7Smrg else 47976aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47986aec45a7Smrg fi 47996aec45a7Smrg ;; 4800ab47cfaaSmrg 48016aec45a7Smrg haiku*) 48026aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48036aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 48046aec45a7Smrg ;; 4805ab47cfaaSmrg 48066aec45a7Smrg interix[[3-9]]*) 48076aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 48086aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48096aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48106aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48116aec45a7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 48126aec45a7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48136aec45a7Smrg # default) and relocated if they conflict, which is a slow very memory 48146aec45a7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 48156aec45a7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48166aec45a7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48176aec45a7Smrg _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' 48186aec45a7Smrg _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' 48196aec45a7Smrg ;; 4820ab47cfaaSmrg 48216aec45a7Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48226aec45a7Smrg tmp_diet=no 48236aec45a7Smrg if test "$host_os" = linux-dietlibc; then 48246aec45a7Smrg case $cc_basename in 48256aec45a7Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48266aec45a7Smrg esac 48276aec45a7Smrg fi 48286aec45a7Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48296aec45a7Smrg && test "$tmp_diet" = no 48306aec45a7Smrg then 4831aa9e3350Smrg tmp_addflag=' $pic_flag' 48326aec45a7Smrg tmp_sharedflag='-shared' 48336aec45a7Smrg case $cc_basename,$host_cpu in 48346aec45a7Smrg pgcc*) # Portland Group C compiler 48356aec45a7Smrg _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' 48366aec45a7Smrg tmp_addflag=' $pic_flag' 48376aec45a7Smrg ;; 48386aec45a7Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 48396aec45a7Smrg # Portland Group f77 and f90 compilers 48406aec45a7Smrg _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' 48416aec45a7Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 48426aec45a7Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48436aec45a7Smrg tmp_addflag=' -i_dynamic' ;; 48446aec45a7Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48456aec45a7Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48466aec45a7Smrg ifc* | ifort*) # Intel Fortran compiler 48476aec45a7Smrg tmp_addflag=' -nofor_main' ;; 48486aec45a7Smrg lf95*) # Lahey Fortran 8.1 48496aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48506aec45a7Smrg tmp_sharedflag='--shared' ;; 48516aec45a7Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48526aec45a7Smrg tmp_sharedflag='-qmkshrobj' 48536aec45a7Smrg tmp_addflag= ;; 48546aec45a7Smrg nvcc*) # Cuda Compiler Driver 2.2 48556aec45a7Smrg _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' 48566aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48576aec45a7Smrg ;; 48586aec45a7Smrg esac 48596aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 48606aec45a7Smrg *Sun\ C*) # Sun C 5.9 48616aec45a7Smrg _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' 48626aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48636aec45a7Smrg tmp_sharedflag='-G' ;; 48646aec45a7Smrg *Sun\ F*) # Sun Fortran 8.3 48656aec45a7Smrg tmp_sharedflag='-G' ;; 48666aec45a7Smrg esac 48676aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4868ab47cfaaSmrg 48696aec45a7Smrg if test "x$supports_anon_versioning" = xyes; then 48706aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48716aec45a7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48726aec45a7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48736aec45a7Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48746aec45a7Smrg fi 4875ab47cfaaSmrg 48766aec45a7Smrg case $cc_basename in 48776aec45a7Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48786aec45a7Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48796aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4880aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48816aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48826aec45a7Smrg if test "x$supports_anon_versioning" = xyes; then 48836aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48846aec45a7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48856aec45a7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48866aec45a7Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48876aec45a7Smrg fi 48886aec45a7Smrg ;; 48896aec45a7Smrg esac 48906aec45a7Smrg else 48916aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48926aec45a7Smrg fi 48936aec45a7Smrg ;; 4894ab47cfaaSmrg 489538770048Smrg netbsd* | netbsdelf*-gnu) 48966aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48976aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48986aec45a7Smrg wlarc= 48996aec45a7Smrg else 4900aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4901aa9e3350Smrg _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' 49026aec45a7Smrg fi 49036aec45a7Smrg ;; 4904ab47cfaaSmrg 49056aec45a7Smrg solaris*) 49066aec45a7Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 49076aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49086aec45a7Smrg cat <<_LT_EOF 1>&2 4909ab47cfaaSmrg 49106aec45a7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 49116aec45a7Smrg*** create shared libraries on Solaris systems. Therefore, libtool 49126aec45a7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49136aec45a7Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 49146aec45a7Smrg*** your PATH or compiler configuration so that the native linker is 49156aec45a7Smrg*** used, and then restart. 4916ab47cfaaSmrg 49176aec45a7Smrg_LT_EOF 49186aec45a7Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4919aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4920aa9e3350Smrg _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' 49216aec45a7Smrg else 49226aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49236aec45a7Smrg fi 49246aec45a7Smrg ;; 4925ab47cfaaSmrg 49266aec45a7Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49276aec45a7Smrg case `$LD -v 2>&1` in 49286aec45a7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49296aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49306aec45a7Smrg cat <<_LT_EOF 1>&2 4931ab47cfaaSmrg 49326aec45a7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49336aec45a7Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49346aec45a7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49356aec45a7Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49366aec45a7Smrg*** your PATH or compiler configuration so that the native linker is 49376aec45a7Smrg*** used, and then restart. 4938ab47cfaaSmrg 49396aec45a7Smrg_LT_EOF 49406aec45a7Smrg ;; 49416aec45a7Smrg *) 49426aec45a7Smrg # For security reasons, it is highly recommended that you always 49436aec45a7Smrg # use absolute paths for naming shared libraries, and exclude the 49446aec45a7Smrg # DT_RUNPATH tag from executables and libraries. But doing so 49456aec45a7Smrg # requires that you compile everything twice, which is a pain. 49466aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49476aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49486aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49496aec45a7Smrg _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' 49506aec45a7Smrg else 49516aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49526aec45a7Smrg fi 49536aec45a7Smrg ;; 49546aec45a7Smrg esac 49556aec45a7Smrg ;; 4956ab47cfaaSmrg 49576aec45a7Smrg sunos4*) 49586aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49596aec45a7Smrg wlarc= 49606aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 49616aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49626aec45a7Smrg ;; 4963ab47cfaaSmrg 49646aec45a7Smrg *) 49656aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4966aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4967aa9e3350Smrg _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' 49686aec45a7Smrg else 49696aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49706aec45a7Smrg fi 49716aec45a7Smrg ;; 49726aec45a7Smrg esac 4973ab47cfaaSmrg 49746aec45a7Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49756aec45a7Smrg runpath_var= 49766aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49776aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49786aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49796aec45a7Smrg fi 49806aec45a7Smrg else 49816aec45a7Smrg # PORTME fill in a description of your system's linker (not GNU ld) 49826aec45a7Smrg case $host_os in 49836aec45a7Smrg aix3*) 49846aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49856aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 49866aec45a7Smrg _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' 49876aec45a7Smrg # Note: this linker hardcodes the directories in LIBPATH if there 49886aec45a7Smrg # are no directories specified by -L. 49896aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49906aec45a7Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49916aec45a7Smrg # Neither direct hardcoding nor static linking is supported with a 49926aec45a7Smrg # broken collect2. 49936aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49946aec45a7Smrg fi 49956aec45a7Smrg ;; 4996ab47cfaaSmrg 49976aec45a7Smrg aix[[4-9]]*) 49986aec45a7Smrg if test "$host_cpu" = ia64; then 49996aec45a7Smrg # On IA64, the linker does run time linking by default, so we don't 50006aec45a7Smrg # have to do anything special. 50016aec45a7Smrg aix_use_runtimelinking=no 50026aec45a7Smrg exp_sym_flag='-Bexport' 50036aec45a7Smrg no_entry_flag="" 50046aec45a7Smrg else 50056aec45a7Smrg # If we're using GNU nm, then we don't want the "-C" option. 50066aec45a7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 50076aec45a7Smrg # Also, AIX nm treats weak defined symbols like other global 50086aec45a7Smrg # defined symbols, whereas GNU nm marks them as "W". 50096aec45a7Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 50106aec45a7Smrg _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' 50116aec45a7Smrg else 50126aec45a7Smrg _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' 50136aec45a7Smrg fi 50146aec45a7Smrg aix_use_runtimelinking=no 5015ab47cfaaSmrg 50166aec45a7Smrg # Test if we are trying to use run time linking or normal 50176aec45a7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50186aec45a7Smrg # need to do runtime linking. 50196aec45a7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50206aec45a7Smrg for ld_flag in $LDFLAGS; do 50216aec45a7Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50226aec45a7Smrg aix_use_runtimelinking=yes 50236aec45a7Smrg break 50246aec45a7Smrg fi 50256aec45a7Smrg done 50266aec45a7Smrg ;; 50276aec45a7Smrg esac 5028ab47cfaaSmrg 50296aec45a7Smrg exp_sym_flag='-bexport' 50306aec45a7Smrg no_entry_flag='-bnoentry' 50316aec45a7Smrg fi 5032ab47cfaaSmrg 50336aec45a7Smrg # When large executables or shared objects are built, AIX ld can 50346aec45a7Smrg # have problems creating the table of contents. If linking a library 50356aec45a7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 50366aec45a7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50376aec45a7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5038ab47cfaaSmrg 50396aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='' 50406aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50416aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50426aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50436aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50446aec45a7Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5045ab47cfaaSmrg 50466aec45a7Smrg if test "$GCC" = yes; then 50476aec45a7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50486aec45a7Smrg # We only want to do this on AIX 4.2 and lower, the check 50496aec45a7Smrg # below for broken collect2 doesn't work under 4.3+ 50506aec45a7Smrg collect2name=`${CC} -print-prog-name=collect2` 50516aec45a7Smrg if test -f "$collect2name" && 50526aec45a7Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50536aec45a7Smrg then 50546aec45a7Smrg # We have reworked collect2 50556aec45a7Smrg : 50566aec45a7Smrg else 50576aec45a7Smrg # We have old collect2 50586aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50596aec45a7Smrg # It fails to find uninstalled libraries when the uninstalled 50606aec45a7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 50616aec45a7Smrg # to unsupported forces relinking 50626aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50636aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50646aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50656aec45a7Smrg fi 50666aec45a7Smrg ;; 50676aec45a7Smrg esac 50686aec45a7Smrg shared_flag='-shared' 50696aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 50706aec45a7Smrg shared_flag="$shared_flag "'${wl}-G' 50716aec45a7Smrg fi 507238770048Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 50736aec45a7Smrg else 50746aec45a7Smrg # not using gcc 50756aec45a7Smrg if test "$host_cpu" = ia64; then 50766aec45a7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50776aec45a7Smrg # chokes on -Wl,-G. The following line is correct: 50786aec45a7Smrg shared_flag='-G' 50796aec45a7Smrg else 50806aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 50816aec45a7Smrg shared_flag='${wl}-G' 50826aec45a7Smrg else 50836aec45a7Smrg shared_flag='${wl}-bM:SRE' 50846aec45a7Smrg fi 50856aec45a7Smrg fi 50866aec45a7Smrg fi 5087ab47cfaaSmrg 50886aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50896aec45a7Smrg # It seems that -bexpall does not export symbols beginning with 50906aec45a7Smrg # underscore (_), so it is better to generate a list of symbols to export. 50916aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 50926aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 50936aec45a7Smrg # Warning - without using the other runtime loading flags (-brtl), 50946aec45a7Smrg # -berok will link without error, but may produce a broken library. 50956aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50966aec45a7Smrg # Determine the default libpath from the value encoded in an 50976aec45a7Smrg # empty executable. 5098aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50996aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51006aec45a7Smrg _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" 51016aec45a7Smrg else 51026aec45a7Smrg if test "$host_cpu" = ia64; then 51036aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 51046aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 51056aec45a7Smrg _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" 51066aec45a7Smrg else 51076aec45a7Smrg # Determine the default libpath from the value encoded in an 51086aec45a7Smrg # empty executable. 5109aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 51106aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51116aec45a7Smrg # Warning - without using the other run time loading flags, 51126aec45a7Smrg # -berok will link without error, but may produce a broken library. 51136aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51146aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 51156aec45a7Smrg if test "$with_gnu_ld" = yes; then 51166aec45a7Smrg # We only use this code for GNU lds that support --whole-archive. 51176aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 51186aec45a7Smrg else 51196aec45a7Smrg # Exported symbols can be pulled into shared objects from archives 51206aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 51216aec45a7Smrg fi 51226aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51236aec45a7Smrg # This is similar to how AIX traditionally builds its shared libraries. 51246aec45a7Smrg _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' 51256aec45a7Smrg fi 51266aec45a7Smrg fi 51276aec45a7Smrg ;; 5128ab47cfaaSmrg 51296aec45a7Smrg amigaos*) 51306aec45a7Smrg case $host_cpu in 51316aec45a7Smrg powerpc) 51326aec45a7Smrg # see comment about AmigaOS4 .so support 51336aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51346aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51356aec45a7Smrg ;; 51366aec45a7Smrg m68k) 51376aec45a7Smrg _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)' 51386aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51396aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51406aec45a7Smrg ;; 51416aec45a7Smrg esac 51426aec45a7Smrg ;; 5143ab47cfaaSmrg 51446aec45a7Smrg bsdi[[45]]*) 51456aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51466aec45a7Smrg ;; 5147ab47cfaaSmrg 51486aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 51496aec45a7Smrg # When not using gcc, we currently assume that we are using 51506aec45a7Smrg # Microsoft Visual C++. 51516aec45a7Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51526aec45a7Smrg # no search path for DLLs. 5153aa9e3350Smrg case $cc_basename in 5154aa9e3350Smrg cl*) 5155aa9e3350Smrg # Native MSVC 5156aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5157aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5158aa9e3350Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5159aa9e3350Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5160aa9e3350Smrg # Tell ltmain to make .lib files, not .a files. 5161aa9e3350Smrg libext=lib 5162aa9e3350Smrg # Tell ltmain to make .dll files, not .so files. 5163aa9e3350Smrg shrext_cmds=".dll" 5164aa9e3350Smrg # FIXME: Setting linknames here is a bad hack. 5165aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5166aa9e3350Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5167aa9e3350Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5168aa9e3350Smrg else 5169aa9e3350Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5170aa9e3350Smrg fi~ 5171aa9e3350Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5172aa9e3350Smrg linknames=' 5173aa9e3350Smrg # The linker will not automatically build a static lib if we build a DLL. 5174aa9e3350Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5175aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5176aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5177aa9e3350Smrg _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' 5178aa9e3350Smrg # Don't use ranlib 5179aa9e3350Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5180aa9e3350Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5181aa9e3350Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5182aa9e3350Smrg case $lt_outputfile in 5183aa9e3350Smrg *.exe|*.EXE) ;; 5184aa9e3350Smrg *) 5185aa9e3350Smrg lt_outputfile="$lt_outputfile.exe" 5186aa9e3350Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5187aa9e3350Smrg ;; 5188aa9e3350Smrg esac~ 5189aa9e3350Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5190aa9e3350Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5191aa9e3350Smrg $RM "$lt_outputfile.manifest"; 5192aa9e3350Smrg fi' 5193aa9e3350Smrg ;; 5194aa9e3350Smrg *) 5195aa9e3350Smrg # Assume MSVC wrapper 5196aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5197aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5198aa9e3350Smrg # Tell ltmain to make .lib files, not .a files. 5199aa9e3350Smrg libext=lib 5200aa9e3350Smrg # Tell ltmain to make .dll files, not .so files. 5201aa9e3350Smrg shrext_cmds=".dll" 5202aa9e3350Smrg # FIXME: Setting linknames here is a bad hack. 5203aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5204aa9e3350Smrg # The linker will automatically build a .lib file if we build a DLL. 5205aa9e3350Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5206aa9e3350Smrg # FIXME: Should let the user specify the lib program. 5207aa9e3350Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5208aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5209aa9e3350Smrg ;; 5210aa9e3350Smrg esac 52116aec45a7Smrg ;; 5212ab47cfaaSmrg 52136aec45a7Smrg darwin* | rhapsody*) 52146aec45a7Smrg _LT_DARWIN_LINKER_FEATURES($1) 52156aec45a7Smrg ;; 5216ab47cfaaSmrg 52176aec45a7Smrg dgux*) 52186aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52196aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52206aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52216aec45a7Smrg ;; 5222ab47cfaaSmrg 52236aec45a7Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52246aec45a7Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 52256aec45a7Smrg # does not break anything, and helps significantly (at the cost of a little 52266aec45a7Smrg # extra space). 52276aec45a7Smrg freebsd2.2*) 52286aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52296aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52306aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52316aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52321473d951Smrg ;; 52336aec45a7Smrg 52346aec45a7Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5235aa9e3350Smrg freebsd2.*) 52366aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52376aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52386aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52396aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5240ab47cfaaSmrg ;; 52411473d951Smrg 52426aec45a7Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52436aec45a7Smrg freebsd* | dragonfly*) 5244aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52456aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52466aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52476aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52486aec45a7Smrg ;; 5249ab47cfaaSmrg 52506aec45a7Smrg hpux9*) 52516aec45a7Smrg if test "$GCC" = yes; then 5252aa9e3350Smrg _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' 52536aec45a7Smrg else 52546aec45a7Smrg _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' 52556aec45a7Smrg fi 52566aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52576aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52586aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5259ab47cfaaSmrg 52606aec45a7Smrg # hardcode_minus_L: Not really in the search PATH, 52616aec45a7Smrg # but as the default location of the library. 52626aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52636aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52646aec45a7Smrg ;; 5265ab47cfaaSmrg 52666aec45a7Smrg hpux10*) 52676aec45a7Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5268aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52696aec45a7Smrg else 52706aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52716aec45a7Smrg fi 52726aec45a7Smrg if test "$with_gnu_ld" = no; then 52736aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52746aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52756aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52766aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52776aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52786aec45a7Smrg # hardcode_minus_L: Not really in the search PATH, 52796aec45a7Smrg # but as the default location of the library. 52806aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52816aec45a7Smrg fi 52826aec45a7Smrg ;; 5283ab47cfaaSmrg 52846aec45a7Smrg hpux11*) 52856aec45a7Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52866aec45a7Smrg case $host_cpu in 52876aec45a7Smrg hppa*64*) 52886aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52896aec45a7Smrg ;; 52906aec45a7Smrg ia64*) 5291aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52926aec45a7Smrg ;; 52936aec45a7Smrg *) 5294aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52956aec45a7Smrg ;; 52966aec45a7Smrg esac 52976aec45a7Smrg else 52986aec45a7Smrg case $host_cpu in 52996aec45a7Smrg hppa*64*) 53006aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 53016aec45a7Smrg ;; 53026aec45a7Smrg ia64*) 53036aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 53046aec45a7Smrg ;; 53056aec45a7Smrg *) 53066aec45a7Smrg m4_if($1, [], [ 53076aec45a7Smrg # Older versions of the 11.00 compiler do not understand -b yet 53086aec45a7Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 53096aec45a7Smrg _LT_LINKER_OPTION([if $CC understands -b], 53106aec45a7Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 53116aec45a7Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 53126aec45a7Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 53136aec45a7Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53146aec45a7Smrg ;; 53156aec45a7Smrg esac 53166aec45a7Smrg fi 53176aec45a7Smrg if test "$with_gnu_ld" = no; then 53186aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53196aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5320ab47cfaaSmrg 53216aec45a7Smrg case $host_cpu in 53226aec45a7Smrg hppa*64*|ia64*) 53236aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53246aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53256aec45a7Smrg ;; 53266aec45a7Smrg *) 53276aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53286aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53296aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5330ab47cfaaSmrg 53316aec45a7Smrg # hardcode_minus_L: Not really in the search PATH, 53326aec45a7Smrg # but as the default location of the library. 53336aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53346aec45a7Smrg ;; 53356aec45a7Smrg esac 53366aec45a7Smrg fi 53376aec45a7Smrg ;; 5338ab47cfaaSmrg 53396aec45a7Smrg irix5* | irix6* | nonstopux*) 53406aec45a7Smrg if test "$GCC" = yes; then 5341aa9e3350Smrg _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' 53426aec45a7Smrg # Try to use the -exported_symbol ld option, if it does not 53436aec45a7Smrg # work, assume that -exports_file does not work either and 53446aec45a7Smrg # implicitly export all symbols. 5345aa9e3350Smrg # This should be the same for all languages, so no per-tag cache variable. 5346aa9e3350Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5347aa9e3350Smrg [lt_cv_irix_exported_symbol], 5348aa9e3350Smrg [save_LDFLAGS="$LDFLAGS" 5349aa9e3350Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5350aa9e3350Smrg AC_LINK_IFELSE( 5351aa9e3350Smrg [AC_LANG_SOURCE( 5352aa9e3350Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5353aa9e3350Smrg [C++], [[int foo (void) { return 0; }]], 5354aa9e3350Smrg [Fortran 77], [[ 5355aa9e3350Smrg subroutine foo 5356aa9e3350Smrg end]], 5357aa9e3350Smrg [Fortran], [[ 5358aa9e3350Smrg subroutine foo 5359aa9e3350Smrg end]])])], 5360aa9e3350Smrg [lt_cv_irix_exported_symbol=yes], 5361aa9e3350Smrg [lt_cv_irix_exported_symbol=no]) 5362aa9e3350Smrg LDFLAGS="$save_LDFLAGS"]) 5363aa9e3350Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5364aa9e3350Smrg _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' 5365aa9e3350Smrg fi 53666aec45a7Smrg else 53676aec45a7Smrg _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' 53686aec45a7Smrg _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' 53696aec45a7Smrg fi 53706aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53716aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53726aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53736aec45a7Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 53746aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53756aec45a7Smrg ;; 5376ab47cfaaSmrg 537738770048Smrg netbsd* | netbsdelf*-gnu) 53786aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53796aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53806aec45a7Smrg else 53816aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53826aec45a7Smrg fi 53836aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53846aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53856aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53866aec45a7Smrg ;; 5387ab47cfaaSmrg 53886aec45a7Smrg newsos6) 53896aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53906aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53916aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53926aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53936aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53946aec45a7Smrg ;; 5395ab47cfaaSmrg 53966aec45a7Smrg *nto* | *qnx*) 53976aec45a7Smrg ;; 5398ab47cfaaSmrg 53996aec45a7Smrg openbsd*) 54006aec45a7Smrg if test -f /usr/libexec/ld.so; then 54016aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54026aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54036aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54046aec45a7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 54056aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54066aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 54076aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54086aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54096aec45a7Smrg else 54106aec45a7Smrg case $host_os in 54116aec45a7Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 54126aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54136aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54146aec45a7Smrg ;; 54156aec45a7Smrg *) 54166aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54176aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54186aec45a7Smrg ;; 54196aec45a7Smrg esac 54206aec45a7Smrg fi 54216aec45a7Smrg else 54226aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54236aec45a7Smrg fi 54246aec45a7Smrg ;; 5425ab47cfaaSmrg 54266aec45a7Smrg os2*) 54276aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54286aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54296aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 54306aec45a7Smrg _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' 54316aec45a7Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54326aec45a7Smrg ;; 5433ab47cfaaSmrg 54346aec45a7Smrg osf3*) 54356aec45a7Smrg if test "$GCC" = yes; then 54366aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 54376aec45a7Smrg _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' 54386aec45a7Smrg else 54396aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54406aec45a7Smrg _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' 54416aec45a7Smrg fi 54426aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54436aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54446aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54456aec45a7Smrg ;; 5446ab47cfaaSmrg 54476aec45a7Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54486aec45a7Smrg if test "$GCC" = yes; then 54496aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5450aa9e3350Smrg _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' 54516aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54526aec45a7Smrg else 54536aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 54546aec45a7Smrg _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' 54556aec45a7Smrg _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~ 54566aec45a7Smrg $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' 5457ab47cfaaSmrg 54586aec45a7Smrg # Both c and cxx compiler support -rpath directly 54596aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54606aec45a7Smrg fi 54616aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54626aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54636aec45a7Smrg ;; 5464ab47cfaaSmrg 54656aec45a7Smrg solaris*) 54666aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54676aec45a7Smrg if test "$GCC" = yes; then 54686aec45a7Smrg wlarc='${wl}' 5469aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54706aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5471aa9e3350Smrg $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' 54726aec45a7Smrg else 54736aec45a7Smrg case `$CC -V 2>&1` in 54746aec45a7Smrg *"Compilers 5.0"*) 54756aec45a7Smrg wlarc='' 54766aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54776aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54786aec45a7Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54796aec45a7Smrg ;; 54806aec45a7Smrg *) 54816aec45a7Smrg wlarc='${wl}' 54826aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54836aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54846aec45a7Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54856aec45a7Smrg ;; 54866aec45a7Smrg esac 54876aec45a7Smrg fi 54886aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54896aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54906aec45a7Smrg case $host_os in 54916aec45a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54926aec45a7Smrg *) 54936aec45a7Smrg # The compiler driver will combine and reorder linker options, 54946aec45a7Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54956aec45a7Smrg # but is careful enough not to reorder. 54966aec45a7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54976aec45a7Smrg if test "$GCC" = yes; then 54986aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54996aec45a7Smrg else 55006aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 55016aec45a7Smrg fi 55026aec45a7Smrg ;; 55036aec45a7Smrg esac 55046aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55056aec45a7Smrg ;; 5506ab47cfaaSmrg 55076aec45a7Smrg sunos4*) 55086aec45a7Smrg if test "x$host_vendor" = xsequent; then 55096aec45a7Smrg # Use $CC to link under sequent, because it throws in some extra .o 55106aec45a7Smrg # files that make .init and .fini sections work. 55116aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 55126aec45a7Smrg else 55136aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55146aec45a7Smrg fi 55156aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55166aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55176aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55186aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55196aec45a7Smrg ;; 5520ab47cfaaSmrg 55216aec45a7Smrg sysv4) 55226aec45a7Smrg case $host_vendor in 55236aec45a7Smrg sni) 55246aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55256aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55266aec45a7Smrg ;; 55276aec45a7Smrg siemens) 55286aec45a7Smrg ## LD is ld it makes a PLAMLIB 55296aec45a7Smrg ## CC just makes a GrossModule. 55306aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55316aec45a7Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55326aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55336aec45a7Smrg ;; 55346aec45a7Smrg motorola) 55356aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55366aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55376aec45a7Smrg ;; 55386aec45a7Smrg esac 55396aec45a7Smrg runpath_var='LD_RUN_PATH' 55406aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55416aec45a7Smrg ;; 5542ab47cfaaSmrg 55436aec45a7Smrg sysv4.3*) 55446aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55456aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55466aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55476aec45a7Smrg ;; 5548ab47cfaaSmrg 55496aec45a7Smrg sysv4*MP*) 55506aec45a7Smrg if test -d /usr/nec; then 55516aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55526aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55536aec45a7Smrg runpath_var=LD_RUN_PATH 55546aec45a7Smrg hardcode_runpath_var=yes 55556aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 55566aec45a7Smrg fi 55576aec45a7Smrg ;; 5558ab47cfaaSmrg 55596aec45a7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55606aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55616aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55626aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55636aec45a7Smrg runpath_var='LD_RUN_PATH' 5564ab47cfaaSmrg 55656aec45a7Smrg if test "$GCC" = yes; then 55666aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55676aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55686aec45a7Smrg else 55696aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55706aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55716aec45a7Smrg fi 55726aec45a7Smrg ;; 5573ab47cfaaSmrg 55746aec45a7Smrg sysv5* | sco3.2v5* | sco5v6*) 55756aec45a7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55766aec45a7Smrg # link with -lc, and that would cause any symbols used from libc to 55776aec45a7Smrg # always be unresolved, which means just about no library would 55786aec45a7Smrg # ever link correctly. If we're not using GNU ld we use -z text 55796aec45a7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55806aec45a7Smrg # as -z defs. 55816aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55826aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55836aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55846aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55856aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55866aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55876aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55886aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55896aec45a7Smrg runpath_var='LD_RUN_PATH' 5590ab47cfaaSmrg 55916aec45a7Smrg if test "$GCC" = yes; then 55926aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55936aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55946aec45a7Smrg else 55956aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55966aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55976aec45a7Smrg fi 55986aec45a7Smrg ;; 5599ab47cfaaSmrg 56006aec45a7Smrg uts4*) 56016aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56026aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56036aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56046aec45a7Smrg ;; 5605ab47cfaaSmrg 56066aec45a7Smrg *) 56076aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56086aec45a7Smrg ;; 56096aec45a7Smrg esac 5610ab47cfaaSmrg 56116aec45a7Smrg if test x$host_vendor = xsni; then 56126aec45a7Smrg case $host in 56136aec45a7Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56146aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56156aec45a7Smrg ;; 56166aec45a7Smrg esac 56176aec45a7Smrg fi 56186aec45a7Smrg fi 56196aec45a7Smrg]) 56206aec45a7SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56216aec45a7Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5622ab47cfaaSmrg 56236aec45a7Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5624ab47cfaaSmrg 56256aec45a7Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56266aec45a7Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56276aec45a7Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 56286aec45a7Smrg [The commands to extract the exported symbol list from a shared archive]) 5629ab47cfaaSmrg 56306aec45a7Smrg# 56316aec45a7Smrg# Do we need to explicitly link libc? 56326aec45a7Smrg# 56336aec45a7Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56346aec45a7Smrgx|xyes) 56356aec45a7Smrg # Assume -lc should be added 56366aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5637ab47cfaaSmrg 56386aec45a7Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56396aec45a7Smrg case $_LT_TAGVAR(archive_cmds, $1) in 56406aec45a7Smrg *'~'*) 56416aec45a7Smrg # FIXME: we may have to deal with multi-command sequences. 56426aec45a7Smrg ;; 56436aec45a7Smrg '$CC '*) 56446aec45a7Smrg # Test whether the compiler implicitly links with -lc since on some 56456aec45a7Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56466aec45a7Smrg # to ld, don't add -lc before -lgcc. 56476aec45a7Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 56486aec45a7Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 56496aec45a7Smrg [$RM conftest* 56506aec45a7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 56516aec45a7Smrg 56526aec45a7Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 56536aec45a7Smrg soname=conftest 56546aec45a7Smrg lib=conftest 56556aec45a7Smrg libobjs=conftest.$ac_objext 56566aec45a7Smrg deplibs= 56576aec45a7Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 56586aec45a7Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 56596aec45a7Smrg compiler_flags=-v 56606aec45a7Smrg linker_flags=-v 56616aec45a7Smrg verstring= 56626aec45a7Smrg output_objdir=. 56636aec45a7Smrg libname=conftest 56646aec45a7Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 56656aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 56666aec45a7Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 56676aec45a7Smrg then 56686aec45a7Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 56696aec45a7Smrg else 56706aec45a7Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56716aec45a7Smrg fi 56726aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 56736aec45a7Smrg else 56746aec45a7Smrg cat conftest.err 1>&5 56756aec45a7Smrg fi 56766aec45a7Smrg $RM conftest* 56776aec45a7Smrg ]) 56786aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56796aec45a7Smrg ;; 56806aec45a7Smrg esac 56816aec45a7Smrg fi 56826aec45a7Smrg ;; 56836aec45a7Smrgesac 5684ab47cfaaSmrg 56856aec45a7Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56866aec45a7Smrg [Whether or not to add -lc for building shared libraries]) 56876aec45a7Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56886aec45a7Smrg [enable_shared_with_static_runtimes], [0], 56896aec45a7Smrg [Whether or not to disallow shared libs when runtime libs are static]) 56906aec45a7Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56916aec45a7Smrg [Compiler flag to allow reflexive dlopens]) 56926aec45a7Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56936aec45a7Smrg [Compiler flag to generate shared objects directly from archives]) 56946aec45a7Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 56956aec45a7Smrg [Whether the compiler copes with passing no objects directly]) 56966aec45a7Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56976aec45a7Smrg [Create an old-style archive from a shared archive]) 56986aec45a7Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56996aec45a7Smrg [Create a temporary old-style archive to link instead of a shared archive]) 57006aec45a7Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 57016aec45a7Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 57026aec45a7Smrg_LT_TAGDECL([], [module_cmds], [2], 57036aec45a7Smrg [Commands used to build a loadable module if different from building 57046aec45a7Smrg a shared archive.]) 57056aec45a7Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 57066aec45a7Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 57076aec45a7Smrg [Whether we are building with GNU ld or not]) 57086aec45a7Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 57096aec45a7Smrg [Flag that allows shared libraries with undefined symbols to be built]) 57106aec45a7Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 57116aec45a7Smrg [Flag that enforces no undefined symbols]) 57126aec45a7Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 57136aec45a7Smrg [Flag to hardcode $libdir into a binary during linking. 57146aec45a7Smrg This must work even if $libdir does not exist]) 57156aec45a7Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57166aec45a7Smrg [Whether we need a single "-rpath" flag with a separated argument]) 57176aec45a7Smrg_LT_TAGDECL([], [hardcode_direct], [0], 57186aec45a7Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57196aec45a7Smrg DIR into the resulting binary]) 57206aec45a7Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57216aec45a7Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57226aec45a7Smrg DIR into the resulting binary and the resulting library dependency is 57236aec45a7Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57246aec45a7Smrg library is relocated]) 57256aec45a7Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57266aec45a7Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57276aec45a7Smrg into the resulting binary]) 57286aec45a7Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57296aec45a7Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57306aec45a7Smrg into the resulting binary]) 57316aec45a7Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 57326aec45a7Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 57336aec45a7Smrg into the library and all subsequent libraries and executables linked 57346aec45a7Smrg against it]) 57356aec45a7Smrg_LT_TAGDECL([], [inherit_rpath], [0], 57366aec45a7Smrg [Set to yes if linker adds runtime paths of dependent libraries 57376aec45a7Smrg to runtime path list]) 57386aec45a7Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 57396aec45a7Smrg [Whether libtool must link a program against all its dependency libraries]) 57406aec45a7Smrg_LT_TAGDECL([], [always_export_symbols], [0], 57416aec45a7Smrg [Set to "yes" if exported symbols are required]) 57426aec45a7Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57436aec45a7Smrg [The commands to list exported symbols]) 57446aec45a7Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 57456aec45a7Smrg [Symbols that should not be listed in the preloaded symbols]) 57466aec45a7Smrg_LT_TAGDECL([], [include_expsyms], [1], 57476aec45a7Smrg [Symbols that must always be exported]) 57486aec45a7Smrg_LT_TAGDECL([], [prelink_cmds], [2], 57496aec45a7Smrg [Commands necessary for linking programs (against libraries) with templates]) 5750aa9e3350Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5751aa9e3350Smrg [Commands necessary for finishing linking programs]) 57526aec45a7Smrg_LT_TAGDECL([], [file_list_spec], [1], 57536aec45a7Smrg [Specify filename containing input files]) 57546aec45a7Smrgdnl FIXME: Not yet implemented 57556aec45a7Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57566aec45a7Smrgdnl [Compiler flag to generate thread safe objects]) 57576aec45a7Smrg])# _LT_LINKER_SHLIBS 57586aec45a7Smrg 57596aec45a7Smrg 57606aec45a7Smrg# _LT_LANG_C_CONFIG([TAG]) 57616aec45a7Smrg# ------------------------ 57626aec45a7Smrg# Ensure that the configuration variables for a C compiler are suitably 57636aec45a7Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 57646aec45a7Smrg# the compiler configuration to `libtool'. 57656aec45a7Smrgm4_defun([_LT_LANG_C_CONFIG], 57666aec45a7Smrg[m4_require([_LT_DECL_EGREP])dnl 57676aec45a7Smrglt_save_CC="$CC" 57686aec45a7SmrgAC_LANG_PUSH(C) 5769ab47cfaaSmrg 57706aec45a7Smrg# Source file extension for C test sources. 57716aec45a7Smrgac_ext=c 5772ab47cfaaSmrg 57736aec45a7Smrg# Object file extension for compiled C test sources. 57746aec45a7Smrgobjext=o 57756aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 5776ab47cfaaSmrg 57776aec45a7Smrg# Code to be used in simple compile tests 57786aec45a7Smrglt_simple_compile_test_code="int some_variable = 0;" 5779ab47cfaaSmrg 57806aec45a7Smrg# Code to be used in simple link tests 57816aec45a7Smrglt_simple_link_test_code='int main(){return(0);}' 5782ab47cfaaSmrg 57836aec45a7Smrg_LT_TAG_COMPILER 57846aec45a7Smrg# Save the default compiler, since it gets overwritten when the other 57856aec45a7Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57866aec45a7Smrgcompiler_DEFAULT=$CC 5787ab47cfaaSmrg 57886aec45a7Smrg# save warnings/boilerplate of simple test code 57896aec45a7Smrg_LT_COMPILER_BOILERPLATE 57906aec45a7Smrg_LT_LINKER_BOILERPLATE 5791ab47cfaaSmrg 57926aec45a7Smrgif test -n "$compiler"; then 57936aec45a7Smrg _LT_COMPILER_NO_RTTI($1) 57946aec45a7Smrg _LT_COMPILER_PIC($1) 57956aec45a7Smrg _LT_COMPILER_C_O($1) 57966aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 57976aec45a7Smrg _LT_LINKER_SHLIBS($1) 57986aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 57996aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 58006aec45a7Smrg LT_SYS_DLOPEN_SELF 58016aec45a7Smrg _LT_CMD_STRIPLIB 58026aec45a7Smrg 58036aec45a7Smrg # Report which library types will actually be built 58046aec45a7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 58056aec45a7Smrg AC_MSG_RESULT([$can_build_shared]) 58066aec45a7Smrg 58076aec45a7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 58086aec45a7Smrg test "$can_build_shared" = "no" && enable_shared=no 58096aec45a7Smrg 58106aec45a7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 58116aec45a7Smrg # are all built from PIC. 58126aec45a7Smrg case $host_os in 58136aec45a7Smrg aix3*) 58146aec45a7Smrg test "$enable_shared" = yes && enable_static=no 58156aec45a7Smrg if test -n "$RANLIB"; then 58166aec45a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58176aec45a7Smrg postinstall_cmds='$RANLIB $lib' 58186aec45a7Smrg fi 58196aec45a7Smrg ;; 5820ab47cfaaSmrg 58216aec45a7Smrg aix[[4-9]]*) 58226aec45a7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58236aec45a7Smrg test "$enable_shared" = yes && enable_static=no 58246aec45a7Smrg fi 58256aec45a7Smrg ;; 58266aec45a7Smrg esac 58276aec45a7Smrg AC_MSG_RESULT([$enable_shared]) 5828ab47cfaaSmrg 58296aec45a7Smrg AC_MSG_CHECKING([whether to build static libraries]) 58306aec45a7Smrg # Make sure either enable_shared or enable_static is yes. 58316aec45a7Smrg test "$enable_shared" = yes || enable_static=yes 58326aec45a7Smrg AC_MSG_RESULT([$enable_static]) 5833ab47cfaaSmrg 58346aec45a7Smrg _LT_CONFIG($1) 58356aec45a7Smrgfi 58366aec45a7SmrgAC_LANG_POP 58376aec45a7SmrgCC="$lt_save_CC" 58386aec45a7Smrg])# _LT_LANG_C_CONFIG 5839ab47cfaaSmrg 5840ab47cfaaSmrg 58416aec45a7Smrg# _LT_LANG_CXX_CONFIG([TAG]) 58426aec45a7Smrg# -------------------------- 58436aec45a7Smrg# Ensure that the configuration variables for a C++ compiler are suitably 58446aec45a7Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 58456aec45a7Smrg# the compiler configuration to `libtool'. 58466aec45a7Smrgm4_defun([_LT_LANG_CXX_CONFIG], 58476aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58486aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 5849aa9e3350Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 58506aec45a7Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 58516aec45a7Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 58526aec45a7Smrg (test "X$CXX" != "Xg++"))) ; then 58536aec45a7Smrg AC_PROG_CXXCPP 58546aec45a7Smrgelse 58556aec45a7Smrg _lt_caught_CXX_error=yes 58566aec45a7Smrgfi 5857ab47cfaaSmrg 58586aec45a7SmrgAC_LANG_PUSH(C++) 58596aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58606aec45a7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 58616aec45a7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 58626aec45a7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58636aec45a7Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 58646aec45a7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58656aec45a7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 58666aec45a7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58676aec45a7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58686aec45a7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58696aec45a7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58706aec45a7Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58716aec45a7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 58726aec45a7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 58736aec45a7Smrg_LT_TAGVAR(module_cmds, $1)= 58746aec45a7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 58756aec45a7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58766aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 58776aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 58786aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58796aec45a7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 58806aec45a7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58816aec45a7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5882ab47cfaaSmrg 58836aec45a7Smrg# Source file extension for C++ test sources. 58846aec45a7Smrgac_ext=cpp 5885ab47cfaaSmrg 58866aec45a7Smrg# Object file extension for compiled C++ test sources. 58876aec45a7Smrgobjext=o 58886aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 58896aec45a7Smrg 58906aec45a7Smrg# No sense in running all these tests if we already determined that 58916aec45a7Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 58926aec45a7Smrg# are currently assumed to apply to all compilers on this platform, 58936aec45a7Smrg# and will be corrupted by setting them based on a non-working compiler. 58946aec45a7Smrgif test "$_lt_caught_CXX_error" != yes; then 58956aec45a7Smrg # Code to be used in simple compile tests 58966aec45a7Smrg lt_simple_compile_test_code="int some_variable = 0;" 58976aec45a7Smrg 58986aec45a7Smrg # Code to be used in simple link tests 58996aec45a7Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 59006aec45a7Smrg 59016aec45a7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 59026aec45a7Smrg _LT_TAG_COMPILER 59036aec45a7Smrg 59046aec45a7Smrg # save warnings/boilerplate of simple test code 59056aec45a7Smrg _LT_COMPILER_BOILERPLATE 59066aec45a7Smrg _LT_LINKER_BOILERPLATE 59076aec45a7Smrg 59086aec45a7Smrg # Allow CC to be a program name with arguments. 59096aec45a7Smrg lt_save_CC=$CC 5910aa9e3350Smrg lt_save_CFLAGS=$CFLAGS 59116aec45a7Smrg lt_save_LD=$LD 59126aec45a7Smrg lt_save_GCC=$GCC 59136aec45a7Smrg GCC=$GXX 59146aec45a7Smrg lt_save_with_gnu_ld=$with_gnu_ld 59156aec45a7Smrg lt_save_path_LD=$lt_cv_path_LD 59166aec45a7Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59176aec45a7Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59186aec45a7Smrg else 59196aec45a7Smrg $as_unset lt_cv_prog_gnu_ld 59206aec45a7Smrg fi 59216aec45a7Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 59226aec45a7Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 59236aec45a7Smrg else 59246aec45a7Smrg $as_unset lt_cv_path_LD 59256aec45a7Smrg fi 59266aec45a7Smrg test -z "${LDCXX+set}" || LD=$LDCXX 59276aec45a7Smrg CC=${CXX-"c++"} 5928aa9e3350Smrg CFLAGS=$CXXFLAGS 59296aec45a7Smrg compiler=$CC 59306aec45a7Smrg _LT_TAGVAR(compiler, $1)=$CC 59316aec45a7Smrg _LT_CC_BASENAME([$compiler]) 5932ab47cfaaSmrg 59336aec45a7Smrg if test -n "$compiler"; then 59346aec45a7Smrg # We don't want -fno-exception when compiling C++ code, so set the 59356aec45a7Smrg # no_builtin_flag separately 59366aec45a7Smrg if test "$GXX" = yes; then 59376aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59386aec45a7Smrg else 59396aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59406aec45a7Smrg fi 5941ab47cfaaSmrg 59426aec45a7Smrg if test "$GXX" = yes; then 59436aec45a7Smrg # Set up default GNU C++ configuration 5944ab47cfaaSmrg 59456aec45a7Smrg LT_PATH_LD 5946ab47cfaaSmrg 59476aec45a7Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59486aec45a7Smrg # archiving commands below assume that GNU ld is being used. 59496aec45a7Smrg if test "$with_gnu_ld" = yes; then 5950aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5951aa9e3350Smrg _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' 5952ab47cfaaSmrg 59536aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59546aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5955ab47cfaaSmrg 59566aec45a7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 59576aec45a7Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59586aec45a7Smrg # investigate it a little bit more. (MM) 59596aec45a7Smrg wlarc='${wl}' 5960ab47cfaaSmrg 59616aec45a7Smrg # ancient GNU ld didn't support --whole-archive et. al. 59626aec45a7Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59636aec45a7Smrg $GREP 'no-whole-archive' > /dev/null; then 59646aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59656aec45a7Smrg else 59666aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59676aec45a7Smrg fi 59686aec45a7Smrg else 59696aec45a7Smrg with_gnu_ld=no 59706aec45a7Smrg wlarc= 59716aec45a7Smrg 59726aec45a7Smrg # A generic and very simple default shared library creation 59736aec45a7Smrg # command for GNU C++ for the case where it uses the native 59746aec45a7Smrg # linker, instead of GNU ld. If possible, this setting should 59756aec45a7Smrg # overridden to take advantage of the native linker features on 59766aec45a7Smrg # the platform it is being used on. 59776aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59786aec45a7Smrg fi 5979ab47cfaaSmrg 59806aec45a7Smrg # Commands to make compiler produce verbose output that lists 59816aec45a7Smrg # what "hidden" libraries, object files and flags are used when 59826aec45a7Smrg # linking a shared library. 59836aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5984ab47cfaaSmrg 59856aec45a7Smrg else 59866aec45a7Smrg GXX=no 59876aec45a7Smrg with_gnu_ld=no 59886aec45a7Smrg wlarc= 59896aec45a7Smrg fi 5990ab47cfaaSmrg 59916aec45a7Smrg # PORTME: fill in a description of your system's C++ link characteristics 59926aec45a7Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59936aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59946aec45a7Smrg case $host_os in 59956aec45a7Smrg aix3*) 59966aec45a7Smrg # FIXME: insert proper C++ library support 59976aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59986aec45a7Smrg ;; 59996aec45a7Smrg aix[[4-9]]*) 60006aec45a7Smrg if test "$host_cpu" = ia64; then 60016aec45a7Smrg # On IA64, the linker does run time linking by default, so we don't 60026aec45a7Smrg # have to do anything special. 60036aec45a7Smrg aix_use_runtimelinking=no 60046aec45a7Smrg exp_sym_flag='-Bexport' 60056aec45a7Smrg no_entry_flag="" 60066aec45a7Smrg else 60076aec45a7Smrg aix_use_runtimelinking=no 60086aec45a7Smrg 60096aec45a7Smrg # Test if we are trying to use run time linking or normal 60106aec45a7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60116aec45a7Smrg # need to do runtime linking. 60126aec45a7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60136aec45a7Smrg for ld_flag in $LDFLAGS; do 60146aec45a7Smrg case $ld_flag in 60156aec45a7Smrg *-brtl*) 60166aec45a7Smrg aix_use_runtimelinking=yes 60176aec45a7Smrg break 60186aec45a7Smrg ;; 60196aec45a7Smrg esac 60206aec45a7Smrg done 60216aec45a7Smrg ;; 60226aec45a7Smrg esac 6023ab47cfaaSmrg 60246aec45a7Smrg exp_sym_flag='-bexport' 60256aec45a7Smrg no_entry_flag='-bnoentry' 60266aec45a7Smrg fi 6027ab47cfaaSmrg 60286aec45a7Smrg # When large executables or shared objects are built, AIX ld can 60296aec45a7Smrg # have problems creating the table of contents. If linking a library 60306aec45a7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60316aec45a7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60326aec45a7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60336aec45a7Smrg 60346aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='' 60356aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60366aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60376aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60386aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60396aec45a7Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60406aec45a7Smrg 60416aec45a7Smrg if test "$GXX" = yes; then 60426aec45a7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60436aec45a7Smrg # We only want to do this on AIX 4.2 and lower, the check 60446aec45a7Smrg # below for broken collect2 doesn't work under 4.3+ 60456aec45a7Smrg collect2name=`${CC} -print-prog-name=collect2` 60466aec45a7Smrg if test -f "$collect2name" && 60476aec45a7Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60486aec45a7Smrg then 60496aec45a7Smrg # We have reworked collect2 60506aec45a7Smrg : 60516aec45a7Smrg else 60526aec45a7Smrg # We have old collect2 60536aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60546aec45a7Smrg # It fails to find uninstalled libraries when the uninstalled 60556aec45a7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 60566aec45a7Smrg # to unsupported forces relinking 60576aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60586aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60596aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60606aec45a7Smrg fi 60616aec45a7Smrg esac 60626aec45a7Smrg shared_flag='-shared' 60636aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 60646aec45a7Smrg shared_flag="$shared_flag "'${wl}-G' 60656aec45a7Smrg fi 60666aec45a7Smrg else 60676aec45a7Smrg # not using gcc 60686aec45a7Smrg if test "$host_cpu" = ia64; then 60696aec45a7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60706aec45a7Smrg # chokes on -Wl,-G. The following line is correct: 60716aec45a7Smrg shared_flag='-G' 60726aec45a7Smrg else 60736aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 60746aec45a7Smrg shared_flag='${wl}-G' 60756aec45a7Smrg else 60766aec45a7Smrg shared_flag='${wl}-bM:SRE' 60776aec45a7Smrg fi 60786aec45a7Smrg fi 60796aec45a7Smrg fi 6080ab47cfaaSmrg 60816aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60826aec45a7Smrg # It seems that -bexpall does not export symbols beginning with 60836aec45a7Smrg # underscore (_), so it is better to generate a list of symbols to 60846aec45a7Smrg # export. 60856aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60866aec45a7Smrg if test "$aix_use_runtimelinking" = yes; then 60876aec45a7Smrg # Warning - without using the other runtime loading flags (-brtl), 60886aec45a7Smrg # -berok will link without error, but may produce a broken library. 60896aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60906aec45a7Smrg # Determine the default libpath from the value encoded in an empty 60916aec45a7Smrg # executable. 6092aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60936aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60946aec45a7Smrg 60956aec45a7Smrg _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" 60966aec45a7Smrg else 60976aec45a7Smrg if test "$host_cpu" = ia64; then 60986aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60996aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61006aec45a7Smrg _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" 61016aec45a7Smrg else 61026aec45a7Smrg # Determine the default libpath from the value encoded in an 61036aec45a7Smrg # empty executable. 6104aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 61056aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61066aec45a7Smrg # Warning - without using the other run time loading flags, 61076aec45a7Smrg # -berok will link without error, but may produce a broken library. 61086aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61096aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61106aec45a7Smrg if test "$with_gnu_ld" = yes; then 61116aec45a7Smrg # We only use this code for GNU lds that support --whole-archive. 61126aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61136aec45a7Smrg else 61146aec45a7Smrg # Exported symbols can be pulled into shared objects from archives 61156aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61166aec45a7Smrg fi 61176aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61186aec45a7Smrg # This is similar to how AIX traditionally builds its shared 61196aec45a7Smrg # libraries. 61206aec45a7Smrg _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' 61216aec45a7Smrg fi 61226aec45a7Smrg fi 61236aec45a7Smrg ;; 6124ab47cfaaSmrg 61256aec45a7Smrg beos*) 61266aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61276aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61286aec45a7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61296aec45a7Smrg # support --undefined. This deserves some investigation. FIXME 61306aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61316aec45a7Smrg else 61326aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61336aec45a7Smrg fi 61346aec45a7Smrg ;; 6135ab47cfaaSmrg 61366aec45a7Smrg chorus*) 61376aec45a7Smrg case $cc_basename in 61386aec45a7Smrg *) 61396aec45a7Smrg # FIXME: insert proper C++ library support 61406aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61416aec45a7Smrg ;; 61426aec45a7Smrg esac 61436aec45a7Smrg ;; 6144ab47cfaaSmrg 61456aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 6146aa9e3350Smrg case $GXX,$cc_basename in 6147aa9e3350Smrg ,cl* | no,cl*) 6148aa9e3350Smrg # Native MSVC 6149aa9e3350Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6150aa9e3350Smrg # no search path for DLLs. 6151aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6152aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6153aa9e3350Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6154aa9e3350Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6155aa9e3350Smrg # Tell ltmain to make .lib files, not .a files. 6156aa9e3350Smrg libext=lib 6157aa9e3350Smrg # Tell ltmain to make .dll files, not .so files. 6158aa9e3350Smrg shrext_cmds=".dll" 6159aa9e3350Smrg # FIXME: Setting linknames here is a bad hack. 6160aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6161aa9e3350Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6162aa9e3350Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6163aa9e3350Smrg else 6164aa9e3350Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6165aa9e3350Smrg fi~ 6166aa9e3350Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6167aa9e3350Smrg linknames=' 6168aa9e3350Smrg # The linker will not automatically build a static lib if we build a DLL. 6169aa9e3350Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6170aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6171aa9e3350Smrg # Don't use ranlib 6172aa9e3350Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6173aa9e3350Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6174aa9e3350Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6175aa9e3350Smrg case $lt_outputfile in 6176aa9e3350Smrg *.exe|*.EXE) ;; 6177aa9e3350Smrg *) 6178aa9e3350Smrg lt_outputfile="$lt_outputfile.exe" 6179aa9e3350Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6180aa9e3350Smrg ;; 6181aa9e3350Smrg esac~ 6182aa9e3350Smrg func_to_tool_file "$lt_outputfile"~ 6183aa9e3350Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6184aa9e3350Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6185aa9e3350Smrg $RM "$lt_outputfile.manifest"; 6186aa9e3350Smrg fi' 6187aa9e3350Smrg ;; 6188aa9e3350Smrg *) 6189aa9e3350Smrg # g++ 6190aa9e3350Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6191aa9e3350Smrg # as there is no search path for DLLs. 6192aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6193aa9e3350Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6194aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6195aa9e3350Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6196aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6197aa9e3350Smrg 6198aa9e3350Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6199aa9e3350Smrg _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' 6200aa9e3350Smrg # If the export-symbols file already is a .def file (1st line 6201aa9e3350Smrg # is EXPORTS), use it as is; otherwise, prepend... 6202aa9e3350Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6203aa9e3350Smrg cp $export_symbols $output_objdir/$soname.def; 6204aa9e3350Smrg else 6205aa9e3350Smrg echo EXPORTS > $output_objdir/$soname.def; 6206aa9e3350Smrg cat $export_symbols >> $output_objdir/$soname.def; 6207aa9e3350Smrg fi~ 6208aa9e3350Smrg $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' 6209aa9e3350Smrg else 6210aa9e3350Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6211aa9e3350Smrg fi 6212aa9e3350Smrg ;; 6213aa9e3350Smrg esac 6214aa9e3350Smrg ;; 62156aec45a7Smrg darwin* | rhapsody*) 62166aec45a7Smrg _LT_DARWIN_LINKER_FEATURES($1) 62176aec45a7Smrg ;; 6218ab47cfaaSmrg 62196aec45a7Smrg dgux*) 62206aec45a7Smrg case $cc_basename in 62216aec45a7Smrg ec++*) 62226aec45a7Smrg # FIXME: insert proper C++ library support 62236aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62246aec45a7Smrg ;; 62256aec45a7Smrg ghcx*) 62266aec45a7Smrg # Green Hills C++ Compiler 62276aec45a7Smrg # FIXME: insert proper C++ library support 62286aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62296aec45a7Smrg ;; 62306aec45a7Smrg *) 62316aec45a7Smrg # FIXME: insert proper C++ library support 62326aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62336aec45a7Smrg ;; 62346aec45a7Smrg esac 62356aec45a7Smrg ;; 6236ab47cfaaSmrg 6237aa9e3350Smrg freebsd2.*) 62386aec45a7Smrg # C++ shared libraries reported to be fairly broken before 62396aec45a7Smrg # switch to ELF 62406aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62416aec45a7Smrg ;; 6242ab47cfaaSmrg 62436aec45a7Smrg freebsd-elf*) 62446aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62456aec45a7Smrg ;; 6246ab47cfaaSmrg 62476aec45a7Smrg freebsd* | dragonfly*) 62486aec45a7Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62496aec45a7Smrg # conventions 62506aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 62516aec45a7Smrg ;; 6252ab47cfaaSmrg 62536aec45a7Smrg haiku*) 62546aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62556aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62566aec45a7Smrg ;; 6257ab47cfaaSmrg 62586aec45a7Smrg hpux9*) 62596aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62606aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62616aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62626aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62636aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62646aec45a7Smrg # but as the default 62656aec45a7Smrg # location of the library. 62666aec45a7Smrg 62676aec45a7Smrg case $cc_basename in 62686aec45a7Smrg CC*) 62696aec45a7Smrg # FIXME: insert proper C++ library support 62706aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62716aec45a7Smrg ;; 62726aec45a7Smrg aCC*) 62736aec45a7Smrg _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' 62746aec45a7Smrg # Commands to make compiler produce verbose output that lists 62756aec45a7Smrg # what "hidden" libraries, object files and flags are used when 62766aec45a7Smrg # linking a shared library. 62776aec45a7Smrg # 62786aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 62796aec45a7Smrg # explicitly linking system object files so we need to strip them 62806aec45a7Smrg # from the output so that they don't get included in the library 62816aec45a7Smrg # dependencies. 62826aec45a7Smrg 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"' 62836aec45a7Smrg ;; 62846aec45a7Smrg *) 62856aec45a7Smrg if test "$GXX" = yes; then 6286aa9e3350Smrg _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' 62876aec45a7Smrg else 62886aec45a7Smrg # FIXME: insert proper C++ library support 62896aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62906aec45a7Smrg fi 62916aec45a7Smrg ;; 62926aec45a7Smrg esac 62936aec45a7Smrg ;; 6294ab47cfaaSmrg 62956aec45a7Smrg hpux10*|hpux11*) 62966aec45a7Smrg if test $with_gnu_ld = no; then 62976aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62986aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62996aec45a7Smrg 63006aec45a7Smrg case $host_cpu in 63016aec45a7Smrg hppa*64*|ia64*) 63026aec45a7Smrg ;; 63036aec45a7Smrg *) 63046aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63056aec45a7Smrg ;; 63066aec45a7Smrg esac 63076aec45a7Smrg fi 63086aec45a7Smrg case $host_cpu in 63096aec45a7Smrg hppa*64*|ia64*) 63106aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63116aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63126aec45a7Smrg ;; 63136aec45a7Smrg *) 63146aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63156aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63166aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63176aec45a7Smrg # but as the default 63186aec45a7Smrg # location of the library. 63196aec45a7Smrg ;; 63206aec45a7Smrg esac 63216aec45a7Smrg 63226aec45a7Smrg case $cc_basename in 63236aec45a7Smrg CC*) 63246aec45a7Smrg # FIXME: insert proper C++ library support 63256aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63266aec45a7Smrg ;; 63276aec45a7Smrg aCC*) 63286aec45a7Smrg case $host_cpu in 63296aec45a7Smrg hppa*64*) 63306aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63316aec45a7Smrg ;; 63326aec45a7Smrg ia64*) 63336aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63346aec45a7Smrg ;; 63356aec45a7Smrg *) 63366aec45a7Smrg _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' 63376aec45a7Smrg ;; 63386aec45a7Smrg esac 63396aec45a7Smrg # Commands to make compiler produce verbose output that lists 63406aec45a7Smrg # what "hidden" libraries, object files and flags are used when 63416aec45a7Smrg # linking a shared library. 63426aec45a7Smrg # 63436aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 63446aec45a7Smrg # explicitly linking system object files so we need to strip them 63456aec45a7Smrg # from the output so that they don't get included in the library 63466aec45a7Smrg # dependencies. 63476aec45a7Smrg 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"' 63486aec45a7Smrg ;; 63496aec45a7Smrg *) 63506aec45a7Smrg if test "$GXX" = yes; then 63516aec45a7Smrg if test $with_gnu_ld = no; then 63526aec45a7Smrg case $host_cpu in 63536aec45a7Smrg hppa*64*) 63546aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63556aec45a7Smrg ;; 63566aec45a7Smrg ia64*) 6357aa9e3350Smrg _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' 63586aec45a7Smrg ;; 63596aec45a7Smrg *) 6360aa9e3350Smrg _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' 63616aec45a7Smrg ;; 63626aec45a7Smrg esac 63636aec45a7Smrg fi 63646aec45a7Smrg else 63656aec45a7Smrg # FIXME: insert proper C++ library support 63666aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63676aec45a7Smrg fi 63686aec45a7Smrg ;; 63696aec45a7Smrg esac 63706aec45a7Smrg ;; 6371ab47cfaaSmrg 63726aec45a7Smrg interix[[3-9]]*) 63736aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63746aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63756aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63766aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63776aec45a7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63786aec45a7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63796aec45a7Smrg # default) and relocated if they conflict, which is a slow very memory 63806aec45a7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 63816aec45a7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63826aec45a7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63836aec45a7Smrg _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' 63846aec45a7Smrg _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' 63856aec45a7Smrg ;; 63866aec45a7Smrg irix5* | irix6*) 63876aec45a7Smrg case $cc_basename in 63886aec45a7Smrg CC*) 63896aec45a7Smrg # SGI C++ 63906aec45a7Smrg _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' 63916aec45a7Smrg 63926aec45a7Smrg # Archives containing C++ object files must be created using 63936aec45a7Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63946aec45a7Smrg # necessary to make sure instantiated templates are included 63956aec45a7Smrg # in the archive. 63966aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63976aec45a7Smrg ;; 63986aec45a7Smrg *) 63996aec45a7Smrg if test "$GXX" = yes; then 64006aec45a7Smrg if test "$with_gnu_ld" = no; then 6401aa9e3350Smrg _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' 64026aec45a7Smrg else 6403aa9e3350Smrg _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' 64046aec45a7Smrg fi 64056aec45a7Smrg fi 64066aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64076aec45a7Smrg ;; 64086aec45a7Smrg esac 64096aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64106aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64116aec45a7Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64126aec45a7Smrg ;; 6413ab47cfaaSmrg 641438770048Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 64156aec45a7Smrg case $cc_basename in 64166aec45a7Smrg KCC*) 64176aec45a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6418ab47cfaaSmrg 64196aec45a7Smrg # KCC will only create a shared library if the output file 64206aec45a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64216aec45a7Smrg # to its proper name (with version) after linking. 64226aec45a7Smrg _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' 64236aec45a7Smrg _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' 64246aec45a7Smrg # Commands to make compiler produce verbose output that lists 64256aec45a7Smrg # what "hidden" libraries, object files and flags are used when 64266aec45a7Smrg # linking a shared library. 64276aec45a7Smrg # 64286aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 64296aec45a7Smrg # explicitly linking system object files so we need to strip them 64306aec45a7Smrg # from the output so that they don't get included in the library 64316aec45a7Smrg # dependencies. 64326aec45a7Smrg 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"' 64336aec45a7Smrg 64346aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64356aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64366aec45a7Smrg 64376aec45a7Smrg # Archives containing C++ object files must be created using 64386aec45a7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64396aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64406aec45a7Smrg ;; 64416aec45a7Smrg icpc* | ecpc* ) 64426aec45a7Smrg # Intel C++ 64436aec45a7Smrg with_gnu_ld=yes 64446aec45a7Smrg # version 8.0 and above of icpc choke on multiply defined symbols 64456aec45a7Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64466aec45a7Smrg # earlier do not add the objects themselves. 64476aec45a7Smrg case `$CC -V 2>&1` in 64486aec45a7Smrg *"Version 7."*) 64496aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64506aec45a7Smrg _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' 64516aec45a7Smrg ;; 64526aec45a7Smrg *) # Version 8.0 or newer 64536aec45a7Smrg tmp_idyn= 64546aec45a7Smrg case $host_cpu in 64556aec45a7Smrg ia64*) tmp_idyn=' -i_dynamic';; 64566aec45a7Smrg esac 64576aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64586aec45a7Smrg _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' 64596aec45a7Smrg ;; 64606aec45a7Smrg esac 64616aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64626aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64636aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64646aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64656aec45a7Smrg ;; 64666aec45a7Smrg pgCC* | pgcpp*) 64676aec45a7Smrg # Portland Group C++ compiler 64686aec45a7Smrg case `$CC -V` in 64696aec45a7Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64706aec45a7Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64716aec45a7Smrg rm -rf $tpldir~ 64726aec45a7Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 64736aec45a7Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64746aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64756aec45a7Smrg rm -rf $tpldir~ 64766aec45a7Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 64776aec45a7Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64786aec45a7Smrg $RANLIB $oldlib' 64796aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64806aec45a7Smrg rm -rf $tpldir~ 64816aec45a7Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64826aec45a7Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64836aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64846aec45a7Smrg rm -rf $tpldir~ 64856aec45a7Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 64866aec45a7Smrg $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' 64876aec45a7Smrg ;; 64886aec45a7Smrg *) # Version 6 and above use weak symbols 64896aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64906aec45a7Smrg _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' 64916aec45a7Smrg ;; 64926aec45a7Smrg esac 6493ab47cfaaSmrg 64946aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64956aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64966aec45a7Smrg _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' 64976aec45a7Smrg ;; 64986aec45a7Smrg cxx*) 64996aec45a7Smrg # Compaq C++ 65006aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 65016aec45a7Smrg _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' 6502ab47cfaaSmrg 65036aec45a7Smrg runpath_var=LD_RUN_PATH 65046aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65056aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6506ab47cfaaSmrg 65076aec45a7Smrg # Commands to make compiler produce verbose output that lists 65086aec45a7Smrg # what "hidden" libraries, object files and flags are used when 65096aec45a7Smrg # linking a shared library. 65106aec45a7Smrg # 65116aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 65126aec45a7Smrg # explicitly linking system object files so we need to strip them 65136aec45a7Smrg # from the output so that they don't get included in the library 65146aec45a7Smrg # dependencies. 65156aec45a7Smrg 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' 65166aec45a7Smrg ;; 65176aec45a7Smrg xl* | mpixl* | bgxl*) 65186aec45a7Smrg # IBM XL 8.0 on PPC, with GNU ld 65196aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65206aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65216aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65226aec45a7Smrg if test "x$supports_anon_versioning" = xyes; then 65236aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65246aec45a7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65256aec45a7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65266aec45a7Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65276aec45a7Smrg fi 65286aec45a7Smrg ;; 65296aec45a7Smrg *) 65306aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 65316aec45a7Smrg *Sun\ C*) 65326aec45a7Smrg # Sun C++ 5.9 65336aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65346aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65356aec45a7Smrg _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' 65366aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65376aec45a7Smrg _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' 65386aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65396aec45a7Smrg 65406aec45a7Smrg # Not sure whether something based on 65416aec45a7Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65426aec45a7Smrg # would be better. 65436aec45a7Smrg output_verbose_link_cmd='func_echo_all' 65446aec45a7Smrg 65456aec45a7Smrg # Archives containing C++ object files must be created using 65466aec45a7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65476aec45a7Smrg # necessary to make sure instantiated templates are included 65486aec45a7Smrg # in the archive. 65496aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65506aec45a7Smrg ;; 65516aec45a7Smrg esac 65526aec45a7Smrg ;; 65536aec45a7Smrg esac 65546aec45a7Smrg ;; 6555ab47cfaaSmrg 65566aec45a7Smrg lynxos*) 65576aec45a7Smrg # FIXME: insert proper C++ library support 65586aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65596aec45a7Smrg ;; 6560ab47cfaaSmrg 65616aec45a7Smrg m88k*) 65626aec45a7Smrg # FIXME: insert proper C++ library support 65636aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65646aec45a7Smrg ;; 6565ab47cfaaSmrg 65666aec45a7Smrg mvs*) 65676aec45a7Smrg case $cc_basename in 65686aec45a7Smrg cxx*) 65696aec45a7Smrg # FIXME: insert proper C++ library support 65706aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65716aec45a7Smrg ;; 65726aec45a7Smrg *) 65736aec45a7Smrg # FIXME: insert proper C++ library support 65746aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65756aec45a7Smrg ;; 65766aec45a7Smrg esac 65776aec45a7Smrg ;; 6578ab47cfaaSmrg 65796aec45a7Smrg netbsd*) 65806aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65816aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65826aec45a7Smrg wlarc= 65836aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65846aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65856aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65866aec45a7Smrg fi 65876aec45a7Smrg # Workaround some broken pre-1.5 toolchains 65886aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65896aec45a7Smrg ;; 6590ab47cfaaSmrg 65916aec45a7Smrg *nto* | *qnx*) 65926aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 65936aec45a7Smrg ;; 6594ab47cfaaSmrg 65956aec45a7Smrg openbsd2*) 65966aec45a7Smrg # C++ shared libraries are fairly broken 65976aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65986aec45a7Smrg ;; 6599ab47cfaaSmrg 66006aec45a7Smrg openbsd*) 66016aec45a7Smrg if test -f /usr/libexec/ld.so; then 66026aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66036aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66046aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 66056aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 66066aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66076aec45a7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 66086aec45a7Smrg _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' 66096aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66106aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66116aec45a7Smrg fi 66126aec45a7Smrg output_verbose_link_cmd=func_echo_all 66136aec45a7Smrg else 66146aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66156aec45a7Smrg fi 66166aec45a7Smrg ;; 6617ab47cfaaSmrg 66186aec45a7Smrg osf3* | osf4* | osf5*) 66196aec45a7Smrg case $cc_basename in 66206aec45a7Smrg KCC*) 66216aec45a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66226aec45a7Smrg 66236aec45a7Smrg # KCC will only create a shared library if the output file 66246aec45a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66256aec45a7Smrg # to its proper name (with version) after linking. 66266aec45a7Smrg _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' 66276aec45a7Smrg 66286aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66296aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66306aec45a7Smrg 66316aec45a7Smrg # Archives containing C++ object files must be created using 66326aec45a7Smrg # the KAI C++ compiler. 66336aec45a7Smrg case $host in 66346aec45a7Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66356aec45a7Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66366aec45a7Smrg esac 66376aec45a7Smrg ;; 66386aec45a7Smrg RCC*) 66396aec45a7Smrg # Rational C++ 2.4.1 66406aec45a7Smrg # FIXME: insert proper C++ library support 66416aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66426aec45a7Smrg ;; 66436aec45a7Smrg cxx*) 66446aec45a7Smrg case $host in 66456aec45a7Smrg osf3*) 66466aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66476aec45a7Smrg _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' 66486aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66496aec45a7Smrg ;; 66506aec45a7Smrg *) 66516aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 66526aec45a7Smrg _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' 66536aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66546aec45a7Smrg echo "-hidden">> $lib.exp~ 66556aec45a7Smrg $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~ 66566aec45a7Smrg $RM $lib.exp' 66576aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66586aec45a7Smrg ;; 66596aec45a7Smrg esac 6660ab47cfaaSmrg 66616aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6662ab47cfaaSmrg 66636aec45a7Smrg # Commands to make compiler produce verbose output that lists 66646aec45a7Smrg # what "hidden" libraries, object files and flags are used when 66656aec45a7Smrg # linking a shared library. 66666aec45a7Smrg # 66676aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 66686aec45a7Smrg # explicitly linking system object files so we need to strip them 66696aec45a7Smrg # from the output so that they don't get included in the library 66706aec45a7Smrg # dependencies. 66716aec45a7Smrg 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"' 66726aec45a7Smrg ;; 66736aec45a7Smrg *) 66746aec45a7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66756aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66766aec45a7Smrg case $host in 66776aec45a7Smrg osf3*) 66786aec45a7Smrg _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' 66796aec45a7Smrg ;; 66806aec45a7Smrg *) 6681aa9e3350Smrg _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' 66826aec45a7Smrg ;; 66836aec45a7Smrg esac 66846aec45a7Smrg 66856aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66866aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66876aec45a7Smrg 66886aec45a7Smrg # Commands to make compiler produce verbose output that lists 66896aec45a7Smrg # what "hidden" libraries, object files and flags are used when 66906aec45a7Smrg # linking a shared library. 66916aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66926aec45a7Smrg 66936aec45a7Smrg else 66946aec45a7Smrg # FIXME: insert proper C++ library support 66956aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66966aec45a7Smrg fi 66976aec45a7Smrg ;; 66986aec45a7Smrg esac 66996aec45a7Smrg ;; 6700ab47cfaaSmrg 67016aec45a7Smrg psos*) 67026aec45a7Smrg # FIXME: insert proper C++ library support 67036aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67046aec45a7Smrg ;; 6705ab47cfaaSmrg 67066aec45a7Smrg sunos4*) 67076aec45a7Smrg case $cc_basename in 67086aec45a7Smrg CC*) 67096aec45a7Smrg # Sun C++ 4.x 67106aec45a7Smrg # FIXME: insert proper C++ library support 67116aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67126aec45a7Smrg ;; 67136aec45a7Smrg lcc*) 67146aec45a7Smrg # Lucid 67156aec45a7Smrg # FIXME: insert proper C++ library support 67166aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67176aec45a7Smrg ;; 67186aec45a7Smrg *) 67196aec45a7Smrg # FIXME: insert proper C++ library support 67206aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67216aec45a7Smrg ;; 67226aec45a7Smrg esac 67236aec45a7Smrg ;; 6724ab47cfaaSmrg 67256aec45a7Smrg solaris*) 67266aec45a7Smrg case $cc_basename in 67276aec45a7Smrg CC* | sunCC*) 67286aec45a7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 67296aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67306aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67316aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67326aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67336aec45a7Smrg $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' 67346aec45a7Smrg 67356aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67366aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67376aec45a7Smrg case $host_os in 67386aec45a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67396aec45a7Smrg *) 67406aec45a7Smrg # The compiler driver will combine and reorder linker options, 67416aec45a7Smrg # but understands `-z linker_flag'. 67426aec45a7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67436aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67446aec45a7Smrg ;; 67456aec45a7Smrg esac 67466aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6747ab47cfaaSmrg 67486aec45a7Smrg output_verbose_link_cmd='func_echo_all' 6749ab47cfaaSmrg 67506aec45a7Smrg # Archives containing C++ object files must be created using 67516aec45a7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67526aec45a7Smrg # necessary to make sure instantiated templates are included 67536aec45a7Smrg # in the archive. 67546aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67556aec45a7Smrg ;; 67566aec45a7Smrg gcx*) 67576aec45a7Smrg # Green Hills C++ Compiler 67586aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6759ab47cfaaSmrg 67606aec45a7Smrg # The C++ compiler must be used to create the archive. 67616aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67626aec45a7Smrg ;; 67636aec45a7Smrg *) 67646aec45a7Smrg # GNU C++ compiler with Solaris linker 67656aec45a7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67666aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67676aec45a7Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6768aa9e3350Smrg _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' 67696aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770aa9e3350Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67716aec45a7Smrg 67726aec45a7Smrg # Commands to make compiler produce verbose output that lists 67736aec45a7Smrg # what "hidden" libraries, object files and flags are used when 67746aec45a7Smrg # linking a shared library. 67756aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67766aec45a7Smrg else 67776aec45a7Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67786aec45a7Smrg # platform. 67796aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67806aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67816aec45a7Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67826aec45a7Smrg 67836aec45a7Smrg # Commands to make compiler produce verbose output that lists 67846aec45a7Smrg # what "hidden" libraries, object files and flags are used when 67856aec45a7Smrg # linking a shared library. 67866aec45a7Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67876aec45a7Smrg fi 67886aec45a7Smrg 67896aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67906aec45a7Smrg case $host_os in 67916aec45a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67926aec45a7Smrg *) 67936aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67946aec45a7Smrg ;; 67956aec45a7Smrg esac 67966aec45a7Smrg fi 67976aec45a7Smrg ;; 67986aec45a7Smrg esac 67996aec45a7Smrg ;; 6800ab47cfaaSmrg 68016aec45a7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 68026aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68036aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68046aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68056aec45a7Smrg runpath_var='LD_RUN_PATH' 6806ab47cfaaSmrg 68076aec45a7Smrg case $cc_basename in 68086aec45a7Smrg CC*) 68096aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68106aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68116aec45a7Smrg ;; 68126aec45a7Smrg *) 68136aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68146aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68156aec45a7Smrg ;; 68166aec45a7Smrg esac 68176aec45a7Smrg ;; 6818ab47cfaaSmrg 68196aec45a7Smrg sysv5* | sco3.2v5* | sco5v6*) 68206aec45a7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 68216aec45a7Smrg # link with -lc, and that would cause any symbols used from libc to 68226aec45a7Smrg # always be unresolved, which means just about no library would 68236aec45a7Smrg # ever link correctly. If we're not using GNU ld we use -z text 68246aec45a7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 68256aec45a7Smrg # as -z defs. 68266aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68276aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68286aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68296aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68306aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68316aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68326aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68336aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68346aec45a7Smrg runpath_var='LD_RUN_PATH' 6835ab47cfaaSmrg 68366aec45a7Smrg case $cc_basename in 68376aec45a7Smrg CC*) 68386aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68396aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68406aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 68416aec45a7Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 68426aec45a7Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 68436aec45a7Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68446aec45a7Smrg ;; 68456aec45a7Smrg *) 68466aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68476aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68486aec45a7Smrg ;; 68496aec45a7Smrg esac 68506aec45a7Smrg ;; 6851ab47cfaaSmrg 68526aec45a7Smrg tandem*) 68536aec45a7Smrg case $cc_basename in 68546aec45a7Smrg NCC*) 68556aec45a7Smrg # NonStop-UX NCC 3.20 68566aec45a7Smrg # FIXME: insert proper C++ library support 68576aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68586aec45a7Smrg ;; 68596aec45a7Smrg *) 68606aec45a7Smrg # FIXME: insert proper C++ library support 68616aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68626aec45a7Smrg ;; 68636aec45a7Smrg esac 68646aec45a7Smrg ;; 6865ab47cfaaSmrg 68666aec45a7Smrg vxworks*) 68676aec45a7Smrg # FIXME: insert proper C++ library support 68686aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68696aec45a7Smrg ;; 6870ab47cfaaSmrg 68716aec45a7Smrg *) 68726aec45a7Smrg # FIXME: insert proper C++ library support 68736aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68746aec45a7Smrg ;; 68756aec45a7Smrg esac 6876ab47cfaaSmrg 68776aec45a7Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68786aec45a7Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68796aec45a7Smrg 68806aec45a7Smrg _LT_TAGVAR(GCC, $1)="$GXX" 68816aec45a7Smrg _LT_TAGVAR(LD, $1)="$LD" 68826aec45a7Smrg 68836aec45a7Smrg ## CAVEAT EMPTOR: 68846aec45a7Smrg ## There is no encapsulation within the following macros, do not change 68856aec45a7Smrg ## the running order or otherwise move them around unless you know exactly 68866aec45a7Smrg ## what you are doing... 68876aec45a7Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68886aec45a7Smrg _LT_COMPILER_PIC($1) 68896aec45a7Smrg _LT_COMPILER_C_O($1) 68906aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 68916aec45a7Smrg _LT_LINKER_SHLIBS($1) 68926aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 68936aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68946aec45a7Smrg 68956aec45a7Smrg _LT_CONFIG($1) 68966aec45a7Smrg fi # test -n "$compiler" 68976aec45a7Smrg 68986aec45a7Smrg CC=$lt_save_CC 6899aa9e3350Smrg CFLAGS=$lt_save_CFLAGS 69006aec45a7Smrg LDCXX=$LD 69016aec45a7Smrg LD=$lt_save_LD 69026aec45a7Smrg GCC=$lt_save_GCC 69036aec45a7Smrg with_gnu_ld=$lt_save_with_gnu_ld 69046aec45a7Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 69056aec45a7Smrg lt_cv_path_LD=$lt_save_path_LD 69066aec45a7Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 69076aec45a7Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 69086aec45a7Smrgfi # test "$_lt_caught_CXX_error" != yes 6909ab47cfaaSmrg 69106aec45a7SmrgAC_LANG_POP 69116aec45a7Smrg])# _LT_LANG_CXX_CONFIG 6912ab47cfaaSmrg 6913ab47cfaaSmrg 6914aa9e3350Smrg# _LT_FUNC_STRIPNAME_CNF 6915aa9e3350Smrg# ---------------------- 6916aa9e3350Smrg# func_stripname_cnf prefix suffix name 6917aa9e3350Smrg# strip PREFIX and SUFFIX off of NAME. 6918aa9e3350Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6919aa9e3350Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6920aa9e3350Smrg# dot (in which case that matches only a dot). 6921aa9e3350Smrg# 6922aa9e3350Smrg# This function is identical to the (non-XSI) version of func_stripname, 6923aa9e3350Smrg# except this one can be used by m4 code that may be executed by configure, 6924aa9e3350Smrg# rather than the libtool script. 6925aa9e3350Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6926aa9e3350SmrgAC_REQUIRE([_LT_DECL_SED]) 6927aa9e3350SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6928aa9e3350Smrgfunc_stripname_cnf () 6929aa9e3350Smrg{ 6930aa9e3350Smrg case ${2} in 6931aa9e3350Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6932aa9e3350Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6933aa9e3350Smrg esac 6934aa9e3350Smrg} # func_stripname_cnf 6935aa9e3350Smrg])# _LT_FUNC_STRIPNAME_CNF 6936aa9e3350Smrg 69376aec45a7Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69386aec45a7Smrg# --------------------------------- 69396aec45a7Smrg# Figure out "hidden" library dependencies from verbose 69406aec45a7Smrg# compiler output when linking a shared library. 69416aec45a7Smrg# Parse the compiler output and extract the necessary 69426aec45a7Smrg# objects, libraries and library flags. 69436aec45a7Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69446aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6945aa9e3350SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69466aec45a7Smrg# Dependencies to place before and after the object being linked: 69476aec45a7Smrg_LT_TAGVAR(predep_objects, $1)= 69486aec45a7Smrg_LT_TAGVAR(postdep_objects, $1)= 69496aec45a7Smrg_LT_TAGVAR(predeps, $1)= 69506aec45a7Smrg_LT_TAGVAR(postdeps, $1)= 69516aec45a7Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6952ab47cfaaSmrg 69536aec45a7Smrgdnl we can't use the lt_simple_compile_test_code here, 69546aec45a7Smrgdnl because it contains code intended for an executable, 69556aec45a7Smrgdnl not a library. It's possible we should let each 69566aec45a7Smrgdnl tag define a new lt_????_link_test_code variable, 69576aec45a7Smrgdnl but it's only used here... 69586aec45a7Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69596aec45a7Smrgint a; 69606aec45a7Smrgvoid foo (void) { a = 0; } 69616aec45a7Smrg_LT_EOF 69626aec45a7Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69636aec45a7Smrgclass Foo 69646aec45a7Smrg{ 69656aec45a7Smrgpublic: 69666aec45a7Smrg Foo (void) { a = 0; } 69676aec45a7Smrgprivate: 69686aec45a7Smrg int a; 69696aec45a7Smrg}; 69706aec45a7Smrg_LT_EOF 69716aec45a7Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69726aec45a7Smrg subroutine foo 69736aec45a7Smrg implicit none 69746aec45a7Smrg integer*4 a 69756aec45a7Smrg a=0 69766aec45a7Smrg return 69776aec45a7Smrg end 69786aec45a7Smrg_LT_EOF 69796aec45a7Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69806aec45a7Smrg subroutine foo 69816aec45a7Smrg implicit none 69826aec45a7Smrg integer a 69836aec45a7Smrg a=0 69846aec45a7Smrg return 69856aec45a7Smrg end 69866aec45a7Smrg_LT_EOF 69876aec45a7Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69886aec45a7Smrgpublic class foo { 69896aec45a7Smrg private int a; 69906aec45a7Smrg public void bar (void) { 69916aec45a7Smrg a = 0; 69926aec45a7Smrg } 69936aec45a7Smrg}; 69946aec45a7Smrg_LT_EOF 6995aa9e3350Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6996aa9e3350Smrgpackage foo 6997aa9e3350Smrgfunc foo() { 6998aa9e3350Smrg} 6999aa9e3350Smrg_LT_EOF 70005c42550eSmrg]) 7001aa9e3350Smrg 7002aa9e3350Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7003aa9e3350Smrgcase "$CC $CFLAGS " in #( 7004aa9e3350Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7005aa9e3350Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7006aa9e3350Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7007aa9e3350Smrgesac 7008aa9e3350Smrg 70096aec45a7Smrgdnl Parse the compiler output and extract the necessary 70106aec45a7Smrgdnl objects, libraries and library flags. 70116aec45a7Smrgif AC_TRY_EVAL(ac_compile); then 70126aec45a7Smrg # Parse the compiler output and extract the necessary 70136aec45a7Smrg # objects, libraries and library flags. 7014ab47cfaaSmrg 70156aec45a7Smrg # Sentinel used to keep track of whether or not we are before 70166aec45a7Smrg # the conftest object file. 70176aec45a7Smrg pre_test_object_deps_done=no 70181473d951Smrg 70196aec45a7Smrg for p in `eval "$output_verbose_link_cmd"`; do 7020aa9e3350Smrg case ${prev}${p} in 7021ab47cfaaSmrg 70226aec45a7Smrg -L* | -R* | -l*) 70236aec45a7Smrg # Some compilers place space between "-{L,R}" and the path. 70246aec45a7Smrg # Remove the space. 70256aec45a7Smrg if test $p = "-L" || 70266aec45a7Smrg test $p = "-R"; then 70276aec45a7Smrg prev=$p 70286aec45a7Smrg continue 70296aec45a7Smrg fi 7030ab47cfaaSmrg 7031aa9e3350Smrg # Expand the sysroot to ease extracting the directories later. 7032aa9e3350Smrg if test -z "$prev"; then 7033aa9e3350Smrg case $p in 7034aa9e3350Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7035aa9e3350Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7036aa9e3350Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7037aa9e3350Smrg esac 7038aa9e3350Smrg fi 7039aa9e3350Smrg case $p in 7040aa9e3350Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7041aa9e3350Smrg esac 70426aec45a7Smrg if test "$pre_test_object_deps_done" = no; then 7043aa9e3350Smrg case ${prev} in 7044aa9e3350Smrg -L | -R) 70456aec45a7Smrg # Internal compiler library paths should come after those 70466aec45a7Smrg # provided the user. The postdeps already come after the 70476aec45a7Smrg # user supplied libs so there is no need to process them. 70486aec45a7Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70496aec45a7Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70506aec45a7Smrg else 70516aec45a7Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70526aec45a7Smrg fi 70536aec45a7Smrg ;; 70546aec45a7Smrg # The "-l" case would never come before the object being 70556aec45a7Smrg # linked, so don't bother handling this case. 70566aec45a7Smrg esac 70576aec45a7Smrg else 70586aec45a7Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70596aec45a7Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70606aec45a7Smrg else 70616aec45a7Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70626aec45a7Smrg fi 70636aec45a7Smrg fi 7064aa9e3350Smrg prev= 70656aec45a7Smrg ;; 7066ab47cfaaSmrg 7067aa9e3350Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70686aec45a7Smrg *.$objext) 70696aec45a7Smrg # This assumes that the test object file only shows up 70706aec45a7Smrg # once in the compiler output. 70716aec45a7Smrg if test "$p" = "conftest.$objext"; then 70726aec45a7Smrg pre_test_object_deps_done=yes 70736aec45a7Smrg continue 70746aec45a7Smrg fi 7075ab47cfaaSmrg 70766aec45a7Smrg if test "$pre_test_object_deps_done" = no; then 70776aec45a7Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70786aec45a7Smrg _LT_TAGVAR(predep_objects, $1)="$p" 70796aec45a7Smrg else 70806aec45a7Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70816aec45a7Smrg fi 70826aec45a7Smrg else 70836aec45a7Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70846aec45a7Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 70856aec45a7Smrg else 70866aec45a7Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70876aec45a7Smrg fi 70886aec45a7Smrg fi 70896aec45a7Smrg ;; 7090ab47cfaaSmrg 70916aec45a7Smrg *) ;; # Ignore the rest. 7092ab47cfaaSmrg 70936aec45a7Smrg esac 70946aec45a7Smrg done 7095ab47cfaaSmrg 70966aec45a7Smrg # Clean up. 70976aec45a7Smrg rm -f a.out a.exe 70986aec45a7Smrgelse 70996aec45a7Smrg echo "libtool.m4: error: problem compiling $1 test program" 71006aec45a7Smrgfi 71011473d951Smrg 71026aec45a7Smrg$RM -f confest.$objext 7103aa9e3350SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7104ab47cfaaSmrg 71056aec45a7Smrg# PORTME: override above test on systems where it is broken 71066aec45a7Smrgm4_if([$1], [CXX], 71076aec45a7Smrg[case $host_os in 71086aec45a7Smrginterix[[3-9]]*) 71096aec45a7Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71106aec45a7Smrg # hack all around it, let's just trust "g++" to DTRT. 71116aec45a7Smrg _LT_TAGVAR(predep_objects,$1)= 71126aec45a7Smrg _LT_TAGVAR(postdep_objects,$1)= 71136aec45a7Smrg _LT_TAGVAR(postdeps,$1)= 71145c42550eSmrg ;; 71156aec45a7Smrg 71166aec45a7Smrglinux*) 71176aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 71186aec45a7Smrg *Sun\ C*) 71196aec45a7Smrg # Sun C++ 5.9 71206aec45a7Smrg 71216aec45a7Smrg # The more standards-conforming stlport4 library is 71226aec45a7Smrg # incompatible with the Cstd library. Avoid specifying 71236aec45a7Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71246aec45a7Smrg # -library=stlport4 depends on it. 71256aec45a7Smrg case " $CXX $CXXFLAGS " in 71266aec45a7Smrg *" -library=stlport4 "*) 71276aec45a7Smrg solaris_use_stlport4=yes 71286aec45a7Smrg ;; 71296aec45a7Smrg esac 71306aec45a7Smrg 71316aec45a7Smrg if test "$solaris_use_stlport4" != yes; then 71326aec45a7Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71336aec45a7Smrg fi 71346aec45a7Smrg ;; 71356aec45a7Smrg esac 71365c42550eSmrg ;; 71376aec45a7Smrg 71385c42550eSmrgsolaris*) 71396aec45a7Smrg case $cc_basename in 71406aec45a7Smrg CC* | sunCC*) 71416aec45a7Smrg # The more standards-conforming stlport4 library is 71426aec45a7Smrg # incompatible with the Cstd library. Avoid specifying 71436aec45a7Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71446aec45a7Smrg # -library=stlport4 depends on it. 71456aec45a7Smrg case " $CXX $CXXFLAGS " in 71466aec45a7Smrg *" -library=stlport4 "*) 71476aec45a7Smrg solaris_use_stlport4=yes 71486aec45a7Smrg ;; 71496aec45a7Smrg esac 71501473d951Smrg 71516aec45a7Smrg # Adding this requires a known-good setup of shared libraries for 71526aec45a7Smrg # Sun compiler versions before 5.6, else PIC objects from an old 71536aec45a7Smrg # archive will be linked into the output, leading to subtle bugs. 71546aec45a7Smrg if test "$solaris_use_stlport4" != yes; then 71556aec45a7Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71566aec45a7Smrg fi 71576aec45a7Smrg ;; 71586aec45a7Smrg esac 71595c42550eSmrg ;; 71605c42550eSmrgesac 71616aec45a7Smrg]) 71621473d951Smrg 71636aec45a7Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 71646aec45a7Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71655c42550eSmrgesac 71666aec45a7Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71676aec45a7Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71686aec45a7Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71696aec45a7Smrgfi 71706aec45a7Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71716aec45a7Smrg [The directories searched by this compiler when creating a shared library]) 71726aec45a7Smrg_LT_TAGDECL([], [predep_objects], [1], 71736aec45a7Smrg [Dependencies to place before and after the objects being linked to 71746aec45a7Smrg create a shared library]) 71756aec45a7Smrg_LT_TAGDECL([], [postdep_objects], [1]) 71766aec45a7Smrg_LT_TAGDECL([], [predeps], [1]) 71776aec45a7Smrg_LT_TAGDECL([], [postdeps], [1]) 71786aec45a7Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71796aec45a7Smrg [The library search path used internally by the compiler when linking 71806aec45a7Smrg a shared library]) 71816aec45a7Smrg])# _LT_SYS_HIDDEN_LIBDEPS 71826aec45a7Smrg 71836aec45a7Smrg 71846aec45a7Smrg# _LT_LANG_F77_CONFIG([TAG]) 71856aec45a7Smrg# -------------------------- 71866aec45a7Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 71876aec45a7Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71886aec45a7Smrg# to write the compiler configuration to `libtool'. 71896aec45a7Smrgm4_defun([_LT_LANG_F77_CONFIG], 71906aec45a7Smrg[AC_LANG_PUSH(Fortran 77) 71916aec45a7Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 71926aec45a7Smrg _lt_disable_F77=yes 71936aec45a7Smrgfi 7194ab47cfaaSmrg 71956aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71966aec45a7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 71976aec45a7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 71986aec45a7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71996aec45a7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 72006aec45a7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 72016aec45a7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 72026aec45a7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 72036aec45a7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 72046aec45a7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 72056aec45a7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 72066aec45a7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 72076aec45a7Smrg_LT_TAGVAR(module_cmds, $1)= 72086aec45a7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 72096aec45a7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 72106aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 72116aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 72126aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72136aec45a7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 72146aec45a7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72156aec45a7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7216ab47cfaaSmrg 72176aec45a7Smrg# Source file extension for f77 test sources. 72186aec45a7Smrgac_ext=f 7219ab47cfaaSmrg 72206aec45a7Smrg# Object file extension for compiled f77 test sources. 72216aec45a7Smrgobjext=o 72226aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 72236aec45a7Smrg 72246aec45a7Smrg# No sense in running all these tests if we already determined that 72256aec45a7Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 72266aec45a7Smrg# are currently assumed to apply to all compilers on this platform, 72276aec45a7Smrg# and will be corrupted by setting them based on a non-working compiler. 72286aec45a7Smrgif test "$_lt_disable_F77" != yes; then 72296aec45a7Smrg # Code to be used in simple compile tests 72306aec45a7Smrg lt_simple_compile_test_code="\ 72316aec45a7Smrg subroutine t 72326aec45a7Smrg return 72336aec45a7Smrg end 72346aec45a7Smrg" 72351473d951Smrg 72366aec45a7Smrg # Code to be used in simple link tests 72376aec45a7Smrg lt_simple_link_test_code="\ 72386aec45a7Smrg program t 72396aec45a7Smrg end 72406aec45a7Smrg" 72411473d951Smrg 72426aec45a7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72436aec45a7Smrg _LT_TAG_COMPILER 72441473d951Smrg 72456aec45a7Smrg # save warnings/boilerplate of simple test code 72466aec45a7Smrg _LT_COMPILER_BOILERPLATE 72476aec45a7Smrg _LT_LINKER_BOILERPLATE 7248ab47cfaaSmrg 72496aec45a7Smrg # Allow CC to be a program name with arguments. 72506aec45a7Smrg lt_save_CC="$CC" 72516aec45a7Smrg lt_save_GCC=$GCC 7252aa9e3350Smrg lt_save_CFLAGS=$CFLAGS 72536aec45a7Smrg CC=${F77-"f77"} 7254aa9e3350Smrg CFLAGS=$FFLAGS 72556aec45a7Smrg compiler=$CC 72566aec45a7Smrg _LT_TAGVAR(compiler, $1)=$CC 72576aec45a7Smrg _LT_CC_BASENAME([$compiler]) 72586aec45a7Smrg GCC=$G77 72596aec45a7Smrg if test -n "$compiler"; then 72606aec45a7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72616aec45a7Smrg AC_MSG_RESULT([$can_build_shared]) 72621473d951Smrg 72636aec45a7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 72646aec45a7Smrg test "$can_build_shared" = "no" && enable_shared=no 72651473d951Smrg 72666aec45a7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 72676aec45a7Smrg # are all built from PIC. 72686aec45a7Smrg case $host_os in 72696aec45a7Smrg aix3*) 72706aec45a7Smrg test "$enable_shared" = yes && enable_static=no 72716aec45a7Smrg if test -n "$RANLIB"; then 72726aec45a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72736aec45a7Smrg postinstall_cmds='$RANLIB $lib' 72746aec45a7Smrg fi 72756aec45a7Smrg ;; 72766aec45a7Smrg aix[[4-9]]*) 72776aec45a7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72786aec45a7Smrg test "$enable_shared" = yes && enable_static=no 72796aec45a7Smrg fi 72806aec45a7Smrg ;; 72816aec45a7Smrg esac 72826aec45a7Smrg AC_MSG_RESULT([$enable_shared]) 72836aec45a7Smrg 72846aec45a7Smrg AC_MSG_CHECKING([whether to build static libraries]) 72856aec45a7Smrg # Make sure either enable_shared or enable_static is yes. 72866aec45a7Smrg test "$enable_shared" = yes || enable_static=yes 72876aec45a7Smrg AC_MSG_RESULT([$enable_static]) 72886aec45a7Smrg 72896aec45a7Smrg _LT_TAGVAR(GCC, $1)="$G77" 72906aec45a7Smrg _LT_TAGVAR(LD, $1)="$LD" 72916aec45a7Smrg 72926aec45a7Smrg ## CAVEAT EMPTOR: 72936aec45a7Smrg ## There is no encapsulation within the following macros, do not change 72946aec45a7Smrg ## the running order or otherwise move them around unless you know exactly 72956aec45a7Smrg ## what you are doing... 72966aec45a7Smrg _LT_COMPILER_PIC($1) 72976aec45a7Smrg _LT_COMPILER_C_O($1) 72986aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 72996aec45a7Smrg _LT_LINKER_SHLIBS($1) 73006aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 73016aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 73026aec45a7Smrg 73036aec45a7Smrg _LT_CONFIG($1) 73046aec45a7Smrg fi # test -n "$compiler" 73056aec45a7Smrg 73066aec45a7Smrg GCC=$lt_save_GCC 73076aec45a7Smrg CC="$lt_save_CC" 7308aa9e3350Smrg CFLAGS="$lt_save_CFLAGS" 73096aec45a7Smrgfi # test "$_lt_disable_F77" != yes 73101473d951Smrg 73116aec45a7SmrgAC_LANG_POP 73126aec45a7Smrg])# _LT_LANG_F77_CONFIG 73131473d951Smrg 7314ab47cfaaSmrg 73156aec45a7Smrg# _LT_LANG_FC_CONFIG([TAG]) 73166aec45a7Smrg# ------------------------- 73176aec45a7Smrg# Ensure that the configuration variables for a Fortran compiler are 73186aec45a7Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73196aec45a7Smrg# to write the compiler configuration to `libtool'. 73206aec45a7Smrgm4_defun([_LT_LANG_FC_CONFIG], 73216aec45a7Smrg[AC_LANG_PUSH(Fortran) 73226aec45a7Smrg 73236aec45a7Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 73246aec45a7Smrg _lt_disable_FC=yes 73255c42550eSmrgfi 7326ab47cfaaSmrg 73276aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73286aec45a7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 73296aec45a7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 73306aec45a7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73316aec45a7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73326aec45a7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 73336aec45a7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73346aec45a7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73356aec45a7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73366aec45a7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73376aec45a7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 73386aec45a7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 73396aec45a7Smrg_LT_TAGVAR(module_cmds, $1)= 73406aec45a7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 73416aec45a7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73426aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 73436aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 73446aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73456aec45a7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 73466aec45a7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73476aec45a7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73486aec45a7Smrg 73496aec45a7Smrg# Source file extension for fc test sources. 73506aec45a7Smrgac_ext=${ac_fc_srcext-f} 73516aec45a7Smrg 73526aec45a7Smrg# Object file extension for compiled fc test sources. 73536aec45a7Smrgobjext=o 73546aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 73556aec45a7Smrg 73566aec45a7Smrg# No sense in running all these tests if we already determined that 73576aec45a7Smrg# the FC compiler isn't working. Some variables (like enable_shared) 73586aec45a7Smrg# are currently assumed to apply to all compilers on this platform, 73596aec45a7Smrg# and will be corrupted by setting them based on a non-working compiler. 73606aec45a7Smrgif test "$_lt_disable_FC" != yes; then 73616aec45a7Smrg # Code to be used in simple compile tests 73626aec45a7Smrg lt_simple_compile_test_code="\ 73636aec45a7Smrg subroutine t 73646aec45a7Smrg return 73656aec45a7Smrg end 73666aec45a7Smrg" 7367ab47cfaaSmrg 73686aec45a7Smrg # Code to be used in simple link tests 73696aec45a7Smrg lt_simple_link_test_code="\ 73706aec45a7Smrg program t 73716aec45a7Smrg end 73726aec45a7Smrg" 7373ab47cfaaSmrg 73746aec45a7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73756aec45a7Smrg _LT_TAG_COMPILER 7376ab47cfaaSmrg 73776aec45a7Smrg # save warnings/boilerplate of simple test code 73786aec45a7Smrg _LT_COMPILER_BOILERPLATE 73796aec45a7Smrg _LT_LINKER_BOILERPLATE 73806aec45a7Smrg 73816aec45a7Smrg # Allow CC to be a program name with arguments. 73826aec45a7Smrg lt_save_CC="$CC" 73836aec45a7Smrg lt_save_GCC=$GCC 7384aa9e3350Smrg lt_save_CFLAGS=$CFLAGS 73856aec45a7Smrg CC=${FC-"f95"} 7386aa9e3350Smrg CFLAGS=$FCFLAGS 73876aec45a7Smrg compiler=$CC 73886aec45a7Smrg GCC=$ac_cv_fc_compiler_gnu 73896aec45a7Smrg 73906aec45a7Smrg _LT_TAGVAR(compiler, $1)=$CC 73916aec45a7Smrg _LT_CC_BASENAME([$compiler]) 73926aec45a7Smrg 73936aec45a7Smrg if test -n "$compiler"; then 73946aec45a7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73956aec45a7Smrg AC_MSG_RESULT([$can_build_shared]) 73966aec45a7Smrg 73976aec45a7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 73986aec45a7Smrg test "$can_build_shared" = "no" && enable_shared=no 73996aec45a7Smrg 74006aec45a7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 74016aec45a7Smrg # are all built from PIC. 74025c42550eSmrg case $host_os in 74036aec45a7Smrg aix3*) 74046aec45a7Smrg test "$enable_shared" = yes && enable_static=no 74056aec45a7Smrg if test -n "$RANLIB"; then 74066aec45a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 74076aec45a7Smrg postinstall_cmds='$RANLIB $lib' 74086aec45a7Smrg fi 74096aec45a7Smrg ;; 74105c42550eSmrg aix[[4-9]]*) 74116aec45a7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74126aec45a7Smrg test "$enable_shared" = yes && enable_static=no 74135c42550eSmrg fi 74146aec45a7Smrg ;; 74155c42550eSmrg esac 74166aec45a7Smrg AC_MSG_RESULT([$enable_shared]) 74176aec45a7Smrg 74186aec45a7Smrg AC_MSG_CHECKING([whether to build static libraries]) 74196aec45a7Smrg # Make sure either enable_shared or enable_static is yes. 74206aec45a7Smrg test "$enable_shared" = yes || enable_static=yes 74216aec45a7Smrg AC_MSG_RESULT([$enable_static]) 74226aec45a7Smrg 74236aec45a7Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74246aec45a7Smrg _LT_TAGVAR(LD, $1)="$LD" 74256aec45a7Smrg 74266aec45a7Smrg ## CAVEAT EMPTOR: 74276aec45a7Smrg ## There is no encapsulation within the following macros, do not change 74286aec45a7Smrg ## the running order or otherwise move them around unless you know exactly 74296aec45a7Smrg ## what you are doing... 74306aec45a7Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74316aec45a7Smrg _LT_COMPILER_PIC($1) 74326aec45a7Smrg _LT_COMPILER_C_O($1) 74336aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 74346aec45a7Smrg _LT_LINKER_SHLIBS($1) 74356aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 74366aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74376aec45a7Smrg 74386aec45a7Smrg _LT_CONFIG($1) 74396aec45a7Smrg fi # test -n "$compiler" 74406aec45a7Smrg 74416aec45a7Smrg GCC=$lt_save_GCC 7442aa9e3350Smrg CC=$lt_save_CC 7443aa9e3350Smrg CFLAGS=$lt_save_CFLAGS 74446aec45a7Smrgfi # test "$_lt_disable_FC" != yes 74451473d951Smrg 74466aec45a7SmrgAC_LANG_POP 74476aec45a7Smrg])# _LT_LANG_FC_CONFIG 74481473d951Smrg 74491473d951Smrg 74506aec45a7Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 74516aec45a7Smrg# -------------------------- 74526aec45a7Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74536aec45a7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74546aec45a7Smrg# to write the compiler configuration to `libtool'. 74556aec45a7Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 74566aec45a7Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74576aec45a7SmrgAC_LANG_SAVE 74581473d951Smrg 74596aec45a7Smrg# Source file extension for Java test sources. 74606aec45a7Smrgac_ext=java 74611473d951Smrg 74626aec45a7Smrg# Object file extension for compiled Java test sources. 74636aec45a7Smrgobjext=o 74646aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 74651473d951Smrg 74666aec45a7Smrg# Code to be used in simple compile tests 74676aec45a7Smrglt_simple_compile_test_code="class foo {}" 74681473d951Smrg 74696aec45a7Smrg# Code to be used in simple link tests 74706aec45a7Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 74716aec45a7Smrg 74726aec45a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74736aec45a7Smrg_LT_TAG_COMPILER 74746aec45a7Smrg 74756aec45a7Smrg# save warnings/boilerplate of simple test code 74766aec45a7Smrg_LT_COMPILER_BOILERPLATE 74776aec45a7Smrg_LT_LINKER_BOILERPLATE 74786aec45a7Smrg 74796aec45a7Smrg# Allow CC to be a program name with arguments. 7480aa9e3350Smrglt_save_CC=$CC 7481aa9e3350Smrglt_save_CFLAGS=$CFLAGS 74826aec45a7Smrglt_save_GCC=$GCC 74836aec45a7SmrgGCC=yes 74846aec45a7SmrgCC=${GCJ-"gcj"} 7485aa9e3350SmrgCFLAGS=$GCJFLAGS 74866aec45a7Smrgcompiler=$CC 74876aec45a7Smrg_LT_TAGVAR(compiler, $1)=$CC 74886aec45a7Smrg_LT_TAGVAR(LD, $1)="$LD" 74896aec45a7Smrg_LT_CC_BASENAME([$compiler]) 74906aec45a7Smrg 74916aec45a7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74926aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74936aec45a7Smrg 74946aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 74956aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 74966aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74976aec45a7Smrg 74986aec45a7Smrgif test -n "$compiler"; then 74996aec45a7Smrg _LT_COMPILER_NO_RTTI($1) 75006aec45a7Smrg _LT_COMPILER_PIC($1) 75016aec45a7Smrg _LT_COMPILER_C_O($1) 75026aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 75036aec45a7Smrg _LT_LINKER_SHLIBS($1) 75046aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 75056aec45a7Smrg 75066aec45a7Smrg _LT_CONFIG($1) 75076aec45a7Smrgfi 75086aec45a7Smrg 75096aec45a7SmrgAC_LANG_RESTORE 75106aec45a7Smrg 75116aec45a7SmrgGCC=$lt_save_GCC 7512aa9e3350SmrgCC=$lt_save_CC 7513aa9e3350SmrgCFLAGS=$lt_save_CFLAGS 75146aec45a7Smrg])# _LT_LANG_GCJ_CONFIG 75156aec45a7Smrg 75166aec45a7Smrg 7517aa9e3350Smrg# _LT_LANG_GO_CONFIG([TAG]) 7518aa9e3350Smrg# -------------------------- 7519aa9e3350Smrg# Ensure that the configuration variables for the GNU Go compiler 7520aa9e3350Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7521aa9e3350Smrg# to write the compiler configuration to `libtool'. 7522aa9e3350Smrgm4_defun([_LT_LANG_GO_CONFIG], 7523aa9e3350Smrg[AC_REQUIRE([LT_PROG_GO])dnl 7524aa9e3350SmrgAC_LANG_SAVE 7525aa9e3350Smrg 7526aa9e3350Smrg# Source file extension for Go test sources. 7527aa9e3350Smrgac_ext=go 7528aa9e3350Smrg 7529aa9e3350Smrg# Object file extension for compiled Go test sources. 7530aa9e3350Smrgobjext=o 7531aa9e3350Smrg_LT_TAGVAR(objext, $1)=$objext 7532aa9e3350Smrg 7533aa9e3350Smrg# Code to be used in simple compile tests 7534aa9e3350Smrglt_simple_compile_test_code="package main; func main() { }" 7535aa9e3350Smrg 7536aa9e3350Smrg# Code to be used in simple link tests 7537aa9e3350Smrglt_simple_link_test_code='package main; func main() { }' 7538aa9e3350Smrg 7539aa9e3350Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7540aa9e3350Smrg_LT_TAG_COMPILER 7541aa9e3350Smrg 7542aa9e3350Smrg# save warnings/boilerplate of simple test code 7543aa9e3350Smrg_LT_COMPILER_BOILERPLATE 7544aa9e3350Smrg_LT_LINKER_BOILERPLATE 7545aa9e3350Smrg 7546aa9e3350Smrg# Allow CC to be a program name with arguments. 7547aa9e3350Smrglt_save_CC=$CC 7548aa9e3350Smrglt_save_CFLAGS=$CFLAGS 7549aa9e3350Smrglt_save_GCC=$GCC 7550aa9e3350SmrgGCC=yes 7551aa9e3350SmrgCC=${GOC-"gccgo"} 7552aa9e3350SmrgCFLAGS=$GOFLAGS 7553aa9e3350Smrgcompiler=$CC 7554aa9e3350Smrg_LT_TAGVAR(compiler, $1)=$CC 7555aa9e3350Smrg_LT_TAGVAR(LD, $1)="$LD" 7556aa9e3350Smrg_LT_CC_BASENAME([$compiler]) 7557aa9e3350Smrg 7558aa9e3350Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7559aa9e3350Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7560aa9e3350Smrg 7561aa9e3350Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7562aa9e3350Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7563aa9e3350Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7564aa9e3350Smrg 7565aa9e3350Smrgif test -n "$compiler"; then 7566aa9e3350Smrg _LT_COMPILER_NO_RTTI($1) 7567aa9e3350Smrg _LT_COMPILER_PIC($1) 7568aa9e3350Smrg _LT_COMPILER_C_O($1) 7569aa9e3350Smrg _LT_COMPILER_FILE_LOCKS($1) 7570aa9e3350Smrg _LT_LINKER_SHLIBS($1) 7571aa9e3350Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7572aa9e3350Smrg 7573aa9e3350Smrg _LT_CONFIG($1) 7574aa9e3350Smrgfi 7575aa9e3350Smrg 7576aa9e3350SmrgAC_LANG_RESTORE 7577aa9e3350Smrg 7578aa9e3350SmrgGCC=$lt_save_GCC 7579aa9e3350SmrgCC=$lt_save_CC 7580aa9e3350SmrgCFLAGS=$lt_save_CFLAGS 7581aa9e3350Smrg])# _LT_LANG_GO_CONFIG 7582aa9e3350Smrg 7583aa9e3350Smrg 75846aec45a7Smrg# _LT_LANG_RC_CONFIG([TAG]) 75856aec45a7Smrg# ------------------------- 75866aec45a7Smrg# Ensure that the configuration variables for the Windows resource compiler 75876aec45a7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75886aec45a7Smrg# to write the compiler configuration to `libtool'. 75896aec45a7Smrgm4_defun([_LT_LANG_RC_CONFIG], 75906aec45a7Smrg[AC_REQUIRE([LT_PROG_RC])dnl 75916aec45a7SmrgAC_LANG_SAVE 75926aec45a7Smrg 75936aec45a7Smrg# Source file extension for RC test sources. 75946aec45a7Smrgac_ext=rc 75956aec45a7Smrg 75966aec45a7Smrg# Object file extension for compiled RC test sources. 75976aec45a7Smrgobjext=o 75986aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 75996aec45a7Smrg 76006aec45a7Smrg# Code to be used in simple compile tests 76016aec45a7Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 76026aec45a7Smrg 76036aec45a7Smrg# Code to be used in simple link tests 76046aec45a7Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 76056aec45a7Smrg 76066aec45a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 76076aec45a7Smrg_LT_TAG_COMPILER 76086aec45a7Smrg 76096aec45a7Smrg# save warnings/boilerplate of simple test code 76106aec45a7Smrg_LT_COMPILER_BOILERPLATE 76116aec45a7Smrg_LT_LINKER_BOILERPLATE 76126aec45a7Smrg 76136aec45a7Smrg# Allow CC to be a program name with arguments. 76146aec45a7Smrglt_save_CC="$CC" 7615aa9e3350Smrglt_save_CFLAGS=$CFLAGS 76166aec45a7Smrglt_save_GCC=$GCC 76176aec45a7SmrgGCC= 76186aec45a7SmrgCC=${RC-"windres"} 7619aa9e3350SmrgCFLAGS= 76206aec45a7Smrgcompiler=$CC 76216aec45a7Smrg_LT_TAGVAR(compiler, $1)=$CC 76226aec45a7Smrg_LT_CC_BASENAME([$compiler]) 76236aec45a7Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 76246aec45a7Smrg 76256aec45a7Smrgif test -n "$compiler"; then 76266aec45a7Smrg : 76276aec45a7Smrg _LT_CONFIG($1) 76286aec45a7Smrgfi 76296aec45a7Smrg 76306aec45a7SmrgGCC=$lt_save_GCC 76316aec45a7SmrgAC_LANG_RESTORE 7632aa9e3350SmrgCC=$lt_save_CC 7633aa9e3350SmrgCFLAGS=$lt_save_CFLAGS 76346aec45a7Smrg])# _LT_LANG_RC_CONFIG 76356aec45a7Smrg 76366aec45a7Smrg 76376aec45a7Smrg# LT_PROG_GCJ 76386aec45a7Smrg# ----------- 76396aec45a7SmrgAC_DEFUN([LT_PROG_GCJ], 76406aec45a7Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76416aec45a7Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76426aec45a7Smrg [AC_CHECK_TOOL(GCJ, gcj,) 76436aec45a7Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76446aec45a7Smrg AC_SUBST(GCJFLAGS)])])[]dnl 76456aec45a7Smrg]) 76466aec45a7Smrg 76476aec45a7Smrg# Old name: 76486aec45a7SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76496aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 76506aec45a7Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76516aec45a7Smrg 76526aec45a7Smrg 7653aa9e3350Smrg# LT_PROG_GO 7654aa9e3350Smrg# ---------- 7655aa9e3350SmrgAC_DEFUN([LT_PROG_GO], 7656aa9e3350Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7657aa9e3350Smrg]) 7658aa9e3350Smrg 7659aa9e3350Smrg 76606aec45a7Smrg# LT_PROG_RC 76616aec45a7Smrg# ---------- 76626aec45a7SmrgAC_DEFUN([LT_PROG_RC], 76636aec45a7Smrg[AC_CHECK_TOOL(RC, windres,) 76646aec45a7Smrg]) 76656aec45a7Smrg 76666aec45a7Smrg# Old name: 76676aec45a7SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76686aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 76696aec45a7Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76706aec45a7Smrg 76716aec45a7Smrg 76726aec45a7Smrg# _LT_DECL_EGREP 76736aec45a7Smrg# -------------- 76746aec45a7Smrg# If we don't have a new enough Autoconf to choose the best grep 76756aec45a7Smrg# available, choose the one first in the user's PATH. 76766aec45a7Smrgm4_defun([_LT_DECL_EGREP], 76776aec45a7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76786aec45a7SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76796aec45a7Smrgtest -z "$GREP" && GREP=grep 76806aec45a7Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76816aec45a7Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76826aec45a7Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76836aec45a7Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76846aec45a7SmrgAC_SUBST([GREP]) 76856aec45a7Smrg]) 76866aec45a7Smrg 76876aec45a7Smrg 76886aec45a7Smrg# _LT_DECL_OBJDUMP 76896aec45a7Smrg# -------------- 76906aec45a7Smrg# If we don't have a new enough Autoconf to choose the best objdump 76916aec45a7Smrg# available, choose the one first in the user's PATH. 76926aec45a7Smrgm4_defun([_LT_DECL_OBJDUMP], 76936aec45a7Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76946aec45a7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76956aec45a7Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76966aec45a7SmrgAC_SUBST([OBJDUMP]) 76976aec45a7Smrg]) 76986aec45a7Smrg 7699aa9e3350Smrg# _LT_DECL_DLLTOOL 7700aa9e3350Smrg# ---------------- 7701aa9e3350Smrg# Ensure DLLTOOL variable is set. 7702aa9e3350Smrgm4_defun([_LT_DECL_DLLTOOL], 7703aa9e3350Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7704aa9e3350Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7705aa9e3350Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7706aa9e3350SmrgAC_SUBST([DLLTOOL]) 7707aa9e3350Smrg]) 77086aec45a7Smrg 77096aec45a7Smrg# _LT_DECL_SED 77106aec45a7Smrg# ------------ 77116aec45a7Smrg# Check for a fully-functional sed program, that truncates 77126aec45a7Smrg# as few characters as possible. Prefer GNU sed if found. 77136aec45a7Smrgm4_defun([_LT_DECL_SED], 77146aec45a7Smrg[AC_PROG_SED 77156aec45a7Smrgtest -z "$SED" && SED=sed 77166aec45a7SmrgXsed="$SED -e 1s/^X//" 77176aec45a7Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77186aec45a7Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77196aec45a7Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77206aec45a7Smrg])# _LT_DECL_SED 77216aec45a7Smrg 77226aec45a7Smrgm4_ifndef([AC_PROG_SED], [ 77236aec45a7Smrg# NOTE: This macro has been submitted for inclusion into # 77246aec45a7Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77256aec45a7Smrg# a released version of Autoconf we should remove this # 77266aec45a7Smrg# macro and use it instead. # 77276aec45a7Smrg 77286aec45a7Smrgm4_defun([AC_PROG_SED], 77296aec45a7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77306aec45a7SmrgAC_CACHE_VAL(lt_cv_path_SED, 77316aec45a7Smrg[# Loop through the user's path and test for sed and gsed. 77326aec45a7Smrg# Then use that list of sed's as ones to test for truncation. 77336aec45a7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77346aec45a7Smrgfor as_dir in $PATH 77356aec45a7Smrgdo 77366aec45a7Smrg IFS=$as_save_IFS 77376aec45a7Smrg test -z "$as_dir" && as_dir=. 77386aec45a7Smrg for lt_ac_prog in sed gsed; do 77396aec45a7Smrg for ac_exec_ext in '' $ac_executable_extensions; do 77406aec45a7Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77416aec45a7Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77426aec45a7Smrg fi 77436aec45a7Smrg done 77446aec45a7Smrg done 77456aec45a7Smrgdone 77466aec45a7SmrgIFS=$as_save_IFS 77476aec45a7Smrglt_ac_max=0 77486aec45a7Smrglt_ac_count=0 77496aec45a7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77506aec45a7Smrg# along with /bin/sed that truncates output. 77516aec45a7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77526aec45a7Smrg test ! -f $lt_ac_sed && continue 77536aec45a7Smrg cat /dev/null > conftest.in 77546aec45a7Smrg lt_ac_count=0 77556aec45a7Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77566aec45a7Smrg # Check for GNU sed and select it if it is found. 77576aec45a7Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77586aec45a7Smrg lt_cv_path_SED=$lt_ac_sed 77596aec45a7Smrg break 77606aec45a7Smrg fi 77616aec45a7Smrg while true; do 77626aec45a7Smrg cat conftest.in conftest.in >conftest.tmp 77636aec45a7Smrg mv conftest.tmp conftest.in 77646aec45a7Smrg cp conftest.in conftest.nl 77656aec45a7Smrg echo >>conftest.nl 77666aec45a7Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77676aec45a7Smrg cmp -s conftest.out conftest.nl || break 77686aec45a7Smrg # 10000 chars as input seems more than enough 77696aec45a7Smrg test $lt_ac_count -gt 10 && break 77706aec45a7Smrg lt_ac_count=`expr $lt_ac_count + 1` 77716aec45a7Smrg if test $lt_ac_count -gt $lt_ac_max; then 77726aec45a7Smrg lt_ac_max=$lt_ac_count 77736aec45a7Smrg lt_cv_path_SED=$lt_ac_sed 77746aec45a7Smrg fi 77756aec45a7Smrg done 77766aec45a7Smrgdone 77776aec45a7Smrg]) 77786aec45a7SmrgSED=$lt_cv_path_SED 77796aec45a7SmrgAC_SUBST([SED]) 77806aec45a7SmrgAC_MSG_RESULT([$SED]) 77816aec45a7Smrg])#AC_PROG_SED 77826aec45a7Smrg])#m4_ifndef 77831473d951Smrg 77846aec45a7Smrg# Old name: 77856aec45a7SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77866aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 77876aec45a7Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77881473d951Smrg 77891473d951Smrg 77906aec45a7Smrg# _LT_CHECK_SHELL_FEATURES 77916aec45a7Smrg# ------------------------ 77926aec45a7Smrg# Find out whether the shell is Bourne or XSI compatible, 77936aec45a7Smrg# or has some other useful features. 77946aec45a7Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77956aec45a7Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77966aec45a7Smrg# Try some XSI features 77976aec45a7Smrgxsi_shell=no 77986aec45a7Smrg( _lt_dummy="a/b/c" 7799aa9e3350Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7800aa9e3350Smrg = c,a/b,b/c, \ 78016aec45a7Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 78026aec45a7Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 78036aec45a7Smrg && xsi_shell=yes 78046aec45a7SmrgAC_MSG_RESULT([$xsi_shell]) 78056aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 78066aec45a7Smrg 78076aec45a7SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 78086aec45a7Smrglt_shell_append=no 78096aec45a7Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 78106aec45a7Smrg >/dev/null 2>&1 \ 78116aec45a7Smrg && lt_shell_append=yes 78126aec45a7SmrgAC_MSG_RESULT([$lt_shell_append]) 78136aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78146aec45a7Smrg 78156aec45a7Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78166aec45a7Smrg lt_unset=unset 78176aec45a7Smrgelse 78186aec45a7Smrg lt_unset=false 78196aec45a7Smrgfi 78206aec45a7Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78216aec45a7Smrg 78226aec45a7Smrg# test EBCDIC or ASCII 78236aec45a7Smrgcase `echo X|tr X '\101'` in 78246aec45a7Smrg A) # ASCII based system 78256aec45a7Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78266aec45a7Smrg lt_SP2NL='tr \040 \012' 78276aec45a7Smrg lt_NL2SP='tr \015\012 \040\040' 78286aec45a7Smrg ;; 78296aec45a7Smrg *) # EBCDIC based system 78306aec45a7Smrg lt_SP2NL='tr \100 \n' 78316aec45a7Smrg lt_NL2SP='tr \r\n \100\100' 78326aec45a7Smrg ;; 78336aec45a7Smrgesac 78346aec45a7Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78356aec45a7Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78366aec45a7Smrg])# _LT_CHECK_SHELL_FEATURES 78371473d951Smrg 78381473d951Smrg 7839aa9e3350Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7840aa9e3350Smrg# ------------------------------------------------------ 7841aa9e3350Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7842aa9e3350Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7843aa9e3350Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7844aa9e3350Smrg[dnl { 7845aa9e3350Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7846aa9e3350Smrg$1 ()\ 7847aa9e3350Smrg{\ 7848aa9e3350Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7849aa9e3350Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7850aa9e3350Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7851aa9e3350Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7852aa9e3350Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7853aa9e3350Smrg]) 7854ab47cfaaSmrg 7855ab47cfaaSmrg 7856aa9e3350Smrg# _LT_PROG_REPLACE_SHELLFNS 7857aa9e3350Smrg# ------------------------- 7858aa9e3350Smrg# Replace existing portable implementations of several shell functions with 7859aa9e3350Smrg# equivalent extended shell implementations where those features are available.. 7860aa9e3350Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7861aa9e3350Smrg[if test x"$xsi_shell" = xyes; then 7862aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7863aa9e3350Smrg case ${1} in 7864aa9e3350Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7865aa9e3350Smrg * ) func_dirname_result="${3}" ;; 7866aa9e3350Smrg esac]) 7867aa9e3350Smrg 7868aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7869aa9e3350Smrg func_basename_result="${1##*/}"]) 7870aa9e3350Smrg 7871aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7872aa9e3350Smrg case ${1} in 7873aa9e3350Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7874aa9e3350Smrg * ) func_dirname_result="${3}" ;; 7875aa9e3350Smrg esac 7876aa9e3350Smrg func_basename_result="${1##*/}"]) 7877ab47cfaaSmrg 7878aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7879aa9e3350Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7880aa9e3350Smrg # positional parameters, so assign one to ordinary parameter first. 7881aa9e3350Smrg func_stripname_result=${3} 7882aa9e3350Smrg func_stripname_result=${func_stripname_result#"${1}"} 7883aa9e3350Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 7884ab47cfaaSmrg 7885aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7886aa9e3350Smrg func_split_long_opt_name=${1%%=*} 7887aa9e3350Smrg func_split_long_opt_arg=${1#*=}]) 7888ab47cfaaSmrg 7889aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7890aa9e3350Smrg func_split_short_opt_arg=${1#??} 7891aa9e3350Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78926aec45a7Smrg 7893aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7894aa9e3350Smrg case ${1} in 7895aa9e3350Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7896aa9e3350Smrg *) func_lo2o_result=${1} ;; 7897aa9e3350Smrg esac]) 7898ab47cfaaSmrg 7899aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7900ab47cfaaSmrg 7901aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7902ab47cfaaSmrg 7903aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7904aa9e3350Smrgfi 79055c42550eSmrg 7906aa9e3350Smrgif test x"$lt_shell_append" = xyes; then 7907aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7908ab47cfaaSmrg 7909aa9e3350Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7910aa9e3350Smrg func_quote_for_eval "${2}" 7911aa9e3350Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7912aa9e3350Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 79135c42550eSmrg 7914aa9e3350Smrg # Save a `func_append' function call where possible by direct use of '+=' 7915aa9e3350Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7916aa9e3350Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7917aa9e3350Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7918aa9e3350Smrg test 0 -eq $? || _lt_function_replace_fail=: 7919aa9e3350Smrgelse 7920aa9e3350Smrg # Save a `func_append' function call even when '+=' is not available 7921aa9e3350Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7922aa9e3350Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7923aa9e3350Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7924aa9e3350Smrg test 0 -eq $? || _lt_function_replace_fail=: 7925aa9e3350Smrgfi 79265c42550eSmrg 7927aa9e3350Smrgif test x"$_lt_function_replace_fail" = x":"; then 7928aa9e3350Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7929aa9e3350Smrgfi 7930aa9e3350Smrg]) 79315c42550eSmrg 7932aa9e3350Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7933aa9e3350Smrg# ----------------------------- 7934aa9e3350Smrg# Determine which file name conversion functions should be used by 7935aa9e3350Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7936aa9e3350Smrg# for certain cross-compile configurations and native mingw. 7937aa9e3350Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7938aa9e3350Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7939aa9e3350SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7940aa9e3350SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7941aa9e3350SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7942aa9e3350Smrg[case $host in 7943aa9e3350Smrg *-*-mingw* ) 7944aa9e3350Smrg case $build in 7945aa9e3350Smrg *-*-mingw* ) # actually msys 7946aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7947aa9e3350Smrg ;; 7948aa9e3350Smrg *-*-cygwin* ) 7949aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7950aa9e3350Smrg ;; 7951aa9e3350Smrg * ) # otherwise, assume *nix 7952aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7953aa9e3350Smrg ;; 7954aa9e3350Smrg esac 79556aec45a7Smrg ;; 7956aa9e3350Smrg *-*-cygwin* ) 7957aa9e3350Smrg case $build in 7958aa9e3350Smrg *-*-mingw* ) # actually msys 7959aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7960aa9e3350Smrg ;; 7961aa9e3350Smrg *-*-cygwin* ) 7962aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7963aa9e3350Smrg ;; 7964aa9e3350Smrg * ) # otherwise, assume *nix 7965aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7966aa9e3350Smrg ;; 7967aa9e3350Smrg esac 79686aec45a7Smrg ;; 7969aa9e3350Smrg * ) # unhandled hosts (and "normal" native builds) 7970aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7971aa9e3350Smrg ;; 7972aa9e3350Smrgesac 79736aec45a7Smrg]) 7974aa9e3350Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7975aa9e3350SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7976aa9e3350Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7977aa9e3350Smrg [0], [convert $build file names to $host format])dnl 7978aa9e3350Smrg 7979aa9e3350SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7980aa9e3350SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7981aa9e3350Smrg[#assume ordinary cross tools, or native build. 7982aa9e3350Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7983aa9e3350Smrgcase $host in 7984aa9e3350Smrg *-*-mingw* ) 7985aa9e3350Smrg case $build in 7986aa9e3350Smrg *-*-mingw* ) # actually msys 7987aa9e3350Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7988aa9e3350Smrg ;; 7989aa9e3350Smrg esac 7990aa9e3350Smrg ;; 7991aa9e3350Smrgesac 7992aa9e3350Smrg]) 7993aa9e3350Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7994aa9e3350SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7995aa9e3350Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7996aa9e3350Smrg [0], [convert $build files to toolchain format])dnl 7997aa9e3350Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7998ab47cfaaSmrg 79996aec45a7Smrg# Helper functions for option handling. -*- Autoconf -*- 80006aec45a7Smrg# 80016aec45a7Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 80026aec45a7Smrg# Inc. 80036aec45a7Smrg# Written by Gary V. Vaughan, 2004 80046aec45a7Smrg# 80056aec45a7Smrg# This file is free software; the Free Software Foundation gives 80066aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 80076aec45a7Smrg# modifications, as long as this notice is preserved. 8008ab47cfaaSmrg 80096aec45a7Smrg# serial 7 ltoptions.m4 8010ab47cfaaSmrg 80116aec45a7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 80126aec45a7SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8013ab47cfaaSmrg 8014ab47cfaaSmrg 80156aec45a7Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80166aec45a7Smrg# ------------------------------------------ 80176aec45a7Smrgm4_define([_LT_MANGLE_OPTION], 80186aec45a7Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8019ab47cfaaSmrg 8020ab47cfaaSmrg 80216aec45a7Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80226aec45a7Smrg# --------------------------------------- 80236aec45a7Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80246aec45a7Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80256aec45a7Smrg# saved as a flag. 80266aec45a7Smrgm4_define([_LT_SET_OPTION], 80276aec45a7Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80286aec45a7Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80296aec45a7Smrg _LT_MANGLE_DEFUN([$1], [$2]), 80306aec45a7Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80316aec45a7Smrg]) 8032ab47cfaaSmrg 8033ab47cfaaSmrg 80346aec45a7Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80356aec45a7Smrg# ------------------------------------------------------------ 80366aec45a7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80376aec45a7Smrgm4_define([_LT_IF_OPTION], 80386aec45a7Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80396aec45a7Smrg 80406aec45a7Smrg 80416aec45a7Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80426aec45a7Smrg# ------------------------------------------------------- 80436aec45a7Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80446aec45a7Smrg# are set. 80456aec45a7Smrgm4_define([_LT_UNLESS_OPTIONS], 80466aec45a7Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80476aec45a7Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80486aec45a7Smrg [m4_define([$0_found])])])[]dnl 80496aec45a7Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80506aec45a7Smrg])[]dnl 80516aec45a7Smrg]) 8052ab47cfaaSmrg 8053ab47cfaaSmrg 80546aec45a7Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80556aec45a7Smrg# ---------------------------------------- 80566aec45a7Smrg# OPTION-LIST is a space-separated list of Libtool options associated 80576aec45a7Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80586aec45a7Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80596aec45a7Smrg# the unknown option and exit. 80606aec45a7Smrgm4_defun([_LT_SET_OPTIONS], 80616aec45a7Smrg[# Set options 80626aec45a7Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80636aec45a7Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 80646aec45a7Smrg 80656aec45a7Smrgm4_if([$1],[LT_INIT],[ 80666aec45a7Smrg dnl 80676aec45a7Smrg dnl Simply set some default values (i.e off) if boolean options were not 80686aec45a7Smrg dnl specified: 80696aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80706aec45a7Smrg ]) 80716aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80726aec45a7Smrg ]) 80736aec45a7Smrg dnl 80746aec45a7Smrg dnl If no reference was made to various pairs of opposing options, then 80756aec45a7Smrg dnl we run the default mode handler for the pair. For example, if neither 80766aec45a7Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80776aec45a7Smrg dnl archives by default: 80786aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80796aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80806aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80816aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80826aec45a7Smrg [_LT_ENABLE_FAST_INSTALL]) 80836aec45a7Smrg ]) 80846aec45a7Smrg])# _LT_SET_OPTIONS 8085ab47cfaaSmrg 8086ab47cfaaSmrg 8087ab47cfaaSmrg 80886aec45a7Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80896aec45a7Smrg# ----------------------------------------- 80906aec45a7Smrgm4_define([_LT_MANGLE_DEFUN], 80916aec45a7Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8092ab47cfaaSmrg 80931473d951Smrg 80946aec45a7Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80956aec45a7Smrg# ----------------------------------------------- 80966aec45a7Smrgm4_define([LT_OPTION_DEFINE], 80976aec45a7Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80986aec45a7Smrg])# LT_OPTION_DEFINE 80991473d951Smrg 81001473d951Smrg 81016aec45a7Smrg# dlopen 81026aec45a7Smrg# ------ 81036aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 81046aec45a7Smrg]) 81051473d951Smrg 81066aec45a7SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 81076aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 81086aec45a7SmrgAC_DIAGNOSE([obsolete], 81096aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81106aec45a7Smrgput the `dlopen' option into LT_INIT's first parameter.]) 81116aec45a7Smrg]) 8112ab47cfaaSmrg 81136aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 81146aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8115ab47cfaaSmrg 8116ab47cfaaSmrg 81176aec45a7Smrg# win32-dll 81186aec45a7Smrg# --------- 81196aec45a7Smrg# Declare package support for building win32 dll's. 81206aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81216aec45a7Smrg[enable_win32_dll=yes 8122ab47cfaaSmrg 81236aec45a7Smrgcase $host in 81246aec45a7Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81256aec45a7Smrg AC_CHECK_TOOL(AS, as, false) 81266aec45a7Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81276aec45a7Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81286aec45a7Smrg ;; 81296aec45a7Smrgesac 8130ab47cfaaSmrg 81316aec45a7Smrgtest -z "$AS" && AS=as 81326aec45a7Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8133ab47cfaaSmrg 81346aec45a7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 81356aec45a7Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8136ab47cfaaSmrg 81376aec45a7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81386aec45a7Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81396aec45a7Smrg])# win32-dll 8140ab47cfaaSmrg 81416aec45a7SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81426aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81436aec45a7Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81446aec45a7SmrgAC_DIAGNOSE([obsolete], 81456aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81466aec45a7Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 81476aec45a7Smrg]) 8148ab47cfaaSmrg 81496aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 81506aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8151ab47cfaaSmrg 8152ab47cfaaSmrg 81536aec45a7Smrg# _LT_ENABLE_SHARED([DEFAULT]) 81546aec45a7Smrg# ---------------------------- 81556aec45a7Smrg# implement the --enable-shared flag, and supports the `shared' and 81566aec45a7Smrg# `disable-shared' LT_INIT options. 81576aec45a7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81586aec45a7Smrgm4_define([_LT_ENABLE_SHARED], 81596aec45a7Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81606aec45a7SmrgAC_ARG_ENABLE([shared], 81616aec45a7Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81626aec45a7Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81636aec45a7Smrg [p=${PACKAGE-default} 81646aec45a7Smrg case $enableval in 81656aec45a7Smrg yes) enable_shared=yes ;; 81666aec45a7Smrg no) enable_shared=no ;; 81676aec45a7Smrg *) 81686aec45a7Smrg enable_shared=no 81696aec45a7Smrg # Look at the argument we got. We use all the common list separators. 81706aec45a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81716aec45a7Smrg for pkg in $enableval; do 81726aec45a7Smrg IFS="$lt_save_ifs" 81736aec45a7Smrg if test "X$pkg" = "X$p"; then 81746aec45a7Smrg enable_shared=yes 81756aec45a7Smrg fi 81766aec45a7Smrg done 81776aec45a7Smrg IFS="$lt_save_ifs" 81785c42550eSmrg ;; 81796aec45a7Smrg esac], 81806aec45a7Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8181ab47cfaaSmrg 81826aec45a7Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81836aec45a7Smrg [Whether or not to build shared libraries]) 81846aec45a7Smrg])# _LT_ENABLE_SHARED 8185ab47cfaaSmrg 81866aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81876aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8188ab47cfaaSmrg 81896aec45a7Smrg# Old names: 81906aec45a7SmrgAC_DEFUN([AC_ENABLE_SHARED], 81916aec45a7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81926aec45a7Smrg]) 8193ab47cfaaSmrg 81946aec45a7SmrgAC_DEFUN([AC_DISABLE_SHARED], 81956aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81966aec45a7Smrg]) 8197ab47cfaaSmrg 81986aec45a7SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81996aec45a7SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8200ab47cfaaSmrg 82016aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 82026aec45a7Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 82036aec45a7Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8204ab47cfaaSmrg 8205ab47cfaaSmrg 8206ab47cfaaSmrg 82076aec45a7Smrg# _LT_ENABLE_STATIC([DEFAULT]) 82086aec45a7Smrg# ---------------------------- 82096aec45a7Smrg# implement the --enable-static flag, and support the `static' and 82106aec45a7Smrg# `disable-static' LT_INIT options. 82116aec45a7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82126aec45a7Smrgm4_define([_LT_ENABLE_STATIC], 82136aec45a7Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 82146aec45a7SmrgAC_ARG_ENABLE([static], 82156aec45a7Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82166aec45a7Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82176aec45a7Smrg [p=${PACKAGE-default} 82186aec45a7Smrg case $enableval in 82196aec45a7Smrg yes) enable_static=yes ;; 82206aec45a7Smrg no) enable_static=no ;; 82216aec45a7Smrg *) 82226aec45a7Smrg enable_static=no 82236aec45a7Smrg # Look at the argument we got. We use all the common list separators. 82246aec45a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82256aec45a7Smrg for pkg in $enableval; do 82266aec45a7Smrg IFS="$lt_save_ifs" 82276aec45a7Smrg if test "X$pkg" = "X$p"; then 82286aec45a7Smrg enable_static=yes 82296aec45a7Smrg fi 82306aec45a7Smrg done 82316aec45a7Smrg IFS="$lt_save_ifs" 82325c42550eSmrg ;; 82336aec45a7Smrg esac], 82346aec45a7Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8235ab47cfaaSmrg 82366aec45a7Smrg _LT_DECL([build_old_libs], [enable_static], [0], 82376aec45a7Smrg [Whether or not to build static libraries]) 82386aec45a7Smrg])# _LT_ENABLE_STATIC 8239ab47cfaaSmrg 82406aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82416aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8242ab47cfaaSmrg 82436aec45a7Smrg# Old names: 82446aec45a7SmrgAC_DEFUN([AC_ENABLE_STATIC], 82456aec45a7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82466aec45a7Smrg]) 82471473d951Smrg 82486aec45a7SmrgAC_DEFUN([AC_DISABLE_STATIC], 82496aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82506aec45a7Smrg]) 8251ab47cfaaSmrg 82526aec45a7SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82536aec45a7SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8254ab47cfaaSmrg 82556aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 82566aec45a7Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82576aec45a7Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8258ab47cfaaSmrg 8259ab47cfaaSmrg 8260ab47cfaaSmrg 82616aec45a7Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82626aec45a7Smrg# ---------------------------------- 82636aec45a7Smrg# implement the --enable-fast-install flag, and support the `fast-install' 82646aec45a7Smrg# and `disable-fast-install' LT_INIT options. 82656aec45a7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82666aec45a7Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 82676aec45a7Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82686aec45a7SmrgAC_ARG_ENABLE([fast-install], 82696aec45a7Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82706aec45a7Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82716aec45a7Smrg [p=${PACKAGE-default} 82726aec45a7Smrg case $enableval in 82736aec45a7Smrg yes) enable_fast_install=yes ;; 82746aec45a7Smrg no) enable_fast_install=no ;; 82756aec45a7Smrg *) 82766aec45a7Smrg enable_fast_install=no 82776aec45a7Smrg # Look at the argument we got. We use all the common list separators. 82786aec45a7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82796aec45a7Smrg for pkg in $enableval; do 82806aec45a7Smrg IFS="$lt_save_ifs" 82816aec45a7Smrg if test "X$pkg" = "X$p"; then 82826aec45a7Smrg enable_fast_install=yes 82835c42550eSmrg fi 82846aec45a7Smrg done 82856aec45a7Smrg IFS="$lt_save_ifs" 82865c42550eSmrg ;; 82876aec45a7Smrg esac], 82886aec45a7Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8289ab47cfaaSmrg 82906aec45a7Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 82916aec45a7Smrg [Whether or not to optimize for fast installation])dnl 82926aec45a7Smrg])# _LT_ENABLE_FAST_INSTALL 8293ab47cfaaSmrg 82946aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82956aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8296ab47cfaaSmrg 82976aec45a7Smrg# Old names: 82986aec45a7SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82996aec45a7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 83006aec45a7SmrgAC_DIAGNOSE([obsolete], 83016aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83026aec45a7Smrgthe `fast-install' option into LT_INIT's first parameter.]) 83036aec45a7Smrg]) 8304ab47cfaaSmrg 83056aec45a7SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 83066aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 83076aec45a7SmrgAC_DIAGNOSE([obsolete], 83086aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83096aec45a7Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 83106aec45a7Smrg]) 8311ab47cfaaSmrg 83126aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 83136aec45a7Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 83146aec45a7Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83151473d951Smrg 8316ab47cfaaSmrg 83176aec45a7Smrg# _LT_WITH_PIC([MODE]) 83186aec45a7Smrg# -------------------- 83196aec45a7Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83206aec45a7Smrg# LT_INIT options. 83216aec45a7Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83226aec45a7Smrgm4_define([_LT_WITH_PIC], 83236aec45a7Smrg[AC_ARG_WITH([pic], 8324aa9e3350Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83256aec45a7Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8326aa9e3350Smrg [lt_p=${PACKAGE-default} 8327aa9e3350Smrg case $withval in 8328aa9e3350Smrg yes|no) pic_mode=$withval ;; 8329aa9e3350Smrg *) 8330aa9e3350Smrg pic_mode=default 8331aa9e3350Smrg # Look at the argument we got. We use all the common list separators. 8332aa9e3350Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8333aa9e3350Smrg for lt_pkg in $withval; do 8334aa9e3350Smrg IFS="$lt_save_ifs" 8335aa9e3350Smrg if test "X$lt_pkg" = "X$lt_p"; then 8336aa9e3350Smrg pic_mode=yes 8337aa9e3350Smrg fi 8338aa9e3350Smrg done 8339aa9e3350Smrg IFS="$lt_save_ifs" 8340aa9e3350Smrg ;; 8341aa9e3350Smrg esac], 83426aec45a7Smrg [pic_mode=default]) 8343ab47cfaaSmrg 83446aec45a7Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8345ab47cfaaSmrg 83466aec45a7Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83476aec45a7Smrg])# _LT_WITH_PIC 8348ab47cfaaSmrg 83496aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83506aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 83516aec45a7Smrg 83526aec45a7Smrg# Old name: 83536aec45a7SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83546aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83556aec45a7SmrgAC_DIAGNOSE([obsolete], 83566aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83576aec45a7Smrgput the `pic-only' option into LT_INIT's first parameter.]) 83585c42550eSmrg]) 8359ab47cfaaSmrg 83606aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 83616aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 83621473d951Smrg 83631473d951Smrg 83646aec45a7Smrgm4_define([_LTDL_MODE], []) 83656aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83666aec45a7Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83676aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83686aec45a7Smrg [m4_define([_LTDL_MODE], [recursive])]) 83696aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83706aec45a7Smrg [m4_define([_LTDL_MODE], [subproject])]) 83711473d951Smrg 83726aec45a7Smrgm4_define([_LTDL_TYPE], []) 83736aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83746aec45a7Smrg [m4_define([_LTDL_TYPE], [installable])]) 83756aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83766aec45a7Smrg [m4_define([_LTDL_TYPE], [convenience])]) 83776aec45a7Smrg 83786aec45a7Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 83795c42550eSmrg# 83806aec45a7Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83816aec45a7Smrg# Written by Gary V. Vaughan, 2004 83825c42550eSmrg# 83836aec45a7Smrg# This file is free software; the Free Software Foundation gives 83846aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 83856aec45a7Smrg# modifications, as long as this notice is preserved. 83866aec45a7Smrg 83876aec45a7Smrg# serial 6 ltsugar.m4 83886aec45a7Smrg 83896aec45a7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83906aec45a7SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83916aec45a7Smrg 83926aec45a7Smrg 83936aec45a7Smrg# lt_join(SEP, ARG1, [ARG2...]) 83946aec45a7Smrg# ----------------------------- 83956aec45a7Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83966aec45a7Smrg# associated separator. 83976aec45a7Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83986aec45a7Smrg# versions in m4sugar had bugs. 83996aec45a7Smrgm4_define([lt_join], 84006aec45a7Smrg[m4_if([$#], [1], [], 84016aec45a7Smrg [$#], [2], [[$2]], 84026aec45a7Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 84036aec45a7Smrgm4_define([_lt_join], 84046aec45a7Smrg[m4_if([$#$2], [2], [], 84056aec45a7Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 84066aec45a7Smrg 84076aec45a7Smrg 84086aec45a7Smrg# lt_car(LIST) 84096aec45a7Smrg# lt_cdr(LIST) 84106aec45a7Smrg# ------------ 84116aec45a7Smrg# Manipulate m4 lists. 84126aec45a7Smrg# These macros are necessary as long as will still need to support 84136aec45a7Smrg# Autoconf-2.59 which quotes differently. 84146aec45a7Smrgm4_define([lt_car], [[$1]]) 84156aec45a7Smrgm4_define([lt_cdr], 84166aec45a7Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84176aec45a7Smrg [$#], 1, [], 84186aec45a7Smrg [m4_dquote(m4_shift($@))])]) 84196aec45a7Smrgm4_define([lt_unquote], $1) 84206aec45a7Smrg 84216aec45a7Smrg 84226aec45a7Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84236aec45a7Smrg# ------------------------------------------ 84246aec45a7Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84256aec45a7Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84266aec45a7Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84276aec45a7Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84286aec45a7Smrg# than defined and empty). 84295c42550eSmrg# 84306aec45a7Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84316aec45a7Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84326aec45a7Smrgm4_define([lt_append], 84336aec45a7Smrg[m4_define([$1], 84346aec45a7Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84356aec45a7Smrg 84366aec45a7Smrg 84376aec45a7Smrg 84386aec45a7Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84396aec45a7Smrg# ---------------------------------------------------------- 84406aec45a7Smrg# Produce a SEP delimited list of all paired combinations of elements of 84416aec45a7Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84426aec45a7Smrg# has the form PREFIXmINFIXSUFFIXn. 84436aec45a7Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84446aec45a7Smrgm4_define([lt_combine], 84456aec45a7Smrg[m4_if(m4_eval([$# > 3]), [1], 84466aec45a7Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84476aec45a7Smrg[[m4_foreach([_Lt_prefix], [$2], 84486aec45a7Smrg [m4_foreach([_Lt_suffix], 84496aec45a7Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84506aec45a7Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84516aec45a7Smrg 84526aec45a7Smrg 84536aec45a7Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84546aec45a7Smrg# ----------------------------------------------------------------------- 84556aec45a7Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84566aec45a7Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84576aec45a7Smrgm4_define([lt_if_append_uniq], 84586aec45a7Smrg[m4_ifdef([$1], 84596aec45a7Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84606aec45a7Smrg [lt_append([$1], [$2], [$3])$4], 84616aec45a7Smrg [$5])], 84626aec45a7Smrg [lt_append([$1], [$2], [$3])$4])]) 84636aec45a7Smrg 84646aec45a7Smrg 84656aec45a7Smrg# lt_dict_add(DICT, KEY, VALUE) 84666aec45a7Smrg# ----------------------------- 84676aec45a7Smrgm4_define([lt_dict_add], 84686aec45a7Smrg[m4_define([$1($2)], [$3])]) 8469ab47cfaaSmrg 84701473d951Smrg 84716aec45a7Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84726aec45a7Smrg# -------------------------------------------- 84736aec45a7Smrgm4_define([lt_dict_add_subkey], 84746aec45a7Smrg[m4_define([$1($2:$3)], [$4])]) 8475ab47cfaaSmrg 8476ab47cfaaSmrg 84776aec45a7Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84786aec45a7Smrg# ---------------------------------- 84796aec45a7Smrgm4_define([lt_dict_fetch], 84806aec45a7Smrg[m4_ifval([$3], 84816aec45a7Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84826aec45a7Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8483ab47cfaaSmrg 8484ab47cfaaSmrg 84856aec45a7Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84866aec45a7Smrg# ----------------------------------------------------------------- 84876aec45a7Smrgm4_define([lt_if_dict_fetch], 84886aec45a7Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84896aec45a7Smrg [$5], 84906aec45a7Smrg [$6])]) 8491ab47cfaaSmrg 8492ab47cfaaSmrg 84936aec45a7Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84946aec45a7Smrg# -------------------------------------------------------------- 84956aec45a7Smrgm4_define([lt_dict_filter], 84966aec45a7Smrg[m4_if([$5], [], [], 84976aec45a7Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84986aec45a7Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84996aec45a7Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 85006aec45a7Smrg]) 85018697ee19Smrg 85026aec45a7Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 85036aec45a7Smrg# 85046aec45a7Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 85056aec45a7Smrg# Written by Scott James Remnant, 2004 85066aec45a7Smrg# 85076aec45a7Smrg# This file is free software; the Free Software Foundation gives 85086aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 85096aec45a7Smrg# modifications, as long as this notice is preserved. 85108697ee19Smrg 8511aa9e3350Smrg# @configure_input@ 85128697ee19Smrg 8513aa9e3350Smrg# serial 3337 ltversion.m4 85146aec45a7Smrg# This file is part of GNU Libtool 85158697ee19Smrg 8516aa9e3350Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8517aa9e3350Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 85186aec45a7Smrg 85196aec45a7SmrgAC_DEFUN([LTVERSION_VERSION], 8520aa9e3350Smrg[macro_version='2.4.2' 8521aa9e3350Smrgmacro_revision='1.3337' 85226aec45a7Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85236aec45a7Smrg_LT_DECL(, macro_revision, 0) 8524ab47cfaaSmrg]) 85251473d951Smrg 85266aec45a7Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85276aec45a7Smrg# 85286aec45a7Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85296aec45a7Smrg# Written by Scott James Remnant, 2004. 85306aec45a7Smrg# 85316aec45a7Smrg# This file is free software; the Free Software Foundation gives 85326aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 85336aec45a7Smrg# modifications, as long as this notice is preserved. 85346aec45a7Smrg 85356aec45a7Smrg# serial 5 lt~obsolete.m4 85366aec45a7Smrg 85376aec45a7Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 85386aec45a7Smrg# 85396aec45a7Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85406aec45a7Smrg# which have later been changed to m4_define as they aren't part of the 85416aec45a7Smrg# exported API, or moved to Autoconf or Automake where they belong. 85426aec45a7Smrg# 85436aec45a7Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85446aec45a7Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85456aec45a7Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 85466aec45a7Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85476aec45a7Smrg# and doesn't know about Autoconf macros at all.) 85486aec45a7Smrg# 85496aec45a7Smrg# So we provide this file, which has a silly filename so it's always 85506aec45a7Smrg# included after everything else. This provides aclocal with the 85516aec45a7Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85526aec45a7Smrg# because those macros already exist, or will be overwritten later. 85536aec45a7Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85546aec45a7Smrg# 85556aec45a7Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85566aec45a7Smrg# Yes, that means every name once taken will need to remain here until 85576aec45a7Smrg# we give up compatibility with versions before 1.7, at which point 85586aec45a7Smrg# we need to keep only those names which we still refer to. 85596aec45a7Smrg 85606aec45a7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 85616aec45a7SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85626aec45a7Smrg 85636aec45a7Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85646aec45a7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85656aec45a7Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85666aec45a7Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85676aec45a7Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85686aec45a7Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85696aec45a7Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85706aec45a7Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85716aec45a7Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85726aec45a7Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85736aec45a7Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85746aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85756aec45a7Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85766aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85776aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85786aec45a7Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85796aec45a7Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85806aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85816aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85826aec45a7Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85836aec45a7Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85846aec45a7Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85856aec45a7Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85866aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85876aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85886aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85896aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85906aec45a7Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85916aec45a7Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85926aec45a7Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85936aec45a7Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85946aec45a7Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85956aec45a7Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85966aec45a7Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85976aec45a7Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85986aec45a7Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85996aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 86006aec45a7Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 86016aec45a7Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 86026aec45a7Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 86036aec45a7Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 86046aec45a7Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 86056aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 86066aec45a7Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 86076aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 86086aec45a7Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 86096aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 86106aec45a7Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 86116aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 86126aec45a7Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 86136aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 86146aec45a7Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86156aec45a7Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86166aec45a7Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 86176aec45a7Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 86186aec45a7Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 86196aec45a7Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 86206aec45a7Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 86216aec45a7Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 86226aec45a7Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 86236aec45a7Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86246aec45a7Smrg 8625ab47cfaaSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 86266aec45a7Smrg# serial 1 (pkg-config-0.24) 8627ab47cfaaSmrg# 8628ab47cfaaSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8629ab47cfaaSmrg# 8630ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify 8631ab47cfaaSmrg# it under the terms of the GNU General Public License as published by 8632ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or 8633ab47cfaaSmrg# (at your option) any later version. 8634ab47cfaaSmrg# 8635ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but 8636ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8637ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8638ab47cfaaSmrg# General Public License for more details. 8639ab47cfaaSmrg# 8640ab47cfaaSmrg# You should have received a copy of the GNU General Public License 8641ab47cfaaSmrg# along with this program; if not, write to the Free Software 8642ab47cfaaSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8643ab47cfaaSmrg# 8644ab47cfaaSmrg# As a special exception to the GNU General Public License, if you 8645ab47cfaaSmrg# distribute this file as part of a program that contains a 8646ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under 8647ab47cfaaSmrg# the same distribution terms that you use for the rest of that program. 8648ab47cfaaSmrg 8649ab47cfaaSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8650ab47cfaaSmrg# ---------------------------------- 8651ab47cfaaSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8652ab47cfaaSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 865338770048Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 865438770048Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 86556aec45a7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 86566aec45a7SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 86576aec45a7SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 86586aec45a7Smrg 8659ab47cfaaSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8660ab47cfaaSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8661ab47cfaaSmrgfi 8662ab47cfaaSmrgif test -n "$PKG_CONFIG"; then 8663ab47cfaaSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8664ab47cfaaSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8665ab47cfaaSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8666ab47cfaaSmrg AC_MSG_RESULT([yes]) 8667ab47cfaaSmrg else 8668ab47cfaaSmrg AC_MSG_RESULT([no]) 8669ab47cfaaSmrg PKG_CONFIG="" 8670ab47cfaaSmrg fi 8671ab47cfaaSmrgfi[]dnl 8672ab47cfaaSmrg])# PKG_PROG_PKG_CONFIG 8673ab47cfaaSmrg 8674ab47cfaaSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8675ab47cfaaSmrg# 8676ab47cfaaSmrg# Check to see whether a particular set of modules exists. Similar 8677ab47cfaaSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8678ab47cfaaSmrg# 86796aec45a7Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86806aec45a7Smrg# only at the first occurence in configure.ac, so if the first place 86816aec45a7Smrg# it's called might be skipped (such as if it is within an "if", you 86826aec45a7Smrg# have to call PKG_CHECK_EXISTS manually 8683ab47cfaaSmrg# -------------------------------------------------------------- 8684ab47cfaaSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8685ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8686ab47cfaaSmrgif test -n "$PKG_CONFIG" && \ 8687ab47cfaaSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 86886aec45a7Smrg m4_default([$2], [:]) 8689ab47cfaaSmrgm4_ifvaln([$3], [else 8690ab47cfaaSmrg $3])dnl 8691ab47cfaaSmrgfi]) 8692ab47cfaaSmrg 8693ab47cfaaSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8694ab47cfaaSmrg# --------------------------------------------- 8695ab47cfaaSmrgm4_define([_PKG_CONFIG], 86968697ee19Smrg[if test -n "$$1"; then 86978697ee19Smrg pkg_cv_[]$1="$$1" 86988697ee19Smrg elif test -n "$PKG_CONFIG"; then 86998697ee19Smrg PKG_CHECK_EXISTS([$3], 870038770048Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 870138770048Smrg test "x$?" != "x0" && pkg_failed=yes ], 87028697ee19Smrg [pkg_failed=yes]) 87038697ee19Smrg else 87048697ee19Smrg pkg_failed=untried 8705ab47cfaaSmrgfi[]dnl 8706ab47cfaaSmrg])# _PKG_CONFIG 8707ab47cfaaSmrg 8708ab47cfaaSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8709ab47cfaaSmrg# ----------------------------- 8710ab47cfaaSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8711ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8712ab47cfaaSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8713ab47cfaaSmrg _pkg_short_errors_supported=yes 8714ab47cfaaSmrgelse 8715ab47cfaaSmrg _pkg_short_errors_supported=no 8716ab47cfaaSmrgfi[]dnl 8717ab47cfaaSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8718ab47cfaaSmrg 8719ab47cfaaSmrg 8720ab47cfaaSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8721ab47cfaaSmrg# [ACTION-IF-NOT-FOUND]) 8722ab47cfaaSmrg# 8723ab47cfaaSmrg# 8724ab47cfaaSmrg# Note that if there is a possibility the first call to 8725ab47cfaaSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8726ab47cfaaSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8727ab47cfaaSmrg# 8728ab47cfaaSmrg# 8729ab47cfaaSmrg# -------------------------------------------------------------- 8730ab47cfaaSmrgAC_DEFUN([PKG_CHECK_MODULES], 8731ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8732ab47cfaaSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8733ab47cfaaSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8734ab47cfaaSmrg 8735ab47cfaaSmrgpkg_failed=no 8736ab47cfaaSmrgAC_MSG_CHECKING([for $1]) 8737ab47cfaaSmrg 8738ab47cfaaSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8739ab47cfaaSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8740ab47cfaaSmrg 8741ab47cfaaSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8742ab47cfaaSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8743ab47cfaaSmrgSee the pkg-config man page for more details.]) 8744ab47cfaaSmrg 8745ab47cfaaSmrgif test $pkg_failed = yes; then 87466aec45a7Smrg AC_MSG_RESULT([no]) 8747ab47cfaaSmrg _PKG_SHORT_ERRORS_SUPPORTED 8748ab47cfaaSmrg if test $_pkg_short_errors_supported = yes; then 874938770048Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 8750ab47cfaaSmrg else 875138770048Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 8752ab47cfaaSmrg fi 8753ab47cfaaSmrg # Put the nasty error message in config.log where it belongs 8754ab47cfaaSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8755ab47cfaaSmrg 87566aec45a7Smrg m4_default([$4], [AC_MSG_ERROR( 8757ab47cfaaSmrg[Package requirements ($2) were not met: 8758ab47cfaaSmrg 8759ab47cfaaSmrg$$1_PKG_ERRORS 8760ab47cfaaSmrg 8761ab47cfaaSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8762ab47cfaaSmrginstalled software in a non-standard prefix. 8763ab47cfaaSmrg 876438770048Smrg_PKG_TEXT])[]dnl 87656aec45a7Smrg ]) 8766ab47cfaaSmrgelif test $pkg_failed = untried; then 87676aec45a7Smrg AC_MSG_RESULT([no]) 87686aec45a7Smrg m4_default([$4], [AC_MSG_FAILURE( 8769ab47cfaaSmrg[The pkg-config script could not be found or is too old. Make sure it 8770ab47cfaaSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8771ab47cfaaSmrgpath to pkg-config. 8772ab47cfaaSmrg 8773ab47cfaaSmrg_PKG_TEXT 8774ab47cfaaSmrg 877538770048SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 87766aec45a7Smrg ]) 8777ab47cfaaSmrgelse 8778ab47cfaaSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8779ab47cfaaSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8780ab47cfaaSmrg AC_MSG_RESULT([yes]) 87816aec45a7Smrg $3 8782ab47cfaaSmrgfi[]dnl 8783ab47cfaaSmrg])# PKG_CHECK_MODULES 8784ab47cfaaSmrg 87851e449e82Smrg 87861e449e82Smrg# PKG_INSTALLDIR(DIRECTORY) 87871e449e82Smrg# ------------------------- 87881e449e82Smrg# Substitutes the variable pkgconfigdir as the location where a module 87891e449e82Smrg# should install pkg-config .pc files. By default the directory is 87901e449e82Smrg# $libdir/pkgconfig, but the default can be changed by passing 87911e449e82Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 87921e449e82Smrg# parameter. 87931e449e82SmrgAC_DEFUN([PKG_INSTALLDIR], 87941e449e82Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 87951e449e82Smrgm4_pushdef([pkg_description], 87961e449e82Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 87971e449e82SmrgAC_ARG_WITH([pkgconfigdir], 87981e449e82Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 87991e449e82Smrg [with_pkgconfigdir=]pkg_default) 88001e449e82SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 88011e449e82Smrgm4_popdef([pkg_default]) 88021e449e82Smrgm4_popdef([pkg_description]) 88031e449e82Smrg]) dnl PKG_INSTALLDIR 88041e449e82Smrg 88051e449e82Smrg 88061e449e82Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 88071e449e82Smrg# ------------------------- 88081e449e82Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 88091e449e82Smrg# module should install arch-independent pkg-config .pc files. By 88101e449e82Smrg# default the directory is $datadir/pkgconfig, but the default can be 88111e449e82Smrg# changed by passing DIRECTORY. The user can override through the 88121e449e82Smrg# --with-noarch-pkgconfigdir parameter. 88131e449e82SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 88141e449e82Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 88151e449e82Smrgm4_pushdef([pkg_description], 88161e449e82Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 88171e449e82SmrgAC_ARG_WITH([noarch-pkgconfigdir], 88181e449e82Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 88191e449e82Smrg [with_noarch_pkgconfigdir=]pkg_default) 88201e449e82SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 88211e449e82Smrgm4_popdef([pkg_default]) 88221e449e82Smrgm4_popdef([pkg_description]) 88231e449e82Smrg]) dnl PKG_NOARCH_INSTALLDIR 88241e449e82Smrg 88251e449e82Smrg 88261e449e82Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 88271e449e82Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 88281e449e82Smrg# ------------------------------------------- 88291e449e82Smrg# Retrieves the value of the pkg-config variable for the given module. 88301e449e82SmrgAC_DEFUN([PKG_CHECK_VAR], 88311e449e82Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 88321e449e82SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 88331e449e82Smrg 88341e449e82Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 88351e449e82SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 88361e449e82Smrg 88371e449e82SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 88381e449e82Smrg])# PKG_CHECK_VAR 88391e449e82Smrg 88401473d951Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 88418697ee19Smrgdnl 88426aec45a7Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 88431e449e82Smrgdnl 88448697ee19Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 88456aec45a7Smrgdnl copy of this software and associated documentation files (the "Software"), 88466aec45a7Smrgdnl to deal in the Software without restriction, including without limitation 88476aec45a7Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 88486aec45a7Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 88496aec45a7Smrgdnl Software is furnished to do so, subject to the following conditions: 88508697ee19Smrgdnl 88516aec45a7Smrgdnl The above copyright notice and this permission notice (including the next 88526aec45a7Smrgdnl paragraph) shall be included in all copies or substantial portions of the 88536aec45a7Smrgdnl Software. 88548697ee19Smrgdnl 88556aec45a7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 88566aec45a7Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 88576aec45a7Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 88586aec45a7Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 88596aec45a7Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 88606aec45a7Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 88616aec45a7Smrgdnl DEALINGS IN THE SOFTWARE. 8862ab47cfaaSmrg 88638697ee19Smrg# XORG_MACROS_VERSION(required-version) 88648697ee19Smrg# ------------------------------------- 88658697ee19Smrg# Minimum version: 1.1.0 8866ab47cfaaSmrg# 88678697ee19Smrg# If you're using a macro added in Version 1.1 or newer, include this in 88688697ee19Smrg# your configure.ac with the minimum required version, such as: 88698697ee19Smrg# XORG_MACROS_VERSION(1.1) 8870ab47cfaaSmrg# 88716aec45a7Smrg# To ensure that this macro is defined, also add: 88726aec45a7Smrg# m4_ifndef([XORG_MACROS_VERSION], 88736aec45a7Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8874ab47cfaaSmrg# 8875ab47cfaaSmrg# 88761e449e82Smrg# See the "minimum version" comment for each macro you use to see what 88778697ee19Smrg# version you require. 88786aec45a7Smrgm4_defun([XORG_MACROS_VERSION],[ 88791e449e82Smrgm4_define([vers_have], [1.19.0]) 88806aec45a7Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 88816aec45a7Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 88826aec45a7Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 88836aec45a7Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 88846aec45a7Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 88856aec45a7Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 88866aec45a7Smrgm4_undefine([vers_have]) 88876aec45a7Smrgm4_undefine([maj_have]) 88886aec45a7Smrgm4_undefine([maj_needed]) 88898697ee19Smrg]) # XORG_MACROS_VERSION 8890ab47cfaaSmrg 88918697ee19Smrg# XORG_PROG_RAWCPP() 88928697ee19Smrg# ------------------ 88938697ee19Smrg# Minimum version: 1.0.0 8894ab47cfaaSmrg# 88958697ee19Smrg# Find cpp program and necessary flags for use in pre-processing text files 88968697ee19Smrg# such as man pages and config files 88978697ee19SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 88988697ee19SmrgAC_REQUIRE([AC_PROG_CPP]) 88991e449e82SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 89008697ee19Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8901ab47cfaaSmrg 89028697ee19Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 89038697ee19Smrg# which is not the best choice for supporting other OS'es, but covers most 89048697ee19Smrg# of the ones we need for now. 89058697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8906aa9e3350SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 89078697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 89088697ee19Smrg AC_MSG_RESULT([no]) 8909ab47cfaaSmrgelse 89108697ee19Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 89118697ee19Smrg RAWCPPFLAGS=-undef 89128697ee19Smrg AC_MSG_RESULT([yes]) 89131473d951Smrg # under Cygwin unix is still defined even with -undef 89141473d951Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 89151473d951Smrg RAWCPPFLAGS="-undef -ansi" 89161473d951Smrg AC_MSG_RESULT([yes, with -ansi]) 89178697ee19Smrg else 89188697ee19Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 89198697ee19Smrg fi 8920ab47cfaaSmrgfi 89218697ee19Smrgrm -f conftest.$ac_ext 8922ab47cfaaSmrg 89238697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8924aa9e3350SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 89258697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 89268697ee19Smrg AC_MSG_RESULT([no]) 89278697ee19Smrgelse 89288697ee19Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 89291e449e82Smrg TRADITIONALCPPFLAGS="-traditional" 89308697ee19Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 89318697ee19Smrg AC_MSG_RESULT([yes]) 89328697ee19Smrg else 89338697ee19Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 89348697ee19Smrg fi 89358697ee19Smrgfi 89368697ee19Smrgrm -f conftest.$ac_ext 89378697ee19SmrgAC_SUBST(RAWCPPFLAGS) 89381e449e82SmrgAC_SUBST(TRADITIONALCPPFLAGS) 89398697ee19Smrg]) # XORG_PROG_RAWCPP 8940ab47cfaaSmrg 89418697ee19Smrg# XORG_MANPAGE_SECTIONS() 89428697ee19Smrg# ----------------------- 89438697ee19Smrg# Minimum version: 1.0.0 8944ab47cfaaSmrg# 89458697ee19Smrg# Determine which sections man pages go in for the different man page types 89468697ee19Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 89478697ee19Smrg# Not sure if there's any better way than just hardcoding by OS name. 89488697ee19Smrg# Override default settings by setting environment variables 89496aec45a7Smrg# Added MAN_SUBSTS in version 1.8 89506aec45a7Smrg# Added AC_PROG_SED in version 1.8 8951ab47cfaaSmrg 89528697ee19SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 89538697ee19SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 89546aec45a7SmrgAC_REQUIRE([AC_PROG_SED]) 8955ab47cfaaSmrg 89568697ee19Smrgif test x$APP_MAN_SUFFIX = x ; then 89578697ee19Smrg APP_MAN_SUFFIX=1 89588697ee19Smrgfi 89598697ee19Smrgif test x$APP_MAN_DIR = x ; then 89608697ee19Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 89618697ee19Smrgfi 8962ab47cfaaSmrg 89638697ee19Smrgif test x$LIB_MAN_SUFFIX = x ; then 89648697ee19Smrg LIB_MAN_SUFFIX=3 89658697ee19Smrgfi 89668697ee19Smrgif test x$LIB_MAN_DIR = x ; then 89678697ee19Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 89688697ee19Smrgfi 8969ab47cfaaSmrg 89708697ee19Smrgif test x$FILE_MAN_SUFFIX = x ; then 89718697ee19Smrg case $host_os in 89728697ee19Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 89738697ee19Smrg *) FILE_MAN_SUFFIX=5 ;; 8974ab47cfaaSmrg esac 8975ab47cfaaSmrgfi 89768697ee19Smrgif test x$FILE_MAN_DIR = x ; then 89778697ee19Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 89788697ee19Smrgfi 8979ab47cfaaSmrg 89808697ee19Smrgif test x$MISC_MAN_SUFFIX = x ; then 89818697ee19Smrg case $host_os in 89828697ee19Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 89838697ee19Smrg *) MISC_MAN_SUFFIX=7 ;; 89848697ee19Smrg esac 89858697ee19Smrgfi 89868697ee19Smrgif test x$MISC_MAN_DIR = x ; then 89878697ee19Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 89888697ee19Smrgfi 8989ab47cfaaSmrg 89908697ee19Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 89918697ee19Smrg case $host_os in 89928697ee19Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 89938697ee19Smrg *) DRIVER_MAN_SUFFIX=4 ;; 89948697ee19Smrg esac 89958697ee19Smrgfi 89968697ee19Smrgif test x$DRIVER_MAN_DIR = x ; then 89978697ee19Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 89988697ee19Smrgfi 8999ab47cfaaSmrg 90008697ee19Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 90018697ee19Smrg case $host_os in 90028697ee19Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 90038697ee19Smrg *) ADMIN_MAN_SUFFIX=8 ;; 90048697ee19Smrg esac 90058697ee19Smrgfi 90068697ee19Smrgif test x$ADMIN_MAN_DIR = x ; then 90078697ee19Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9008ab47cfaaSmrgfi 9009ab47cfaaSmrg 9010ab47cfaaSmrg 90118697ee19SmrgAC_SUBST([APP_MAN_SUFFIX]) 90128697ee19SmrgAC_SUBST([LIB_MAN_SUFFIX]) 90138697ee19SmrgAC_SUBST([FILE_MAN_SUFFIX]) 90148697ee19SmrgAC_SUBST([MISC_MAN_SUFFIX]) 90158697ee19SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 90168697ee19SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 90178697ee19SmrgAC_SUBST([APP_MAN_DIR]) 90188697ee19SmrgAC_SUBST([LIB_MAN_DIR]) 90198697ee19SmrgAC_SUBST([FILE_MAN_DIR]) 90208697ee19SmrgAC_SUBST([MISC_MAN_DIR]) 90218697ee19SmrgAC_SUBST([DRIVER_MAN_DIR]) 90228697ee19SmrgAC_SUBST([ADMIN_MAN_DIR]) 90236aec45a7Smrg 90246aec45a7SmrgXORG_MAN_PAGE="X Version 11" 90256aec45a7SmrgAC_SUBST([XORG_MAN_PAGE]) 90266aec45a7SmrgMAN_SUBSTS="\ 90276aec45a7Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 90286aec45a7Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 90296aec45a7Smrg -e 's|__xservername__|Xorg|g' \ 90306aec45a7Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 90316aec45a7Smrg -e 's|__projectroot__|\$(prefix)|g' \ 90326aec45a7Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 90336aec45a7Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 90346aec45a7Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 90356aec45a7Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 90366aec45a7Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 90376aec45a7Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 90386aec45a7Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 90396aec45a7SmrgAC_SUBST([MAN_SUBSTS]) 90406aec45a7Smrg 90418697ee19Smrg]) # XORG_MANPAGE_SECTIONS 9042ab47cfaaSmrg 90436aec45a7Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 90446aec45a7Smrg# ------------------------ 90456aec45a7Smrg# Minimum version: 1.7.0 90466aec45a7Smrg# 90476aec45a7Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 90486aec45a7Smrg# provided by xorg-sgml-doctools, if installed. 90496aec45a7SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 90506aec45a7SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 90516aec45a7SmrgXORG_SGML_PATH= 90526aec45a7SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 90536aec45a7Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 90546aec45a7Smrg [m4_ifval([$1],[:], 90556aec45a7Smrg [if test x"$cross_compiling" != x"yes" ; then 90566aec45a7Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 90576aec45a7Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 90586aec45a7Smrg fi]) 90596aec45a7Smrg ]) 90606aec45a7Smrg 90616aec45a7Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 90626aec45a7Smrg# the path and the name of the doc stylesheet 90636aec45a7Smrgif test "x$XORG_SGML_PATH" != "x" ; then 90646aec45a7Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 90656aec45a7Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 90666aec45a7Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 90676aec45a7Smrgelse 90686aec45a7Smrg AC_MSG_RESULT([no]) 90696aec45a7Smrgfi 90706aec45a7Smrg 90716aec45a7SmrgAC_SUBST(XORG_SGML_PATH) 90726aec45a7SmrgAC_SUBST(STYLESHEET_SRCDIR) 90736aec45a7SmrgAC_SUBST(XSL_STYLESHEET) 90746aec45a7SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 90756aec45a7Smrg]) # XORG_CHECK_SGML_DOCTOOLS 90766aec45a7Smrg 90778697ee19Smrg# XORG_CHECK_LINUXDOC 90788697ee19Smrg# ------------------- 90798697ee19Smrg# Minimum version: 1.0.0 9080ab47cfaaSmrg# 90818697ee19Smrg# Defines the variable MAKE_TEXT if the necessary tools and 90828697ee19Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 90838697ee19Smrg# Whether or not the necessary tools and files are found can be checked 90848697ee19Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 90858697ee19SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 90866aec45a7SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90876aec45a7SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9088ab47cfaaSmrg 90898697ee19SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9090ab47cfaaSmrg 90916aec45a7SmrgAC_MSG_CHECKING([whether to build documentation]) 9092ab47cfaaSmrg 90936aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 90948697ee19Smrg BUILDDOC=yes 90958697ee19Smrgelse 90968697ee19Smrg BUILDDOC=no 90978697ee19Smrgfi 9098ab47cfaaSmrg 90998697ee19SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9100ab47cfaaSmrg 91018697ee19SmrgAC_MSG_RESULT([$BUILDDOC]) 9102ab47cfaaSmrg 91036aec45a7SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9104ab47cfaaSmrg 91056aec45a7Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 91068697ee19Smrg BUILDPDFDOC=yes 91078697ee19Smrgelse 91088697ee19Smrg BUILDPDFDOC=no 9109ab47cfaaSmrgfi 9110ab47cfaaSmrg 91118697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9112ab47cfaaSmrg 91138697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9114ab47cfaaSmrg 91156aec45a7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 91168697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 91178697ee19SmrgMAKE_PDF="$PS2PDF" 91188697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9119ab47cfaaSmrg 91208697ee19SmrgAC_SUBST(MAKE_TEXT) 91218697ee19SmrgAC_SUBST(MAKE_PS) 91228697ee19SmrgAC_SUBST(MAKE_PDF) 91238697ee19SmrgAC_SUBST(MAKE_HTML) 91248697ee19Smrg]) # XORG_CHECK_LINUXDOC 9125ab47cfaaSmrg 91268697ee19Smrg# XORG_CHECK_DOCBOOK 91278697ee19Smrg# ------------------- 91288697ee19Smrg# Minimum version: 1.0.0 9129ab47cfaaSmrg# 91308697ee19Smrg# Checks for the ability to build output formats from SGML DocBook source. 91318697ee19Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 91328697ee19Smrg# indicates whether the necessary tools and files are found and, if set, 91338697ee19Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 91348697ee19SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 91356aec45a7SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 91366aec45a7Smrg 91378697ee19SmrgBUILDTXTDOC=no 91388697ee19SmrgBUILDPDFDOC=no 91398697ee19SmrgBUILDPSDOC=no 91408697ee19SmrgBUILDHTMLDOC=no 9141ab47cfaaSmrg 91428697ee19SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 91438697ee19SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 91448697ee19SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 91458697ee19SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9146ab47cfaaSmrg 91476aec45a7SmrgAC_MSG_CHECKING([whether to build text documentation]) 91486aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 91498697ee19Smrg test x$BUILD_TXTDOC != xno; then 91508697ee19Smrg BUILDTXTDOC=yes 91518697ee19Smrgfi 91528697ee19SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 91538697ee19SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9154ab47cfaaSmrg 91556aec45a7SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 91566aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 91578697ee19Smrg test x$BUILD_PDFDOC != xno; then 91588697ee19Smrg BUILDPDFDOC=yes 9159ab47cfaaSmrgfi 91608697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 91618697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9162ab47cfaaSmrg 91636aec45a7SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 91646aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 91658697ee19Smrg test x$BUILD_PSDOC != xno; then 91668697ee19Smrg BUILDPSDOC=yes 91678697ee19Smrgfi 91688697ee19SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 91698697ee19SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9170ab47cfaaSmrg 91716aec45a7SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 91726aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 91738697ee19Smrg test x$BUILD_HTMLDOC != xno; then 91748697ee19Smrg BUILDHTMLDOC=yes 91758697ee19Smrgfi 91768697ee19SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 91778697ee19SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9178ab47cfaaSmrg 91798697ee19SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 91808697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 91818697ee19SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 91828697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9183ab47cfaaSmrg 91848697ee19SmrgAC_SUBST(MAKE_TEXT) 91858697ee19SmrgAC_SUBST(MAKE_PS) 91868697ee19SmrgAC_SUBST(MAKE_PDF) 91878697ee19SmrgAC_SUBST(MAKE_HTML) 91888697ee19Smrg]) # XORG_CHECK_DOCBOOK 9189ab47cfaaSmrg 91906aec45a7Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 91916aec45a7Smrg# ---------------- 91926aec45a7Smrg# Minimum version: 1.5.0 91936aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 91946aec45a7Smrg# 91956aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 91966aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 91976aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 91986aec45a7Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 91996aec45a7Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 92006aec45a7Smrg# --with-xmlto assumes 'auto'. 92016aec45a7Smrg# 92026aec45a7Smrg# Interface to module: 92036aec45a7Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 92046aec45a7Smrg# XMLTO: returns the path of the xmlto program found 92056aec45a7Smrg# returns the path set by the user in the environment 92066aec45a7Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 92076aec45a7Smrg# 'no' user instructs the module not to use xmlto 92086aec45a7Smrg# 92096aec45a7Smrg# Added in version 1.10.0 92106aec45a7Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 92116aec45a7Smrg# xmlto for text output requires either lynx, links, or w3m browsers 92126aec45a7Smrg# 92136aec45a7Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 92146aec45a7Smrg# 92156aec45a7SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 92166aec45a7SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 92176aec45a7Smrgm4_define([_defopt], m4_default([$2], [auto])) 92186aec45a7SmrgAC_ARG_WITH(xmlto, 92196aec45a7Smrg AS_HELP_STRING([--with-xmlto], 92206aec45a7Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 92216aec45a7Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 92226aec45a7Smrgm4_undefine([_defopt]) 92236aec45a7Smrg 92246aec45a7Smrgif test "x$use_xmlto" = x"auto"; then 92256aec45a7Smrg AC_PATH_PROG([XMLTO], [xmlto]) 92266aec45a7Smrg if test "x$XMLTO" = "x"; then 92276aec45a7Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 92286aec45a7Smrg have_xmlto=no 92296aec45a7Smrg else 92306aec45a7Smrg have_xmlto=yes 92316aec45a7Smrg fi 92326aec45a7Smrgelif test "x$use_xmlto" = x"yes" ; then 92336aec45a7Smrg AC_PATH_PROG([XMLTO], [xmlto]) 92346aec45a7Smrg if test "x$XMLTO" = "x"; then 92356aec45a7Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 92366aec45a7Smrg fi 92376aec45a7Smrg have_xmlto=yes 92386aec45a7Smrgelif test "x$use_xmlto" = x"no" ; then 92396aec45a7Smrg if test "x$XMLTO" != "x"; then 92406aec45a7Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 92416aec45a7Smrg fi 92426aec45a7Smrg have_xmlto=no 92436aec45a7Smrgelse 92446aec45a7Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 92456aec45a7Smrgfi 92466aec45a7Smrg 92476aec45a7Smrg# Test for a minimum version of xmlto, if provided. 92486aec45a7Smrgm4_ifval([$1], 92496aec45a7Smrg[if test "$have_xmlto" = yes; then 92506aec45a7Smrg # scrape the xmlto version 92516aec45a7Smrg AC_MSG_CHECKING([the xmlto version]) 92526aec45a7Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 92536aec45a7Smrg AC_MSG_RESULT([$xmlto_version]) 92546aec45a7Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 92556aec45a7Smrg [if test "x$use_xmlto" = xauto; then 92566aec45a7Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 92576aec45a7Smrg have_xmlto=no 92586aec45a7Smrg else 92596aec45a7Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 92606aec45a7Smrg fi]) 92616aec45a7Smrgfi]) 92626aec45a7Smrg 92636aec45a7Smrg# Test for the ability of xmlto to generate a text target 92646aec45a7Smrghave_xmlto_text=no 92656aec45a7Smrgcat > conftest.xml << "EOF" 92666aec45a7SmrgEOF 92676aec45a7SmrgAS_IF([test "$have_xmlto" = yes], 92686aec45a7Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 92696aec45a7Smrg [have_xmlto_text=yes], 92706aec45a7Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 92716aec45a7Smrgrm -f conftest.xml 92726aec45a7SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 92736aec45a7SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 92746aec45a7Smrg]) # XORG_WITH_XMLTO 92756aec45a7Smrg 9276aa9e3350Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9277aa9e3350Smrg# -------------------------------------------- 9278aa9e3350Smrg# Minimum version: 1.12.0 9279aa9e3350Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9280aa9e3350Smrg# 9281aa9e3350Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9282aa9e3350Smrg# XML-based language used for the transformation of XML documents. 9283aa9e3350Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9284aa9e3350Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9285aa9e3350Smrg# The XSLT processor is often used as a standalone tool for transformations. 9286aa9e3350Smrg# It should not be assumed that this tool is used only to work with documnetation. 9287aa9e3350Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9288aa9e3350Smrg# 9289aa9e3350Smrg# Interface to module: 9290aa9e3350Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9291aa9e3350Smrg# XSLTPROC: returns the path of the xsltproc program found 9292aa9e3350Smrg# returns the path set by the user in the environment 9293aa9e3350Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9294aa9e3350Smrg# 'no' user instructs the module not to use xsltproc 9295aa9e3350Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9296aa9e3350Smrg# 9297aa9e3350Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9298aa9e3350Smrg# 9299aa9e3350SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9300aa9e3350SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9301aa9e3350Smrg# Preserves the interface, should it be implemented later 9302aa9e3350Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9303aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 9304aa9e3350SmrgAC_ARG_WITH(xsltproc, 9305aa9e3350Smrg AS_HELP_STRING([--with-xsltproc], 9306aa9e3350Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9307aa9e3350Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9308aa9e3350Smrgm4_undefine([_defopt]) 9309aa9e3350Smrg 9310aa9e3350Smrgif test "x$use_xsltproc" = x"auto"; then 9311aa9e3350Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9312aa9e3350Smrg if test "x$XSLTPROC" = "x"; then 9313aa9e3350Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9314aa9e3350Smrg have_xsltproc=no 9315aa9e3350Smrg else 9316aa9e3350Smrg have_xsltproc=yes 9317aa9e3350Smrg fi 9318aa9e3350Smrgelif test "x$use_xsltproc" = x"yes" ; then 9319aa9e3350Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9320aa9e3350Smrg if test "x$XSLTPROC" = "x"; then 9321aa9e3350Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9322aa9e3350Smrg fi 9323aa9e3350Smrg have_xsltproc=yes 9324aa9e3350Smrgelif test "x$use_xsltproc" = x"no" ; then 9325aa9e3350Smrg if test "x$XSLTPROC" != "x"; then 9326aa9e3350Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9327aa9e3350Smrg fi 9328aa9e3350Smrg have_xsltproc=no 9329aa9e3350Smrgelse 9330aa9e3350Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9331aa9e3350Smrgfi 9332aa9e3350Smrg 9333aa9e3350SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9334aa9e3350Smrg]) # XORG_WITH_XSLTPROC 9335aa9e3350Smrg 9336aa9e3350Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9337aa9e3350Smrg# ---------------------------------------- 9338aa9e3350Smrg# Minimum version: 1.15.0 9339aa9e3350Smrg# 9340aa9e3350Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9341aa9e3350Smrg# scanning arbitrary text files, extracting information from those text files, 9342aa9e3350Smrg# and printing reports based on that information. 9343aa9e3350Smrg# 9344aa9e3350Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9345aa9e3350Smrg# 9346aa9e3350Smrg# Interface to module: 9347aa9e3350Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9348aa9e3350Smrg# PERL: returns the path of the perl program found 9349aa9e3350Smrg# returns the path set by the user in the environment 9350aa9e3350Smrg# --with-perl: 'yes' user instructs the module to use perl 9351aa9e3350Smrg# 'no' user instructs the module not to use perl 9352aa9e3350Smrg# have_perl: returns yes if perl found in PATH or no 9353aa9e3350Smrg# 9354aa9e3350Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9355aa9e3350Smrg# 9356aa9e3350SmrgAC_DEFUN([XORG_WITH_PERL],[ 9357aa9e3350SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9358aa9e3350Smrg# Preserves the interface, should it be implemented later 9359aa9e3350Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9360aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 9361aa9e3350SmrgAC_ARG_WITH(perl, 9362aa9e3350Smrg AS_HELP_STRING([--with-perl], 9363aa9e3350Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9364aa9e3350Smrg [use_perl=$withval], [use_perl=]_defopt) 9365aa9e3350Smrgm4_undefine([_defopt]) 9366aa9e3350Smrg 9367aa9e3350Smrgif test "x$use_perl" = x"auto"; then 9368aa9e3350Smrg AC_PATH_PROG([PERL], [perl]) 9369aa9e3350Smrg if test "x$PERL" = "x"; then 9370aa9e3350Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9371aa9e3350Smrg have_perl=no 9372aa9e3350Smrg else 9373aa9e3350Smrg have_perl=yes 9374aa9e3350Smrg fi 9375aa9e3350Smrgelif test "x$use_perl" = x"yes" ; then 9376aa9e3350Smrg AC_PATH_PROG([PERL], [perl]) 9377aa9e3350Smrg if test "x$PERL" = "x"; then 9378aa9e3350Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9379aa9e3350Smrg fi 9380aa9e3350Smrg have_perl=yes 9381aa9e3350Smrgelif test "x$use_perl" = x"no" ; then 9382aa9e3350Smrg if test "x$PERL" != "x"; then 9383aa9e3350Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9384aa9e3350Smrg fi 9385aa9e3350Smrg have_perl=no 9386aa9e3350Smrgelse 9387aa9e3350Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9388aa9e3350Smrgfi 9389aa9e3350Smrg 9390aa9e3350SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9391aa9e3350Smrg]) # XORG_WITH_PERL 9392aa9e3350Smrg 93936aec45a7Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 93946aec45a7Smrg# ---------------- 93956aec45a7Smrg# Minimum version: 1.5.0 93966aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 93976aec45a7Smrg# 93986aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 93996aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 94006aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94016aec45a7Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 94026aec45a7Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 94036aec45a7Smrg# --with-asciidoc assumes 'auto'. 94046aec45a7Smrg# 94056aec45a7Smrg# Interface to module: 94066aec45a7Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 94076aec45a7Smrg# ASCIIDOC: returns the path of the asciidoc program found 94086aec45a7Smrg# returns the path set by the user in the environment 94096aec45a7Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 94106aec45a7Smrg# 'no' user instructs the module not to use asciidoc 94116aec45a7Smrg# 94126aec45a7Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 94136aec45a7Smrg# 94146aec45a7SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 94156aec45a7SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 94166aec45a7Smrgm4_define([_defopt], m4_default([$2], [auto])) 94176aec45a7SmrgAC_ARG_WITH(asciidoc, 94186aec45a7Smrg AS_HELP_STRING([--with-asciidoc], 94196aec45a7Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 94206aec45a7Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 94216aec45a7Smrgm4_undefine([_defopt]) 94226aec45a7Smrg 94236aec45a7Smrgif test "x$use_asciidoc" = x"auto"; then 94246aec45a7Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 94256aec45a7Smrg if test "x$ASCIIDOC" = "x"; then 94266aec45a7Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 94276aec45a7Smrg have_asciidoc=no 94286aec45a7Smrg else 94296aec45a7Smrg have_asciidoc=yes 94306aec45a7Smrg fi 94316aec45a7Smrgelif test "x$use_asciidoc" = x"yes" ; then 94326aec45a7Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 94336aec45a7Smrg if test "x$ASCIIDOC" = "x"; then 94346aec45a7Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 94356aec45a7Smrg fi 94366aec45a7Smrg have_asciidoc=yes 94376aec45a7Smrgelif test "x$use_asciidoc" = x"no" ; then 94386aec45a7Smrg if test "x$ASCIIDOC" != "x"; then 94396aec45a7Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 94406aec45a7Smrg fi 94416aec45a7Smrg have_asciidoc=no 94426aec45a7Smrgelse 94436aec45a7Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 94446aec45a7Smrgfi 94456aec45a7Smrgm4_ifval([$1], 94466aec45a7Smrg[if test "$have_asciidoc" = yes; then 94476aec45a7Smrg # scrape the asciidoc version 94486aec45a7Smrg AC_MSG_CHECKING([the asciidoc version]) 94496aec45a7Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 94506aec45a7Smrg AC_MSG_RESULT([$asciidoc_version]) 94516aec45a7Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 94526aec45a7Smrg [if test "x$use_asciidoc" = xauto; then 94536aec45a7Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 94546aec45a7Smrg have_asciidoc=no 94556aec45a7Smrg else 94566aec45a7Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 94576aec45a7Smrg fi]) 94586aec45a7Smrgfi]) 94596aec45a7SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 94606aec45a7Smrg]) # XORG_WITH_ASCIIDOC 94616aec45a7Smrg 94626aec45a7Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 94631e449e82Smrg# ------------------------------------------- 94646aec45a7Smrg# Minimum version: 1.5.0 94656aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 94661e449e82Smrg# Minimum version for optional DOT checking: 1.18.0 94676aec45a7Smrg# 94686aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 94696aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 94706aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94716aec45a7Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 94726aec45a7Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 94736aec45a7Smrg# --with-doxygen assumes 'auto'. 94746aec45a7Smrg# 94756aec45a7Smrg# Interface to module: 94766aec45a7Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 94776aec45a7Smrg# DOXYGEN: returns the path of the doxygen program found 94786aec45a7Smrg# returns the path set by the user in the environment 94796aec45a7Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 94806aec45a7Smrg# 'no' user instructs the module not to use doxygen 94816aec45a7Smrg# 94826aec45a7Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 94836aec45a7Smrg# 94846aec45a7SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 94856aec45a7SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 94861e449e82SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 94876aec45a7Smrgm4_define([_defopt], m4_default([$2], [auto])) 94886aec45a7SmrgAC_ARG_WITH(doxygen, 94896aec45a7Smrg AS_HELP_STRING([--with-doxygen], 94906aec45a7Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 94916aec45a7Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 94926aec45a7Smrgm4_undefine([_defopt]) 94936aec45a7Smrg 94946aec45a7Smrgif test "x$use_doxygen" = x"auto"; then 94956aec45a7Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94966aec45a7Smrg if test "x$DOXYGEN" = "x"; then 94976aec45a7Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 94986aec45a7Smrg have_doxygen=no 94996aec45a7Smrg else 95006aec45a7Smrg have_doxygen=yes 95016aec45a7Smrg fi 95026aec45a7Smrgelif test "x$use_doxygen" = x"yes" ; then 95036aec45a7Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 95046aec45a7Smrg if test "x$DOXYGEN" = "x"; then 95056aec45a7Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 95066aec45a7Smrg fi 95076aec45a7Smrg have_doxygen=yes 95086aec45a7Smrgelif test "x$use_doxygen" = x"no" ; then 95096aec45a7Smrg if test "x$DOXYGEN" != "x"; then 95106aec45a7Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 95116aec45a7Smrg fi 95126aec45a7Smrg have_doxygen=no 95136aec45a7Smrgelse 95146aec45a7Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 95156aec45a7Smrgfi 95166aec45a7Smrgm4_ifval([$1], 95176aec45a7Smrg[if test "$have_doxygen" = yes; then 95186aec45a7Smrg # scrape the doxygen version 95196aec45a7Smrg AC_MSG_CHECKING([the doxygen version]) 95206aec45a7Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 95216aec45a7Smrg AC_MSG_RESULT([$doxygen_version]) 95226aec45a7Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 95236aec45a7Smrg [if test "x$use_doxygen" = xauto; then 95246aec45a7Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 95256aec45a7Smrg have_doxygen=no 95266aec45a7Smrg else 95276aec45a7Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 95286aec45a7Smrg fi]) 95296aec45a7Smrgfi]) 95301e449e82Smrg 95311e449e82Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 95321e449e82Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 95331e449e82Smrgdnl HAVE_DOT = @HAVE_DOT@ 95341e449e82SmrgHAVE_DOT=no 95351e449e82Smrgif test "x$have_doxygen" = "xyes"; then 95361e449e82Smrg AC_PATH_PROG([DOT], [dot]) 95371e449e82Smrg if test "x$DOT" != "x"; then 95381e449e82Smrg HAVE_DOT=yes 95391e449e82Smrg fi 95401e449e82Smrgfi 95411e449e82Smrg 95421e449e82SmrgAC_SUBST([HAVE_DOT]) 95431e449e82SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 95446aec45a7SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 95456aec45a7Smrg]) # XORG_WITH_DOXYGEN 95466aec45a7Smrg 95476aec45a7Smrg# XORG_WITH_GROFF([DEFAULT]) 95486aec45a7Smrg# ---------------- 95496aec45a7Smrg# Minimum version: 1.6.0 95506aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 95516aec45a7Smrg# 95526aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 95536aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 95546aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 95556aec45a7Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 95566aec45a7Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 95576aec45a7Smrg# --with-groff assumes 'auto'. 95586aec45a7Smrg# 95596aec45a7Smrg# Interface to module: 95606aec45a7Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 95616aec45a7Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 95626aec45a7Smrg# HAVE_GROFF_MS: the -ms macros package 95636aec45a7Smrg# GROFF: returns the path of the groff program found 95646aec45a7Smrg# returns the path set by the user in the environment 95656aec45a7Smrg# --with-groff: 'yes' user instructs the module to use groff 95666aec45a7Smrg# 'no' user instructs the module not to use groff 95676aec45a7Smrg# 95686aec45a7Smrg# Added in version 1.9.0: 95696aec45a7Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 95706aec45a7Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 95716aec45a7Smrg# psselect from the psutils package. 95726aec45a7Smrg# the ghostcript package. Refer to the grohtml man pages 95736aec45a7Smrg# 95746aec45a7Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 95756aec45a7Smrg# 95766aec45a7Smrg# OS and distros often splits groff in a basic and full package, the former 95776aec45a7Smrg# having the groff program and the later having devices, fonts and macros 95786aec45a7Smrg# Checking for the groff executable is not enough. 95796aec45a7Smrg# 95806aec45a7Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 95816aec45a7Smrg# unset HAVE_GROFF or GROFF env variables. 95826aec45a7Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 95836aec45a7Smrg# 95846aec45a7SmrgAC_DEFUN([XORG_WITH_GROFF],[ 95856aec45a7SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 95866aec45a7Smrgm4_define([_defopt], m4_default([$1], [auto])) 95876aec45a7SmrgAC_ARG_WITH(groff, 95886aec45a7Smrg AS_HELP_STRING([--with-groff], 95896aec45a7Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 95906aec45a7Smrg [use_groff=$withval], [use_groff=]_defopt) 95916aec45a7Smrgm4_undefine([_defopt]) 95926aec45a7Smrg 95936aec45a7Smrgif test "x$use_groff" = x"auto"; then 95946aec45a7Smrg AC_PATH_PROG([GROFF], [groff]) 95956aec45a7Smrg if test "x$GROFF" = "x"; then 95966aec45a7Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 95976aec45a7Smrg have_groff=no 95986aec45a7Smrg else 95996aec45a7Smrg have_groff=yes 96006aec45a7Smrg fi 96016aec45a7Smrgelif test "x$use_groff" = x"yes" ; then 96026aec45a7Smrg AC_PATH_PROG([GROFF], [groff]) 96036aec45a7Smrg if test "x$GROFF" = "x"; then 96046aec45a7Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 96056aec45a7Smrg fi 96066aec45a7Smrg have_groff=yes 96076aec45a7Smrgelif test "x$use_groff" = x"no" ; then 96086aec45a7Smrg if test "x$GROFF" != "x"; then 96096aec45a7Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 96106aec45a7Smrg fi 96116aec45a7Smrg have_groff=no 96126aec45a7Smrgelse 96136aec45a7Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 96146aec45a7Smrgfi 96156aec45a7Smrg 96166aec45a7Smrg# We have groff, test for the presence of the macro packages 96176aec45a7Smrgif test "x$have_groff" = x"yes"; then 96186aec45a7Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 96196aec45a7Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 96206aec45a7Smrg groff_ms_works=yes 96216aec45a7Smrg else 96226aec45a7Smrg groff_ms_works=no 96236aec45a7Smrg fi 96246aec45a7Smrg AC_MSG_RESULT([$groff_ms_works]) 96256aec45a7Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 96266aec45a7Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 96276aec45a7Smrg groff_mm_works=yes 96286aec45a7Smrg else 96296aec45a7Smrg groff_mm_works=no 96306aec45a7Smrg fi 96316aec45a7Smrg AC_MSG_RESULT([$groff_mm_works]) 96326aec45a7Smrgfi 96336aec45a7Smrg 96346aec45a7Smrg# We have groff, test for HTML dependencies, one command per package 96356aec45a7Smrgif test "x$have_groff" = x"yes"; then 96366aec45a7Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 96376aec45a7Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 96386aec45a7Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 96396aec45a7Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 96406aec45a7Smrg have_groff_html=yes 96416aec45a7Smrg else 96426aec45a7Smrg have_groff_html=no 96436aec45a7Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 96446aec45a7Smrg fi 96456aec45a7Smrgfi 96466aec45a7Smrg 96476aec45a7Smrg# Set Automake conditionals for Makefiles 96486aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 96496aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 96506aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 96516aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 96526aec45a7Smrg]) # XORG_WITH_GROFF 96536aec45a7Smrg 9654aa9e3350Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9655aa9e3350Smrg# --------------------------------------- 96566aec45a7Smrg# Minimum version: 1.6.0 96576aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9658aa9e3350Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 96596aec45a7Smrg# 96606aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 96616aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 96626aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96636aec45a7Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 96646aec45a7Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 96656aec45a7Smrg# --with-fop assumes 'auto'. 96666aec45a7Smrg# 96676aec45a7Smrg# Interface to module: 96686aec45a7Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 96696aec45a7Smrg# FOP: returns the path of the fop program found 96706aec45a7Smrg# returns the path set by the user in the environment 96716aec45a7Smrg# --with-fop: 'yes' user instructs the module to use fop 96726aec45a7Smrg# 'no' user instructs the module not to use fop 96736aec45a7Smrg# 96746aec45a7Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 96756aec45a7Smrg# 96766aec45a7SmrgAC_DEFUN([XORG_WITH_FOP],[ 96776aec45a7SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9678aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 96796aec45a7SmrgAC_ARG_WITH(fop, 96806aec45a7Smrg AS_HELP_STRING([--with-fop], 96816aec45a7Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 96826aec45a7Smrg [use_fop=$withval], [use_fop=]_defopt) 96836aec45a7Smrgm4_undefine([_defopt]) 96846aec45a7Smrg 96856aec45a7Smrgif test "x$use_fop" = x"auto"; then 96866aec45a7Smrg AC_PATH_PROG([FOP], [fop]) 96876aec45a7Smrg if test "x$FOP" = "x"; then 96886aec45a7Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 96896aec45a7Smrg have_fop=no 96906aec45a7Smrg else 96916aec45a7Smrg have_fop=yes 96926aec45a7Smrg fi 96936aec45a7Smrgelif test "x$use_fop" = x"yes" ; then 96946aec45a7Smrg AC_PATH_PROG([FOP], [fop]) 96956aec45a7Smrg if test "x$FOP" = "x"; then 96966aec45a7Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 96976aec45a7Smrg fi 96986aec45a7Smrg have_fop=yes 96996aec45a7Smrgelif test "x$use_fop" = x"no" ; then 97006aec45a7Smrg if test "x$FOP" != "x"; then 97016aec45a7Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 97026aec45a7Smrg fi 97036aec45a7Smrg have_fop=no 97046aec45a7Smrgelse 97056aec45a7Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 97066aec45a7Smrgfi 9707aa9e3350Smrg 9708aa9e3350Smrg# Test for a minimum version of fop, if provided. 9709aa9e3350Smrgm4_ifval([$1], 9710aa9e3350Smrg[if test "$have_fop" = yes; then 9711aa9e3350Smrg # scrape the fop version 9712aa9e3350Smrg AC_MSG_CHECKING([for fop minimum version]) 9713aa9e3350Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9714aa9e3350Smrg AC_MSG_RESULT([$fop_version]) 9715aa9e3350Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9716aa9e3350Smrg [if test "x$use_fop" = xauto; then 9717aa9e3350Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9718aa9e3350Smrg have_fop=no 9719aa9e3350Smrg else 9720aa9e3350Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9721aa9e3350Smrg fi]) 9722aa9e3350Smrgfi]) 97236aec45a7SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 97246aec45a7Smrg]) # XORG_WITH_FOP 97256aec45a7Smrg 97261e449e82Smrg# XORG_WITH_M4([MIN-VERSION]) 97271e449e82Smrg# --------------------------- 97281e449e82Smrg# Minimum version: 1.19.0 97291e449e82Smrg# 97301e449e82Smrg# This macro attempts to locate an m4 macro processor which supports 97311e449e82Smrg# -I option and is only useful for modules relying on M4 in order to 97321e449e82Smrg# expand macros in source code files. 97331e449e82Smrg# 97341e449e82Smrg# Interface to module: 97351e449e82Smrg# M4: returns the path of the m4 program found 97361e449e82Smrg# returns the path set by the user in the environment 97371e449e82Smrg# 97381e449e82SmrgAC_DEFUN([XORG_WITH_M4], [ 97391e449e82SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 97401e449e82Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 97411e449e82Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 97421e449e82Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 97431e449e82Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 97441e449e82Smrg [$PATH:/usr/gnu/bin])]) 97451e449e82Smrg 97461e449e82SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 97471e449e82Smrg]) # XORG_WITH_M4 97481e449e82Smrg 97496aec45a7Smrg# XORG_WITH_PS2PDF([DEFAULT]) 97506aec45a7Smrg# ---------------- 97516aec45a7Smrg# Minimum version: 1.6.0 97526aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 97536aec45a7Smrg# 97546aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 97556aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 97566aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 97576aec45a7Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 97586aec45a7Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 97596aec45a7Smrg# --with-ps2pdf assumes 'auto'. 97606aec45a7Smrg# 97616aec45a7Smrg# Interface to module: 97626aec45a7Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 97636aec45a7Smrg# PS2PDF: returns the path of the ps2pdf program found 97646aec45a7Smrg# returns the path set by the user in the environment 97656aec45a7Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 97666aec45a7Smrg# 'no' user instructs the module not to use ps2pdf 97676aec45a7Smrg# 97686aec45a7Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 97696aec45a7Smrg# 97706aec45a7SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 97716aec45a7SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 97726aec45a7Smrgm4_define([_defopt], m4_default([$1], [auto])) 97736aec45a7SmrgAC_ARG_WITH(ps2pdf, 97746aec45a7Smrg AS_HELP_STRING([--with-ps2pdf], 97756aec45a7Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 97766aec45a7Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 97776aec45a7Smrgm4_undefine([_defopt]) 97786aec45a7Smrg 97796aec45a7Smrgif test "x$use_ps2pdf" = x"auto"; then 97806aec45a7Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 97816aec45a7Smrg if test "x$PS2PDF" = "x"; then 97826aec45a7Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 97836aec45a7Smrg have_ps2pdf=no 97846aec45a7Smrg else 97856aec45a7Smrg have_ps2pdf=yes 97866aec45a7Smrg fi 97876aec45a7Smrgelif test "x$use_ps2pdf" = x"yes" ; then 97886aec45a7Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 97896aec45a7Smrg if test "x$PS2PDF" = "x"; then 97906aec45a7Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 97916aec45a7Smrg fi 97926aec45a7Smrg have_ps2pdf=yes 97936aec45a7Smrgelif test "x$use_ps2pdf" = x"no" ; then 97946aec45a7Smrg if test "x$PS2PDF" != "x"; then 97956aec45a7Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 97966aec45a7Smrg fi 97976aec45a7Smrg have_ps2pdf=no 97986aec45a7Smrgelse 97996aec45a7Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 98006aec45a7Smrgfi 98016aec45a7SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 98026aec45a7Smrg]) # XORG_WITH_PS2PDF 98036aec45a7Smrg 98046aec45a7Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 98056aec45a7Smrg# ---------------- 98066aec45a7Smrg# Minimum version: 1.6.0 98076aec45a7Smrg# 98086aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 98096aec45a7Smrg# not at the appropriate level. This macro enables a builder to skip all 98106aec45a7Smrg# documentation targets except traditional man pages. 98116aec45a7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98126aec45a7Smrg# maximum flexibilty in controlling documentation building. 98136aec45a7Smrg# Refer to: 98146aec45a7Smrg# XORG_WITH_XMLTO --with-xmlto 98156aec45a7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98166aec45a7Smrg# XORG_WITH_DOXYGEN --with-doxygen 98176aec45a7Smrg# XORG_WITH_FOP --with-fop 98186aec45a7Smrg# XORG_WITH_GROFF --with-groff 98196aec45a7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98206aec45a7Smrg# 98216aec45a7Smrg# Interface to module: 98226aec45a7Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 98236aec45a7Smrg# --enable-docs: 'yes' user instructs the module to generate docs 98246aec45a7Smrg# 'no' user instructs the module not to generate docs 98256aec45a7Smrg# parm1: specify the default value, yes or no. 98266aec45a7Smrg# 98276aec45a7SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9828aa9e3350Smrgm4_define([docs_default], m4_default([$1], [yes])) 98296aec45a7SmrgAC_ARG_ENABLE(docs, 98306aec45a7Smrg AS_HELP_STRING([--enable-docs], 9831aa9e3350Smrg [Enable building the documentation (default: ]docs_default[)]), 9832aa9e3350Smrg [build_docs=$enableval], [build_docs=]docs_default) 9833aa9e3350Smrgm4_undefine([docs_default]) 98346aec45a7SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 98356aec45a7SmrgAC_MSG_CHECKING([whether to build documentation]) 98366aec45a7SmrgAC_MSG_RESULT([$build_docs]) 98376aec45a7Smrg]) # XORG_ENABLE_DOCS 98386aec45a7Smrg 98396aec45a7Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 98406aec45a7Smrg# ---------------- 98416aec45a7Smrg# Minimum version: 1.6.0 98426aec45a7Smrg# 98436aec45a7Smrg# This macro enables a builder to skip all developer documentation. 98446aec45a7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98456aec45a7Smrg# maximum flexibilty in controlling documentation building. 98466aec45a7Smrg# Refer to: 98476aec45a7Smrg# XORG_WITH_XMLTO --with-xmlto 98486aec45a7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98496aec45a7Smrg# XORG_WITH_DOXYGEN --with-doxygen 98506aec45a7Smrg# XORG_WITH_FOP --with-fop 98516aec45a7Smrg# XORG_WITH_GROFF --with-groff 98526aec45a7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98536aec45a7Smrg# 98546aec45a7Smrg# Interface to module: 98556aec45a7Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 98566aec45a7Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 98576aec45a7Smrg# 'no' user instructs the module not to generate developer docs 98586aec45a7Smrg# parm1: specify the default value, yes or no. 98596aec45a7Smrg# 98606aec45a7SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 98616aec45a7Smrgm4_define([devel_default], m4_default([$1], [yes])) 98626aec45a7SmrgAC_ARG_ENABLE(devel-docs, 98636aec45a7Smrg AS_HELP_STRING([--enable-devel-docs], 98646aec45a7Smrg [Enable building the developer documentation (default: ]devel_default[)]), 98656aec45a7Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 98666aec45a7Smrgm4_undefine([devel_default]) 98676aec45a7SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 98686aec45a7SmrgAC_MSG_CHECKING([whether to build developer documentation]) 98696aec45a7SmrgAC_MSG_RESULT([$build_devel_docs]) 98706aec45a7Smrg]) # XORG_ENABLE_DEVEL_DOCS 98716aec45a7Smrg 98726aec45a7Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 98736aec45a7Smrg# ---------------- 98746aec45a7Smrg# Minimum version: 1.6.0 98756aec45a7Smrg# 98766aec45a7Smrg# This macro enables a builder to skip all functional specification targets. 98776aec45a7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 98786aec45a7Smrg# maximum flexibilty in controlling documentation building. 98796aec45a7Smrg# Refer to: 98806aec45a7Smrg# XORG_WITH_XMLTO --with-xmlto 98816aec45a7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 98826aec45a7Smrg# XORG_WITH_DOXYGEN --with-doxygen 98836aec45a7Smrg# XORG_WITH_FOP --with-fop 98846aec45a7Smrg# XORG_WITH_GROFF --with-groff 98856aec45a7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 98866aec45a7Smrg# 98876aec45a7Smrg# Interface to module: 98886aec45a7Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 98896aec45a7Smrg# --enable-specs: 'yes' user instructs the module to generate specs 98906aec45a7Smrg# 'no' user instructs the module not to generate specs 98916aec45a7Smrg# parm1: specify the default value, yes or no. 98926aec45a7Smrg# 98936aec45a7SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 98946aec45a7Smrgm4_define([spec_default], m4_default([$1], [yes])) 98956aec45a7SmrgAC_ARG_ENABLE(specs, 98966aec45a7Smrg AS_HELP_STRING([--enable-specs], 98976aec45a7Smrg [Enable building the specs (default: ]spec_default[)]), 98986aec45a7Smrg [build_specs=$enableval], [build_specs=]spec_default) 98996aec45a7Smrgm4_undefine([spec_default]) 99006aec45a7SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 99016aec45a7SmrgAC_MSG_CHECKING([whether to build functional specifications]) 99026aec45a7SmrgAC_MSG_RESULT([$build_specs]) 99036aec45a7Smrg]) # XORG_ENABLE_SPECS 99046aec45a7Smrg 9905aa9e3350Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9906aa9e3350Smrg# ---------------------------------------------- 9907aa9e3350Smrg# Minimum version: 1.13.0 9908aa9e3350Smrg# 9909aa9e3350Smrg# This macro enables a builder to enable/disable unit testing 9910aa9e3350Smrg# It makes no assumption about the test cases implementation 9911aa9e3350Smrg# Test cases may or may not use Automake "Support for test suites" 9912aa9e3350Smrg# They may or may not use the software utility library GLib 9913aa9e3350Smrg# 9914aa9e3350Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9915aa9e3350Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9916aa9e3350Smrg# The variable enable_unit_tests is used by other macros in this file. 9917aa9e3350Smrg# 9918aa9e3350Smrg# Interface to module: 9919aa9e3350Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9920aa9e3350Smrg# enable_unit_tests: used in configure.ac for additional configuration 9921aa9e3350Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9922aa9e3350Smrg# 'no' user instructs the module not to build tests 9923aa9e3350Smrg# parm1: specify the default value, yes or no. 9924aa9e3350Smrg# 9925aa9e3350SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9926aa9e3350SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9927aa9e3350SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9928aa9e3350SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9929aa9e3350Smrgm4_define([_defopt], m4_default([$1], [auto])) 9930aa9e3350SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9931aa9e3350Smrg [Enable building unit test cases (default: ]_defopt[)]), 9932aa9e3350Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9933aa9e3350Smrgm4_undefine([_defopt]) 9934aa9e3350SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9935aa9e3350SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9936aa9e3350SmrgAC_MSG_RESULT([$enable_unit_tests]) 9937aa9e3350Smrg]) # XORG_ENABLE_UNIT_TESTS 9938aa9e3350Smrg 9939aa9e3350Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9940aa9e3350Smrg# ------------------------------------------------------ 9941aa9e3350Smrg# Minimum version: 1.17.0 9942aa9e3350Smrg# 9943aa9e3350Smrg# This macro enables a builder to enable/disable integration testing 9944aa9e3350Smrg# It makes no assumption about the test cases' implementation 9945aa9e3350Smrg# Test cases may or may not use Automake "Support for test suites" 9946aa9e3350Smrg# 9947aa9e3350Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9948aa9e3350Smrg# usually requires less dependencies and may be built and run under less 9949aa9e3350Smrg# stringent environments than integration tests. 9950aa9e3350Smrg# 9951aa9e3350Smrg# Interface to module: 9952aa9e3350Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9953aa9e3350Smrg# enable_integration_tests: used in configure.ac for additional configuration 9954aa9e3350Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9955aa9e3350Smrg# 'no' user instructs the module not to build tests 9956aa9e3350Smrg# parm1: specify the default value, yes or no. 9957aa9e3350Smrg# 9958aa9e3350SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9959aa9e3350SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9960aa9e3350Smrgm4_define([_defopt], m4_default([$1], [auto])) 9961aa9e3350SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9962aa9e3350Smrg [Enable building integration test cases (default: ]_defopt[)]), 9963aa9e3350Smrg [enable_integration_tests=$enableval], 9964aa9e3350Smrg [enable_integration_tests=]_defopt) 9965aa9e3350Smrgm4_undefine([_defopt]) 9966aa9e3350SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9967aa9e3350Smrg [test "x$enable_integration_tests" != xno]) 9968aa9e3350SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9969aa9e3350SmrgAC_MSG_RESULT([$enable_integration_tests]) 9970aa9e3350Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9971aa9e3350Smrg 9972aa9e3350Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9973aa9e3350Smrg# ---------------------------------------- 9974aa9e3350Smrg# Minimum version: 1.13.0 9975aa9e3350Smrg# 9976aa9e3350Smrg# GLib is a library which provides advanced data structures and functions. 9977aa9e3350Smrg# This macro enables a module to test for the presence of Glib. 9978aa9e3350Smrg# 9979aa9e3350Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9980aa9e3350Smrg# Otherwise the value of $enable_unit_tests is blank. 9981aa9e3350Smrg# 9982aa9e3350Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9983aa9e3350Smrg# test support usually requires less dependencies and may be built and run under 9984aa9e3350Smrg# less stringent environments than integration tests. 9985aa9e3350Smrg# 9986aa9e3350Smrg# Interface to module: 9987aa9e3350Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9988aa9e3350Smrg# with_glib: used in configure.ac to know if GLib has been found 9989aa9e3350Smrg# --with-glib: 'yes' user instructs the module to use glib 9990aa9e3350Smrg# 'no' user instructs the module not to use glib 9991aa9e3350Smrg# 9992aa9e3350SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9993aa9e3350SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9994aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 9995aa9e3350SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9996aa9e3350Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9997aa9e3350Smrg [with_glib=$withval], [with_glib=]_defopt) 9998aa9e3350Smrgm4_undefine([_defopt]) 9999aa9e3350Smrg 10000aa9e3350Smrghave_glib=no 10001aa9e3350Smrg# Do not probe GLib if user explicitly disabled unit testing 10002aa9e3350Smrgif test "x$enable_unit_tests" != x"no"; then 10003aa9e3350Smrg # Do not probe GLib if user explicitly disabled it 10004aa9e3350Smrg if test "x$with_glib" != x"no"; then 10005aa9e3350Smrg m4_ifval( 10006aa9e3350Smrg [$1], 10007aa9e3350Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10008aa9e3350Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10009aa9e3350Smrg ) 10010aa9e3350Smrg fi 10011aa9e3350Smrgfi 10012aa9e3350Smrg 10013aa9e3350Smrg# Not having GLib when unit testing has been explicitly requested is an error 10014aa9e3350Smrgif test "x$enable_unit_tests" = x"yes"; then 10015aa9e3350Smrg if test "x$have_glib" = x"no"; then 10016aa9e3350Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10017aa9e3350Smrg fi 10018aa9e3350Smrgfi 10019aa9e3350Smrg 10020aa9e3350Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10021aa9e3350Smrgif test "x$enable_unit_tests" = x"no"; then 10022aa9e3350Smrg if test "x$with_glib" = x"yes"; then 10023aa9e3350Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10024aa9e3350Smrg fi 10025aa9e3350Smrgfi 10026aa9e3350Smrg 10027aa9e3350Smrg# Not having GLib when it has been explicitly requested is an error 10028aa9e3350Smrgif test "x$with_glib" = x"yes"; then 10029aa9e3350Smrg if test "x$have_glib" = x"no"; then 10030aa9e3350Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10031aa9e3350Smrg fi 10032aa9e3350Smrgfi 10033aa9e3350Smrg 10034aa9e3350SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10035aa9e3350Smrg]) # XORG_WITH_GLIB 10036aa9e3350Smrg 10037aa9e3350Smrg# XORG_LD_WRAP([required|optional]) 10038aa9e3350Smrg# --------------------------------- 10039aa9e3350Smrg# Minimum version: 1.13.0 10040aa9e3350Smrg# 10041aa9e3350Smrg# Check if linker supports -wrap, passed via compiler flags 10042aa9e3350Smrg# 10043aa9e3350Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10044aa9e3350Smrg# Otherwise the value of $enable_unit_tests is blank. 10045aa9e3350Smrg# 10046aa9e3350Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10047aa9e3350Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10048aa9e3350Smrg# available, an argument of "optional" allows use when some unit tests require 10049aa9e3350Smrg# ld -wrap and others do not. 10050aa9e3350Smrg# 10051aa9e3350SmrgAC_DEFUN([XORG_LD_WRAP],[ 10052aa9e3350SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10053aa9e3350Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10054aa9e3350Smrg void __wrap_exit(int status) { return; }], 10055aa9e3350Smrg [exit(0);])]) 10056aa9e3350Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10057aa9e3350Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10058aa9e3350Smrg if test "x$have_ld_wrap" = x"no"; then 10059aa9e3350Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10060aa9e3350Smrg fi 10061aa9e3350Smrgfi 10062aa9e3350SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10063aa9e3350Smrg# 10064aa9e3350Smrg]) # XORG_LD_WRAP 10065aa9e3350Smrg 10066aa9e3350Smrg# XORG_CHECK_LINKER_FLAGS 10067aa9e3350Smrg# ----------------------- 10068aa9e3350Smrg# SYNOPSIS 10069aa9e3350Smrg# 10070aa9e3350Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10071aa9e3350Smrg# 10072aa9e3350Smrg# DESCRIPTION 10073aa9e3350Smrg# 10074aa9e3350Smrg# Check whether the given linker FLAGS work with the current language's 10075aa9e3350Smrg# linker, or whether they give an error. 10076aa9e3350Smrg# 10077aa9e3350Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10078aa9e3350Smrg# success/failure. 10079aa9e3350Smrg# 10080aa9e3350Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10081aa9e3350Smrg# 10082aa9e3350Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10083aa9e3350Smrg# 10084aa9e3350Smrg# LICENSE 10085aa9e3350Smrg# 10086aa9e3350Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10087aa9e3350Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10088aa9e3350Smrg# Copyright (c) 2009 Matteo Frigo 10089aa9e3350Smrg# 10090aa9e3350Smrg# This program is free software: you can redistribute it and/or modify it 10091aa9e3350Smrg# under the terms of the GNU General Public License as published by the 10092aa9e3350Smrg# Free Software Foundation, either version 3 of the License, or (at your 10093aa9e3350Smrg# option) any later version. 10094aa9e3350Smrg# 10095aa9e3350Smrg# This program is distributed in the hope that it will be useful, but 10096aa9e3350Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10097aa9e3350Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10098aa9e3350Smrg# Public License for more details. 10099aa9e3350Smrg# 10100aa9e3350Smrg# You should have received a copy of the GNU General Public License along 10101aa9e3350Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10102aa9e3350Smrg# 10103aa9e3350Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10104aa9e3350Smrg# gives unlimited permission to copy, distribute and modify the configure 10105aa9e3350Smrg# scripts that are the output of Autoconf when processing the Macro. You 10106aa9e3350Smrg# need not follow the terms of the GNU General Public License when using 10107aa9e3350Smrg# or distributing such scripts, even though portions of the text of the 10108aa9e3350Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10109aa9e3350Smrg# all other use of the material that constitutes the Autoconf Macro. 10110aa9e3350Smrg# 10111aa9e3350Smrg# This special exception to the GPL applies to versions of the Autoconf 10112aa9e3350Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10113aa9e3350Smrg# modified version of the Autoconf Macro, you may extend this special 10114aa9e3350Smrg# exception to the GPL to apply to your modified version as well.# 10115aa9e3350SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10116aa9e3350Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10117aa9e3350Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10118aa9e3350SmrgAS_LITERAL_IF([$1], 10119aa9e3350Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10120aa9e3350Smrg ax_save_FLAGS=$LDFLAGS 10121aa9e3350Smrg LDFLAGS="$1" 10122aa9e3350Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10123aa9e3350Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10124aa9e3350Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10125aa9e3350Smrg LDFLAGS=$ax_save_FLAGS])], 10126aa9e3350Smrg [ax_save_FLAGS=$LDFLAGS 10127aa9e3350Smrg LDFLAGS="$1" 10128aa9e3350Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10129aa9e3350Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10130aa9e3350Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10131aa9e3350Smrg LDFLAGS=$ax_save_FLAGS]) 10132aa9e3350Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10133aa9e3350SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10134aa9e3350Smrgif test "x$xorg_check_linker_flags" = xyes; then 10135aa9e3350Smrg m4_default([$2], :) 10136aa9e3350Smrgelse 10137aa9e3350Smrg m4_default([$3], :) 10138aa9e3350Smrgfi 10139aa9e3350Smrg]) # XORG_CHECK_LINKER_FLAGS 10140aa9e3350Smrg 10141aa9e3350Smrg# XORG_MEMORY_CHECK_FLAGS 10142aa9e3350Smrg# ----------------------- 10143aa9e3350Smrg# Minimum version: 1.16.0 10144aa9e3350Smrg# 10145aa9e3350Smrg# This macro attempts to find appropriate memory checking functionality 10146aa9e3350Smrg# for various platforms which unit testing code may use to catch various 10147aa9e3350Smrg# forms of memory allocation and access errors in testing. 10148aa9e3350Smrg# 10149aa9e3350Smrg# Interface to module: 10150aa9e3350Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10151aa9e3350Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10152aa9e3350Smrg# 10153aa9e3350Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10154aa9e3350Smrg# 10155aa9e3350SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10156aa9e3350Smrg 10157aa9e3350SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10158aa9e3350SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10159aa9e3350Smrg [Environment variables to enable memory checking in tests]) 10160aa9e3350Smrg 10161aa9e3350Smrg# Check for different types of support on different platforms 10162aa9e3350Smrgcase $host_os in 10163aa9e3350Smrg solaris*) 10164aa9e3350Smrg AC_CHECK_LIB([umem], [umem_alloc], 10165aa9e3350Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10166aa9e3350Smrg ;; 10167aa9e3350Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10168aa9e3350Smrg # both directly and inverted, so should not be 0 or 255. 10169aa9e3350Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10170aa9e3350Smrg ;; 10171aa9e3350Smrg darwin*) 10172aa9e3350Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10173aa9e3350Smrg ;; 10174aa9e3350Smrg *bsd*) 10175aa9e3350Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10176aa9e3350Smrg ;; 10177aa9e3350Smrgesac 10178aa9e3350Smrg 10179aa9e3350Smrg# User supplied flags override default flags 10180aa9e3350Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10181aa9e3350Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10182aa9e3350Smrgfi 10183aa9e3350Smrg 10184aa9e3350SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10185aa9e3350Smrg]) # XORG_WITH_LINT 10186aa9e3350Smrg 101878697ee19Smrg# XORG_CHECK_MALLOC_ZERO 101888697ee19Smrg# ---------------------- 101898697ee19Smrg# Minimum version: 1.0.0 10190ab47cfaaSmrg# 101918697ee19Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 101928697ee19Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 101938697ee19Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 101948697ee19SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 101958697ee19SmrgAC_ARG_ENABLE(malloc0returnsnull, 101966aec45a7Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 101978697ee19Smrg [malloc(0) returns NULL (default: auto)]), 101988697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 101998697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10200ab47cfaaSmrg 102018697ee19SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 102028697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 102031e449e82SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 102041e449e82Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10205aa9e3350Smrg#include <stdlib.h> 10206aa9e3350Smrg],[ 102078697ee19Smrg char *m0, *r0, *c0, *p; 102088697ee19Smrg m0 = malloc(0); 102098697ee19Smrg p = malloc(10); 102108697ee19Smrg r0 = realloc(p,0); 10211aa9e3350Smrg c0 = calloc(0,10); 10212aa9e3350Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10213aa9e3350Smrg])], 102141e449e82Smrg [xorg_cv_malloc0_returns_null=yes], 102151e449e82Smrg [xorg_cv_malloc0_returns_null=no])]) 102161e449e82SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10217ab47cfaaSmrgfi 102188697ee19SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 102198697ee19Smrg 102208697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 102218697ee19Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 102228697ee19Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 102238697ee19Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 102248697ee19Smrgelse 102258697ee19Smrg MALLOC_ZERO_CFLAGS="" 102268697ee19Smrg XMALLOC_ZERO_CFLAGS="" 102278697ee19Smrg XTMALLOC_ZERO_CFLAGS="" 10228ab47cfaaSmrgfi 10229ab47cfaaSmrg 102308697ee19SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 102318697ee19SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 102328697ee19SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 102338697ee19Smrg]) # XORG_CHECK_MALLOC_ZERO 10234ab47cfaaSmrg 102358697ee19Smrg# XORG_WITH_LINT() 102368697ee19Smrg# ---------------- 102378697ee19Smrg# Minimum version: 1.1.0 10238ab47cfaaSmrg# 102396aec45a7Smrg# This macro enables the use of a tool that flags some suspicious and 102406aec45a7Smrg# non-portable constructs (likely to be bugs) in C language source code. 102416aec45a7Smrg# It will attempt to locate the tool and use appropriate options. 102426aec45a7Smrg# There are various lint type tools on different platforms. 102436aec45a7Smrg# 102446aec45a7Smrg# Interface to module: 102456aec45a7Smrg# LINT: returns the path to the tool found on the platform 102466aec45a7Smrg# or the value set to LINT on the configure cmd line 102476aec45a7Smrg# also an Automake conditional 102486aec45a7Smrg# LINT_FLAGS: an Automake variable with appropriate flags 102496aec45a7Smrg# 102506aec45a7Smrg# --with-lint: 'yes' user instructs the module to use lint 102516aec45a7Smrg# 'no' user instructs the module not to use lint (default) 102526aec45a7Smrg# 102536aec45a7Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 102546aec45a7Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 102558697ee19Smrg# 102568697ee19SmrgAC_DEFUN([XORG_WITH_LINT],[ 10257ab47cfaaSmrg 102586aec45a7SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 102596aec45a7SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 102606aec45a7SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 102618697ee19Smrg [Use a lint-style source code checker (default: disabled)])], 102628697ee19Smrg [use_lint=$withval], [use_lint=no]) 102636aec45a7Smrg 102646aec45a7Smrg# Obtain platform specific info like program name and options 102656aec45a7Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 102666aec45a7Smrgcase $host_os in 102676aec45a7Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 102686aec45a7Smrg lint_name=splint 102696aec45a7Smrg lint_options="-badflag" 102706aec45a7Smrg ;; 102716aec45a7Smrg *freebsd* | *netbsd*) 102726aec45a7Smrg lint_name=lint 102736aec45a7Smrg lint_options="-u -b" 102746aec45a7Smrg ;; 102756aec45a7Smrg *solaris*) 102766aec45a7Smrg lint_name=lint 102776aec45a7Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 102786aec45a7Smrg ;; 102796aec45a7Smrgesac 102806aec45a7Smrg 102816aec45a7Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 102826aec45a7Smrgif test "x$use_lint" = x"yes" ; then 102836aec45a7Smrg AC_PATH_PROG([LINT], [$lint_name]) 102846aec45a7Smrg if test "x$LINT" = "x"; then 102856aec45a7Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 102866aec45a7Smrg fi 102876aec45a7Smrgelif test "x$use_lint" = x"no" ; then 102886aec45a7Smrg if test "x$LINT" != "x"; then 102896aec45a7Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 102906aec45a7Smrg fi 10291ab47cfaaSmrgelse 102926aec45a7Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 102938697ee19Smrgfi 102946aec45a7Smrg 102956aec45a7Smrg# User supplied flags override default flags 102966aec45a7Smrgif test "x$LINT_FLAGS" != "x"; then 102976aec45a7Smrg lint_options=$LINT_FLAGS 10298ab47cfaaSmrgfi 10299ab47cfaaSmrg 103006aec45a7SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 103016aec45a7SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10302ab47cfaaSmrg 103038697ee19Smrg]) # XORG_WITH_LINT 103048697ee19Smrg 103058697ee19Smrg# XORG_LINT_LIBRARY(LIBNAME) 103068697ee19Smrg# -------------------------- 103078697ee19Smrg# Minimum version: 1.1.0 10308ab47cfaaSmrg# 103098697ee19Smrg# Sets up flags for building lint libraries for checking programs that call 103108697ee19Smrg# functions in the library. 10311ab47cfaaSmrg# 103126aec45a7Smrg# Interface to module: 103136aec45a7Smrg# LINTLIB - Automake variable with the name of lint library file to make 103146aec45a7Smrg# MAKE_LINT_LIB - Automake conditional 103156aec45a7Smrg# 103166aec45a7Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 103176aec45a7Smrg# - 'no' user instructs the module not to create a lint library (default) 103188697ee19Smrg 103198697ee19SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 103208697ee19SmrgAC_REQUIRE([XORG_WITH_LINT]) 103216aec45a7SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 103228697ee19Smrg [Create lint library (default: disabled)])], 103238697ee19Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 103246aec45a7Smrg 103256aec45a7Smrgif test "x$make_lint_lib" = x"yes" ; then 103266aec45a7Smrg LINTLIB=llib-l$1.ln 103276aec45a7Smrg if test "x$LINT" = "x"; then 103286aec45a7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 103296aec45a7Smrg fi 103306aec45a7Smrgelif test "x$make_lint_lib" != x"no" ; then 103316aec45a7Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10332ab47cfaaSmrgfi 103336aec45a7Smrg 103348697ee19SmrgAC_SUBST(LINTLIB) 103358697ee19SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10336ab47cfaaSmrg 103378697ee19Smrg]) # XORG_LINT_LIBRARY 10338ab47cfaaSmrg 10339aa9e3350Smrg# XORG_COMPILER_BRAND 10340aa9e3350Smrg# ------------------- 10341aa9e3350Smrg# Minimum version: 1.14.0 10342aa9e3350Smrg# 10343aa9e3350Smrg# Checks for various brands of compilers and sets flags as appropriate: 10344aa9e3350Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10345aa9e3350Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10346aa9e3350Smrg# clang compiler - sets CLANGCC to "yes" 10347aa9e3350Smrg# Intel compiler - sets INTELCC to "yes" 10348aa9e3350Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10349aa9e3350Smrg# 10350aa9e3350SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10351aa9e3350SmrgAC_LANG_CASE( 10352aa9e3350Smrg [C], [ 10353aa9e3350Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10354aa9e3350Smrg ], 10355aa9e3350Smrg [C++], [ 10356aa9e3350Smrg AC_REQUIRE([AC_PROG_CXX]) 10357aa9e3350Smrg ] 10358aa9e3350Smrg) 10359aa9e3350SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10360aa9e3350SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10361aa9e3350SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10362aa9e3350Smrg]) # XORG_COMPILER_BRAND 10363aa9e3350Smrg 10364aa9e3350Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10365aa9e3350Smrg# --------------- 10366aa9e3350Smrg# Minimum version: 1.16.0 10367aa9e3350Smrg# 10368aa9e3350Smrg# Test if the compiler works when passed the given flag as a command line argument. 10369aa9e3350Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10370aa9e3350Smrg# next flag in the list until there are no more options. 10371aa9e3350Smrg# 10372aa9e3350Smrg# Note that this does not guarantee that the compiler supports the flag as some 10373aa9e3350Smrg# compilers will simply ignore arguments that they do not understand, but we do 10374aa9e3350Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10375aa9e3350Smrg# -Werror=unused-command-line-argument 10376aa9e3350Smrg# 10377aa9e3350SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10378aa9e3350Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10379aa9e3350Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10380aa9e3350Smrg 10381aa9e3350SmrgAC_LANG_COMPILER_REQUIRE 10382aa9e3350Smrg 10383aa9e3350SmrgAC_LANG_CASE( 10384aa9e3350Smrg [C], [ 10385aa9e3350Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10386aa9e3350Smrg define([PREFIX], [C]) 10387aa9e3350Smrg define([CACHE_PREFIX], [cc]) 10388aa9e3350Smrg define([COMPILER], [$CC]) 10389aa9e3350Smrg ], 10390aa9e3350Smrg [C++], [ 10391aa9e3350Smrg define([PREFIX], [CXX]) 10392aa9e3350Smrg define([CACHE_PREFIX], [cxx]) 10393aa9e3350Smrg define([COMPILER], [$CXX]) 10394aa9e3350Smrg ] 10395aa9e3350Smrg) 10396aa9e3350Smrg 10397aa9e3350Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10398aa9e3350Smrg 10399aa9e3350Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10400aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10401aa9e3350Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10402aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10403aa9e3350Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10404aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10405aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10406aa9e3350Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10407aa9e3350Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10408aa9e3350Smrgfi 10409aa9e3350Smrg 10410aa9e3350Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10411aa9e3350Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10412aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10413aa9e3350Smrg fi 10414aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10415aa9e3350Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10416aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10417aa9e3350Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10418aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10419aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10420aa9e3350Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10421aa9e3350Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10422aa9e3350Smrgfi 10423aa9e3350Smrg 10424aa9e3350Smrgfound="no" 10425aa9e3350Smrgm4_foreach([flag], m4_cdr($@), [ 10426aa9e3350Smrg if test $found = "no" ; then 104271e449e82Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10428aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10429aa9e3350Smrg fi 10430aa9e3350Smrg 104311e449e82Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10432aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10433aa9e3350Smrg fi 10434aa9e3350Smrg 10435aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10436aa9e3350Smrg 10437aa9e3350Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 104381e449e82Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10439aa9e3350Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10440aa9e3350Smrg AC_CACHE_VAL($cacheid, 10441aa9e3350Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10442aa9e3350Smrg [eval $cacheid=yes], 10443aa9e3350Smrg [eval $cacheid=no])]) 10444aa9e3350Smrg 10445aa9e3350Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10446aa9e3350Smrg 10447aa9e3350Smrg eval supported=\$$cacheid 10448aa9e3350Smrg AC_MSG_RESULT([$supported]) 10449aa9e3350Smrg if test "$supported" = "yes" ; then 10450aa9e3350Smrg $1="$$1 ]flag[" 10451aa9e3350Smrg found="yes" 10452aa9e3350Smrg fi 10453aa9e3350Smrg fi 10454aa9e3350Smrg]) 10455aa9e3350Smrg]) # XORG_TESTSET_CFLAG 10456aa9e3350Smrg 10457aa9e3350Smrg# XORG_COMPILER_FLAGS 10458aa9e3350Smrg# --------------- 10459aa9e3350Smrg# Minimum version: 1.16.0 10460aa9e3350Smrg# 10461aa9e3350Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10462aa9e3350Smrg# arguments supported by the selected compiler which do NOT alter the generated 10463aa9e3350Smrg# code. These arguments will cause the compiler to print various warnings 10464aa9e3350Smrg# during compilation AND turn a conservative set of warnings into errors. 10465aa9e3350Smrg# 10466aa9e3350Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10467aa9e3350Smrg# future versions of util-macros as options are added to new compilers. 10468aa9e3350Smrg# 10469aa9e3350SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10470aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10471aa9e3350Smrg 10472aa9e3350SmrgAC_ARG_ENABLE(selective-werror, 10473aa9e3350Smrg AS_HELP_STRING([--disable-selective-werror], 10474aa9e3350Smrg [Turn off selective compiler errors. (default: enabled)]), 10475aa9e3350Smrg [SELECTIVE_WERROR=$enableval], 10476aa9e3350Smrg [SELECTIVE_WERROR=yes]) 10477aa9e3350Smrg 10478aa9e3350SmrgAC_LANG_CASE( 10479aa9e3350Smrg [C], [ 10480aa9e3350Smrg define([PREFIX], [C]) 10481aa9e3350Smrg ], 10482aa9e3350Smrg [C++], [ 10483aa9e3350Smrg define([PREFIX], [CXX]) 10484aa9e3350Smrg ] 10485aa9e3350Smrg) 10486aa9e3350Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10487aa9e3350Smrgif test "x$SUNCC" = "xyes"; then 10488aa9e3350Smrg [BASE_]PREFIX[FLAGS]="-v" 10489aa9e3350Smrgelse 10490aa9e3350Smrg [BASE_]PREFIX[FLAGS]="" 10491aa9e3350Smrgfi 10492aa9e3350Smrg 10493aa9e3350Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10494aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10495aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10496aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10497aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10498aa9e3350Smrg 10499aa9e3350SmrgAC_LANG_CASE( 10500aa9e3350Smrg [C], [ 10501aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10502aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10503aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10504aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 105051e449e82Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10506aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10507aa9e3350Smrg ] 10508aa9e3350Smrg) 10509aa9e3350Smrg 10510aa9e3350Smrg# This chunk adds additional warnings that could catch undesired effects. 10511aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10512aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10513aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10514aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10515aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10516aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 105171e449e82SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10518aa9e3350Smrg 10519aa9e3350Smrg# These are currently disabled because they are noisy. They will be enabled 10520aa9e3350Smrg# in the future once the codebase is sufficiently modernized to silence 10521aa9e3350Smrg# them. For now, I don't want them to drown out the other warnings. 10522aa9e3350Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10523aa9e3350Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 105241e449e82Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10525aa9e3350Smrg 10526aa9e3350Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10527aa9e3350Smrg# when there are problems that should be fixed. 10528aa9e3350Smrg 10529aa9e3350Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10530aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10531aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10532aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10533aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10534aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10535aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10536aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10537aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10538aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10539aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10540aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10541aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10542aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10543aa9e3350Smrgelse 10544aa9e3350SmrgAC_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]) 10545aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10546aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10547aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10548aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10549aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10550aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10551aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10552aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10553aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10554aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10555aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10556aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10557aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10558aa9e3350Smrgfi 10559aa9e3350Smrg 10560aa9e3350SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10561aa9e3350Smrg]) # XORG_COMPILER_FLAGS 10562aa9e3350Smrg 105631473d951Smrg# XORG_CWARNFLAGS 105641473d951Smrg# --------------- 105651473d951Smrg# Minimum version: 1.2.0 10566aa9e3350Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 105671473d951Smrg# 105681473d951Smrg# Defines CWARNFLAGS to enable C compiler warnings. 105691473d951Smrg# 10570aa9e3350Smrg# This function is deprecated because it defines -fno-strict-aliasing 10571aa9e3350Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10572aa9e3350Smrg# is needed, then it should be added explicitly in the module when 10573aa9e3350Smrg# it is updated to use BASE_CFLAGS. 10574aa9e3350Smrg# 105751473d951SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10576aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10577aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10578aa9e3350SmrgAC_LANG_CASE( 10579aa9e3350Smrg [C], [ 10580aa9e3350Smrg CWARNFLAGS="$BASE_CFLAGS" 10581aa9e3350Smrg if test "x$GCC" = xyes ; then 10582aa9e3350Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10583aa9e3350Smrg fi 10584aa9e3350Smrg AC_SUBST(CWARNFLAGS) 10585aa9e3350Smrg ] 10586aa9e3350Smrg) 105871473d951Smrg]) # XORG_CWARNFLAGS 105886aec45a7Smrg 105896aec45a7Smrg# XORG_STRICT_OPTION 105906aec45a7Smrg# ----------------------- 105916aec45a7Smrg# Minimum version: 1.3.0 105926aec45a7Smrg# 10593aa9e3350Smrg# Add configure option to enable strict compilation flags, such as treating 10594aa9e3350Smrg# warnings as fatal errors. 10595aa9e3350Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10596aa9e3350Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10597aa9e3350Smrg# 10598aa9e3350Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10599aa9e3350Smrg# when strict compilation is unconditionally desired. 106006aec45a7SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 106016aec45a7SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10602aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 106036aec45a7Smrg 106046aec45a7SmrgAC_ARG_ENABLE(strict-compilation, 106056aec45a7Smrg AS_HELP_STRING([--enable-strict-compilation], 106066aec45a7Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 106076aec45a7Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10608aa9e3350Smrg 10609aa9e3350SmrgAC_LANG_CASE( 10610aa9e3350Smrg [C], [ 10611aa9e3350Smrg define([PREFIX], [C]) 10612aa9e3350Smrg ], 10613aa9e3350Smrg [C++], [ 10614aa9e3350Smrg define([PREFIX], [CXX]) 10615aa9e3350Smrg ] 10616aa9e3350Smrg) 10617aa9e3350Smrg 10618aa9e3350Smrg[STRICT_]PREFIX[FLAGS]="" 10619aa9e3350SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10620aa9e3350SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10621aa9e3350Smrg 10622aa9e3350Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10623aa9e3350Smrg# activate it with -Werror, so we add it here explicitly. 10624aa9e3350SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10625aa9e3350Smrg 106266aec45a7Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10627aa9e3350Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10628aa9e3350Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 106296aec45a7Smrgfi 10630aa9e3350SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10631aa9e3350SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10632aa9e3350SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 106336aec45a7Smrg]) # XORG_STRICT_OPTION 106346aec45a7Smrg 106356aec45a7Smrg# XORG_DEFAULT_OPTIONS 106366aec45a7Smrg# -------------------- 106376aec45a7Smrg# Minimum version: 1.3.0 106386aec45a7Smrg# 106396aec45a7Smrg# Defines default options for X.Org modules. 106406aec45a7Smrg# 106416aec45a7SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 106426aec45a7SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10643aa9e3350SmrgXORG_COMPILER_FLAGS 106446aec45a7SmrgXORG_CWARNFLAGS 106456aec45a7SmrgXORG_STRICT_OPTION 106466aec45a7SmrgXORG_RELEASE_VERSION 106476aec45a7SmrgXORG_CHANGELOG 106486aec45a7SmrgXORG_INSTALL 106496aec45a7SmrgXORG_MANPAGE_SECTIONS 106506aec45a7Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 106516aec45a7Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 106526aec45a7Smrg]) # XORG_DEFAULT_OPTIONS 106536aec45a7Smrg 106546aec45a7Smrg# XORG_INSTALL() 106556aec45a7Smrg# ---------------- 106566aec45a7Smrg# Minimum version: 1.4.0 106576aec45a7Smrg# 106586aec45a7Smrg# Defines the variable INSTALL_CMD as the command to copy 106596aec45a7Smrg# INSTALL from $prefix/share/util-macros. 106606aec45a7Smrg# 106616aec45a7SmrgAC_DEFUN([XORG_INSTALL], [ 106626aec45a7SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106636aec45a7Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 106646aec45a7SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 106656aec45a7Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 106666aec45a7Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 106676aec45a7Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 106686aec45a7SmrgAC_SUBST([INSTALL_CMD]) 106696aec45a7Smrg]) # XORG_INSTALL 106708697ee19Smrgdnl Copyright 2005 Red Hat, Inc 106718697ee19Smrgdnl 106728697ee19Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106738697ee19Smrgdnl documentation for any purpose is hereby granted without fee, provided that 106748697ee19Smrgdnl the above copyright notice appear in all copies and that both that 106758697ee19Smrgdnl copyright notice and this permission notice appear in supporting 106768697ee19Smrgdnl documentation. 106778697ee19Smrgdnl 106788697ee19Smrgdnl The above copyright notice and this permission notice shall be included 106798697ee19Smrgdnl in all copies or substantial portions of the Software. 106808697ee19Smrgdnl 106818697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106828697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106838697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 106848697ee19Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 106858697ee19Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 106868697ee19Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 106878697ee19Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 106888697ee19Smrgdnl 106898697ee19Smrgdnl Except as contained in this notice, the name of the copyright holders shall 106908697ee19Smrgdnl not be used in advertising or otherwise to promote the sale, use or 106918697ee19Smrgdnl other dealings in this Software without prior written authorization 106928697ee19Smrgdnl from the copyright holders. 106938697ee19Smrgdnl 10694ab47cfaaSmrg 106958697ee19Smrg# XORG_RELEASE_VERSION 106968697ee19Smrg# -------------------- 106976aec45a7Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 106981e449e82Smrg 106998697ee19SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 107008697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 107018697ee19Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 107028697ee19Smrg [Major version of this package]) 107038697ee19Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 107048697ee19Smrg if test "x$PVM" = "x"; then 107058697ee19Smrg PVM="0" 107068697ee19Smrg fi 107078697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 107088697ee19Smrg [$PVM], 107098697ee19Smrg [Minor version of this package]) 107108697ee19Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 107118697ee19Smrg if test "x$PVP" = "x"; then 107128697ee19Smrg PVP="0" 107138697ee19Smrg fi 107148697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 107158697ee19Smrg [$PVP], 107168697ee19Smrg [Patch version of this package]) 107178697ee19Smrg]) 10718ab47cfaaSmrg 107191473d951Smrg# XORG_CHANGELOG() 107201473d951Smrg# ---------------- 107211473d951Smrg# Minimum version: 1.2.0 107221473d951Smrg# 107231473d951Smrg# Defines the variable CHANGELOG_CMD as the command to generate 107241473d951Smrg# ChangeLog from git. 107251473d951Smrg# 107261473d951Smrg# 107271473d951SmrgAC_DEFUN([XORG_CHANGELOG], [ 107286aec45a7SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 107296aec45a7Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 107306aec45a7Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 107311473d951Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 107321473d951SmrgAC_SUBST([CHANGELOG_CMD]) 107331473d951Smrg]) # XORG_CHANGELOG 107341473d951Smrg 107351473d951Smrgdnl Copyright 2005 Red Hat, Inc 107361473d951Smrgdnl 107371473d951Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 107381473d951Smrgdnl documentation for any purpose is hereby granted without fee, provided that 107391473d951Smrgdnl the above copyright notice appear in all copies and that both that 107401473d951Smrgdnl copyright notice and this permission notice appear in supporting 107411473d951Smrgdnl documentation. 107421473d951Smrgdnl 107431473d951Smrgdnl The above copyright notice and this permission notice shall be included 107441473d951Smrgdnl in all copies or substantial portions of the Software. 107451473d951Smrgdnl 107461473d951Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 107471473d951Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 107481473d951Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 107491473d951Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 107501473d951Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 107511473d951Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 107521473d951Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 107531473d951Smrgdnl 107541473d951Smrgdnl Except as contained in this notice, the name of the copyright holders shall 107551473d951Smrgdnl not be used in advertising or otherwise to promote the sale, use or 107561473d951Smrgdnl other dealings in this Software without prior written authorization 107571473d951Smrgdnl from the copyright holders. 107581473d951Smrgdnl 107591473d951Smrg 107601e449e82Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 107611473d951Smrg# -------------------------- 107621e449e82Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 107631e449e82Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 107641473d951Smrg 107651473d951SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 107666aec45a7Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 107671473d951Smrg SAVE_CFLAGS="$CFLAGS" 107686aec45a7Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 107691473d951Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 107701473d951Smrg#include "xorg-server.h" 107711473d951Smrg#if !defined $1 107721473d951Smrg#error $1 not defined 107731473d951Smrg#endif 107741473d951Smrg ]])], 107751473d951Smrg [_EXT_CHECK=yes], 107761473d951Smrg [_EXT_CHECK=no]) 107771473d951Smrg CFLAGS="$SAVE_CFLAGS" 107781473d951Smrg AC_MSG_CHECKING([if $1 is defined]) 107791473d951Smrg AC_MSG_RESULT([$_EXT_CHECK]) 107801473d951Smrg if test "$_EXT_CHECK" != no; then 107811473d951Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 107821473d951Smrg fi 107831473d951Smrg]) 107841473d951Smrg 107851e449e82Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 10786ab47cfaaSmrg# 10787ab47cfaaSmrg# This file is free software; the Free Software Foundation 10788ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 10789ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 10790ab47cfaaSmrg 107918697ee19Smrg# AM_AUTOMAKE_VERSION(VERSION) 107928697ee19Smrg# ---------------------------- 107938697ee19Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 107948697ee19Smrg# generated from the m4 files accompanying Automake X.Y. 107958697ee19Smrg# (This private macro should not be called outside this file.) 107968697ee19SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 107971e449e82Smrg[am__api_version='1.14' 107988697ee19Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 107998697ee19Smrgdnl require some minimum version. Point them to the right macro. 108001e449e82Smrgm4_if([$1], [1.14.1], [], 108018697ee19Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 108028697ee19Smrg]) 10803ab47cfaaSmrg 108048697ee19Smrg# _AM_AUTOCONF_VERSION(VERSION) 108058697ee19Smrg# ----------------------------- 108068697ee19Smrg# aclocal traces this macro to find the Autoconf version. 108078697ee19Smrg# This is a private macro too. Using m4_define simplifies 108088697ee19Smrg# the logic in aclocal, which can simply ignore this definition. 108098697ee19Smrgm4_define([_AM_AUTOCONF_VERSION], []) 10810ab47cfaaSmrg 108118697ee19Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 108128697ee19Smrg# ------------------------------- 108138697ee19Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 108141473d951Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 108158697ee19SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 108161e449e82Smrg[AM_AUTOMAKE_VERSION([1.14.1])dnl 108178697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 108188697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 108191473d951Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10820ab47cfaaSmrg 108218697ee19Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10822ab47cfaaSmrg 108231e449e82Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 10824ab47cfaaSmrg# 10825ab47cfaaSmrg# This file is free software; the Free Software Foundation 10826ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 10827ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 10828ab47cfaaSmrg 108298697ee19Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 108301e449e82Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 108311e449e82Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 108328697ee19Smrg# 108338697ee19Smrg# Of course, Automake must honor this variable whenever it calls a 108348697ee19Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 108358697ee19Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 108368697ee19Smrg# depending on how configure is run. This is pretty annoying, since 108378697ee19Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 108388697ee19Smrg# source directory, any form will work fine, but in subdirectories a 108398697ee19Smrg# relative path needs to be adjusted first. 108408697ee19Smrg# 108418697ee19Smrg# $ac_aux_dir/missing 108428697ee19Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 108438697ee19Smrg# $top_srcdir/$ac_aux_dir/missing 108448697ee19Smrg# fails if $ac_aux_dir is absolute, 108458697ee19Smrg# fails when called from a subdirectory in a VPATH build with 108468697ee19Smrg# a relative $ac_aux_dir 108478697ee19Smrg# 108488697ee19Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 108498697ee19Smrg# are both prefixed by $srcdir. In an in-source build this is usually 108501e449e82Smrg# harmless because $srcdir is '.', but things will broke when you 108518697ee19Smrg# start a VPATH build or use an absolute $srcdir. 108528697ee19Smrg# 108538697ee19Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 108548697ee19Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 108558697ee19Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 108568697ee19Smrg# and then we would define $MISSING as 108578697ee19Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 108588697ee19Smrg# This will work as long as MISSING is not called from configure, because 108598697ee19Smrg# unfortunately $(top_srcdir) has no meaning in configure. 108608697ee19Smrg# However there are other variables, like CC, which are often used in 108618697ee19Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 108628697ee19Smrg# 108638697ee19Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 108648697ee19Smrg# absolute PATH. The drawback is that using absolute paths prevent a 108658697ee19Smrg# configured tree to be moved without reconfiguration. 10866ab47cfaaSmrg 108678697ee19SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 108681e449e82Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 108691e449e82Smrg# Expand $ac_aux_dir to an absolute path. 108701e449e82Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 108718697ee19Smrg]) 10872ab47cfaaSmrg 108738697ee19Smrg# AM_CONDITIONAL -*- Autoconf -*- 108748697ee19Smrg 108751e449e82Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 10876ab47cfaaSmrg# 10877ab47cfaaSmrg# This file is free software; the Free Software Foundation 10878ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 10879ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 10880ab47cfaaSmrg 108818697ee19Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 108828697ee19Smrg# ------------------------------------- 108838697ee19Smrg# Define a conditional. 108848697ee19SmrgAC_DEFUN([AM_CONDITIONAL], 108851e449e82Smrg[AC_PREREQ([2.52])dnl 108861e449e82Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 108871e449e82Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 108888697ee19SmrgAC_SUBST([$1_TRUE])dnl 108898697ee19SmrgAC_SUBST([$1_FALSE])dnl 108908697ee19Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 108918697ee19Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 108925c42550eSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 108938697ee19Smrgif $2; then 108948697ee19Smrg $1_TRUE= 108958697ee19Smrg $1_FALSE='#' 108968697ee19Smrgelse 108978697ee19Smrg $1_TRUE='#' 108988697ee19Smrg $1_FALSE= 108998697ee19Smrgfi 109008697ee19SmrgAC_CONFIG_COMMANDS_PRE( 109018697ee19Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 109028697ee19Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 109038697ee19SmrgUsually this means the macro was only invoked conditionally.]]) 109048697ee19Smrgfi])]) 109058697ee19Smrg 109061e449e82Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 10907ab47cfaaSmrg# 109088697ee19Smrg# This file is free software; the Free Software Foundation 109098697ee19Smrg# gives unlimited permission to copy and/or distribute it, 109108697ee19Smrg# with or without modifications, as long as this notice is preserved. 109118697ee19Smrg 109128697ee19Smrg 109131e449e82Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 109148697ee19Smrg# written in clear, in which case automake, when reading aclocal.m4, 109158697ee19Smrg# will think it sees a *use*, and therefore will trigger all it's 109168697ee19Smrg# C support machinery. Also note that it means that autoscan, seeing 109178697ee19Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 109188697ee19Smrg 109198697ee19Smrg 109208697ee19Smrg# _AM_DEPENDENCIES(NAME) 109218697ee19Smrg# ---------------------- 109228697ee19Smrg# See how the compiler implements dependency checking. 109231e449e82Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 109248697ee19Smrg# We try a few techniques and use that to set a single cache variable. 10925ab47cfaaSmrg# 109268697ee19Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 109278697ee19Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 109288697ee19Smrg# dependency, and given that the user is not expected to run this macro, 109298697ee19Smrg# just rely on AC_PROG_CC. 109308697ee19SmrgAC_DEFUN([_AM_DEPENDENCIES], 109318697ee19Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 109328697ee19SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 109338697ee19SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 109348697ee19SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10935ab47cfaaSmrg 109361e449e82Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 109371e449e82Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 109381e449e82Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 109391e449e82Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 109401e449e82Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 109411e449e82Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 109421e449e82Smrg [depcc="$$1" am_compiler_list=]) 10943ab47cfaaSmrg 109448697ee19SmrgAC_CACHE_CHECK([dependency style of $depcc], 109458697ee19Smrg [am_cv_$1_dependencies_compiler_type], 109468697ee19Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 109478697ee19Smrg # We make a subdir and do the tests there. Otherwise we can end up 109488697ee19Smrg # making bogus files that we don't know about and never remove. For 109498697ee19Smrg # instance it was reported that on HP-UX the gcc test will end up 109501e449e82Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 109511e449e82Smrg # in D". 10952aa9e3350Smrg rm -rf conftest.dir 10953ab47cfaaSmrg mkdir conftest.dir 109548697ee19Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 109558697ee19Smrg # using a relative directory. 109568697ee19Smrg cp "$am_depcomp" conftest.dir 109578697ee19Smrg cd conftest.dir 109588697ee19Smrg # We will build objects and dependencies in a subdirectory because 109598697ee19Smrg # it helps to detect inapplicable dependency modes. For instance 109608697ee19Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 109618697ee19Smrg # side effect of compilation, but ICC will put the dependencies in 109628697ee19Smrg # the current directory while Tru64 will put them in the object 109638697ee19Smrg # directory. 109648697ee19Smrg mkdir sub 109658697ee19Smrg 109668697ee19Smrg am_cv_$1_dependencies_compiler_type=none 109678697ee19Smrg if test "$am_compiler_list" = ""; then 109688697ee19Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10969ab47cfaaSmrg fi 109705c42550eSmrg am__universal=false 109715c42550eSmrg m4_case([$1], [CC], 109725c42550eSmrg [case " $depcc " in #( 109735c42550eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 109745c42550eSmrg esac], 109755c42550eSmrg [CXX], 109765c42550eSmrg [case " $depcc " in #( 109775c42550eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 109785c42550eSmrg esac]) 109795c42550eSmrg 109808697ee19Smrg for depmode in $am_compiler_list; do 109818697ee19Smrg # Setup a source with many dependencies, because some compilers 109828697ee19Smrg # like to wrap large dependency lists on column 80 (with \), and 109838697ee19Smrg # we should not choose a depcomp mode which is confused by this. 109848697ee19Smrg # 109858697ee19Smrg # We need to recreate these files for each test, as the compiler may 109868697ee19Smrg # overwrite some of them when testing with obscure command lines. 109878697ee19Smrg # This happens at least with the AIX C compiler. 109888697ee19Smrg : > sub/conftest.c 109898697ee19Smrg for i in 1 2 3 4 5 6; do 109908697ee19Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 109911e449e82Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 109921e449e82Smrg # Solaris 10 /bin/sh. 109931e449e82Smrg echo '/* dummy */' > sub/conftst$i.h 109948697ee19Smrg done 109958697ee19Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10996ab47cfaaSmrg 109971e449e82Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 109985c42550eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 109991e449e82Smrg # handle '-M -o', and we need to detect this. Also, some Intel 110001e449e82Smrg # versions had trouble with output in subdirs. 110015c42550eSmrg am__obj=sub/conftest.${OBJEXT-o} 110025c42550eSmrg am__minus_obj="-o $am__obj" 110038697ee19Smrg case $depmode in 110045c42550eSmrg gcc) 110055c42550eSmrg # This depmode causes a compiler race in universal mode. 110065c42550eSmrg test "$am__universal" = false || continue 110075c42550eSmrg ;; 110088697ee19Smrg nosideeffect) 110091e449e82Smrg # After this tag, mechanisms are not by side-effect, so they'll 110101e449e82Smrg # only be used when explicitly requested. 110118697ee19Smrg if test "x$enable_dependency_tracking" = xyes; then 110128697ee19Smrg continue 110138697ee19Smrg else 110148697ee19Smrg break 110158697ee19Smrg fi 110168697ee19Smrg ;; 11017aa9e3350Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 110181e449e82Smrg # This compiler won't grok '-c -o', but also, the minuso test has 110195c42550eSmrg # not run yet. These depmodes are late enough in the game, and 110205c42550eSmrg # so weak that their functioning should not be impacted. 110215c42550eSmrg am__obj=conftest.${OBJEXT-o} 110225c42550eSmrg am__minus_obj= 110235c42550eSmrg ;; 110248697ee19Smrg none) break ;; 110258697ee19Smrg esac 110268697ee19Smrg if depmode=$depmode \ 110275c42550eSmrg source=sub/conftest.c object=$am__obj \ 110288697ee19Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 110295c42550eSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 110308697ee19Smrg >/dev/null 2>conftest.err && 110318697ee19Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 110328697ee19Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 110335c42550eSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 110348697ee19Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 110358697ee19Smrg # icc doesn't choke on unknown options, it will just issue warnings 110368697ee19Smrg # or remarks (even with -Werror). So we grep stderr for any message 110378697ee19Smrg # that says an option was ignored or not supported. 110388697ee19Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 110398697ee19Smrg # icc: Command line warning: ignoring option '-M'; no argument required 110408697ee19Smrg # The diagnosis changed in icc 8.0: 110418697ee19Smrg # icc: Command line remark: option '-MP' not supported 110428697ee19Smrg if (grep 'ignoring option' conftest.err || 110438697ee19Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 110448697ee19Smrg am_cv_$1_dependencies_compiler_type=$depmode 110458697ee19Smrg break 110468697ee19Smrg fi 110478697ee19Smrg fi 110488697ee19Smrg done 11049ab47cfaaSmrg 110508697ee19Smrg cd .. 110518697ee19Smrg rm -rf conftest.dir 110528697ee19Smrgelse 110538697ee19Smrg am_cv_$1_dependencies_compiler_type=none 110548697ee19Smrgfi 110558697ee19Smrg]) 110568697ee19SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 110578697ee19SmrgAM_CONDITIONAL([am__fastdep$1], [ 110588697ee19Smrg test "x$enable_dependency_tracking" != xno \ 110598697ee19Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 110608697ee19Smrg]) 11061ab47cfaaSmrg 110628697ee19Smrg 110638697ee19Smrg# AM_SET_DEPDIR 110648697ee19Smrg# ------------- 110658697ee19Smrg# Choose a directory name for dependency files. 110661e449e82Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 110678697ee19SmrgAC_DEFUN([AM_SET_DEPDIR], 110688697ee19Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 110698697ee19SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 110708697ee19Smrg]) 110718697ee19Smrg 110728697ee19Smrg 110738697ee19Smrg# AM_DEP_TRACK 110748697ee19Smrg# ------------ 110758697ee19SmrgAC_DEFUN([AM_DEP_TRACK], 110761e449e82Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 110771e449e82SmrgAS_HELP_STRING( 110781e449e82Smrg [--enable-dependency-tracking], 110791e449e82Smrg [do not reject slow dependency extractors]) 110801e449e82SmrgAS_HELP_STRING( 110811e449e82Smrg [--disable-dependency-tracking], 110821e449e82Smrg [speeds up one-time build])]) 110838697ee19Smrgif test "x$enable_dependency_tracking" != xno; then 110848697ee19Smrg am_depcomp="$ac_aux_dir/depcomp" 110858697ee19Smrg AMDEPBACKSLASH='\' 11086aa9e3350Smrg am__nodep='_no' 110878697ee19Smrgfi 110888697ee19SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 110898697ee19SmrgAC_SUBST([AMDEPBACKSLASH])dnl 110908697ee19Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11091aa9e3350SmrgAC_SUBST([am__nodep])dnl 11092aa9e3350Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 110938697ee19Smrg]) 110948697ee19Smrg 110958697ee19Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 110968697ee19Smrg 110971e449e82Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11098ab47cfaaSmrg# 110998697ee19Smrg# This file is free software; the Free Software Foundation 111008697ee19Smrg# gives unlimited permission to copy and/or distribute it, 111018697ee19Smrg# with or without modifications, as long as this notice is preserved. 111028697ee19Smrg 111038697ee19Smrg 111048697ee19Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 111058697ee19Smrg# ------------------------------ 111068697ee19SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 111075c42550eSmrg[{ 111081e449e82Smrg # Older Autoconf quotes --file arguments for eval, but not when files 111095c42550eSmrg # are listed without --file. Let's play safe and only enable the eval 111105c42550eSmrg # if we detect the quoting. 111115c42550eSmrg case $CONFIG_FILES in 111125c42550eSmrg *\'*) eval set x "$CONFIG_FILES" ;; 111135c42550eSmrg *) set x $CONFIG_FILES ;; 111145c42550eSmrg esac 111155c42550eSmrg shift 111165c42550eSmrg for mf 111175c42550eSmrg do 111185c42550eSmrg # Strip MF so we end up with the name of the file. 111195c42550eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 111205c42550eSmrg # Check whether this is an Automake generated Makefile or not. 111211e449e82Smrg # We used to match only the files named 'Makefile.in', but 111225c42550eSmrg # some people rename them; so instead we look at the file content. 111235c42550eSmrg # Grep'ing the first line is not enough: some people post-process 111245c42550eSmrg # each Makefile.in and add a new line on top of each file to say so. 111255c42550eSmrg # Grep'ing the whole file is not good either: AIX grep has a line 111265c42550eSmrg # limit of 2048, but all sed's we know have understand at least 4000. 111275c42550eSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 111285c42550eSmrg dirpart=`AS_DIRNAME("$mf")` 111295c42550eSmrg else 111305c42550eSmrg continue 111315c42550eSmrg fi 111325c42550eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 111331e449e82Smrg # from the Makefile without running 'make'. 111345c42550eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 111355c42550eSmrg test -z "$DEPDIR" && continue 111365c42550eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 111371e449e82Smrg test -z "$am__include" && continue 111385c42550eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 111395c42550eSmrg # Find all dependency output files, they are included files with 111405c42550eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 111415c42550eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 111425c42550eSmrg # expansion. 111435c42550eSmrg for file in `sed -n " 111445c42550eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 111451e449e82Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 111465c42550eSmrg # Make sure the directory exists. 111475c42550eSmrg test -f "$dirpart/$file" && continue 111485c42550eSmrg fdir=`AS_DIRNAME(["$file"])` 111495c42550eSmrg AS_MKDIR_P([$dirpart/$fdir]) 111505c42550eSmrg # echo "creating $dirpart/$file" 111515c42550eSmrg echo '# dummy' > "$dirpart/$file" 111525c42550eSmrg done 111538697ee19Smrg done 111545c42550eSmrg} 111558697ee19Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 111568697ee19Smrg 111578697ee19Smrg 111588697ee19Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 111598697ee19Smrg# ----------------------------- 111608697ee19Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11161ab47cfaaSmrg# 111628697ee19Smrg# This code is only required when automatic dependency tracking 111631e449e82Smrg# is enabled. FIXME. This creates each '.P' file that we will 111648697ee19Smrg# need in order to bootstrap the dependency handling code. 111658697ee19SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 111668697ee19Smrg[AC_CONFIG_COMMANDS([depfiles], 111678697ee19Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 111688697ee19Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 111698697ee19Smrg]) 111708697ee19Smrg 111718697ee19Smrg# Do all the work for Automake. -*- Autoconf -*- 111728697ee19Smrg 111731e449e82Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11174ab47cfaaSmrg# 111758697ee19Smrg# This file is free software; the Free Software Foundation 111768697ee19Smrg# gives unlimited permission to copy and/or distribute it, 111778697ee19Smrg# with or without modifications, as long as this notice is preserved. 111788697ee19Smrg 111798697ee19Smrg# This macro actually does too much. Some checks are only needed if 111808697ee19Smrg# your package does certain things. But this isn't really a big deal. 111818697ee19Smrg 111821e449e82Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 111831e449e82Smrgm4_define([AC_PROG_CC], 111841e449e82Smrgm4_defn([AC_PROG_CC]) 111851e449e82Smrg[_AM_PROG_CC_C_O 111861e449e82Smrg]) 111871e449e82Smrg 111888697ee19Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 111898697ee19Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 111908697ee19Smrg# ----------------------------------------------- 111918697ee19Smrg# The call with PACKAGE and VERSION arguments is the old style 111928697ee19Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 111938697ee19Smrg# and VERSION should now be passed to AC_INIT and removed from 111948697ee19Smrg# the call to AM_INIT_AUTOMAKE. 111958697ee19Smrg# We support both call styles for the transition. After 111968697ee19Smrg# the next Automake release, Autoconf can make the AC_INIT 111978697ee19Smrg# arguments mandatory, and then we can depend on a new Autoconf 111988697ee19Smrg# release and drop the old call support. 111998697ee19SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 112001e449e82Smrg[AC_PREREQ([2.65])dnl 112018697ee19Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 112028697ee19Smrgdnl the ones we care about. 112038697ee19Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 112048697ee19SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 112058697ee19SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 112068697ee19Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 112078697ee19Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 112088697ee19Smrg # is not polluted with repeated "-I." 112098697ee19Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 112108697ee19Smrg # test to see if srcdir already configured 112118697ee19Smrg if test -f $srcdir/config.status; then 112128697ee19Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 112138697ee19Smrg fi 112148697ee19Smrgfi 112158697ee19Smrg 112168697ee19Smrg# test whether we have cygpath 112178697ee19Smrgif test -z "$CYGPATH_W"; then 112188697ee19Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 112198697ee19Smrg CYGPATH_W='cygpath -w' 112208697ee19Smrg else 112218697ee19Smrg CYGPATH_W=echo 112228697ee19Smrg fi 112238697ee19Smrgfi 112248697ee19SmrgAC_SUBST([CYGPATH_W]) 112258697ee19Smrg 112268697ee19Smrg# Define the identity of the package. 112278697ee19Smrgdnl Distinguish between old-style and new-style calls. 112288697ee19Smrgm4_ifval([$2], 112291e449e82Smrg[AC_DIAGNOSE([obsolete], 112301e449e82Smrg [$0: two- and three-arguments forms are deprecated.]) 112311e449e82Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 112328697ee19Smrg AC_SUBST([PACKAGE], [$1])dnl 112338697ee19Smrg AC_SUBST([VERSION], [$2])], 112348697ee19Smrg[_AM_SET_OPTIONS([$1])dnl 112358697ee19Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 112361e449e82Smrgm4_if( 112371e449e82Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 112381e449e82Smrg [ok:ok],, 112398697ee19Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 112408697ee19Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 112418697ee19Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 112428697ee19Smrg 112438697ee19Smrg_AM_IF_OPTION([no-define],, 112441e449e82Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 112451e449e82Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 112468697ee19Smrg 112478697ee19Smrg# Some tools Automake needs. 112488697ee19SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 112498697ee19SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 112501e449e82SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 112511e449e82SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 112521e449e82SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 112531e449e82SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 112541e449e82SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 112555c42550eSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 112565c42550eSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 112571e449e82SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 112581e449e82Smrg# For better backward compatibility. To be removed once Automake 1.9.x 112591e449e82Smrg# dies out for good. For more background, see: 112601e449e82Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 112611e449e82Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 112621e449e82SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 112638697ee19Smrg# We need awk for the "check" target. The system "awk" is bad on 112648697ee19Smrg# some platforms. 112658697ee19SmrgAC_REQUIRE([AC_PROG_AWK])dnl 112668697ee19SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 112678697ee19SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 112688697ee19Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 112695c42550eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 112705c42550eSmrg [_AM_PROG_TAR([v7])])]) 112718697ee19Smrg_AM_IF_OPTION([no-dependencies],, 112728697ee19Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 112731e449e82Smrg [_AM_DEPENDENCIES([CC])], 112741e449e82Smrg [m4_define([AC_PROG_CC], 112751e449e82Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 112768697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 112771e449e82Smrg [_AM_DEPENDENCIES([CXX])], 112781e449e82Smrg [m4_define([AC_PROG_CXX], 112791e449e82Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 112808697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 112811e449e82Smrg [_AM_DEPENDENCIES([OBJC])], 112821e449e82Smrg [m4_define([AC_PROG_OBJC], 112831e449e82Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 112841e449e82SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 112851e449e82Smrg [_AM_DEPENDENCIES([OBJCXX])], 112861e449e82Smrg [m4_define([AC_PROG_OBJCXX], 112871e449e82Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 112888697ee19Smrg]) 112891e449e82SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 112901e449e82Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 112911e449e82Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 112921e449e82Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 112935c42550eSmrgAC_CONFIG_COMMANDS_PRE(dnl 112945c42550eSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 112955c42550eSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 112961e449e82Smrg 112971e449e82Smrg# POSIX will say in a future version that running "rm -f" with no argument 112981e449e82Smrg# is OK; and we want to be able to make that assumption in our Makefile 112991e449e82Smrg# recipes. So use an aggressive probe to check that the usage we want is 113001e449e82Smrg# actually supported "in the wild" to an acceptable degree. 113011e449e82Smrg# See automake bug#10828. 113021e449e82Smrg# To make any issue more visible, cause the running configure to be aborted 113031e449e82Smrg# by default if the 'rm' program in use doesn't match our expectations; the 113041e449e82Smrg# user can still override this though. 113051e449e82Smrgif rm -f && rm -fr && rm -rf; then : OK; else 113061e449e82Smrg cat >&2 <<'END' 113071e449e82SmrgOops! 113081e449e82Smrg 113091e449e82SmrgYour 'rm' program seems unable to run without file operands specified 113101e449e82Smrgon the command line, even when the '-f' option is present. This is contrary 113111e449e82Smrgto the behaviour of most rm programs out there, and not conforming with 113121e449e82Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 113131e449e82Smrg 113141e449e82SmrgPlease tell bug-automake@gnu.org about your system, including the value 113151e449e82Smrgof your $PATH and any error possibly output before this message. This 113161e449e82Smrgcan help us improve future automake versions. 113171e449e82Smrg 113181e449e82SmrgEND 113191e449e82Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 113201e449e82Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 113211e449e82Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 113221e449e82Smrg echo >&2 113231e449e82Smrg else 113241e449e82Smrg cat >&2 <<'END' 113251e449e82SmrgAborting the configuration process, to ensure you take notice of the issue. 113261e449e82Smrg 113271e449e82SmrgYou can download and install GNU coreutils to get an 'rm' implementation 113281e449e82Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 113291e449e82Smrg 113301e449e82SmrgIf you want to complete the configuration process using your problematic 113311e449e82Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 113321e449e82Smrgto "yes", and re-run configure. 113331e449e82Smrg 113341e449e82SmrgEND 113351e449e82Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 113361e449e82Smrg fi 113371e449e82Smrgfi 113388697ee19Smrg]) 11339ab47cfaaSmrg 113401e449e82Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 113415c42550eSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 113425c42550eSmrgdnl mangled by Autoconf and run in a shell conditional statement. 113435c42550eSmrgm4_define([_AC_COMPILER_EXEEXT], 113445c42550eSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 113455c42550eSmrg 113468697ee19Smrg# When config.status generates a header, we must update the stamp-h file. 113478697ee19Smrg# This file resides in the same directory as the config header 113488697ee19Smrg# that is generated. The stamp files are numbered to have different names. 11349ab47cfaaSmrg 113508697ee19Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 113518697ee19Smrg# loop where config.status creates the headers, so we can generate 113528697ee19Smrg# our stamp files there. 113538697ee19SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 113548697ee19Smrg[# Compute $1's index in $config_headers. 113558697ee19Smrg_am_arg=$1 113568697ee19Smrg_am_stamp_count=1 113578697ee19Smrgfor _am_header in $config_headers :; do 113588697ee19Smrg case $_am_header in 113598697ee19Smrg $_am_arg | $_am_arg:* ) 113608697ee19Smrg break ;; 113618697ee19Smrg * ) 113628697ee19Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 113638697ee19Smrg esac 113648697ee19Smrgdone 113658697ee19Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11366ab47cfaaSmrg 113671e449e82Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11368ab47cfaaSmrg# 113698697ee19Smrg# This file is free software; the Free Software Foundation 113708697ee19Smrg# gives unlimited permission to copy and/or distribute it, 113718697ee19Smrg# with or without modifications, as long as this notice is preserved. 11372ab47cfaaSmrg 113738697ee19Smrg# AM_PROG_INSTALL_SH 113748697ee19Smrg# ------------------ 113758697ee19Smrg# Define $install_sh. 113768697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 113778697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 113785c42550eSmrgif test x"${install_sh}" != xset; then 113795c42550eSmrg case $am_aux_dir in 113805c42550eSmrg *\ * | *\ *) 113815c42550eSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 113825c42550eSmrg *) 113835c42550eSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 113845c42550eSmrg esac 113855c42550eSmrgfi 113861e449e82SmrgAC_SUBST([install_sh])]) 11387ab47cfaaSmrg 113881e449e82Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 113898697ee19Smrg# 113908697ee19Smrg# This file is free software; the Free Software Foundation 113918697ee19Smrg# gives unlimited permission to copy and/or distribute it, 113928697ee19Smrg# with or without modifications, as long as this notice is preserved. 11393ab47cfaaSmrg 113948697ee19Smrg# Check whether the underlying file-system supports filenames 113958697ee19Smrg# with a leading dot. For instance MS-DOS doesn't. 113968697ee19SmrgAC_DEFUN([AM_SET_LEADING_DOT], 113978697ee19Smrg[rm -rf .tst 2>/dev/null 113988697ee19Smrgmkdir .tst 2>/dev/null 113998697ee19Smrgif test -d .tst; then 114008697ee19Smrg am__leading_dot=. 114018697ee19Smrgelse 114028697ee19Smrg am__leading_dot=_ 11403ab47cfaaSmrgfi 114048697ee19Smrgrmdir .tst 2>/dev/null 114058697ee19SmrgAC_SUBST([am__leading_dot])]) 11406ab47cfaaSmrg 114078697ee19Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 114088697ee19Smrg# From Jim Meyering 11409ab47cfaaSmrg 114101e449e82Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 114118697ee19Smrg# 114128697ee19Smrg# This file is free software; the Free Software Foundation 114138697ee19Smrg# gives unlimited permission to copy and/or distribute it, 114148697ee19Smrg# with or without modifications, as long as this notice is preserved. 11415ab47cfaaSmrg 114165c42550eSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 114175c42550eSmrg# ---------------------------------- 114185c42550eSmrg# Control maintainer-specific portions of Makefiles. 114191e449e82Smrg# Default is to disable them, unless 'enable' is passed literally. 114201e449e82Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 114215c42550eSmrg# can override the default with the --enable/--disable switch. 114228697ee19SmrgAC_DEFUN([AM_MAINTAINER_MODE], 114235c42550eSmrg[m4_case(m4_default([$1], [disable]), 114245c42550eSmrg [enable], [m4_define([am_maintainer_other], [disable])], 114255c42550eSmrg [disable], [m4_define([am_maintainer_other], [enable])], 114265c42550eSmrg [m4_define([am_maintainer_other], [enable]) 114275c42550eSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11428aa9e3350SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 114295c42550eSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 114305c42550eSmrg AC_ARG_ENABLE([maintainer-mode], 114311e449e82Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 114321e449e82Smrg am_maintainer_other[ make rules and dependencies not useful 114331e449e82Smrg (and sometimes confusing) to the casual installer])], 114341e449e82Smrg [USE_MAINTAINER_MODE=$enableval], 114351e449e82Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 114368697ee19Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 114375c42550eSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 114388697ee19Smrg MAINT=$MAINTAINER_MODE_TRUE 114395c42550eSmrg AC_SUBST([MAINT])dnl 114408697ee19Smrg] 114418697ee19Smrg) 11442ab47cfaaSmrg 114438697ee19Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11444ab47cfaaSmrg 114451e449e82Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 114468697ee19Smrg# 114478697ee19Smrg# This file is free software; the Free Software Foundation 114488697ee19Smrg# gives unlimited permission to copy and/or distribute it, 114498697ee19Smrg# with or without modifications, as long as this notice is preserved. 11450ab47cfaaSmrg 114518697ee19Smrg# AM_MAKE_INCLUDE() 114528697ee19Smrg# ----------------- 114538697ee19Smrg# Check to see how make treats includes. 114548697ee19SmrgAC_DEFUN([AM_MAKE_INCLUDE], 114558697ee19Smrg[am_make=${MAKE-make} 114568697ee19Smrgcat > confinc << 'END' 114578697ee19Smrgam__doit: 114585c42550eSmrg @echo this is the am__doit target 114598697ee19Smrg.PHONY: am__doit 114608697ee19SmrgEND 114618697ee19Smrg# If we don't find an include directive, just comment out the code. 114628697ee19SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 114638697ee19Smrgam__include="#" 114648697ee19Smrgam__quote= 114658697ee19Smrg_am_result=none 114668697ee19Smrg# First try GNU make style include. 114678697ee19Smrgecho "include confinc" > confmf 114681e449e82Smrg# Ignore all kinds of additional output from 'make'. 114695c42550eSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 114705c42550eSmrg*the\ am__doit\ target*) 114715c42550eSmrg am__include=include 114725c42550eSmrg am__quote= 114735c42550eSmrg _am_result=GNU 114745c42550eSmrg ;; 114755c42550eSmrgesac 114768697ee19Smrg# Now try BSD make style include. 114778697ee19Smrgif test "$am__include" = "#"; then 114788697ee19Smrg echo '.include "confinc"' > confmf 114795c42550eSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 114805c42550eSmrg *the\ am__doit\ target*) 114815c42550eSmrg am__include=.include 114825c42550eSmrg am__quote="\"" 114835c42550eSmrg _am_result=BSD 114845c42550eSmrg ;; 114855c42550eSmrg esac 11486ab47cfaaSmrgfi 114878697ee19SmrgAC_SUBST([am__include]) 114888697ee19SmrgAC_SUBST([am__quote]) 114898697ee19SmrgAC_MSG_RESULT([$_am_result]) 114908697ee19Smrgrm -f confinc confmf 114918697ee19Smrg]) 114928697ee19Smrg 114938697ee19Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11494ab47cfaaSmrg 114951e449e82Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 114968697ee19Smrg# 114978697ee19Smrg# This file is free software; the Free Software Foundation 114988697ee19Smrg# gives unlimited permission to copy and/or distribute it, 114998697ee19Smrg# with or without modifications, as long as this notice is preserved. 11500ab47cfaaSmrg 115018697ee19Smrg# AM_MISSING_PROG(NAME, PROGRAM) 115028697ee19Smrg# ------------------------------ 115038697ee19SmrgAC_DEFUN([AM_MISSING_PROG], 115048697ee19Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 115058697ee19Smrg$1=${$1-"${am_missing_run}$2"} 115068697ee19SmrgAC_SUBST($1)]) 11507ab47cfaaSmrg 115088697ee19Smrg# AM_MISSING_HAS_RUN 115098697ee19Smrg# ------------------ 115101e449e82Smrg# Define MISSING if not defined so far and test if it is modern enough. 115111e449e82Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 115128697ee19SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 115138697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 115148697ee19SmrgAC_REQUIRE_AUX_FILE([missing])dnl 115155c42550eSmrgif test x"${MISSING+set}" != xset; then 115165c42550eSmrg case $am_aux_dir in 115175c42550eSmrg *\ * | *\ *) 115185c42550eSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 115195c42550eSmrg *) 115205c42550eSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 115215c42550eSmrg esac 115225c42550eSmrgfi 115238697ee19Smrg# Use eval to expand $SHELL 115241e449e82Smrgif eval "$MISSING --is-lightweight"; then 115251e449e82Smrg am_missing_run="$MISSING " 11526ab47cfaaSmrgelse 115278697ee19Smrg am_missing_run= 115281e449e82Smrg AC_MSG_WARN(['missing' script is too old or missing]) 11529ab47cfaaSmrgfi 115308697ee19Smrg]) 11531ab47cfaaSmrg 115328697ee19Smrg# Helper functions for option handling. -*- Autoconf -*- 11533ab47cfaaSmrg 115341e449e82Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11535ab47cfaaSmrg# 115368697ee19Smrg# This file is free software; the Free Software Foundation 115378697ee19Smrg# gives unlimited permission to copy and/or distribute it, 115388697ee19Smrg# with or without modifications, as long as this notice is preserved. 11539ab47cfaaSmrg 115408697ee19Smrg# _AM_MANGLE_OPTION(NAME) 115418697ee19Smrg# ----------------------- 115428697ee19SmrgAC_DEFUN([_AM_MANGLE_OPTION], 115438697ee19Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11544ab47cfaaSmrg 115458697ee19Smrg# _AM_SET_OPTION(NAME) 11546aa9e3350Smrg# -------------------- 115478697ee19Smrg# Set option NAME. Presently that only means defining a flag for this option. 115488697ee19SmrgAC_DEFUN([_AM_SET_OPTION], 115491e449e82Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11550ab47cfaaSmrg 115518697ee19Smrg# _AM_SET_OPTIONS(OPTIONS) 11552aa9e3350Smrg# ------------------------ 115538697ee19Smrg# OPTIONS is a space-separated list of Automake options. 115548697ee19SmrgAC_DEFUN([_AM_SET_OPTIONS], 115551473d951Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11556ab47cfaaSmrg 115578697ee19Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 115588697ee19Smrg# ------------------------------------------- 115598697ee19Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 115608697ee19SmrgAC_DEFUN([_AM_IF_OPTION], 115618697ee19Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11562ab47cfaaSmrg 115631e449e82Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 115641e449e82Smrg# 115651e449e82Smrg# This file is free software; the Free Software Foundation 115661e449e82Smrg# gives unlimited permission to copy and/or distribute it, 115671e449e82Smrg# with or without modifications, as long as this notice is preserved. 115681e449e82Smrg 115691e449e82Smrg# _AM_PROG_CC_C_O 115701e449e82Smrg# --------------- 115711e449e82Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 115721e449e82Smrg# to automatically call this. 115731e449e82SmrgAC_DEFUN([_AM_PROG_CC_C_O], 115741e449e82Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 115751e449e82SmrgAC_REQUIRE_AUX_FILE([compile])dnl 115761e449e82SmrgAC_LANG_PUSH([C])dnl 115771e449e82SmrgAC_CACHE_CHECK( 115781e449e82Smrg [whether $CC understands -c and -o together], 115791e449e82Smrg [am_cv_prog_cc_c_o], 115801e449e82Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 115811e449e82Smrg # Make sure it works both with $CC and with simple cc. 115821e449e82Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 115831e449e82Smrg # compilers refuse to overwrite an existing .o file with -o, 115841e449e82Smrg # though they will create one. 115851e449e82Smrg am_cv_prog_cc_c_o=yes 115861e449e82Smrg for am_i in 1 2; do 115871e449e82Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 115881e449e82Smrg && test -f conftest2.$ac_objext; then 115891e449e82Smrg : OK 115901e449e82Smrg else 115911e449e82Smrg am_cv_prog_cc_c_o=no 115921e449e82Smrg break 115931e449e82Smrg fi 115941e449e82Smrg done 115951e449e82Smrg rm -f core conftest* 115961e449e82Smrg unset am_i]) 115971e449e82Smrgif test "$am_cv_prog_cc_c_o" != yes; then 115981e449e82Smrg # Losing compiler, so override with the script. 115991e449e82Smrg # FIXME: It is wrong to rewrite CC. 116001e449e82Smrg # But if we don't then we get into trouble of one sort or another. 116011e449e82Smrg # A longer-term fix would be to have automake use am__CC in this case, 116021e449e82Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 116031e449e82Smrg CC="$am_aux_dir/compile $CC" 116041e449e82Smrgfi 116051e449e82SmrgAC_LANG_POP([C])]) 11606ab47cfaaSmrg 116071e449e82Smrg# For backward compatibility. 116081e449e82SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 116091e449e82Smrg 116101e449e82Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11611ab47cfaaSmrg# 116128697ee19Smrg# This file is free software; the Free Software Foundation 116138697ee19Smrg# gives unlimited permission to copy and/or distribute it, 116148697ee19Smrg# with or without modifications, as long as this notice is preserved. 11615ab47cfaaSmrg 116161e449e82Smrg# AM_RUN_LOG(COMMAND) 116171e449e82Smrg# ------------------- 116181e449e82Smrg# Run COMMAND, save the exit status in ac_status, and log it. 116191e449e82Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 116201e449e82SmrgAC_DEFUN([AM_RUN_LOG], 116211e449e82Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 116221e449e82Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 116231e449e82Smrg ac_status=$? 116241e449e82Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 116251e449e82Smrg (exit $ac_status); }]) 116261e449e82Smrg 116271e449e82Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 116281e449e82Smrg 116291e449e82Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 116301e449e82Smrg# 116311e449e82Smrg# This file is free software; the Free Software Foundation 116321e449e82Smrg# gives unlimited permission to copy and/or distribute it, 116331e449e82Smrg# with or without modifications, as long as this notice is preserved. 11634ab47cfaaSmrg 116358697ee19Smrg# AM_SANITY_CHECK 116368697ee19Smrg# --------------- 116378697ee19SmrgAC_DEFUN([AM_SANITY_CHECK], 116388697ee19Smrg[AC_MSG_CHECKING([whether build environment is sane]) 116395c42550eSmrg# Reject unsafe characters in $srcdir or the absolute working directory 116405c42550eSmrg# name. Accept space and tab only in the latter. 116415c42550eSmrgam_lf=' 116425c42550eSmrg' 116435c42550eSmrgcase `pwd` in 116445c42550eSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 116455c42550eSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 116465c42550eSmrgesac 116475c42550eSmrgcase $srcdir in 116485c42550eSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 116491e449e82Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 116505c42550eSmrgesac 116515c42550eSmrg 116521e449e82Smrg# Do 'set' in a subshell so we don't clobber the current shell's 116538697ee19Smrg# arguments. Must try -L first in case configure is actually a 116548697ee19Smrg# symlink; some systems play weird games with the mod time of symlinks 116558697ee19Smrg# (eg FreeBSD returns the mod time of the symlink's containing 116568697ee19Smrg# directory). 116578697ee19Smrgif ( 116581e449e82Smrg am_has_slept=no 116591e449e82Smrg for am_try in 1 2; do 116601e449e82Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 116611e449e82Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 116621e449e82Smrg if test "$[*]" = "X"; then 116631e449e82Smrg # -L didn't work. 116641e449e82Smrg set X `ls -t "$srcdir/configure" conftest.file` 116651e449e82Smrg fi 116661e449e82Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 116671e449e82Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 116681e449e82Smrg 116691e449e82Smrg # If neither matched, then we have a broken ls. This can happen 116701e449e82Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 116711e449e82Smrg # broken ls alias from the environment. This has actually 116721e449e82Smrg # happened. Such a system could not be considered "sane". 116731e449e82Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 116741e449e82Smrg alias in your environment]) 116751e449e82Smrg fi 116761e449e82Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 116771e449e82Smrg break 116781e449e82Smrg fi 116791e449e82Smrg # Just in case. 116801e449e82Smrg sleep 1 116811e449e82Smrg am_has_slept=yes 116821e449e82Smrg done 116838697ee19Smrg test "$[2]" = conftest.file 116848697ee19Smrg ) 116858697ee19Smrgthen 116868697ee19Smrg # Ok. 116878697ee19Smrg : 116888697ee19Smrgelse 116898697ee19Smrg AC_MSG_ERROR([newly created file is older than distributed files! 116908697ee19SmrgCheck your system clock]) 116918697ee19Smrgfi 116921e449e82SmrgAC_MSG_RESULT([yes]) 116931e449e82Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 116941e449e82Smrg# generated files are strictly newer. 116951e449e82Smrgam_sleep_pid= 116961e449e82Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 116971e449e82Smrg ( sleep 1 ) & 116981e449e82Smrg am_sleep_pid=$! 116991e449e82Smrgfi 117001e449e82SmrgAC_CONFIG_COMMANDS_PRE( 117011e449e82Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 117021e449e82Smrg if test -n "$am_sleep_pid"; then 117031e449e82Smrg # Hide warnings about reused PIDs. 117041e449e82Smrg wait $am_sleep_pid 2>/dev/null 117051e449e82Smrg fi 117061e449e82Smrg AC_MSG_RESULT([done])]) 117071e449e82Smrgrm -f conftest.file 117081e449e82Smrg]) 11709ab47cfaaSmrg 117101e449e82Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 117116aec45a7Smrg# 117126aec45a7Smrg# This file is free software; the Free Software Foundation 117136aec45a7Smrg# gives unlimited permission to copy and/or distribute it, 117146aec45a7Smrg# with or without modifications, as long as this notice is preserved. 117156aec45a7Smrg 117166aec45a7Smrg# AM_SILENT_RULES([DEFAULT]) 117176aec45a7Smrg# -------------------------- 117186aec45a7Smrg# Enable less verbose build rules; with the default set to DEFAULT 117191e449e82Smrg# ("yes" being less verbose, "no" or empty being verbose). 117206aec45a7SmrgAC_DEFUN([AM_SILENT_RULES], 117211e449e82Smrg[AC_ARG_ENABLE([silent-rules], [dnl 117221e449e82SmrgAS_HELP_STRING( 117231e449e82Smrg [--enable-silent-rules], 117241e449e82Smrg [less verbose build output (undo: "make V=1")]) 117251e449e82SmrgAS_HELP_STRING( 117261e449e82Smrg [--disable-silent-rules], 117271e449e82Smrg [verbose build output (undo: "make V=0")])dnl 117281e449e82Smrg]) 117291e449e82Smrgcase $enable_silent_rules in @%:@ ((( 117301e449e82Smrg yes) AM_DEFAULT_VERBOSITY=0;; 117311e449e82Smrg no) AM_DEFAULT_VERBOSITY=1;; 117321e449e82Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 117336aec45a7Smrgesac 11734aa9e3350Smrgdnl 117351e449e82Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11736aa9e3350Smrgdnl do not support nested variable expansions. 11737aa9e3350Smrgdnl See automake bug#9928 and bug#10237. 11738aa9e3350Smrgam_make=${MAKE-make} 11739aa9e3350SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11740aa9e3350Smrg [am_cv_make_support_nested_variables], 11741aa9e3350Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11742aa9e3350SmrgBAR0=false 11743aa9e3350SmrgBAR1=true 11744aa9e3350SmrgV=1 11745aa9e3350Smrgam__doit: 11746aa9e3350Smrg @$(TRUE) 11747aa9e3350Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11748aa9e3350Smrg am_cv_make_support_nested_variables=yes 11749aa9e3350Smrgelse 11750aa9e3350Smrg am_cv_make_support_nested_variables=no 11751aa9e3350Smrgfi]) 11752aa9e3350Smrgif test $am_cv_make_support_nested_variables = yes; then 117531e449e82Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11754aa9e3350Smrg AM_V='$(V)' 11755aa9e3350Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11756aa9e3350Smrgelse 11757aa9e3350Smrg AM_V=$AM_DEFAULT_VERBOSITY 11758aa9e3350Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11759aa9e3350Smrgfi 11760aa9e3350SmrgAC_SUBST([AM_V])dnl 11761aa9e3350SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11762aa9e3350SmrgAC_SUBST([AM_DEFAULT_V])dnl 11763aa9e3350SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 117646aec45a7SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 117656aec45a7SmrgAM_BACKSLASH='\' 117666aec45a7SmrgAC_SUBST([AM_BACKSLASH])dnl 117676aec45a7Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 117686aec45a7Smrg]) 117696aec45a7Smrg 117701e449e82Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11771ab47cfaaSmrg# 117728697ee19Smrg# This file is free software; the Free Software Foundation 117738697ee19Smrg# gives unlimited permission to copy and/or distribute it, 117748697ee19Smrg# with or without modifications, as long as this notice is preserved. 11775ab47cfaaSmrg 117768697ee19Smrg# AM_PROG_INSTALL_STRIP 117778697ee19Smrg# --------------------- 117781e449e82Smrg# One issue with vendor 'install' (even GNU) is that you can't 117798697ee19Smrg# specify the program used to strip binaries. This is especially 117808697ee19Smrg# annoying in cross-compiling environments, where the build's strip 117818697ee19Smrg# is unlikely to handle the host's binaries. 117828697ee19Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 117831e449e82Smrg# always use install-sh in "make install-strip", and initialize 117848697ee19Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 117858697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 117868697ee19Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 117871e449e82Smrg# Installed binaries are usually stripped using 'strip' when the user 117881e449e82Smrg# run "make install-strip". However 'strip' might not be the right 117898697ee19Smrg# tool to use in cross-compilation environments, therefore Automake 117901e449e82Smrg# will honor the 'STRIP' environment variable to overrule this program. 117911e449e82Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 117928697ee19Smrgif test "$cross_compiling" != no; then 117938697ee19Smrg AC_CHECK_TOOL([STRIP], [strip], :) 11794ab47cfaaSmrgfi 117958697ee19SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 117968697ee19SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11797ab47cfaaSmrg 117981e449e82Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 117998697ee19Smrg# 118008697ee19Smrg# This file is free software; the Free Software Foundation 118018697ee19Smrg# gives unlimited permission to copy and/or distribute it, 118028697ee19Smrg# with or without modifications, as long as this notice is preserved. 11803ab47cfaaSmrg 118048697ee19Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 118058697ee19Smrg# --------------------------- 118068697ee19Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 118078697ee19Smrg# This macro is traced by Automake. 118088697ee19SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 11809ab47cfaaSmrg 118105c42550eSmrg# AM_SUBST_NOTMAKE(VARIABLE) 11811aa9e3350Smrg# -------------------------- 118125c42550eSmrg# Public sister of _AM_SUBST_NOTMAKE. 118135c42550eSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 118145c42550eSmrg 118158697ee19Smrg# Check how to create a tarball. -*- Autoconf -*- 11816ab47cfaaSmrg 118171e449e82Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 118188697ee19Smrg# 118198697ee19Smrg# This file is free software; the Free Software Foundation 118208697ee19Smrg# gives unlimited permission to copy and/or distribute it, 118218697ee19Smrg# with or without modifications, as long as this notice is preserved. 11822ab47cfaaSmrg 118238697ee19Smrg# _AM_PROG_TAR(FORMAT) 11824ab47cfaaSmrg# -------------------- 118258697ee19Smrg# Check how to create a tarball in format FORMAT. 118261e449e82Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 118278697ee19Smrg# 118288697ee19Smrg# Substitute a variable $(am__tar) that is a command 118298697ee19Smrg# writing to stdout a FORMAT-tarball containing the directory 118308697ee19Smrg# $tardir. 118318697ee19Smrg# tardir=directory && $(am__tar) > result.tar 118328697ee19Smrg# 118338697ee19Smrg# Substitute a variable $(am__untar) that extract such 118348697ee19Smrg# a tarball read from stdin. 118358697ee19Smrg# $(am__untar) < result.tar 118361e449e82Smrg# 118378697ee19SmrgAC_DEFUN([_AM_PROG_TAR], 11838aa9e3350Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11839aa9e3350Smrg# in the wild :-( We should find a proper way to deprecate it ... 11840aa9e3350SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 118411e449e82Smrg 118421e449e82Smrg# We'll loop over all known methods to create a tar archive until one works. 118438697ee19Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 118448697ee19Smrg 118451e449e82Smrgm4_if([$1], [v7], 118461e449e82Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 118471e449e82Smrg 118481e449e82Smrg [m4_case([$1], 118491e449e82Smrg [ustar], 118501e449e82Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 118511e449e82Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 118521e449e82Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 118531e449e82Smrg # and bug#13588). 118541e449e82Smrg am_max_uid=2097151 # 2^21 - 1 118551e449e82Smrg am_max_gid=$am_max_uid 118561e449e82Smrg # The $UID and $GID variables are not portable, so we need to resort 118571e449e82Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 118581e449e82Smrg # below are definitely unexpected, so allow the users to see them 118591e449e82Smrg # (that is, avoid stderr redirection). 118601e449e82Smrg am_uid=`id -u || echo unknown` 118611e449e82Smrg am_gid=`id -g || echo unknown` 118621e449e82Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 118631e449e82Smrg if test $am_uid -le $am_max_uid; then 118641e449e82Smrg AC_MSG_RESULT([yes]) 118651e449e82Smrg else 118661e449e82Smrg AC_MSG_RESULT([no]) 118671e449e82Smrg _am_tools=none 118681e449e82Smrg fi 118691e449e82Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 118701e449e82Smrg if test $am_gid -le $am_max_gid; then 118711e449e82Smrg AC_MSG_RESULT([yes]) 118721e449e82Smrg else 118731e449e82Smrg AC_MSG_RESULT([no]) 118741e449e82Smrg _am_tools=none 118751e449e82Smrg fi], 118768697ee19Smrg 118771e449e82Smrg [pax], 118781e449e82Smrg [], 118791e449e82Smrg 118801e449e82Smrg [m4_fatal([Unknown tar format])]) 118811e449e82Smrg 118821e449e82Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 118831e449e82Smrg 118841e449e82Smrg # Go ahead even if we have the value already cached. We do so because we 118851e449e82Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 118861e449e82Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 118871e449e82Smrg 118881e449e82Smrg for _am_tool in $_am_tools; do 118891e449e82Smrg case $_am_tool in 118901e449e82Smrg gnutar) 118911e449e82Smrg for _am_tar in tar gnutar gtar; do 118921e449e82Smrg AM_RUN_LOG([$_am_tar --version]) && break 118931e449e82Smrg done 118941e449e82Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 118951e449e82Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 118961e449e82Smrg am__untar="$_am_tar -xf -" 118971e449e82Smrg ;; 118981e449e82Smrg plaintar) 118991e449e82Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 119001e449e82Smrg # ustar tarball either. 119011e449e82Smrg (tar --version) >/dev/null 2>&1 && continue 119021e449e82Smrg am__tar='tar chf - "$$tardir"' 119031e449e82Smrg am__tar_='tar chf - "$tardir"' 119041e449e82Smrg am__untar='tar xf -' 119051e449e82Smrg ;; 119061e449e82Smrg pax) 119071e449e82Smrg am__tar='pax -L -x $1 -w "$$tardir"' 119081e449e82Smrg am__tar_='pax -L -x $1 -w "$tardir"' 119091e449e82Smrg am__untar='pax -r' 119101e449e82Smrg ;; 119111e449e82Smrg cpio) 119121e449e82Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 119131e449e82Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 119141e449e82Smrg am__untar='cpio -i -H $1 -d' 119151e449e82Smrg ;; 119161e449e82Smrg none) 119171e449e82Smrg am__tar=false 119181e449e82Smrg am__tar_=false 119191e449e82Smrg am__untar=false 119201e449e82Smrg ;; 119211e449e82Smrg esac 119221e449e82Smrg 119231e449e82Smrg # If the value was cached, stop now. We just wanted to have am__tar 119241e449e82Smrg # and am__untar set. 119251e449e82Smrg test -n "${am_cv_prog_tar_$1}" && break 119261e449e82Smrg 119271e449e82Smrg # tar/untar a dummy directory, and stop if the command works. 119281e449e82Smrg rm -rf conftest.dir 119291e449e82Smrg mkdir conftest.dir 119301e449e82Smrg echo GrepMe > conftest.dir/file 119311e449e82Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 119321e449e82Smrg rm -rf conftest.dir 119331e449e82Smrg if test -s conftest.tar; then 119341e449e82Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 119351e449e82Smrg AM_RUN_LOG([cat conftest.dir/file]) 119361e449e82Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 119371e449e82Smrg fi 119381e449e82Smrg done 119398697ee19Smrg rm -rf conftest.dir 119408697ee19Smrg 119411e449e82Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 119421e449e82Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 119431e449e82Smrg 119448697ee19SmrgAC_SUBST([am__tar]) 119458697ee19SmrgAC_SUBST([am__untar]) 119468697ee19Smrg]) # _AM_PROG_TAR 11947ab47cfaaSmrg 11948