aclocal.m4 revision 2265a131
12265a131Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*- 2444c061aSmrg 3444c061aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42265a131Smrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5444c061aSmrg# This file is free software; the Free Software Foundation 6444c061aSmrg# gives unlimited permission to copy and/or distribute it, 7444c061aSmrg# with or without modifications, as long as this notice is preserved. 8444c061aSmrg 9444c061aSmrg# This program is distributed in the hope that it will be useful, 10444c061aSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11444c061aSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12444c061aSmrg# PARTICULAR PURPOSE. 13444c061aSmrg 142265a131Smrgm4_ifndef([AC_AUTOCONF_VERSION], 152265a131Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 162265a131Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 172265a131Smrg[m4_warning([this file was generated for autoconf 2.63. 182265a131SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 192265a131SmrgIf you have problems, you may need to regenerate the build system entirely. 202265a131SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21444c061aSmrg 222265a131Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23444c061aSmrg# 242265a131Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 252265a131Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 262265a131Smrg# Written by Gordon Matzigkeit, 1996 27444c061aSmrg# 282265a131Smrg# This file is free software; the Free Software Foundation gives 292265a131Smrg# unlimited permission to copy and/or distribute it, with or without 302265a131Smrg# modifications, as long as this notice is preserved. 312265a131Smrg 322265a131Smrgm4_define([_LT_COPYING], [dnl 332265a131Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 342265a131Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 352265a131Smrg# Written by Gordon Matzigkeit, 1996 36444c061aSmrg# 372265a131Smrg# This file is part of GNU Libtool. 38444c061aSmrg# 392265a131Smrg# GNU Libtool is free software; you can redistribute it and/or 402265a131Smrg# modify it under the terms of the GNU General Public License as 412265a131Smrg# published by the Free Software Foundation; either version 2 of 422265a131Smrg# the License, or (at your option) any later version. 43444c061aSmrg# 442265a131Smrg# As a special exception to the GNU General Public License, 452265a131Smrg# if you distribute this file as part of a program or library that 462265a131Smrg# is built using GNU Libtool, you may include this file under the 472265a131Smrg# same distribution terms that you use for the rest of that program. 48444c061aSmrg# 492265a131Smrg# GNU Libtool is distributed in the hope that it will be useful, 502265a131Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 512265a131Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 522265a131Smrg# GNU General Public License for more details. 532265a131Smrg# 542265a131Smrg# You should have received a copy of the GNU General Public License 552265a131Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 562265a131Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 572265a131Smrg# obtained by writing to the Free Software Foundation, Inc., 582265a131Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59444c061aSmrg]) 60444c061aSmrg 612265a131Smrg# serial 56 LT_INIT 62444c061aSmrg 63444c061aSmrg 642265a131Smrg# LT_PREREQ(VERSION) 652265a131Smrg# ------------------ 662265a131Smrg# Complain and exit if this libtool version is less that VERSION. 672265a131Smrgm4_defun([LT_PREREQ], 682265a131Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 692265a131Smrg [m4_default([$3], 702265a131Smrg [m4_fatal([Libtool version $1 or higher is required], 712265a131Smrg 63)])], 722265a131Smrg [$2])]) 73444c061aSmrg 74444c061aSmrg 752265a131Smrg# _LT_CHECK_BUILDDIR 762265a131Smrg# ------------------ 772265a131Smrg# Complain if the absolute build directory name contains unusual characters 782265a131Smrgm4_defun([_LT_CHECK_BUILDDIR], 792265a131Smrg[case `pwd` in 802265a131Smrg *\ * | *\ *) 812265a131Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 822265a131Smrgesac 832265a131Smrg]) 84444c061aSmrg 85444c061aSmrg 862265a131Smrg# LT_INIT([OPTIONS]) 872265a131Smrg# ------------------ 882265a131SmrgAC_DEFUN([LT_INIT], 892265a131Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 902265a131SmrgAC_BEFORE([$0], [LT_LANG])dnl 912265a131SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 922265a131SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 932265a131Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 942265a131Smrg 952265a131Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 962265a131Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 972265a131Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 982265a131Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 992265a131Smrgdnl unless we require an AC_DEFUNed macro: 1002265a131SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1012265a131SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1022265a131SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1032265a131SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1042265a131Smrgm4_require([_LT_PROG_LTMAIN])dnl 1052265a131Smrg 1062265a131Smrgdnl Parse OPTIONS 1072265a131Smrg_LT_SET_OPTIONS([$0], [$1]) 108444c061aSmrg 1092265a131Smrg# This can be used to rebuild libtool when needed 1102265a131SmrgLIBTOOL_DEPS="$ltmain" 111444c061aSmrg 1122265a131Smrg# Always use our own libtool. 1132265a131SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1142265a131SmrgAC_SUBST(LIBTOOL)dnl 115444c061aSmrg 1162265a131Smrg_LT_SETUP 117444c061aSmrg 1182265a131Smrg# Only expand once: 1192265a131Smrgm4_define([LT_INIT]) 1202265a131Smrg])# LT_INIT 121444c061aSmrg 1222265a131Smrg# Old names: 1232265a131SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1242265a131SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1252265a131Smrgdnl aclocal-1.4 backwards compatibility: 1262265a131Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1272265a131Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128444c061aSmrg 129444c061aSmrg 1302265a131Smrg# _LT_CC_BASENAME(CC) 1312265a131Smrg# ------------------- 1322265a131Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1332265a131Smrgm4_defun([_LT_CC_BASENAME], 1342265a131Smrg[for cc_temp in $1""; do 1352265a131Smrg case $cc_temp in 1362265a131Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1372265a131Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1382265a131Smrg \-*) ;; 1392265a131Smrg *) break;; 1402265a131Smrg esac 1412265a131Smrgdone 1422265a131Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1432265a131Smrg]) 144444c061aSmrg 1452265a131Smrg 1462265a131Smrg# _LT_FILEUTILS_DEFAULTS 1472265a131Smrg# ---------------------- 1482265a131Smrg# It is okay to use these file commands and assume they have been set 1492265a131Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1502265a131Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1512265a131Smrg[: ${CP="cp -f"} 1522265a131Smrg: ${MV="mv -f"} 1532265a131Smrg: ${RM="rm -f"} 1542265a131Smrg])# _LT_FILEUTILS_DEFAULTS 1552265a131Smrg 1562265a131Smrg 1572265a131Smrg# _LT_SETUP 1582265a131Smrg# --------- 1592265a131Smrgm4_defun([_LT_SETUP], 1602265a131Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1612265a131SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1622265a131Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1632265a131Smrg_LT_DECL([], [host], [0])dnl 1642265a131Smrg_LT_DECL([], [host_os], [0])dnl 1652265a131Smrgdnl 1662265a131Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1672265a131Smrg_LT_DECL([], [build], [0])dnl 1682265a131Smrg_LT_DECL([], [build_os], [0])dnl 1692265a131Smrgdnl 1702265a131SmrgAC_REQUIRE([AC_PROG_CC])dnl 1712265a131SmrgAC_REQUIRE([LT_PATH_LD])dnl 1722265a131SmrgAC_REQUIRE([LT_PATH_NM])dnl 1732265a131Smrgdnl 1742265a131SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1752265a131Smrgtest -z "$LN_S" && LN_S="ln -s" 1762265a131Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1772265a131Smrgdnl 1782265a131SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1792265a131Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1802265a131Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1812265a131Smrgdnl 1822265a131Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1832265a131Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1842265a131Smrgm4_require([_LT_CMD_RELOAD])dnl 1852265a131Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1862265a131Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1872265a131Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1882265a131Smrg 1892265a131Smrg_LT_CONFIG_LIBTOOL_INIT([ 1902265a131Smrg# See if we are running on zsh, and set the options which allow our 1912265a131Smrg# commands through without removal of \ escapes INIT. 1922265a131Smrgif test -n "\${ZSH_VERSION+set}" ; then 1932265a131Smrg setopt NO_GLOB_SUBST 194444c061aSmrgfi 195444c061aSmrg]) 1962265a131Smrgif test -n "${ZSH_VERSION+set}" ; then 1972265a131Smrg setopt NO_GLOB_SUBST 1982265a131Smrgfi 199444c061aSmrg 2002265a131Smrg_LT_CHECK_OBJDIR 201444c061aSmrg 2022265a131Smrgm4_require([_LT_TAG_COMPILER])dnl 2032265a131Smrg_LT_PROG_ECHO_BACKSLASH 204444c061aSmrg 2052265a131Smrgcase $host_os in 2062265a131Smrgaix3*) 2072265a131Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2082265a131Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2092265a131Smrg # vanish in a puff of smoke. 2102265a131Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 2112265a131Smrg COLLECT_NAMES= 2122265a131Smrg export COLLECT_NAMES 2132265a131Smrg fi 2142265a131Smrg ;; 2152265a131Smrgesac 216444c061aSmrg 2172265a131Smrg# Sed substitution that helps us do robust quoting. It backslashifies 2182265a131Smrg# metacharacters that are still active within double-quoted strings. 2192265a131Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220444c061aSmrg 2212265a131Smrg# Same as above, but do not quote variable references. 2222265a131Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223444c061aSmrg 2242265a131Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2252265a131Smrg# double_quote_subst'ed string. 2262265a131Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227444c061aSmrg 2282265a131Smrg# Sed substitution to delay expansion of an escaped single quote. 2292265a131Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230444c061aSmrg 2312265a131Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2322265a131Smrgno_glob_subst='s/\*/\\\*/g' 2332265a131Smrg 2342265a131Smrg# Global variables: 2352265a131Smrgofile=libtool 2362265a131Smrgcan_build_shared=yes 2372265a131Smrg 2382265a131Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 2392265a131Smrg# which needs '.lib'). 2402265a131Smrglibext=a 2412265a131Smrg 2422265a131Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2432265a131Smrg 2442265a131Smrgold_CC="$CC" 2452265a131Smrgold_CFLAGS="$CFLAGS" 2462265a131Smrg 2472265a131Smrg# Set sane defaults for various variables 2482265a131Smrgtest -z "$CC" && CC=cc 2492265a131Smrgtest -z "$LTCC" && LTCC=$CC 2502265a131Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2512265a131Smrgtest -z "$LD" && LD=ld 2522265a131Smrgtest -z "$ac_objext" && ac_objext=o 2532265a131Smrg 2542265a131Smrg_LT_CC_BASENAME([$compiler]) 2552265a131Smrg 2562265a131Smrg# Only perform the check for file, if the check method requires it 2572265a131Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2582265a131Smrgcase $deplibs_check_method in 2592265a131Smrgfile_magic*) 2602265a131Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2612265a131Smrg _LT_PATH_MAGIC 262444c061aSmrg fi 2632265a131Smrg ;; 2642265a131Smrgesac 2652265a131Smrg 2662265a131Smrg# Use C for the default configuration in the libtool script 2672265a131SmrgLT_SUPPORTED_TAG([CC]) 2682265a131Smrg_LT_LANG_C_CONFIG 2692265a131Smrg_LT_LANG_DEFAULT_CONFIG 2702265a131Smrg_LT_CONFIG_COMMANDS 2712265a131Smrg])# _LT_SETUP 272444c061aSmrg 273444c061aSmrg 2742265a131Smrg# _LT_PROG_LTMAIN 2752265a131Smrg# --------------- 2762265a131Smrg# Note that this code is called both from `configure', and `config.status' 2772265a131Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2782265a131Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2792265a131Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2802265a131Smrgm4_defun([_LT_PROG_LTMAIN], 2812265a131Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2822265a131Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2832265a131Smrgltmain="$ac_aux_dir/ltmain.sh" 2842265a131Smrg])# _LT_PROG_LTMAIN 2852265a131Smrg 2862265a131Smrg 2872265a131Smrg 2882265a131Smrg# So that we can recreate a full libtool script including additional 2892265a131Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2902265a131Smrg# in macros and then make a single call at the end using the `libtool' 2912265a131Smrg# label. 2922265a131Smrg 2932265a131Smrg 2942265a131Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2952265a131Smrg# ---------------------------------------- 2962265a131Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2972265a131Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2982265a131Smrg[m4_ifval([$1], 2992265a131Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3002265a131Smrg [$1 3012265a131Smrg])])]) 3022265a131Smrg 3032265a131Smrg# Initialize. 3042265a131Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3052265a131Smrg 3062265a131Smrg 3072265a131Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3082265a131Smrg# ------------------------------ 3092265a131Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3102265a131Smrgm4_define([_LT_CONFIG_LIBTOOL], 3112265a131Smrg[m4_ifval([$1], 3122265a131Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3132265a131Smrg [$1 3142265a131Smrg])])]) 3152265a131Smrg 3162265a131Smrg# Initialize. 3172265a131Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3182265a131Smrg 3192265a131Smrg 3202265a131Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3212265a131Smrg# ----------------------------------------------------- 3222265a131Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3232265a131Smrg[_LT_CONFIG_LIBTOOL([$1]) 3242265a131Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3252265a131Smrg]) 3262265a131Smrg 3272265a131Smrg 3282265a131Smrg# _LT_FORMAT_COMMENT([COMMENT]) 329444c061aSmrg# ----------------------------- 3302265a131Smrg# Add leading comment marks to the start of each line, and a trailing 3312265a131Smrg# full-stop to the whole comment if one is not present already. 3322265a131Smrgm4_define([_LT_FORMAT_COMMENT], 3332265a131Smrg[m4_ifval([$1], [ 3342265a131Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3352265a131Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3362265a131Smrg)]) 3372265a131Smrg 3382265a131Smrg 3392265a131Smrg 3402265a131Smrg 3412265a131Smrg 3422265a131Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3432265a131Smrg# ------------------------------------------------------------------- 3442265a131Smrg# CONFIGNAME is the name given to the value in the libtool script. 3452265a131Smrg# VARNAME is the (base) name used in the configure script. 3462265a131Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3472265a131Smrg# VARNAME. Any other value will be used directly. 3482265a131Smrgm4_define([_LT_DECL], 3492265a131Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3502265a131Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3512265a131Smrg [m4_ifval([$1], [$1], [$2])]) 3522265a131Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3532265a131Smrg m4_ifval([$4], 3542265a131Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3552265a131Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3562265a131Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357444c061aSmrg]) 358444c061aSmrg 359444c061aSmrg 3602265a131Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3612265a131Smrg# -------------------------------------------------------- 3622265a131Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363444c061aSmrg 364444c061aSmrg 3652265a131Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3662265a131Smrg# ------------------------------------------------ 3672265a131Smrgm4_define([lt_decl_tag_varnames], 3682265a131Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 369444c061aSmrg 370444c061aSmrg 3712265a131Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3722265a131Smrg# --------------------------------------------------------- 3732265a131Smrgm4_define([_lt_decl_filter], 3742265a131Smrg[m4_case([$#], 3752265a131Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3762265a131Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3772265a131Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3782265a131Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3792265a131Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3802265a131Smrg]) 381444c061aSmrg 382444c061aSmrg 3832265a131Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3842265a131Smrg# -------------------------------------------------- 3852265a131Smrgm4_define([lt_decl_quote_varnames], 3862265a131Smrg[_lt_decl_filter([value], [1], $@)]) 387444c061aSmrg 388444c061aSmrg 3892265a131Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3902265a131Smrg# --------------------------------------------------- 3912265a131Smrgm4_define([lt_decl_dquote_varnames], 3922265a131Smrg[_lt_decl_filter([value], [2], $@)]) 393444c061aSmrg 394444c061aSmrg 3952265a131Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3962265a131Smrg# --------------------------------------------------- 3972265a131Smrgm4_define([lt_decl_varnames_tagged], 3982265a131Smrg[m4_assert([$# <= 2])dnl 3992265a131Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4002265a131Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4012265a131Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4022265a131Smrgm4_define([_lt_decl_varnames_tagged], 4032265a131Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4042265a131Smrg 4052265a131Smrg 4062265a131Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4072265a131Smrg# ------------------------------------------------ 4082265a131Smrgm4_define([lt_decl_all_varnames], 4092265a131Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4102265a131Smrg m4_if([$2], [], 4112265a131Smrg m4_quote(lt_decl_varnames), 4122265a131Smrg m4_quote(m4_shift($@))))[]dnl 413444c061aSmrg]) 4142265a131Smrgm4_define([_lt_decl_all_varnames], 4152265a131Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4162265a131Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417444c061aSmrg]) 418444c061aSmrg 419444c061aSmrg 4202265a131Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4212265a131Smrg# ------------------------------------ 4222265a131Smrg# Quote a variable value, and forward it to `config.status' so that its 4232265a131Smrg# declaration there will have the same value as in `configure'. VARNAME 4242265a131Smrg# must have a single quote delimited value for this to work. 4252265a131Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4262265a131Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427444c061aSmrg 428444c061aSmrg 4292265a131Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4302265a131Smrg# ------------------------------ 4312265a131Smrg# We delimit libtool config variables with single quotes, so when 4322265a131Smrg# we write them to config.status, we have to be sure to quote all 4332265a131Smrg# embedded single quotes properly. In configure, this macro expands 4342265a131Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435444c061aSmrg# 4362265a131Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 4372265a131Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4382265a131Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4392265a131Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440444c061aSmrg 441444c061aSmrg 4422265a131Smrg# _LT_LIBTOOL_TAGS 4432265a131Smrg# ---------------- 4442265a131Smrg# Output comment and list of tags supported by the script 4452265a131Smrgm4_defun([_LT_LIBTOOL_TAGS], 4462265a131Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4472265a131Smrgavailable_tags="_LT_TAGS"dnl 4482265a131Smrg]) 4492265a131Smrg 4502265a131Smrg 4512265a131Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4522265a131Smrg# ----------------------------------- 4532265a131Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4542265a131Smrg# expand to a commented shell variable setting: 455444c061aSmrg# 4562265a131Smrg# # Some comment about what VAR is for. 4572265a131Smrg# visible_name=$lt_internal_name 4582265a131Smrgm4_define([_LT_LIBTOOL_DECLARE], 4592265a131Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4602265a131Smrg [description])))[]dnl 4612265a131Smrgm4_pushdef([_libtool_name], 4622265a131Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4632265a131Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4642265a131Smrg [0], [_libtool_name=[$]$1], 4652265a131Smrg [1], [_libtool_name=$lt_[]$1], 4662265a131Smrg [2], [_libtool_name=$lt_[]$1], 4672265a131Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4682265a131Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4692265a131Smrg]) 470444c061aSmrg 471444c061aSmrg 4722265a131Smrg# _LT_LIBTOOL_CONFIG_VARS 4732265a131Smrg# ----------------------- 4742265a131Smrg# Produce commented declarations of non-tagged libtool config variables 4752265a131Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4762265a131Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4772265a131Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4782265a131Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4792265a131Smrg[m4_foreach([_lt_var], 4802265a131Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4812265a131Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482444c061aSmrg 483444c061aSmrg 4842265a131Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4852265a131Smrg# ------------------------- 4862265a131Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 4872265a131Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4882265a131Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489444c061aSmrg 490444c061aSmrg 4912265a131Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4922265a131Smrg# ------------------------------ 4932265a131Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494444c061aSmrg 495444c061aSmrg 4962265a131Smrg# _LT_CONFIG_COMMANDS 4972265a131Smrg# ------------------- 4982265a131Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4992265a131Smrg# variables for single and double quote escaping we saved from calls 5002265a131Smrg# to _LT_DECL, we can put quote escaped variables declarations 5012265a131Smrg# into `config.status', and then the shell code to quote escape them in 5022265a131Smrg# for loops in `config.status'. Finally, any additional code accumulated 5032265a131Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5042265a131Smrgm4_defun([_LT_CONFIG_COMMANDS], 5052265a131Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5062265a131Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5072265a131Smrg dnl instead of duplicating it all over again into config.status, 5082265a131Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5092265a131Smrg dnl needs to know what name is stored there: 5102265a131Smrg [AC_CONFIG_COMMANDS([libtool], 5112265a131Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5122265a131Smrg dnl If the libtool generation code is destined for config.status, 5132265a131Smrg dnl expand the accumulated commands and init code now: 5142265a131Smrg [AC_CONFIG_COMMANDS([libtool], 5152265a131Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5162265a131Smrg])#_LT_CONFIG_COMMANDS 5172265a131Smrg 5182265a131Smrg 5192265a131Smrg# Initialize. 5202265a131Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5212265a131Smrg[ 522444c061aSmrg 5232265a131Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5242265a131Smrg# if CDPATH is set. 5252265a131Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526444c061aSmrg 5272265a131Smrgsed_quote_subst='$sed_quote_subst' 5282265a131Smrgdouble_quote_subst='$double_quote_subst' 5292265a131Smrgdelay_variable_subst='$delay_variable_subst' 5302265a131Smrg_LT_CONFIG_STATUS_DECLARATIONS 5312265a131SmrgLTCC='$LTCC' 5322265a131SmrgLTCFLAGS='$LTCFLAGS' 5332265a131Smrgcompiler='$compiler_DEFAULT' 5342265a131Smrg 5352265a131Smrg# Quote evaled strings. 5362265a131Smrgfor var in lt_decl_all_varnames([[ \ 5372265a131Smrg]], lt_decl_quote_varnames); do 5382265a131Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5392265a131Smrg *[[\\\\\\\`\\"\\\$]]*) 5402265a131Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5412265a131Smrg ;; 5422265a131Smrg *) 5432265a131Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5442265a131Smrg ;; 5452265a131Smrg esac 5462265a131Smrgdone 547444c061aSmrg 5482265a131Smrg# Double-quote double-evaled strings. 5492265a131Smrgfor var in lt_decl_all_varnames([[ \ 5502265a131Smrg]], lt_decl_dquote_varnames); do 5512265a131Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5522265a131Smrg *[[\\\\\\\`\\"\\\$]]*) 5532265a131Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5542265a131Smrg ;; 5552265a131Smrg *) 5562265a131Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5572265a131Smrg ;; 5582265a131Smrg esac 5592265a131Smrgdone 5602265a131Smrg 5612265a131Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 5622265a131Smrgcase \$lt_ECHO in 5632265a131Smrg*'\\\[$]0 --fallback-echo"')dnl " 5642265a131Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 5652265a131Smrg ;; 5662265a131Smrgesac 5672265a131Smrg 5682265a131Smrg_LT_OUTPUT_LIBTOOL_INIT 569444c061aSmrg]) 570444c061aSmrg 571444c061aSmrg 5722265a131Smrg# LT_OUTPUT 5732265a131Smrg# --------- 5742265a131Smrg# This macro allows early generation of the libtool script (before 5752265a131Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 5762265a131Smrg# tests. 5772265a131SmrgAC_DEFUN([LT_OUTPUT], 5782265a131Smrg[: ${CONFIG_LT=./config.lt} 5792265a131SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 5802265a131Smrgcat >"$CONFIG_LT" <<_LTEOF 5812265a131Smrg#! $SHELL 5822265a131Smrg# Generated by $as_me. 5832265a131Smrg# Run this file to recreate a libtool stub with the current configuration. 5842265a131Smrg 5852265a131Smrglt_cl_silent=false 5862265a131SmrgSHELL=\${CONFIG_SHELL-$SHELL} 5872265a131Smrg_LTEOF 5882265a131Smrg 5892265a131Smrgcat >>"$CONFIG_LT" <<\_LTEOF 5902265a131SmrgAS_SHELL_SANITIZE 5912265a131Smrg_AS_PREPARE 5922265a131Smrg 5932265a131Smrgexec AS_MESSAGE_FD>&1 5942265a131Smrgexec AS_MESSAGE_LOG_FD>>config.log 5952265a131Smrg{ 5962265a131Smrg echo 5972265a131Smrg AS_BOX([Running $as_me.]) 5982265a131Smrg} >&AS_MESSAGE_LOG_FD 599444c061aSmrg 6002265a131Smrglt_cl_help="\ 6012265a131Smrg\`$as_me' creates a local libtool stub from the current configuration, 6022265a131Smrgfor use in further configure time tests before the real libtool is 6032265a131Smrggenerated. 604444c061aSmrg 6052265a131SmrgUsage: $[0] [[OPTIONS]] 606444c061aSmrg 6072265a131Smrg -h, --help print this help, then exit 6082265a131Smrg -V, --version print version number, then exit 6092265a131Smrg -q, --quiet do not print progress messages 6102265a131Smrg -d, --debug don't remove temporary files 611444c061aSmrg 6122265a131SmrgReport bugs to <bug-libtool@gnu.org>." 6132265a131Smrg 6142265a131Smrglt_cl_version="\ 6152265a131Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6162265a131Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6172265a131Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6182265a131Smrg 6192265a131SmrgCopyright (C) 2008 Free Software Foundation, Inc. 6202265a131SmrgThis config.lt script is free software; the Free Software Foundation 6212265a131Smrggives unlimited permision to copy, distribute and modify it." 6222265a131Smrg 6232265a131Smrgwhile test $[#] != 0 6242265a131Smrgdo 6252265a131Smrg case $[1] in 6262265a131Smrg --version | --v* | -V ) 6272265a131Smrg echo "$lt_cl_version"; exit 0 ;; 6282265a131Smrg --help | --h* | -h ) 6292265a131Smrg echo "$lt_cl_help"; exit 0 ;; 6302265a131Smrg --debug | --d* | -d ) 6312265a131Smrg debug=: ;; 6322265a131Smrg --quiet | --q* | --silent | --s* | -q ) 6332265a131Smrg lt_cl_silent=: ;; 6342265a131Smrg 6352265a131Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6362265a131SmrgTry \`$[0] --help' for more information.]) ;; 6372265a131Smrg 6382265a131Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6392265a131SmrgTry \`$[0] --help' for more information.]) ;; 6402265a131Smrg esac 6412265a131Smrg shift 6422265a131Smrgdone 6432265a131Smrg 6442265a131Smrgif $lt_cl_silent; then 6452265a131Smrg exec AS_MESSAGE_FD>/dev/null 646444c061aSmrgfi 6472265a131Smrg_LTEOF 6482265a131Smrg 6492265a131Smrgcat >>"$CONFIG_LT" <<_LTEOF 6502265a131Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6512265a131Smrg_LTEOF 6522265a131Smrg 6532265a131Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6542265a131SmrgAC_MSG_NOTICE([creating $ofile]) 6552265a131Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6562265a131SmrgAS_EXIT(0) 6572265a131Smrg_LTEOF 6582265a131Smrgchmod +x "$CONFIG_LT" 6592265a131Smrg 6602265a131Smrg# configure is writing to config.log, but config.lt does its own redirection, 6612265a131Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6622265a131Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6632265a131Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6642265a131Smrgif test "$no_create" != yes; then 6652265a131Smrg lt_cl_success=: 6662265a131Smrg test "$silent" = yes && 6672265a131Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 6682265a131Smrg exec AS_MESSAGE_LOG_FD>/dev/null 6692265a131Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 6702265a131Smrg exec AS_MESSAGE_LOG_FD>>config.log 6712265a131Smrg $lt_cl_success || AS_EXIT(1) 6722265a131Smrgfi 6732265a131Smrg])# LT_OUTPUT 674444c061aSmrg 675444c061aSmrg 6762265a131Smrg# _LT_CONFIG(TAG) 677444c061aSmrg# --------------- 6782265a131Smrg# If TAG is the built-in tag, create an initial libtool script with a 6792265a131Smrg# default configuration from the untagged config vars. Otherwise add code 6802265a131Smrg# to config.status for appending the configuration named by TAG from the 6812265a131Smrg# matching tagged config vars. 6822265a131Smrgm4_defun([_LT_CONFIG], 6832265a131Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6842265a131Smrg_LT_CONFIG_SAVE_COMMANDS([ 6852265a131Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 6862265a131Smrg m4_if(_LT_TAG, [C], [ 6872265a131Smrg # See if we are running on zsh, and set the options which allow our 6882265a131Smrg # commands through without removal of \ escapes. 6892265a131Smrg if test -n "${ZSH_VERSION+set}" ; then 6902265a131Smrg setopt NO_GLOB_SUBST 6912265a131Smrg fi 6922265a131Smrg 6932265a131Smrg cfgfile="${ofile}T" 6942265a131Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 6952265a131Smrg $RM "$cfgfile" 6962265a131Smrg 6972265a131Smrg cat <<_LT_EOF >> "$cfgfile" 6982265a131Smrg#! $SHELL 6992265a131Smrg 7002265a131Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7012265a131Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7022265a131Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7032265a131Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704444c061aSmrg# 7052265a131Smrg_LT_COPYING 7062265a131Smrg_LT_LIBTOOL_TAGS 7072265a131Smrg 7082265a131Smrg# ### BEGIN LIBTOOL CONFIG 7092265a131Smrg_LT_LIBTOOL_CONFIG_VARS 7102265a131Smrg_LT_LIBTOOL_TAG_VARS 7112265a131Smrg# ### END LIBTOOL CONFIG 7122265a131Smrg 7132265a131Smrg_LT_EOF 7142265a131Smrg 7152265a131Smrg case $host_os in 7162265a131Smrg aix3*) 7172265a131Smrg cat <<\_LT_EOF >> "$cfgfile" 7182265a131Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7192265a131Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7202265a131Smrg# vanish in a puff of smoke. 7212265a131Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7222265a131Smrg COLLECT_NAMES= 7232265a131Smrg export COLLECT_NAMES 724444c061aSmrgfi 7252265a131Smrg_LT_EOF 7262265a131Smrg ;; 7272265a131Smrg esac 728444c061aSmrg 7292265a131Smrg _LT_PROG_LTMAIN 730444c061aSmrg 7312265a131Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7322265a131Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7332265a131Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7342265a131Smrg # is reportedly fixed, but why not run on old versions too? 7352265a131Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 7362265a131Smrg || (rm -f "$cfgfile"; exit 1) 737444c061aSmrg 7382265a131Smrg _LT_PROG_XSI_SHELLFNS 739444c061aSmrg 7402265a131Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 7412265a131Smrg || (rm -f "$cfgfile"; exit 1) 742444c061aSmrg 7432265a131Smrg mv -f "$cfgfile" "$ofile" || 7442265a131Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7452265a131Smrg chmod +x "$ofile" 7462265a131Smrg], 7472265a131Smrg[cat <<_LT_EOF >> "$ofile" 748444c061aSmrg 7492265a131Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7502265a131Smrgdnl in a comment (ie after a #). 7512265a131Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7522265a131Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7532265a131Smrg# ### END LIBTOOL TAG CONFIG: $1 7542265a131Smrg_LT_EOF 7552265a131Smrg])dnl /m4_if 7562265a131Smrg], 7572265a131Smrg[m4_if([$1], [], [ 7582265a131Smrg PACKAGE='$PACKAGE' 7592265a131Smrg VERSION='$VERSION' 7602265a131Smrg TIMESTAMP='$TIMESTAMP' 7612265a131Smrg RM='$RM' 7622265a131Smrg ofile='$ofile'], []) 7632265a131Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7642265a131Smrg])# _LT_CONFIG 765444c061aSmrg 766444c061aSmrg 7672265a131Smrg# LT_SUPPORTED_TAG(TAG) 7682265a131Smrg# --------------------- 7692265a131Smrg# Trace this macro to discover what tags are supported by the libtool 7702265a131Smrg# --tag option, using: 7712265a131Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 7722265a131SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773444c061aSmrg 774444c061aSmrg 7752265a131Smrg# C support is built-in for now 7762265a131Smrgm4_define([_LT_LANG_C_enabled], []) 7772265a131Smrgm4_define([_LT_TAGS], []) 778444c061aSmrg 779444c061aSmrg 7802265a131Smrg# LT_LANG(LANG) 7812265a131Smrg# ------------- 7822265a131Smrg# Enable libtool support for the given language if not already enabled. 7832265a131SmrgAC_DEFUN([LT_LANG], 7842265a131Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 7852265a131Smrgm4_case([$1], 7862265a131Smrg [C], [_LT_LANG(C)], 7872265a131Smrg [C++], [_LT_LANG(CXX)], 7882265a131Smrg [Java], [_LT_LANG(GCJ)], 7892265a131Smrg [Fortran 77], [_LT_LANG(F77)], 7902265a131Smrg [Fortran], [_LT_LANG(FC)], 7912265a131Smrg [Windows Resource], [_LT_LANG(RC)], 7922265a131Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 7932265a131Smrg [_LT_LANG($1)], 7942265a131Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 7952265a131Smrg])# LT_LANG 7962265a131Smrg 7972265a131Smrg 7982265a131Smrg# _LT_LANG(LANGNAME) 7992265a131Smrg# ------------------ 8002265a131Smrgm4_defun([_LT_LANG], 8012265a131Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8022265a131Smrg [LT_SUPPORTED_TAG([$1])dnl 8032265a131Smrg m4_append([_LT_TAGS], [$1 ])dnl 8042265a131Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8052265a131Smrg _LT_LANG_$1_CONFIG($1)])dnl 8062265a131Smrg])# _LT_LANG 807444c061aSmrg 808444c061aSmrg 8092265a131Smrg# _LT_LANG_DEFAULT_CONFIG 8102265a131Smrg# ----------------------- 8112265a131Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8122265a131Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8132265a131Smrg [LT_LANG(CXX)], 8142265a131Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8152265a131Smrg 8162265a131SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8172265a131Smrg [LT_LANG(F77)], 8182265a131Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8192265a131Smrg 8202265a131SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8212265a131Smrg [LT_LANG(FC)], 8222265a131Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8232265a131Smrg 8242265a131Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8252265a131Smrgdnl pulling things in needlessly. 8262265a131SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8272265a131Smrg [LT_LANG(GCJ)], 8282265a131Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8292265a131Smrg [LT_LANG(GCJ)], 8302265a131Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8312265a131Smrg [LT_LANG(GCJ)], 8322265a131Smrg [m4_ifdef([AC_PROG_GCJ], 8332265a131Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8342265a131Smrg m4_ifdef([A][M_PROG_GCJ], 8352265a131Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8362265a131Smrg m4_ifdef([LT_PROG_GCJ], 8372265a131Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8382265a131Smrg 8392265a131SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 8402265a131Smrg [LT_LANG(RC)], 8412265a131Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 8422265a131Smrg])# _LT_LANG_DEFAULT_CONFIG 8432265a131Smrg 8442265a131Smrg# Obsolete macros: 8452265a131SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 8462265a131SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 8472265a131SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 8482265a131SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 8492265a131Smrgdnl aclocal-1.4 backwards compatibility: 8502265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 8512265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 8522265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 8532265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 8542265a131Smrg 8552265a131Smrg 8562265a131Smrg# _LT_TAG_COMPILER 8572265a131Smrg# ---------------- 8582265a131Smrgm4_defun([_LT_TAG_COMPILER], 8592265a131Smrg[AC_REQUIRE([AC_PROG_CC])dnl 860444c061aSmrg 8612265a131Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 8622265a131Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 8632265a131Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 8642265a131Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865444c061aSmrg 8662265a131Smrg# If no C compiler was specified, use CC. 8672265a131SmrgLTCC=${LTCC-"$CC"} 868444c061aSmrg 8692265a131Smrg# If no C compiler flags were specified, use CFLAGS. 8702265a131SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871444c061aSmrg 8722265a131Smrg# Allow CC to be a program name with arguments. 8732265a131Smrgcompiler=$CC 8742265a131Smrg])# _LT_TAG_COMPILER 875444c061aSmrg 8762265a131Smrg 8772265a131Smrg# _LT_COMPILER_BOILERPLATE 8782265a131Smrg# ------------------------ 8792265a131Smrg# Check for compiler boilerplate output or warnings with 8802265a131Smrg# the simple compiler test code. 8812265a131Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 8822265a131Smrg[m4_require([_LT_DECL_SED])dnl 8832265a131Smrgac_outfile=conftest.$ac_objext 8842265a131Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 8852265a131Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 8862265a131Smrg_lt_compiler_boilerplate=`cat conftest.err` 8872265a131Smrg$RM conftest* 8882265a131Smrg])# _LT_COMPILER_BOILERPLATE 8892265a131Smrg 8902265a131Smrg 8912265a131Smrg# _LT_LINKER_BOILERPLATE 8922265a131Smrg# ---------------------- 8932265a131Smrg# Check for linker boilerplate output or warnings with 8942265a131Smrg# the simple link test code. 8952265a131Smrgm4_defun([_LT_LINKER_BOILERPLATE], 8962265a131Smrg[m4_require([_LT_DECL_SED])dnl 8972265a131Smrgac_outfile=conftest.$ac_objext 8982265a131Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 8992265a131Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9002265a131Smrg_lt_linker_boilerplate=`cat conftest.err` 9012265a131Smrg$RM -r conftest* 9022265a131Smrg])# _LT_LINKER_BOILERPLATE 9032265a131Smrg 9042265a131Smrg# _LT_REQUIRED_DARWIN_CHECKS 9052265a131Smrg# ------------------------- 9062265a131Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9072265a131Smrg case $host_os in 9082265a131Smrg rhapsody* | darwin*) 9092265a131Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9102265a131Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9112265a131Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9122265a131Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9132265a131Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9142265a131Smrg _LT_DECL([], [DSYMUTIL], [1], 9152265a131Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9162265a131Smrg _LT_DECL([], [NMEDIT], [1], 9172265a131Smrg [Tool to change global to local symbols on Mac OS X]) 9182265a131Smrg _LT_DECL([], [LIPO], [1], 9192265a131Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9202265a131Smrg _LT_DECL([], [OTOOL], [1], 9212265a131Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9222265a131Smrg _LT_DECL([], [OTOOL64], [1], 9232265a131Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9242265a131Smrg 9252265a131Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9262265a131Smrg [lt_cv_apple_cc_single_mod=no 9272265a131Smrg if test -z "${LT_MULTI_MODULE}"; then 9282265a131Smrg # By default we will add the -single_module flag. You can override 9292265a131Smrg # by either setting the environment variable LT_MULTI_MODULE 9302265a131Smrg # non-empty at configure time, or by adding -multi_module to the 9312265a131Smrg # link flags. 9322265a131Smrg rm -rf libconftest.dylib* 9332265a131Smrg echo "int foo(void){return 1;}" > conftest.c 9342265a131Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9352265a131Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 9362265a131Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9372265a131Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 9382265a131Smrg _lt_result=$? 9392265a131Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 9402265a131Smrg lt_cv_apple_cc_single_mod=yes 9412265a131Smrg else 9422265a131Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 9432265a131Smrg fi 9442265a131Smrg rm -rf libconftest.dylib* 9452265a131Smrg rm -f conftest.* 9462265a131Smrg fi]) 9472265a131Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 9482265a131Smrg [lt_cv_ld_exported_symbols_list], 9492265a131Smrg [lt_cv_ld_exported_symbols_list=no 9502265a131Smrg save_LDFLAGS=$LDFLAGS 9512265a131Smrg echo "_main" > conftest.sym 9522265a131Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 9532265a131Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 9542265a131Smrg [lt_cv_ld_exported_symbols_list=yes], 9552265a131Smrg [lt_cv_ld_exported_symbols_list=no]) 9562265a131Smrg LDFLAGS="$save_LDFLAGS" 9572265a131Smrg ]) 9582265a131Smrg case $host_os in 9592265a131Smrg rhapsody* | darwin1.[[012]]) 9602265a131Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 9612265a131Smrg darwin1.*) 9622265a131Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9632265a131Smrg darwin*) # darwin 5.x on 9642265a131Smrg # if running on 10.5 or later, the deployment target defaults 9652265a131Smrg # to the OS version, if on x86, and 10.4, the deployment 9662265a131Smrg # target defaults to 10.4. Don't you love it? 9672265a131Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 9682265a131Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 9692265a131Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9702265a131Smrg 10.[[012]]*) 9712265a131Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9722265a131Smrg 10.*) 9732265a131Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9742265a131Smrg esac 975444c061aSmrg ;; 9762265a131Smrg esac 9772265a131Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 9782265a131Smrg _lt_dar_single_mod='$single_module' 9792265a131Smrg fi 9802265a131Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 9812265a131Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 9822265a131Smrg else 9832265a131Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 9842265a131Smrg fi 9852265a131Smrg if test "$DSYMUTIL" != ":"; then 9862265a131Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 9872265a131Smrg else 9882265a131Smrg _lt_dsymutil= 9892265a131Smrg fi 990444c061aSmrg ;; 991444c061aSmrg esac 9922265a131Smrg]) 993444c061aSmrg 994444c061aSmrg 9952265a131Smrg# _LT_DARWIN_LINKER_FEATURES 9962265a131Smrg# -------------------------- 9972265a131Smrg# Checks for linker and compiler features on darwin 9982265a131Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 9992265a131Smrg[ 10002265a131Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 10012265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10022265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10032265a131Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 10042265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10052265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 10062265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10072265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 10082265a131Smrg case $cc_basename in 10092265a131Smrg ifort*) _lt_dar_can_shared=yes ;; 10102265a131Smrg *) _lt_dar_can_shared=$GCC ;; 10112265a131Smrg esac 10122265a131Smrg if test "$_lt_dar_can_shared" = "yes"; then 10132265a131Smrg output_verbose_link_cmd=echo 10142265a131Smrg _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}" 10152265a131Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 10162265a131Smrg _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}" 10172265a131Smrg _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}" 10182265a131Smrg m4_if([$1], [CXX], 10192265a131Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 10202265a131Smrg _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}" 10212265a131Smrg _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}" 10222265a131Smrg fi 10232265a131Smrg],[]) 10242265a131Smrg else 10252265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1026444c061aSmrg fi 10272265a131Smrg]) 1028444c061aSmrg 10292265a131Smrg# _LT_SYS_MODULE_PATH_AIX 10302265a131Smrg# ----------------------- 10312265a131Smrg# Links a minimal program and checks the executable 10322265a131Smrg# for the system default hardcoded library path. In most cases, 10332265a131Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 10342265a131Smrg# the location of the communication and MPI libs are included too. 10352265a131Smrg# If we don't find anything, use the default library path according 10362265a131Smrg# to the aix ld manual. 10372265a131Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 10382265a131Smrg[m4_require([_LT_DECL_SED])dnl 10392265a131SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 10402265a131Smrglt_aix_libpath_sed=' 10412265a131Smrg /Import File Strings/,/^$/ { 10422265a131Smrg /^0/ { 10432265a131Smrg s/^0 *\(.*\)$/\1/ 10442265a131Smrg p 10452265a131Smrg } 10462265a131Smrg }' 10472265a131Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10482265a131Smrg# Check for a 64-bit object if we didn't find anything. 10492265a131Smrgif test -z "$aix_libpath"; then 10502265a131Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10512265a131Smrgfi],[]) 10522265a131Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 10532265a131Smrg])# _LT_SYS_MODULE_PATH_AIX 1054444c061aSmrg 1055444c061aSmrg 10562265a131Smrg# _LT_SHELL_INIT(ARG) 10572265a131Smrg# ------------------- 10582265a131Smrgm4_define([_LT_SHELL_INIT], 10592265a131Smrg[ifdef([AC_DIVERSION_NOTICE], 10602265a131Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 10612265a131Smrg [AC_DIVERT_PUSH(NOTICE)]) 10622265a131Smrg$1 10632265a131SmrgAC_DIVERT_POP 10642265a131Smrg])# _LT_SHELL_INIT 1065444c061aSmrg 1066444c061aSmrg 10672265a131Smrg# _LT_PROG_ECHO_BACKSLASH 10682265a131Smrg# ----------------------- 10692265a131Smrg# Add some code to the start of the generated configure script which 10702265a131Smrg# will find an echo command which doesn't interpret backslashes. 10712265a131Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 10722265a131Smrg[_LT_SHELL_INIT([ 10732265a131Smrg# Check that we are running under the correct shell. 10742265a131SmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075444c061aSmrg 10762265a131Smrgcase X$lt_ECHO in 10772265a131SmrgX*--fallback-echo) 10782265a131Smrg # Remove one level of quotation (which was required for Make). 10792265a131Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 10802265a131Smrg ;; 10812265a131Smrgesac 10822265a131Smrg 10832265a131SmrgECHO=${lt_ECHO-echo} 10842265a131Smrgif test "X[$]1" = X--no-reexec; then 10852265a131Smrg # Discard the --no-reexec flag, and continue. 10862265a131Smrg shift 10872265a131Smrgelif test "X[$]1" = X--fallback-echo; then 10882265a131Smrg # Avoid inline document here, it may be left over 10892265a131Smrg : 10902265a131Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 10912265a131Smrg # Yippee, $ECHO works! 10922265a131Smrg : 10932265a131Smrgelse 10942265a131Smrg # Restart under the correct shell. 10952265a131Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1096444c061aSmrgfi 1097444c061aSmrg 10982265a131Smrgif test "X[$]1" = X--fallback-echo; then 10992265a131Smrg # used as fallback echo 11002265a131Smrg shift 11012265a131Smrg cat <<_LT_EOF 11022265a131Smrg[$]* 11032265a131Smrg_LT_EOF 11042265a131Smrg exit 0 11052265a131Smrgfi 1106444c061aSmrg 11072265a131Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 11082265a131Smrg# if CDPATH is set. 11092265a131Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1110444c061aSmrg 11112265a131Smrgif test -z "$lt_ECHO"; then 11122265a131Smrg if test "X${echo_test_string+set}" != Xset; then 11132265a131Smrg # find a string as large as possible, as long as the shell can cope with it 11142265a131Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 11152265a131Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 11162265a131Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 11172265a131Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 11182265a131Smrg then 11192265a131Smrg break 11202265a131Smrg fi 11212265a131Smrg done 11222265a131Smrg fi 1123444c061aSmrg 11242265a131Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11252265a131Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11262265a131Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11272265a131Smrg : 11282265a131Smrg else 11292265a131Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 11302265a131Smrg # backslashes. This makes it impossible to quote backslashes using 11312265a131Smrg # echo "$something" | sed 's/\\/\\\\/g' 11322265a131Smrg # 11332265a131Smrg # So, first we look for a working echo in the user's PATH. 1134444c061aSmrg 11352265a131Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 11362265a131Smrg for dir in $PATH /usr/ucb; do 11372265a131Smrg IFS="$lt_save_ifs" 11382265a131Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 11392265a131Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 11402265a131Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 11412265a131Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11422265a131Smrg ECHO="$dir/echo" 11432265a131Smrg break 11442265a131Smrg fi 11452265a131Smrg done 11462265a131Smrg IFS="$lt_save_ifs" 11472265a131Smrg 11482265a131Smrg if test "X$ECHO" = Xecho; then 11492265a131Smrg # We didn't find a better echo, so look for alternatives. 11502265a131Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 11512265a131Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 11522265a131Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11532265a131Smrg # This shell has a builtin print -r that does the trick. 11542265a131Smrg ECHO='print -r' 11552265a131Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 11562265a131Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 11572265a131Smrg # If we have ksh, try running configure again with it. 11582265a131Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 11592265a131Smrg export ORIGINAL_CONFIG_SHELL 11602265a131Smrg CONFIG_SHELL=/bin/ksh 11612265a131Smrg export CONFIG_SHELL 11622265a131Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 11632265a131Smrg else 11642265a131Smrg # Try using printf. 11652265a131Smrg ECHO='printf %s\n' 11662265a131Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11672265a131Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11682265a131Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11692265a131Smrg # Cool, printf works 11702265a131Smrg : 11712265a131Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11722265a131Smrg test "X$echo_testing_string" = 'X\t' && 11732265a131Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11742265a131Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11752265a131Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 11762265a131Smrg export CONFIG_SHELL 11772265a131Smrg SHELL="$CONFIG_SHELL" 11782265a131Smrg export SHELL 11792265a131Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11802265a131Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11812265a131Smrg test "X$echo_testing_string" = 'X\t' && 11822265a131Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11832265a131Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 11842265a131Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11852265a131Smrg else 11862265a131Smrg # maybe with a smaller string... 11872265a131Smrg prev=: 11882265a131Smrg 11892265a131Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 11902265a131Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 11912265a131Smrg then 11922265a131Smrg break 11932265a131Smrg fi 11942265a131Smrg prev="$cmd" 11952265a131Smrg done 11962265a131Smrg 11972265a131Smrg if test "$prev" != 'sed 50q "[$]0"'; then 11982265a131Smrg echo_test_string=`eval $prev` 11992265a131Smrg export echo_test_string 12002265a131Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 12012265a131Smrg else 12022265a131Smrg # Oops. We lost completely, so just stick with echo. 12032265a131Smrg ECHO=echo 12042265a131Smrg fi 12052265a131Smrg fi 12062265a131Smrg fi 12072265a131Smrg fi 12082265a131Smrg fi 1209444c061aSmrgfi 12102265a131Smrg 12112265a131Smrg# Copy echo and quote the copy suitably for passing to libtool from 12122265a131Smrg# the Makefile, instead of quoting the original, which is used later. 12132265a131Smrglt_ECHO=$ECHO 12142265a131Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 12152265a131Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1216444c061aSmrgfi 1217444c061aSmrg 12182265a131SmrgAC_SUBST(lt_ECHO) 12192265a131Smrg]) 12202265a131Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12212265a131Smrg_LT_DECL([], [ECHO], [1], 12222265a131Smrg [An echo program that does not interpret backslashes]) 12232265a131Smrg])# _LT_PROG_ECHO_BACKSLASH 12242265a131Smrg 12252265a131Smrg 12262265a131Smrg# _LT_ENABLE_LOCK 12272265a131Smrg# --------------- 12282265a131Smrgm4_defun([_LT_ENABLE_LOCK], 12292265a131Smrg[AC_ARG_ENABLE([libtool-lock], 12302265a131Smrg [AS_HELP_STRING([--disable-libtool-lock], 12312265a131Smrg [avoid locking (might break parallel builds)])]) 12322265a131Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12332265a131Smrg 12342265a131Smrg# Some flags need to be propagated to the compiler or linker for good 12352265a131Smrg# libtool support. 12362265a131Smrgcase $host in 12372265a131Smrgia64-*-hpux*) 12382265a131Smrg # Find out which ABI we are using. 12392265a131Smrg echo 'int i;' > conftest.$ac_ext 12402265a131Smrg if AC_TRY_EVAL(ac_compile); then 12412265a131Smrg case `/usr/bin/file conftest.$ac_objext` in 12422265a131Smrg *ELF-32*) 12432265a131Smrg HPUX_IA64_MODE="32" 12442265a131Smrg ;; 12452265a131Smrg *ELF-64*) 12462265a131Smrg HPUX_IA64_MODE="64" 12472265a131Smrg ;; 1248444c061aSmrg esac 12492265a131Smrg fi 12502265a131Smrg rm -rf conftest* 12512265a131Smrg ;; 12522265a131Smrg*-*-irix6*) 12532265a131Smrg # Find out which ABI we are using. 12542265a131Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 12552265a131Smrg if AC_TRY_EVAL(ac_compile); then 12562265a131Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 12572265a131Smrg case `/usr/bin/file conftest.$ac_objext` in 12582265a131Smrg *32-bit*) 12592265a131Smrg LD="${LD-ld} -melf32bsmip" 12602265a131Smrg ;; 12612265a131Smrg *N32*) 12622265a131Smrg LD="${LD-ld} -melf32bmipn32" 12632265a131Smrg ;; 12642265a131Smrg *64-bit*) 12652265a131Smrg LD="${LD-ld} -melf64bmip" 12662265a131Smrg ;; 12672265a131Smrg esac 12682265a131Smrg else 12692265a131Smrg case `/usr/bin/file conftest.$ac_objext` in 12702265a131Smrg *32-bit*) 12712265a131Smrg LD="${LD-ld} -32" 12722265a131Smrg ;; 12732265a131Smrg *N32*) 12742265a131Smrg LD="${LD-ld} -n32" 12752265a131Smrg ;; 12762265a131Smrg *64-bit*) 12772265a131Smrg LD="${LD-ld} -64" 12782265a131Smrg ;; 12792265a131Smrg esac 12802265a131Smrg fi 12812265a131Smrg fi 12822265a131Smrg rm -rf conftest* 12832265a131Smrg ;; 1284444c061aSmrg 12852265a131Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 12862265a131Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 12872265a131Smrg # Find out which ABI we are using. 12882265a131Smrg echo 'int i;' > conftest.$ac_ext 12892265a131Smrg if AC_TRY_EVAL(ac_compile); then 12902265a131Smrg case `/usr/bin/file conftest.o` in 12912265a131Smrg *32-bit*) 12922265a131Smrg case $host in 12932265a131Smrg x86_64-*kfreebsd*-gnu) 12942265a131Smrg LD="${LD-ld} -m elf_i386_fbsd" 12952265a131Smrg ;; 12962265a131Smrg x86_64-*linux*) 12972265a131Smrg LD="${LD-ld} -m elf_i386" 12982265a131Smrg ;; 12992265a131Smrg ppc64-*linux*|powerpc64-*linux*) 13002265a131Smrg LD="${LD-ld} -m elf32ppclinux" 13012265a131Smrg ;; 13022265a131Smrg s390x-*linux*) 13032265a131Smrg LD="${LD-ld} -m elf_s390" 13042265a131Smrg ;; 13052265a131Smrg sparc64-*linux*) 13062265a131Smrg LD="${LD-ld} -m elf32_sparc" 13072265a131Smrg ;; 13082265a131Smrg esac 13092265a131Smrg ;; 13102265a131Smrg *64-bit*) 13112265a131Smrg case $host in 13122265a131Smrg x86_64-*kfreebsd*-gnu) 13132265a131Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13142265a131Smrg ;; 13152265a131Smrg x86_64-*linux*) 13162265a131Smrg LD="${LD-ld} -m elf_x86_64" 13172265a131Smrg ;; 13182265a131Smrg ppc*-*linux*|powerpc*-*linux*) 13192265a131Smrg LD="${LD-ld} -m elf64ppc" 13202265a131Smrg ;; 13212265a131Smrg s390*-*linux*|s390*-*tpf*) 13222265a131Smrg LD="${LD-ld} -m elf64_s390" 13232265a131Smrg ;; 13242265a131Smrg sparc*-*linux*) 13252265a131Smrg LD="${LD-ld} -m elf64_sparc" 13262265a131Smrg ;; 13272265a131Smrg esac 13282265a131Smrg ;; 1329444c061aSmrg esac 13302265a131Smrg fi 13312265a131Smrg rm -rf conftest* 13322265a131Smrg ;; 1333444c061aSmrg 13342265a131Smrg*-*-sco3.2v5*) 13352265a131Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13362265a131Smrg SAVE_CFLAGS="$CFLAGS" 13372265a131Smrg CFLAGS="$CFLAGS -belf" 13382265a131Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13392265a131Smrg [AC_LANG_PUSH(C) 13402265a131Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13412265a131Smrg AC_LANG_POP]) 13422265a131Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13432265a131Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13442265a131Smrg CFLAGS="$SAVE_CFLAGS" 13452265a131Smrg fi 13462265a131Smrg ;; 13472265a131Smrgsparc*-*solaris*) 13482265a131Smrg # Find out which ABI we are using. 13492265a131Smrg echo 'int i;' > conftest.$ac_ext 13502265a131Smrg if AC_TRY_EVAL(ac_compile); then 13512265a131Smrg case `/usr/bin/file conftest.o` in 13522265a131Smrg *64-bit*) 13532265a131Smrg case $lt_cv_prog_gnu_ld in 13542265a131Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 13552265a131Smrg *) 13562265a131Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 13572265a131Smrg LD="${LD-ld} -64" 13582265a131Smrg fi 13592265a131Smrg ;; 13602265a131Smrg esac 13612265a131Smrg ;; 1362444c061aSmrg esac 13632265a131Smrg fi 13642265a131Smrg rm -rf conftest* 13652265a131Smrg ;; 13662265a131Smrgesac 1367444c061aSmrg 13682265a131Smrgneed_locks="$enable_libtool_lock" 13692265a131Smrg])# _LT_ENABLE_LOCK 1370444c061aSmrg 1371444c061aSmrg 13722265a131Smrg# _LT_CMD_OLD_ARCHIVE 1373444c061aSmrg# ------------------- 13742265a131Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 13752265a131Smrg[AC_CHECK_TOOL(AR, ar, false) 13762265a131Smrgtest -z "$AR" && AR=ar 13772265a131Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 13782265a131Smrg_LT_DECL([], [AR], [1], [The archiver]) 13792265a131Smrg_LT_DECL([], [AR_FLAGS], [1]) 1380444c061aSmrg 13812265a131SmrgAC_CHECK_TOOL(STRIP, strip, :) 13822265a131Smrgtest -z "$STRIP" && STRIP=: 13832265a131Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1384444c061aSmrg 13852265a131SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 13862265a131Smrgtest -z "$RANLIB" && RANLIB=: 13872265a131Smrg_LT_DECL([], [RANLIB], [1], 13882265a131Smrg [Commands used to install an old-style archive]) 1389444c061aSmrg 13902265a131Smrg# Determine commands to create old-style static archives. 13912265a131Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 13922265a131Smrgold_postinstall_cmds='chmod 644 $oldlib' 13932265a131Smrgold_postuninstall_cmds= 1394444c061aSmrg 13952265a131Smrgif test -n "$RANLIB"; then 13962265a131Smrg case $host_os in 13972265a131Smrg openbsd*) 13982265a131Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 13992265a131Smrg ;; 14002265a131Smrg *) 14012265a131Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 14022265a131Smrg ;; 14032265a131Smrg esac 14042265a131Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405444c061aSmrgfi 14062265a131Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 14072265a131Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 14082265a131Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 14092265a131Smrg [Commands used to build an old-style archive]) 14102265a131Smrg])# _LT_CMD_OLD_ARCHIVE 1411444c061aSmrg 1412444c061aSmrg 14132265a131Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14142265a131Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 14152265a131Smrg# ---------------------------------------------------------------- 14162265a131Smrg# Check whether the given compiler option works 14172265a131SmrgAC_DEFUN([_LT_COMPILER_OPTION], 14182265a131Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14192265a131Smrgm4_require([_LT_DECL_SED])dnl 14202265a131SmrgAC_CACHE_CHECK([$1], [$2], 14212265a131Smrg [$2=no 14222265a131Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 14232265a131Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 14242265a131Smrg lt_compiler_flag="$3" 14252265a131Smrg # Insert the option either (1) after the last *FLAGS variable, or 14262265a131Smrg # (2) before a word containing "conftest.", or (3) at the end. 14272265a131Smrg # Note that $ac_compile itself does not contain backslashes and begins 14282265a131Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 14292265a131Smrg # The option is referenced via a variable to avoid confusing sed. 14302265a131Smrg lt_compile=`echo "$ac_compile" | $SED \ 14312265a131Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 14322265a131Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 14332265a131Smrg -e 's:$: $lt_compiler_flag:'` 14342265a131Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 14352265a131Smrg (eval "$lt_compile" 2>conftest.err) 14362265a131Smrg ac_status=$? 14372265a131Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 14382265a131Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 14392265a131Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 14402265a131Smrg # The compiler can only warn and ignore the option if not recognized 14412265a131Smrg # So say no if there are warnings other than the usual output. 14422265a131Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 14432265a131Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 14442265a131Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 14452265a131Smrg $2=yes 14462265a131Smrg fi 14472265a131Smrg fi 14482265a131Smrg $RM conftest* 14492265a131Smrg]) 1450444c061aSmrg 14512265a131Smrgif test x"[$]$2" = xyes; then 14522265a131Smrg m4_if([$5], , :, [$5]) 1453444c061aSmrgelse 14542265a131Smrg m4_if([$6], , :, [$6]) 1455444c061aSmrgfi 14562265a131Smrg])# _LT_COMPILER_OPTION 1457444c061aSmrg 14582265a131Smrg# Old name: 14592265a131SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 14602265a131Smrgdnl aclocal-1.4 backwards compatibility: 14612265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1462444c061aSmrg 1463444c061aSmrg 14642265a131Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14652265a131Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 14662265a131Smrg# ---------------------------------------------------- 14672265a131Smrg# Check whether the given linker option works 14682265a131SmrgAC_DEFUN([_LT_LINKER_OPTION], 14692265a131Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14702265a131Smrgm4_require([_LT_DECL_SED])dnl 14712265a131SmrgAC_CACHE_CHECK([$1], [$2], 14722265a131Smrg [$2=no 14732265a131Smrg save_LDFLAGS="$LDFLAGS" 14742265a131Smrg LDFLAGS="$LDFLAGS $3" 14752265a131Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 14762265a131Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 14772265a131Smrg # The linker can only warn and ignore the option if not recognized 14782265a131Smrg # So say no if there are warnings 14792265a131Smrg if test -s conftest.err; then 14802265a131Smrg # Append any errors to the config.log. 14812265a131Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 14822265a131Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 14832265a131Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 14842265a131Smrg if diff conftest.exp conftest.er2 >/dev/null; then 14852265a131Smrg $2=yes 14862265a131Smrg fi 14872265a131Smrg else 14882265a131Smrg $2=yes 14892265a131Smrg fi 14902265a131Smrg fi 14912265a131Smrg $RM -r conftest* 14922265a131Smrg LDFLAGS="$save_LDFLAGS" 14932265a131Smrg]) 1494444c061aSmrg 14952265a131Smrgif test x"[$]$2" = xyes; then 14962265a131Smrg m4_if([$4], , :, [$4]) 14972265a131Smrgelse 14982265a131Smrg m4_if([$5], , :, [$5]) 14992265a131Smrgfi 15002265a131Smrg])# _LT_LINKER_OPTION 1501444c061aSmrg 15022265a131Smrg# Old name: 15032265a131SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 15042265a131Smrgdnl aclocal-1.4 backwards compatibility: 15052265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1506444c061aSmrg 1507444c061aSmrg 15082265a131Smrg# LT_CMD_MAX_LEN 15092265a131Smrg#--------------- 15102265a131SmrgAC_DEFUN([LT_CMD_MAX_LEN], 15112265a131Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 15122265a131Smrg# find the maximum length of command line arguments 15132265a131SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 15142265a131SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 15152265a131Smrg i=0 15162265a131Smrg teststring="ABCD" 1517444c061aSmrg 15182265a131Smrg case $build_os in 15192265a131Smrg msdosdjgpp*) 15202265a131Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 15212265a131Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 15222265a131Smrg # during glob expansion). Even if it were fixed, the result of this 15232265a131Smrg # check would be larger than it should be. 15242265a131Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 15252265a131Smrg ;; 1526444c061aSmrg 15272265a131Smrg gnu*) 15282265a131Smrg # Under GNU Hurd, this test is not required because there is 15292265a131Smrg # no limit to the length of command line arguments. 15302265a131Smrg # Libtool will interpret -1 as no limit whatsoever 15312265a131Smrg lt_cv_sys_max_cmd_len=-1; 15322265a131Smrg ;; 1533444c061aSmrg 15342265a131Smrg cygwin* | mingw* | cegcc*) 15352265a131Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 15362265a131Smrg # about 5 minutes as the teststring grows exponentially. 15372265a131Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 15382265a131Smrg # you end up with a "frozen" computer, even though with patience 15392265a131Smrg # the test eventually succeeds (with a max line length of 256k). 15402265a131Smrg # Instead, let's just punt: use the minimum linelength reported by 15412265a131Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 15422265a131Smrg lt_cv_sys_max_cmd_len=8192; 15432265a131Smrg ;; 1544444c061aSmrg 15452265a131Smrg amigaos*) 15462265a131Smrg # On AmigaOS with pdksh, this test takes hours, literally. 15472265a131Smrg # So we just punt and use a minimum line length of 8192. 15482265a131Smrg lt_cv_sys_max_cmd_len=8192; 15492265a131Smrg ;; 1550444c061aSmrg 15512265a131Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 15522265a131Smrg # This has been around since 386BSD, at least. Likely further. 15532265a131Smrg if test -x /sbin/sysctl; then 15542265a131Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 15552265a131Smrg elif test -x /usr/sbin/sysctl; then 15562265a131Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 15572265a131Smrg else 15582265a131Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 15592265a131Smrg fi 15602265a131Smrg # And add a safety zone 15612265a131Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 15622265a131Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 15632265a131Smrg ;; 1564444c061aSmrg 15652265a131Smrg interix*) 15662265a131Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 15672265a131Smrg lt_cv_sys_max_cmd_len=196608 15682265a131Smrg ;; 1569444c061aSmrg 15702265a131Smrg osf*) 15712265a131Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 15722265a131Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 15732265a131Smrg # nice to cause kernel panics so lets avoid the loop below. 15742265a131Smrg # First set a reasonable default. 15752265a131Smrg lt_cv_sys_max_cmd_len=16384 15762265a131Smrg # 15772265a131Smrg if test -x /sbin/sysconfig; then 15782265a131Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 15792265a131Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 15802265a131Smrg esac 15812265a131Smrg fi 15822265a131Smrg ;; 15832265a131Smrg sco3.2v5*) 15842265a131Smrg lt_cv_sys_max_cmd_len=102400 15852265a131Smrg ;; 15862265a131Smrg sysv5* | sco5v6* | sysv4.2uw2*) 15872265a131Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 15882265a131Smrg if test -n "$kargmax"; then 15892265a131Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 15902265a131Smrg else 15912265a131Smrg lt_cv_sys_max_cmd_len=32768 15922265a131Smrg fi 15932265a131Smrg ;; 15942265a131Smrg *) 15952265a131Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 15962265a131Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 15972265a131Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 15982265a131Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 15992265a131Smrg else 16002265a131Smrg # Make teststring a little bigger before we do anything with it. 16012265a131Smrg # a 1K string should be a reasonable start. 16022265a131Smrg for i in 1 2 3 4 5 6 7 8 ; do 16032265a131Smrg teststring=$teststring$teststring 16042265a131Smrg done 16052265a131Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 16062265a131Smrg # If test is not a shell built-in, we'll probably end up computing a 16072265a131Smrg # maximum length that is only half of the actual maximum length, but 16082265a131Smrg # we can't tell. 16092265a131Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 16102265a131Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 16112265a131Smrg test $i != 17 # 1/2 MB should be enough 16122265a131Smrg do 16132265a131Smrg i=`expr $i + 1` 16142265a131Smrg teststring=$teststring$teststring 16152265a131Smrg done 16162265a131Smrg # Only check the string length outside the loop. 16172265a131Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 16182265a131Smrg teststring= 16192265a131Smrg # Add a significant safety factor because C++ compilers can tack on 16202265a131Smrg # massive amounts of additional arguments before passing them to the 16212265a131Smrg # linker. It appears as though 1/2 is a usable value. 16222265a131Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 16232265a131Smrg fi 16242265a131Smrg ;; 16252265a131Smrg esac 16262265a131Smrg]) 16272265a131Smrgif test -n $lt_cv_sys_max_cmd_len ; then 16282265a131Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1629444c061aSmrgelse 16302265a131Smrg AC_MSG_RESULT(none) 1631444c061aSmrgfi 16322265a131Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 16332265a131Smrg_LT_DECL([], [max_cmd_len], [0], 16342265a131Smrg [What is the maximum length of a command?]) 16352265a131Smrg])# LT_CMD_MAX_LEN 1636444c061aSmrg 16372265a131Smrg# Old name: 16382265a131SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 16392265a131Smrgdnl aclocal-1.4 backwards compatibility: 16402265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641444c061aSmrg 16422265a131Smrg 16432265a131Smrg# _LT_HEADER_DLFCN 1644444c061aSmrg# ---------------- 16452265a131Smrgm4_defun([_LT_HEADER_DLFCN], 16462265a131Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 16472265a131Smrg])# _LT_HEADER_DLFCN 1648444c061aSmrg 16492265a131Smrg 16502265a131Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 16512265a131Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 16522265a131Smrg# ---------------------------------------------------------------- 16532265a131Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 16542265a131Smrg[m4_require([_LT_HEADER_DLFCN])dnl 16552265a131Smrgif test "$cross_compiling" = yes; then : 16562265a131Smrg [$4] 1657444c061aSmrgelse 16582265a131Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 16592265a131Smrg lt_status=$lt_dlunknown 16602265a131Smrg cat > conftest.$ac_ext <<_LT_EOF 16612265a131Smrg[#line __oline__ "configure" 16622265a131Smrg#include "confdefs.h" 1663444c061aSmrg 16642265a131Smrg#if HAVE_DLFCN_H 16652265a131Smrg#include <dlfcn.h> 16662265a131Smrg#endif 1667444c061aSmrg 16682265a131Smrg#include <stdio.h> 1669444c061aSmrg 16702265a131Smrg#ifdef RTLD_GLOBAL 16712265a131Smrg# define LT_DLGLOBAL RTLD_GLOBAL 16722265a131Smrg#else 16732265a131Smrg# ifdef DL_GLOBAL 16742265a131Smrg# define LT_DLGLOBAL DL_GLOBAL 16752265a131Smrg# else 16762265a131Smrg# define LT_DLGLOBAL 0 16772265a131Smrg# endif 16782265a131Smrg#endif 1679444c061aSmrg 16802265a131Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 16812265a131Smrg find out it does not work in some platform. */ 16822265a131Smrg#ifndef LT_DLLAZY_OR_NOW 16832265a131Smrg# ifdef RTLD_LAZY 16842265a131Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 16852265a131Smrg# else 16862265a131Smrg# ifdef DL_LAZY 16872265a131Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 16882265a131Smrg# else 16892265a131Smrg# ifdef RTLD_NOW 16902265a131Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 16912265a131Smrg# else 16922265a131Smrg# ifdef DL_NOW 16932265a131Smrg# define LT_DLLAZY_OR_NOW DL_NOW 16942265a131Smrg# else 16952265a131Smrg# define LT_DLLAZY_OR_NOW 0 16962265a131Smrg# endif 16972265a131Smrg# endif 16982265a131Smrg# endif 16992265a131Smrg# endif 17002265a131Smrg#endif 1701444c061aSmrg 17022265a131Smrgvoid fnord() { int i=42;} 17032265a131Smrgint main () 17042265a131Smrg{ 17052265a131Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 17062265a131Smrg int status = $lt_dlunknown; 1707444c061aSmrg 17082265a131Smrg if (self) 17092265a131Smrg { 17102265a131Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 17112265a131Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 17122265a131Smrg /* dlclose (self); */ 17132265a131Smrg } 17142265a131Smrg else 17152265a131Smrg puts (dlerror ()); 1716444c061aSmrg 17172265a131Smrg return status; 17182265a131Smrg}] 17192265a131Smrg_LT_EOF 17202265a131Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 17212265a131Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 17222265a131Smrg lt_status=$? 17232265a131Smrg case x$lt_status in 17242265a131Smrg x$lt_dlno_uscore) $1 ;; 17252265a131Smrg x$lt_dlneed_uscore) $2 ;; 17262265a131Smrg x$lt_dlunknown|x*) $3 ;; 17272265a131Smrg esac 17282265a131Smrg else : 17292265a131Smrg # compilation failed 17302265a131Smrg $3 17312265a131Smrg fi 17322265a131Smrgfi 17332265a131Smrgrm -fr conftest* 17342265a131Smrg])# _LT_TRY_DLOPEN_SELF 1735444c061aSmrg 1736444c061aSmrg 17372265a131Smrg# LT_SYS_DLOPEN_SELF 17382265a131Smrg# ------------------ 17392265a131SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 17402265a131Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17412265a131Smrgif test "x$enable_dlopen" != xyes; then 17422265a131Smrg enable_dlopen=unknown 17432265a131Smrg enable_dlopen_self=unknown 17442265a131Smrg enable_dlopen_self_static=unknown 17452265a131Smrgelse 17462265a131Smrg lt_cv_dlopen=no 17472265a131Smrg lt_cv_dlopen_libs= 1748444c061aSmrg 17492265a131Smrg case $host_os in 17502265a131Smrg beos*) 17512265a131Smrg lt_cv_dlopen="load_add_on" 17522265a131Smrg lt_cv_dlopen_libs= 17532265a131Smrg lt_cv_dlopen_self=yes 17542265a131Smrg ;; 1755444c061aSmrg 17562265a131Smrg mingw* | pw32* | cegcc*) 17572265a131Smrg lt_cv_dlopen="LoadLibrary" 17582265a131Smrg lt_cv_dlopen_libs= 17592265a131Smrg ;; 1760444c061aSmrg 17612265a131Smrg cygwin*) 17622265a131Smrg lt_cv_dlopen="dlopen" 17632265a131Smrg lt_cv_dlopen_libs= 17642265a131Smrg ;; 1765444c061aSmrg 17662265a131Smrg darwin*) 17672265a131Smrg # if libdl is installed we need to link against it 17682265a131Smrg AC_CHECK_LIB([dl], [dlopen], 17692265a131Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 17702265a131Smrg lt_cv_dlopen="dyld" 17712265a131Smrg lt_cv_dlopen_libs= 17722265a131Smrg lt_cv_dlopen_self=yes 17732265a131Smrg ]) 17742265a131Smrg ;; 1775444c061aSmrg 17762265a131Smrg *) 17772265a131Smrg AC_CHECK_FUNC([shl_load], 17782265a131Smrg [lt_cv_dlopen="shl_load"], 17792265a131Smrg [AC_CHECK_LIB([dld], [shl_load], 17802265a131Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 17812265a131Smrg [AC_CHECK_FUNC([dlopen], 17822265a131Smrg [lt_cv_dlopen="dlopen"], 17832265a131Smrg [AC_CHECK_LIB([dl], [dlopen], 17842265a131Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 17852265a131Smrg [AC_CHECK_LIB([svld], [dlopen], 17862265a131Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 17872265a131Smrg [AC_CHECK_LIB([dld], [dld_link], 17882265a131Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 17892265a131Smrg ]) 17902265a131Smrg ]) 17912265a131Smrg ]) 17922265a131Smrg ]) 17932265a131Smrg ]) 17942265a131Smrg ;; 17952265a131Smrg esac 1796444c061aSmrg 17972265a131Smrg if test "x$lt_cv_dlopen" != xno; then 17982265a131Smrg enable_dlopen=yes 17992265a131Smrg else 18002265a131Smrg enable_dlopen=no 18012265a131Smrg fi 1802444c061aSmrg 18032265a131Smrg case $lt_cv_dlopen in 18042265a131Smrg dlopen) 18052265a131Smrg save_CPPFLAGS="$CPPFLAGS" 18062265a131Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807444c061aSmrg 18082265a131Smrg save_LDFLAGS="$LDFLAGS" 18092265a131Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810444c061aSmrg 18112265a131Smrg save_LIBS="$LIBS" 18122265a131Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813444c061aSmrg 18142265a131Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 18152265a131Smrg lt_cv_dlopen_self, [dnl 18162265a131Smrg _LT_TRY_DLOPEN_SELF( 18172265a131Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 18182265a131Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 18192265a131Smrg ]) 1820444c061aSmrg 18212265a131Smrg if test "x$lt_cv_dlopen_self" = xyes; then 18222265a131Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 18232265a131Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 18242265a131Smrg lt_cv_dlopen_self_static, [dnl 18252265a131Smrg _LT_TRY_DLOPEN_SELF( 18262265a131Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 18272265a131Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 18282265a131Smrg ]) 18292265a131Smrg fi 1830444c061aSmrg 18312265a131Smrg CPPFLAGS="$save_CPPFLAGS" 18322265a131Smrg LDFLAGS="$save_LDFLAGS" 18332265a131Smrg LIBS="$save_LIBS" 18342265a131Smrg ;; 18352265a131Smrg esac 1836444c061aSmrg 18372265a131Smrg case $lt_cv_dlopen_self in 18382265a131Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 18392265a131Smrg *) enable_dlopen_self=unknown ;; 18402265a131Smrg esac 1841444c061aSmrg 18422265a131Smrg case $lt_cv_dlopen_self_static in 18432265a131Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 18442265a131Smrg *) enable_dlopen_self_static=unknown ;; 18452265a131Smrg esac 18462265a131Smrgfi 18472265a131Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 18482265a131Smrg [Whether dlopen is supported]) 18492265a131Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 18502265a131Smrg [Whether dlopen of programs is supported]) 18512265a131Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 18522265a131Smrg [Whether dlopen of statically linked programs is supported]) 18532265a131Smrg])# LT_SYS_DLOPEN_SELF 1854444c061aSmrg 18552265a131Smrg# Old name: 18562265a131SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 18572265a131Smrgdnl aclocal-1.4 backwards compatibility: 18582265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859444c061aSmrg 1860444c061aSmrg 18612265a131Smrg# _LT_COMPILER_C_O([TAGNAME]) 18622265a131Smrg# --------------------------- 18632265a131Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 18642265a131Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 18652265a131Smrgm4_defun([_LT_COMPILER_C_O], 18662265a131Smrg[m4_require([_LT_DECL_SED])dnl 18672265a131Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 18682265a131Smrgm4_require([_LT_TAG_COMPILER])dnl 18692265a131SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 18702265a131Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 18712265a131Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 18722265a131Smrg $RM -r conftest 2>/dev/null 18732265a131Smrg mkdir conftest 18742265a131Smrg cd conftest 18752265a131Smrg mkdir out 18762265a131Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877444c061aSmrg 18782265a131Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 18792265a131Smrg # Insert the option either (1) after the last *FLAGS variable, or 18802265a131Smrg # (2) before a word containing "conftest.", or (3) at the end. 18812265a131Smrg # Note that $ac_compile itself does not contain backslashes and begins 18822265a131Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 18832265a131Smrg lt_compile=`echo "$ac_compile" | $SED \ 18842265a131Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 18852265a131Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 18862265a131Smrg -e 's:$: $lt_compiler_flag:'` 18872265a131Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 18882265a131Smrg (eval "$lt_compile" 2>out/conftest.err) 18892265a131Smrg ac_status=$? 18902265a131Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 18912265a131Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 18922265a131Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 18932265a131Smrg then 18942265a131Smrg # The compiler can only warn and ignore the option if not recognized 18952265a131Smrg # So say no if there are warnings 18962265a131Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 18972265a131Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 18982265a131Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 18992265a131Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 19002265a131Smrg fi 19012265a131Smrg fi 19022265a131Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 19032265a131Smrg $RM conftest* 19042265a131Smrg # SGI C++ compiler will create directory out/ii_files/ for 19052265a131Smrg # template instantiation 19062265a131Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 19072265a131Smrg $RM out/* && rmdir out 19082265a131Smrg cd .. 19092265a131Smrg $RM -r conftest 19102265a131Smrg $RM conftest* 19112265a131Smrg]) 19122265a131Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 19132265a131Smrg [Does compiler simultaneously support -c and -o options?]) 19142265a131Smrg])# _LT_COMPILER_C_O 1915444c061aSmrg 1916444c061aSmrg 19172265a131Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 19182265a131Smrg# ---------------------------------- 19192265a131Smrg# Check to see if we can do hard links to lock some files if needed 19202265a131Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 19212265a131Smrg[m4_require([_LT_ENABLE_LOCK])dnl 19222265a131Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19232265a131Smrg_LT_COMPILER_C_O([$1]) 1924444c061aSmrg 19252265a131Smrghard_links="nottested" 19262265a131Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 19272265a131Smrg # do not overwrite the value of need_locks provided by the user 19282265a131Smrg AC_MSG_CHECKING([if we can lock with hard links]) 19292265a131Smrg hard_links=yes 19302265a131Smrg $RM conftest* 19312265a131Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 19322265a131Smrg touch conftest.a 19332265a131Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 19342265a131Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 19352265a131Smrg AC_MSG_RESULT([$hard_links]) 19362265a131Smrg if test "$hard_links" = no; then 19372265a131Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 19382265a131Smrg need_locks=warn 19392265a131Smrg fi 19402265a131Smrgelse 19412265a131Smrg need_locks=no 19422265a131Smrgfi 19432265a131Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 19442265a131Smrg])# _LT_COMPILER_FILE_LOCKS 1945444c061aSmrg 1946444c061aSmrg 19472265a131Smrg# _LT_CHECK_OBJDIR 19482265a131Smrg# ---------------- 19492265a131Smrgm4_defun([_LT_CHECK_OBJDIR], 19502265a131Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 19512265a131Smrg[rm -f .libs 2>/dev/null 19522265a131Smrgmkdir .libs 2>/dev/null 19532265a131Smrgif test -d .libs; then 19542265a131Smrg lt_cv_objdir=.libs 19552265a131Smrgelse 19562265a131Smrg # MS-DOS does not allow filenames that begin with a dot. 19572265a131Smrg lt_cv_objdir=_libs 19582265a131Smrgfi 19592265a131Smrgrmdir .libs 2>/dev/null]) 19602265a131Smrgobjdir=$lt_cv_objdir 19612265a131Smrg_LT_DECL([], [objdir], [0], 19622265a131Smrg [The name of the directory that contains temporary libtool files])dnl 19632265a131Smrgm4_pattern_allow([LT_OBJDIR])dnl 19642265a131SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 19652265a131Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 19662265a131Smrg])# _LT_CHECK_OBJDIR 1967444c061aSmrg 1968444c061aSmrg 19692265a131Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 19702265a131Smrg# -------------------------------------- 19712265a131Smrg# Check hardcoding attributes. 19722265a131Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 19732265a131Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 19742265a131Smrg_LT_TAGVAR(hardcode_action, $1)= 19752265a131Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 19762265a131Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 19772265a131Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 19782265a131Smrg 19792265a131Smrg # We can hardcode non-existent directories. 19802265a131Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 19812265a131Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 19822265a131Smrg # have to relink, otherwise we might link with an installed library 19832265a131Smrg # when we should be linking with a yet-to-be-installed one 19842265a131Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 19852265a131Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 19862265a131Smrg # Linking always hardcodes the temporary library directory. 19872265a131Smrg _LT_TAGVAR(hardcode_action, $1)=relink 19882265a131Smrg else 19892265a131Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 19902265a131Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 19912265a131Smrg fi 19922265a131Smrgelse 19932265a131Smrg # We cannot hardcode anything, or else we can only hardcode existing 19942265a131Smrg # directories. 19952265a131Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 19962265a131Smrgfi 19972265a131SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 19982265a131Smrg 19992265a131Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 20002265a131Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 20012265a131Smrg # Fast installation is not supported 20022265a131Smrg enable_fast_install=no 20032265a131Smrgelif test "$shlibpath_overrides_runpath" = yes || 20042265a131Smrg test "$enable_shared" = no; then 20052265a131Smrg # Fast installation is not necessary 20062265a131Smrg enable_fast_install=needless 20072265a131Smrgfi 20082265a131Smrg_LT_TAGDECL([], [hardcode_action], [0], 20092265a131Smrg [How to hardcode a shared library path into an executable]) 20102265a131Smrg])# _LT_LINKER_HARDCODE_LIBPATH 20112265a131Smrg 20122265a131Smrg 20132265a131Smrg# _LT_CMD_STRIPLIB 20142265a131Smrg# ---------------- 20152265a131Smrgm4_defun([_LT_CMD_STRIPLIB], 20162265a131Smrg[m4_require([_LT_DECL_EGREP]) 20172265a131Smrgstriplib= 20182265a131Smrgold_striplib= 20192265a131SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 20202265a131Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 20212265a131Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 20222265a131Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 20232265a131Smrg AC_MSG_RESULT([yes]) 20242265a131Smrgelse 20252265a131Smrg# FIXME - insert some real tests, host_os isn't really good enough 2026444c061aSmrg case $host_os in 20272265a131Smrg darwin*) 20282265a131Smrg if test -n "$STRIP" ; then 20292265a131Smrg striplib="$STRIP -x" 20302265a131Smrg old_striplib="$STRIP -S" 20312265a131Smrg AC_MSG_RESULT([yes]) 20322265a131Smrg else 20332265a131Smrg AC_MSG_RESULT([no]) 20342265a131Smrg fi 2035444c061aSmrg ;; 2036444c061aSmrg *) 20372265a131Smrg AC_MSG_RESULT([no]) 2038444c061aSmrg ;; 2039444c061aSmrg esac 2040444c061aSmrgfi 20412265a131Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 20422265a131Smrg_LT_DECL([], [striplib], [1]) 20432265a131Smrg])# _LT_CMD_STRIPLIB 2044444c061aSmrg 2045444c061aSmrg 20462265a131Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 20472265a131Smrg# ----------------------------- 20482265a131Smrg# PORTME Fill in your ld.so characteristics 20492265a131Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 20502265a131Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 20512265a131Smrgm4_require([_LT_DECL_EGREP])dnl 20522265a131Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20532265a131Smrgm4_require([_LT_DECL_OBJDUMP])dnl 20542265a131Smrgm4_require([_LT_DECL_SED])dnl 20552265a131SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 20562265a131Smrgm4_if([$1], 20572265a131Smrg [], [ 20582265a131Smrgif test "$GCC" = yes; then 20592265a131Smrg case $host_os in 20602265a131Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 20612265a131Smrg *) lt_awk_arg="/^libraries:/" ;; 20622265a131Smrg esac 20632265a131Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 20642265a131Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 20652265a131Smrg # if the path contains ";" then we assume it to be the separator 20662265a131Smrg # otherwise default to the standard path separator (i.e. ":") - it is 20672265a131Smrg # assumed that no part of a normal pathname contains ";" but that should 20682265a131Smrg # okay in the real world where ";" in dirpaths is itself problematic. 20692265a131Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 20702265a131Smrg else 20712265a131Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2072444c061aSmrg fi 20732265a131Smrg # Ok, now we have the path, separated by spaces, we can step through it 20742265a131Smrg # and add multilib dir if necessary. 20752265a131Smrg lt_tmp_lt_search_path_spec= 20762265a131Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 20772265a131Smrg for lt_sys_path in $lt_search_path_spec; do 20782265a131Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 20792265a131Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 20802265a131Smrg else 20812265a131Smrg test -d "$lt_sys_path" && \ 20822265a131Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 20832265a131Smrg fi 20842265a131Smrg done 20852265a131Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 20862265a131SmrgBEGIN {RS=" "; FS="/|\n";} { 20872265a131Smrg lt_foo=""; 20882265a131Smrg lt_count=0; 20892265a131Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 20902265a131Smrg if ($lt_i != "" && $lt_i != ".") { 20912265a131Smrg if ($lt_i == "..") { 20922265a131Smrg lt_count++; 20932265a131Smrg } else { 20942265a131Smrg if (lt_count == 0) { 20952265a131Smrg lt_foo="/" $lt_i lt_foo; 20962265a131Smrg } else { 20972265a131Smrg lt_count--; 20982265a131Smrg } 20992265a131Smrg } 21002265a131Smrg } 21012265a131Smrg } 21022265a131Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 21032265a131Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 21042265a131Smrg}'` 21052265a131Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 21062265a131Smrgelse 21072265a131Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 21082265a131Smrgfi]) 21092265a131Smrglibrary_names_spec= 21102265a131Smrglibname_spec='lib$name' 21112265a131Smrgsoname_spec= 21122265a131Smrgshrext_cmds=".so" 21132265a131Smrgpostinstall_cmds= 21142265a131Smrgpostuninstall_cmds= 21152265a131Smrgfinish_cmds= 21162265a131Smrgfinish_eval= 21172265a131Smrgshlibpath_var= 21182265a131Smrgshlibpath_overrides_runpath=unknown 21192265a131Smrgversion_type=none 21202265a131Smrgdynamic_linker="$host_os ld.so" 21212265a131Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 21222265a131Smrgneed_lib_prefix=unknown 21232265a131Smrghardcode_into_libs=no 2124444c061aSmrg 21252265a131Smrg# when you set need_version to no, make sure it does not cause -set_version 21262265a131Smrg# flags to be left without arguments 21272265a131Smrgneed_version=unknown 2128444c061aSmrg 21292265a131Smrgcase $host_os in 21302265a131Smrgaix3*) 21312265a131Smrg version_type=linux 21322265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 21332265a131Smrg shlibpath_var=LIBPATH 2134444c061aSmrg 21352265a131Smrg # AIX 3 has no versioning support, so we append a major version to the name. 21362265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 21372265a131Smrg ;; 2138444c061aSmrg 21392265a131Smrgaix[[4-9]]*) 21402265a131Smrg version_type=linux 21412265a131Smrg need_lib_prefix=no 21422265a131Smrg need_version=no 21432265a131Smrg hardcode_into_libs=yes 21442265a131Smrg if test "$host_cpu" = ia64; then 21452265a131Smrg # AIX 5 supports IA64 21462265a131Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 21472265a131Smrg shlibpath_var=LD_LIBRARY_PATH 21482265a131Smrg else 21492265a131Smrg # With GCC up to 2.95.x, collect2 would create an import file 21502265a131Smrg # for dependence libraries. The import file would start with 21512265a131Smrg # the line `#! .'. This would cause the generated library to 21522265a131Smrg # depend on `.', always an invalid library. This was fixed in 21532265a131Smrg # development snapshots of GCC prior to 3.0. 21542265a131Smrg case $host_os in 21552265a131Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 21562265a131Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 21572265a131Smrg echo ' yes ' 21582265a131Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2159444c061aSmrg : 2160444c061aSmrg else 21612265a131Smrg can_build_shared=no 2162444c061aSmrg fi 21632265a131Smrg ;; 21642265a131Smrg esac 21652265a131Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 21662265a131Smrg # soname into executable. Probably we can add versioning support to 21672265a131Smrg # collect2, so additional links can be useful in future. 21682265a131Smrg if test "$aix_use_runtimelinking" = yes; then 21692265a131Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 21702265a131Smrg # instead of lib<name>.a to let people know that these are not 21712265a131Smrg # typical AIX shared libraries. 21722265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 21732265a131Smrg else 21742265a131Smrg # We preserve .a as extension for shared libraries through AIX4.2 21752265a131Smrg # and later when we are not doing run time linking. 21762265a131Smrg library_names_spec='${libname}${release}.a $libname.a' 21772265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 2178444c061aSmrg fi 21792265a131Smrg shlibpath_var=LIBPATH 2180444c061aSmrg fi 21812265a131Smrg ;; 2182444c061aSmrg 21832265a131Smrgamigaos*) 21842265a131Smrg case $host_cpu in 21852265a131Smrg powerpc) 21862265a131Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 21872265a131Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 21882265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 21892265a131Smrg ;; 21902265a131Smrg m68k) 21912265a131Smrg library_names_spec='$libname.ixlibrary $libname.a' 21922265a131Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 21932265a131Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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' 21942265a131Smrg ;; 21952265a131Smrg esac 21962265a131Smrg ;; 2197444c061aSmrg 21982265a131Smrgbeos*) 21992265a131Smrg library_names_spec='${libname}${shared_ext}' 22002265a131Smrg dynamic_linker="$host_os ld.so" 22012265a131Smrg shlibpath_var=LIBRARY_PATH 22022265a131Smrg ;; 2203444c061aSmrg 22042265a131Smrgbsdi[[45]]*) 22052265a131Smrg version_type=linux 22062265a131Smrg need_version=no 22072265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 22082265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 22092265a131Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 22102265a131Smrg shlibpath_var=LD_LIBRARY_PATH 22112265a131Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 22122265a131Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 22132265a131Smrg # the default ld.so.conf also contains /usr/contrib/lib and 22142265a131Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 22152265a131Smrg # libtool to hard-code these into programs 22162265a131Smrg ;; 2217444c061aSmrg 22182265a131Smrgcygwin* | mingw* | pw32* | cegcc*) 22192265a131Smrg version_type=windows 22202265a131Smrg shrext_cmds=".dll" 22212265a131Smrg need_version=no 22222265a131Smrg need_lib_prefix=no 2223444c061aSmrg 22242265a131Smrg case $GCC,$host_os in 22252265a131Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 22262265a131Smrg library_names_spec='$libname.dll.a' 22272265a131Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 22282265a131Smrg postinstall_cmds='base_file=`basename \${file}`~ 22292265a131Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 22302265a131Smrg dldir=$destdir/`dirname \$dlpath`~ 22312265a131Smrg test -d \$dldir || mkdir -p \$dldir~ 22322265a131Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 22332265a131Smrg chmod a+x \$dldir/$dlname~ 22342265a131Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 22352265a131Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 22362265a131Smrg fi' 22372265a131Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 22382265a131Smrg dlpath=$dir/\$dldll~ 22392265a131Smrg $RM \$dlpath' 22402265a131Smrg shlibpath_overrides_runpath=yes 22412265a131Smrg 22422265a131Smrg case $host_os in 22432265a131Smrg cygwin*) 22442265a131Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 22452265a131Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22462265a131Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2247444c061aSmrg ;; 22482265a131Smrg mingw* | cegcc*) 22492265a131Smrg # MinGW DLLs use traditional 'lib' prefix 22502265a131Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22512265a131Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 22522265a131Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 22532265a131Smrg # It is most probably a Windows format PATH printed by 22542265a131Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 22552265a131Smrg # path with ; separators, and with drive letters. We can handle the 22562265a131Smrg # drive letters (cygwin fileutils understands them), so leave them, 22572265a131Smrg # especially as we might pass files found there to a mingw objdump, 22582265a131Smrg # which wouldn't understand a cygwinified path. Ahh. 22592265a131Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 22602265a131Smrg else 22612265a131Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 22622265a131Smrg fi 2263444c061aSmrg ;; 22642265a131Smrg pw32*) 22652265a131Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 22662265a131Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267444c061aSmrg ;; 2268444c061aSmrg esac 22692265a131Smrg ;; 22702265a131Smrg 22712265a131Smrg *) 22722265a131Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 22732265a131Smrg ;; 22742265a131Smrg esac 22752265a131Smrg dynamic_linker='Win32 ld.exe' 22762265a131Smrg # FIXME: first we should search . and the directory the executable is in 22772265a131Smrg shlibpath_var=PATH 2278444c061aSmrg ;; 2279444c061aSmrg 22802265a131Smrgdarwin* | rhapsody*) 22812265a131Smrg dynamic_linker="$host_os dyld" 22822265a131Smrg version_type=darwin 22832265a131Smrg need_lib_prefix=no 22842265a131Smrg need_version=no 22852265a131Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 22862265a131Smrg soname_spec='${libname}${release}${major}$shared_ext' 22872265a131Smrg shlibpath_overrides_runpath=yes 22882265a131Smrg shlibpath_var=DYLD_LIBRARY_PATH 22892265a131Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 22902265a131Smrgm4_if([$1], [],[ 22912265a131Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 22922265a131Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293444c061aSmrg ;; 2294444c061aSmrg 22952265a131Smrgdgux*) 22962265a131Smrg version_type=linux 22972265a131Smrg need_lib_prefix=no 22982265a131Smrg need_version=no 22992265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 23002265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 23012265a131Smrg shlibpath_var=LD_LIBRARY_PATH 2302444c061aSmrg ;; 2303444c061aSmrg 23042265a131Smrgfreebsd1*) 23052265a131Smrg dynamic_linker=no 2306444c061aSmrg ;; 2307444c061aSmrg 23082265a131Smrgfreebsd* | dragonfly*) 23092265a131Smrg # DragonFly does not have aout. When/if they implement a new 23102265a131Smrg # versioning mechanism, adjust this. 23112265a131Smrg if test -x /usr/bin/objformat; then 23122265a131Smrg objformat=`/usr/bin/objformat` 23132265a131Smrg else 23142265a131Smrg case $host_os in 23152265a131Smrg freebsd[[123]]*) objformat=aout ;; 23162265a131Smrg *) objformat=elf ;; 23172265a131Smrg esac 23182265a131Smrg fi 23192265a131Smrg version_type=freebsd-$objformat 23202265a131Smrg case $version_type in 23212265a131Smrg freebsd-elf*) 23222265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 23232265a131Smrg need_version=no 23242265a131Smrg need_lib_prefix=no 23252265a131Smrg ;; 23262265a131Smrg freebsd-*) 23272265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 23282265a131Smrg need_version=yes 23292265a131Smrg ;; 23302265a131Smrg esac 23312265a131Smrg shlibpath_var=LD_LIBRARY_PATH 23322265a131Smrg case $host_os in 23332265a131Smrg freebsd2*) 23342265a131Smrg shlibpath_overrides_runpath=yes 2335444c061aSmrg ;; 23362265a131Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 23372265a131Smrg shlibpath_overrides_runpath=yes 23382265a131Smrg hardcode_into_libs=yes 2339444c061aSmrg ;; 23402265a131Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 23412265a131Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 23422265a131Smrg shlibpath_overrides_runpath=no 23432265a131Smrg hardcode_into_libs=yes 2344444c061aSmrg ;; 23452265a131Smrg *) # from 4.6 on, and DragonFly 23462265a131Smrg shlibpath_overrides_runpath=yes 23472265a131Smrg hardcode_into_libs=yes 2348444c061aSmrg ;; 23492265a131Smrg esac 23502265a131Smrg ;; 2351444c061aSmrg 23522265a131Smrggnu*) 23532265a131Smrg version_type=linux 23542265a131Smrg need_lib_prefix=no 23552265a131Smrg need_version=no 23562265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 23572265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 23582265a131Smrg shlibpath_var=LD_LIBRARY_PATH 23592265a131Smrg hardcode_into_libs=yes 23602265a131Smrg ;; 23612265a131Smrg 23622265a131Smrghpux9* | hpux10* | hpux11*) 23632265a131Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 23642265a131Smrg # link against other versions. 23652265a131Smrg version_type=sunos 23662265a131Smrg need_lib_prefix=no 23672265a131Smrg need_version=no 23682265a131Smrg case $host_cpu in 23692265a131Smrg ia64*) 23702265a131Smrg shrext_cmds='.so' 23712265a131Smrg hardcode_into_libs=yes 23722265a131Smrg dynamic_linker="$host_os dld.so" 23732265a131Smrg shlibpath_var=LD_LIBRARY_PATH 23742265a131Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 23752265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23762265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 23772265a131Smrg if test "X$HPUX_IA64_MODE" = X32; then 23782265a131Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2379444c061aSmrg else 23802265a131Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2381444c061aSmrg fi 23822265a131Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383444c061aSmrg ;; 23842265a131Smrg hppa*64*) 23852265a131Smrg shrext_cmds='.sl' 23862265a131Smrg hardcode_into_libs=yes 23872265a131Smrg dynamic_linker="$host_os dld.sl" 23882265a131Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 23892265a131Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 23902265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23912265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 23922265a131Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 23932265a131Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2394444c061aSmrg ;; 2395444c061aSmrg *) 23962265a131Smrg shrext_cmds='.sl' 23972265a131Smrg dynamic_linker="$host_os dld.sl" 23982265a131Smrg shlibpath_var=SHLIB_PATH 23992265a131Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 24002265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 24012265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 2402444c061aSmrg ;; 2403444c061aSmrg esac 24042265a131Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 24052265a131Smrg postinstall_cmds='chmod 555 $lib' 24062265a131Smrg ;; 2407444c061aSmrg 24082265a131Smrginterix[[3-9]]*) 24092265a131Smrg version_type=linux 24102265a131Smrg need_lib_prefix=no 24112265a131Smrg need_version=no 24122265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 24132265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 24142265a131Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 24152265a131Smrg shlibpath_var=LD_LIBRARY_PATH 24162265a131Smrg shlibpath_overrides_runpath=no 24172265a131Smrg hardcode_into_libs=yes 24182265a131Smrg ;; 2419444c061aSmrg 24202265a131Smrgirix5* | irix6* | nonstopux*) 24212265a131Smrg case $host_os in 24222265a131Smrg nonstopux*) version_type=nonstopux ;; 24232265a131Smrg *) 24242265a131Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 24252265a131Smrg version_type=linux 24262265a131Smrg else 24272265a131Smrg version_type=irix 24282265a131Smrg fi ;; 24292265a131Smrg esac 24302265a131Smrg need_lib_prefix=no 24312265a131Smrg need_version=no 24322265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 24332265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 24342265a131Smrg case $host_os in 24352265a131Smrg irix5* | nonstopux*) 24362265a131Smrg libsuff= shlibsuff= 24372265a131Smrg ;; 24382265a131Smrg *) 24392265a131Smrg case $LD in # libtool.m4 will add one of these switches to LD 24402265a131Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 24412265a131Smrg libsuff= shlibsuff= libmagic=32-bit;; 24422265a131Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 24432265a131Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 24442265a131Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 24452265a131Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 24462265a131Smrg *) libsuff= shlibsuff= libmagic=never-match;; 24472265a131Smrg esac 24482265a131Smrg ;; 24492265a131Smrg esac 24502265a131Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 24512265a131Smrg shlibpath_overrides_runpath=no 24522265a131Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 24532265a131Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 24542265a131Smrg hardcode_into_libs=yes 24552265a131Smrg ;; 2456444c061aSmrg 24572265a131Smrg# No shared lib support for Linux oldld, aout, or coff. 24582265a131Smrglinux*oldld* | linux*aout* | linux*coff*) 24592265a131Smrg dynamic_linker=no 24602265a131Smrg ;; 2461444c061aSmrg 24622265a131Smrg# This must be Linux ELF. 24632265a131Smrglinux* | k*bsd*-gnu) 24642265a131Smrg version_type=linux 24652265a131Smrg need_lib_prefix=no 24662265a131Smrg need_version=no 24672265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 24682265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 24692265a131Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 24702265a131Smrg shlibpath_var=LD_LIBRARY_PATH 24712265a131Smrg shlibpath_overrides_runpath=no 24722265a131Smrg # Some binutils ld are patched to set DT_RUNPATH 24732265a131Smrg save_LDFLAGS=$LDFLAGS 24742265a131Smrg save_libdir=$libdir 24752265a131Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 24762265a131Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 24772265a131Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 24782265a131Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 24792265a131Smrg [shlibpath_overrides_runpath=yes])]) 24802265a131Smrg LDFLAGS=$save_LDFLAGS 24812265a131Smrg libdir=$save_libdir 2482444c061aSmrg 24832265a131Smrg # This implies no fast_install, which is unacceptable. 24842265a131Smrg # Some rework will be needed to allow for fast_install 24852265a131Smrg # before this can be enabled. 24862265a131Smrg hardcode_into_libs=yes 2487444c061aSmrg 24882265a131Smrg # Add ABI-specific directories to the system library path. 24892265a131Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2490444c061aSmrg 24912265a131Smrg # Append ld.so.conf contents to the search path 24922265a131Smrg if test -f /etc/ld.so.conf; then 24932265a131Smrg 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;/^$/d' | tr '\n' ' '` 24942265a131Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 24952265a131Smrg fi 2496444c061aSmrg 24972265a131Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 24982265a131Smrg # powerpc, because MkLinux only supported shared libraries with the 24992265a131Smrg # GNU dynamic linker. Since this was broken with cross compilers, 25002265a131Smrg # most powerpc-linux boxes support dynamic linking these days and 25012265a131Smrg # people can always --disable-shared, the test was removed, and we 25022265a131Smrg # assume the GNU/Linux dynamic linker is in use. 25032265a131Smrg dynamic_linker='GNU/Linux ld.so' 25042265a131Smrg ;; 2505444c061aSmrg 25062265a131Smrgnetbsd*) 25072265a131Smrg version_type=sunos 25082265a131Smrg need_lib_prefix=no 25092265a131Smrg need_version=no 25102265a131Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 25112265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 25122265a131Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 25132265a131Smrg dynamic_linker='NetBSD (a.out) ld.so' 2514444c061aSmrg else 25152265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 25162265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 25172265a131Smrg dynamic_linker='NetBSD ld.elf_so' 2518444c061aSmrg fi 25192265a131Smrg shlibpath_var=LD_LIBRARY_PATH 25202265a131Smrg shlibpath_overrides_runpath=yes 25212265a131Smrg hardcode_into_libs=yes 25222265a131Smrg ;; 2523444c061aSmrg 25242265a131Smrgnewsos6) 25252265a131Smrg version_type=linux 25262265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25272265a131Smrg shlibpath_var=LD_LIBRARY_PATH 25282265a131Smrg shlibpath_overrides_runpath=yes 25292265a131Smrg ;; 2530444c061aSmrg 25312265a131Smrg*nto* | *qnx*) 25322265a131Smrg version_type=qnx 25332265a131Smrg need_lib_prefix=no 25342265a131Smrg need_version=no 25352265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25362265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 25372265a131Smrg shlibpath_var=LD_LIBRARY_PATH 25382265a131Smrg shlibpath_overrides_runpath=no 25392265a131Smrg hardcode_into_libs=yes 25402265a131Smrg dynamic_linker='ldqnx.so' 25412265a131Smrg ;; 2542444c061aSmrg 25432265a131Smrgopenbsd*) 25442265a131Smrg version_type=sunos 25452265a131Smrg sys_lib_dlsearch_path_spec="/usr/lib" 25462265a131Smrg need_lib_prefix=no 25472265a131Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2548444c061aSmrg case $host_os in 25492265a131Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 25502265a131Smrg *) need_version=no ;; 25512265a131Smrg esac 25522265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 25532265a131Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 25542265a131Smrg shlibpath_var=LD_LIBRARY_PATH 25552265a131Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 25562265a131Smrg case $host_os in 25572265a131Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 25582265a131Smrg shlibpath_overrides_runpath=no 25592265a131Smrg ;; 25602265a131Smrg *) 25612265a131Smrg shlibpath_overrides_runpath=yes 25622265a131Smrg ;; 25632265a131Smrg esac 25642265a131Smrg else 25652265a131Smrg shlibpath_overrides_runpath=yes 25662265a131Smrg fi 25672265a131Smrg ;; 2568444c061aSmrg 25692265a131Smrgos2*) 25702265a131Smrg libname_spec='$name' 25712265a131Smrg shrext_cmds=".dll" 25722265a131Smrg need_lib_prefix=no 25732265a131Smrg library_names_spec='$libname${shared_ext} $libname.a' 25742265a131Smrg dynamic_linker='OS/2 ld.exe' 25752265a131Smrg shlibpath_var=LIBPATH 25762265a131Smrg ;; 2577444c061aSmrg 25782265a131Smrgosf3* | osf4* | osf5*) 25792265a131Smrg version_type=osf 25802265a131Smrg need_lib_prefix=no 25812265a131Smrg need_version=no 25822265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 25832265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25842265a131Smrg shlibpath_var=LD_LIBRARY_PATH 25852265a131Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 25862265a131Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 25872265a131Smrg ;; 2588444c061aSmrg 25892265a131Smrgrdos*) 25902265a131Smrg dynamic_linker=no 25912265a131Smrg ;; 2592444c061aSmrg 25932265a131Smrgsolaris*) 25942265a131Smrg version_type=linux 25952265a131Smrg need_lib_prefix=no 25962265a131Smrg need_version=no 25972265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25982265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 25992265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26002265a131Smrg shlibpath_overrides_runpath=yes 26012265a131Smrg hardcode_into_libs=yes 26022265a131Smrg # ldd complains unless libraries are executable 26032265a131Smrg postinstall_cmds='chmod +x $lib' 26042265a131Smrg ;; 26052265a131Smrg 26062265a131Smrgsunos4*) 26072265a131Smrg version_type=sunos 26082265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 26092265a131Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 26102265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26112265a131Smrg shlibpath_overrides_runpath=yes 26122265a131Smrg if test "$with_gnu_ld" = yes; then 26132265a131Smrg need_lib_prefix=no 26142265a131Smrg fi 26152265a131Smrg need_version=yes 26162265a131Smrg ;; 26172265a131Smrg 26182265a131Smrgsysv4 | sysv4.3*) 26192265a131Smrg version_type=linux 26202265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26212265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 26222265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26232265a131Smrg case $host_vendor in 26242265a131Smrg sni) 26252265a131Smrg shlibpath_overrides_runpath=no 26262265a131Smrg need_lib_prefix=no 26272265a131Smrg runpath_var=LD_RUN_PATH 26282265a131Smrg ;; 26292265a131Smrg siemens) 26302265a131Smrg need_lib_prefix=no 26312265a131Smrg ;; 26322265a131Smrg motorola) 26332265a131Smrg need_lib_prefix=no 26342265a131Smrg need_version=no 26352265a131Smrg shlibpath_overrides_runpath=no 26362265a131Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 26372265a131Smrg ;; 2638444c061aSmrg esac 26392265a131Smrg ;; 2640444c061aSmrg 26412265a131Smrgsysv4*MP*) 26422265a131Smrg if test -d /usr/nec ;then 26432265a131Smrg version_type=linux 26442265a131Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 26452265a131Smrg soname_spec='$libname${shared_ext}.$major' 26462265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26472265a131Smrg fi 26482265a131Smrg ;; 26492265a131Smrg 26502265a131Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 26512265a131Smrg version_type=freebsd-elf 26522265a131Smrg need_lib_prefix=no 26532265a131Smrg need_version=no 26542265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 26552265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 26562265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26572265a131Smrg shlibpath_overrides_runpath=yes 26582265a131Smrg hardcode_into_libs=yes 26592265a131Smrg if test "$with_gnu_ld" = yes; then 26602265a131Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661444c061aSmrg else 26622265a131Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 26632265a131Smrg case $host_os in 26642265a131Smrg sco3.2v5*) 26652265a131Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 26662265a131Smrg ;; 26672265a131Smrg esac 2668444c061aSmrg fi 26692265a131Smrg sys_lib_dlsearch_path_spec='/usr/lib' 26702265a131Smrg ;; 2671444c061aSmrg 26722265a131Smrgtpf*) 26732265a131Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 26742265a131Smrg version_type=linux 26752265a131Smrg need_lib_prefix=no 26762265a131Smrg need_version=no 26772265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26782265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26792265a131Smrg shlibpath_overrides_runpath=no 26802265a131Smrg hardcode_into_libs=yes 26812265a131Smrg ;; 2682444c061aSmrg 26832265a131Smrguts4*) 26842265a131Smrg version_type=linux 26852265a131Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26862265a131Smrg soname_spec='${libname}${release}${shared_ext}$major' 26872265a131Smrg shlibpath_var=LD_LIBRARY_PATH 26882265a131Smrg ;; 2689444c061aSmrg 26902265a131Smrg*) 26912265a131Smrg dynamic_linker=no 26922265a131Smrg ;; 26932265a131Smrgesac 26942265a131SmrgAC_MSG_RESULT([$dynamic_linker]) 26952265a131Smrgtest "$dynamic_linker" = no && can_build_shared=no 2696444c061aSmrg 26972265a131Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 26982265a131Smrgif test "$GCC" = yes; then 26992265a131Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 27002265a131Smrgfi 2701444c061aSmrg 27022265a131Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 27032265a131Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 27042265a131Smrgfi 27052265a131Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 27062265a131Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 27072265a131Smrgfi 27082265a131Smrg 27092265a131Smrg_LT_DECL([], [variables_saved_for_relink], [1], 27102265a131Smrg [Variables whose values should be saved in libtool wrapper scripts and 27112265a131Smrg restored at link time]) 27122265a131Smrg_LT_DECL([], [need_lib_prefix], [0], 27132265a131Smrg [Do we need the "lib" prefix for modules?]) 27142265a131Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 27152265a131Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 27162265a131Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 27172265a131Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 27182265a131Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 27192265a131Smrg [Is shlibpath searched before the hard-coded library search path?]) 27202265a131Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 27212265a131Smrg_LT_DECL([], [library_names_spec], [1], 27222265a131Smrg [[List of archive names. First name is the real one, the rest are links. 27232265a131Smrg The last name is the one that the linker finds with -lNAME]]) 27242265a131Smrg_LT_DECL([], [soname_spec], [1], 27252265a131Smrg [[The coded name of the library, if different from the real name]]) 27262265a131Smrg_LT_DECL([], [postinstall_cmds], [2], 27272265a131Smrg [Command to use after installation of a shared archive]) 27282265a131Smrg_LT_DECL([], [postuninstall_cmds], [2], 27292265a131Smrg [Command to use after uninstallation of a shared archive]) 27302265a131Smrg_LT_DECL([], [finish_cmds], [2], 27312265a131Smrg [Commands used to finish a libtool library installation in a directory]) 27322265a131Smrg_LT_DECL([], [finish_eval], [1], 27332265a131Smrg [[As "finish_cmds", except a single script fragment to be evaled but 27342265a131Smrg not shown]]) 27352265a131Smrg_LT_DECL([], [hardcode_into_libs], [0], 27362265a131Smrg [Whether we should hardcode library paths into libraries]) 27372265a131Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 27382265a131Smrg [Compile-time system search path for libraries]) 27392265a131Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 27402265a131Smrg [Run-time system search path for libraries]) 27412265a131Smrg])# _LT_SYS_DYNAMIC_LINKER 27422265a131Smrg 27432265a131Smrg 27442265a131Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 27452265a131Smrg# -------------------------- 27462265a131Smrg# find a file program which can recognize shared library 27472265a131SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 27482265a131Smrg[m4_require([_LT_DECL_EGREP])dnl 27492265a131SmrgAC_MSG_CHECKING([for $1]) 27502265a131SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 27512265a131Smrg[case $MAGIC_CMD in 27522265a131Smrg[[\\/*] | ?:[\\/]*]) 27532265a131Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 27542265a131Smrg ;; 27552265a131Smrg*) 27562265a131Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 27572265a131Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 27582265a131Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 27592265a131Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 27602265a131Smrgdnl not every word. This closes a longstanding sh security hole. 27612265a131Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 27622265a131Smrg for ac_dir in $ac_dummy; do 27632265a131Smrg IFS="$lt_save_ifs" 27642265a131Smrg test -z "$ac_dir" && ac_dir=. 27652265a131Smrg if test -f $ac_dir/$1; then 27662265a131Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 27672265a131Smrg if test -n "$file_magic_test_file"; then 27682265a131Smrg case $deplibs_check_method in 27692265a131Smrg "file_magic "*) 27702265a131Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 27712265a131Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 27722265a131Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 27732265a131Smrg $EGREP "$file_magic_regex" > /dev/null; then 27742265a131Smrg : 27752265a131Smrg else 27762265a131Smrg cat <<_LT_EOF 1>&2 27772265a131Smrg 27782265a131Smrg*** Warning: the command libtool uses to detect shared libraries, 27792265a131Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 27802265a131Smrg*** The result is that libtool may fail to recognize shared libraries 27812265a131Smrg*** as such. This will affect the creation of libtool libraries that 27822265a131Smrg*** depend on shared libraries, but programs linked with such libtool 27832265a131Smrg*** libraries will work regardless of this problem. Nevertheless, you 27842265a131Smrg*** may want to report the problem to your system manager and/or to 27852265a131Smrg*** bug-libtool@gnu.org 27862265a131Smrg 27872265a131Smrg_LT_EOF 27882265a131Smrg fi ;; 27892265a131Smrg esac 27902265a131Smrg fi 27912265a131Smrg break 2792444c061aSmrg fi 27932265a131Smrg done 27942265a131Smrg IFS="$lt_save_ifs" 27952265a131Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 27962265a131Smrg ;; 27972265a131Smrgesac]) 27982265a131SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 27992265a131Smrgif test -n "$MAGIC_CMD"; then 28002265a131Smrg AC_MSG_RESULT($MAGIC_CMD) 28012265a131Smrgelse 28022265a131Smrg AC_MSG_RESULT(no) 28032265a131Smrgfi 28042265a131Smrg_LT_DECL([], [MAGIC_CMD], [0], 28052265a131Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 28062265a131Smrg])# _LT_PATH_TOOL_PREFIX 2807444c061aSmrg 28082265a131Smrg# Old name: 28092265a131SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 28102265a131Smrgdnl aclocal-1.4 backwards compatibility: 28112265a131Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2812444c061aSmrg 2813444c061aSmrg 28142265a131Smrg# _LT_PATH_MAGIC 28152265a131Smrg# -------------- 28162265a131Smrg# find a file program which can recognize a shared library 28172265a131Smrgm4_defun([_LT_PATH_MAGIC], 28182265a131Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 28192265a131Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 28202265a131Smrg if test -n "$ac_tool_prefix"; then 28212265a131Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 28222265a131Smrg else 28232265a131Smrg MAGIC_CMD=: 28242265a131Smrg fi 2825444c061aSmrgfi 28262265a131Smrg])# _LT_PATH_MAGIC 2827444c061aSmrg 2828444c061aSmrg 28292265a131Smrg# LT_PATH_LD 28302265a131Smrg# ---------- 28312265a131Smrg# find the pathname to the GNU or non-GNU linker 28322265a131SmrgAC_DEFUN([LT_PATH_LD], 28332265a131Smrg[AC_REQUIRE([AC_PROG_CC])dnl 28342265a131SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 28352265a131SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 28362265a131Smrgm4_require([_LT_DECL_SED])dnl 28372265a131Smrgm4_require([_LT_DECL_EGREP])dnl 2838444c061aSmrg 28392265a131SmrgAC_ARG_WITH([gnu-ld], 28402265a131Smrg [AS_HELP_STRING([--with-gnu-ld], 28412265a131Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 28422265a131Smrg [test "$withval" = no || with_gnu_ld=yes], 28432265a131Smrg [with_gnu_ld=no])dnl 2844444c061aSmrg 28452265a131Smrgac_prog=ld 28462265a131Smrgif test "$GCC" = yes; then 28472265a131Smrg # Check if gcc -print-prog-name=ld gives a path. 28482265a131Smrg AC_MSG_CHECKING([for ld used by $CC]) 28492265a131Smrg case $host in 28502265a131Smrg *-*-mingw*) 28512265a131Smrg # gcc leaves a trailing carriage return which upsets mingw 28522265a131Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 28532265a131Smrg *) 28542265a131Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 28552265a131Smrg esac 28562265a131Smrg case $ac_prog in 28572265a131Smrg # Accept absolute paths. 28582265a131Smrg [[\\/]]* | ?:[[\\/]]*) 28592265a131Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 28602265a131Smrg # Canonicalize the pathname of ld 28612265a131Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 28622265a131Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 28632265a131Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 28642265a131Smrg done 28652265a131Smrg test -z "$LD" && LD="$ac_prog" 28662265a131Smrg ;; 28672265a131Smrg "") 28682265a131Smrg # If it fails, then pretend we aren't using GCC. 28692265a131Smrg ac_prog=ld 28702265a131Smrg ;; 28712265a131Smrg *) 28722265a131Smrg # If it is relative, then search for the first ld in PATH. 28732265a131Smrg with_gnu_ld=unknown 28742265a131Smrg ;; 28752265a131Smrg esac 28762265a131Smrgelif test "$with_gnu_ld" = yes; then 28772265a131Smrg AC_MSG_CHECKING([for GNU ld]) 2878444c061aSmrgelse 28792265a131Smrg AC_MSG_CHECKING([for non-GNU ld]) 2880444c061aSmrgfi 28812265a131SmrgAC_CACHE_VAL(lt_cv_path_LD, 28822265a131Smrg[if test -z "$LD"; then 28832265a131Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 28842265a131Smrg for ac_dir in $PATH; do 28852265a131Smrg IFS="$lt_save_ifs" 28862265a131Smrg test -z "$ac_dir" && ac_dir=. 28872265a131Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 28882265a131Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 28892265a131Smrg # Check to see if the program is GNU ld. I'd rather use --version, 28902265a131Smrg # but apparently some variants of GNU ld only accept -v. 28912265a131Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 28922265a131Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 28932265a131Smrg *GNU* | *'with BFD'*) 28942265a131Smrg test "$with_gnu_ld" != no && break 28952265a131Smrg ;; 28962265a131Smrg *) 28972265a131Smrg test "$with_gnu_ld" != yes && break 28982265a131Smrg ;; 28992265a131Smrg esac 29002265a131Smrg fi 29012265a131Smrg done 29022265a131Smrg IFS="$lt_save_ifs" 2903444c061aSmrgelse 29042265a131Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 29052265a131Smrgfi]) 29062265a131SmrgLD="$lt_cv_path_LD" 29072265a131Smrgif test -n "$LD"; then 29082265a131Smrg AC_MSG_RESULT($LD) 29092265a131Smrgelse 29102265a131Smrg AC_MSG_RESULT(no) 2911444c061aSmrgfi 29122265a131Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 29132265a131Smrg_LT_PATH_LD_GNU 29142265a131SmrgAC_SUBST([LD]) 2915444c061aSmrg 29162265a131Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 29172265a131Smrg])# LT_PATH_LD 2918444c061aSmrg 29192265a131Smrg# Old names: 29202265a131SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 29212265a131SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 29222265a131Smrgdnl aclocal-1.4 backwards compatibility: 29232265a131Smrgdnl AC_DEFUN([AM_PROG_LD], []) 29242265a131Smrgdnl AC_DEFUN([AC_PROG_LD], []) 2925444c061aSmrg 2926444c061aSmrg 29272265a131Smrg# _LT_PATH_LD_GNU 29282265a131Smrg#- -------------- 29292265a131Smrgm4_defun([_LT_PATH_LD_GNU], 29302265a131Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 29312265a131Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 29322265a131Smrgcase `$LD -v 2>&1 </dev/null` in 29332265a131Smrg*GNU* | *'with BFD'*) 29342265a131Smrg lt_cv_prog_gnu_ld=yes 29352265a131Smrg ;; 29362265a131Smrg*) 29372265a131Smrg lt_cv_prog_gnu_ld=no 29382265a131Smrg ;; 29392265a131Smrgesac]) 29402265a131Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 29412265a131Smrg])# _LT_PATH_LD_GNU 2942444c061aSmrg 2943444c061aSmrg 29442265a131Smrg# _LT_CMD_RELOAD 29452265a131Smrg# -------------- 29462265a131Smrg# find reload flag for linker 29472265a131Smrg# -- PORTME Some linkers may need a different reload flag. 29482265a131Smrgm4_defun([_LT_CMD_RELOAD], 29492265a131Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 29502265a131Smrg lt_cv_ld_reload_flag, 29512265a131Smrg [lt_cv_ld_reload_flag='-r']) 29522265a131Smrgreload_flag=$lt_cv_ld_reload_flag 29532265a131Smrgcase $reload_flag in 29542265a131Smrg"" | " "*) ;; 29552265a131Smrg*) reload_flag=" $reload_flag" ;; 29562265a131Smrgesac 29572265a131Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 29582265a131Smrgcase $host_os in 29592265a131Smrg darwin*) 29602265a131Smrg if test "$GCC" = yes; then 29612265a131Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 29622265a131Smrg else 29632265a131Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 29642265a131Smrg fi 2965444c061aSmrg ;; 29662265a131Smrgesac 29672265a131Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 29682265a131Smrg_LT_DECL([], [reload_cmds], [2])dnl 29692265a131Smrg])# _LT_CMD_RELOAD 2970444c061aSmrg 2971444c061aSmrg 29722265a131Smrg# _LT_CHECK_MAGIC_METHOD 29732265a131Smrg# ---------------------- 29742265a131Smrg# how to check for library dependencies 29752265a131Smrg# -- PORTME fill in with the dynamic library characteristics 29762265a131Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 29772265a131Smrg[m4_require([_LT_DECL_EGREP]) 29782265a131Smrgm4_require([_LT_DECL_OBJDUMP]) 29792265a131SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 29802265a131Smrglt_cv_deplibs_check_method, 29812265a131Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 29822265a131Smrglt_cv_file_magic_test_file= 29832265a131Smrglt_cv_deplibs_check_method='unknown' 29842265a131Smrg# Need to set the preceding variable on all platforms that support 29852265a131Smrg# interlibrary dependencies. 29862265a131Smrg# 'none' -- dependencies not supported. 29872265a131Smrg# `unknown' -- same as none, but documents that we really don't know. 29882265a131Smrg# 'pass_all' -- all dependencies passed with no checks. 29892265a131Smrg# 'test_compile' -- check by making test program. 29902265a131Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 29912265a131Smrg# which responds to the $file_magic_cmd with a given extended regex. 29922265a131Smrg# If you have `file' or equivalent on your system and you're not sure 29932265a131Smrg# whether `pass_all' will *always* work, you probably want this one. 2994444c061aSmrg 2995444c061aSmrgcase $host_os in 29962265a131Smrgaix[[4-9]]*) 29972265a131Smrg lt_cv_deplibs_check_method=pass_all 29982265a131Smrg ;; 2999444c061aSmrg 30002265a131Smrgbeos*) 30012265a131Smrg lt_cv_deplibs_check_method=pass_all 3002444c061aSmrg ;; 3003444c061aSmrg 30042265a131Smrgbsdi[[45]]*) 30052265a131Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 30062265a131Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 30072265a131Smrg lt_cv_file_magic_test_file=/shlib/libc.so 30082265a131Smrg ;; 30092265a131Smrg 30102265a131Smrgcygwin*) 30112265a131Smrg # func_win32_libid is a shell function defined in ltmain.sh 30122265a131Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 30132265a131Smrg lt_cv_file_magic_cmd='func_win32_libid' 30142265a131Smrg ;; 30152265a131Smrg 30162265a131Smrgmingw* | pw32*) 30172265a131Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 30182265a131Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 30192265a131Smrg # unless we find 'file', for example because we are cross-compiling. 30202265a131Smrg if ( file / ) >/dev/null 2>&1; then 30212265a131Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 30222265a131Smrg lt_cv_file_magic_cmd='func_win32_libid' 3023444c061aSmrg else 30242265a131Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 30252265a131Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3026444c061aSmrg fi 3027444c061aSmrg ;; 3028444c061aSmrg 30292265a131Smrgcegcc) 30302265a131Smrg # use the weaker test based on 'objdump'. See mingw*. 30312265a131Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 30322265a131Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033444c061aSmrg ;; 3034444c061aSmrg 30352265a131Smrgdarwin* | rhapsody*) 30362265a131Smrg lt_cv_deplibs_check_method=pass_all 3037444c061aSmrg ;; 3038444c061aSmrg 30392265a131Smrgfreebsd* | dragonfly*) 30402265a131Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 30412265a131Smrg case $host_cpu in 30422265a131Smrg i*86 ) 30432265a131Smrg # Not sure whether the presence of OpenBSD here was a mistake. 30442265a131Smrg # Let's accept both of them until this is cleared up. 30452265a131Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 30462265a131Smrg lt_cv_file_magic_cmd=/usr/bin/file 30472265a131Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 30482265a131Smrg ;; 30492265a131Smrg esac 30502265a131Smrg else 30512265a131Smrg lt_cv_deplibs_check_method=pass_all 30522265a131Smrg fi 3053444c061aSmrg ;; 3054444c061aSmrg 30552265a131Smrggnu*) 30562265a131Smrg lt_cv_deplibs_check_method=pass_all 30572265a131Smrg ;; 3058444c061aSmrg 30592265a131Smrghpux10.20* | hpux11*) 30602265a131Smrg lt_cv_file_magic_cmd=/usr/bin/file 30612265a131Smrg case $host_cpu in 30622265a131Smrg ia64*) 30632265a131Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 30642265a131Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 30652265a131Smrg ;; 30662265a131Smrg hppa*64*) 30672265a131Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 30682265a131Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069444c061aSmrg ;; 3070444c061aSmrg *) 30712265a131Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 30722265a131Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073444c061aSmrg ;; 3074444c061aSmrg esac 3075444c061aSmrg ;; 3076444c061aSmrg 30772265a131Smrginterix[[3-9]]*) 30782265a131Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 30792265a131Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3080444c061aSmrg ;; 3081444c061aSmrg 30822265a131Smrgirix5* | irix6* | nonstopux*) 30832265a131Smrg case $LD in 30842265a131Smrg *-32|*"-32 ") libmagic=32-bit;; 30852265a131Smrg *-n32|*"-n32 ") libmagic=N32;; 30862265a131Smrg *-64|*"-64 ") libmagic=64-bit;; 30872265a131Smrg *) libmagic=never-match;; 30882265a131Smrg esac 30892265a131Smrg lt_cv_deplibs_check_method=pass_all 3090444c061aSmrg ;; 3091444c061aSmrg 30922265a131Smrg# This must be Linux ELF. 30932265a131Smrglinux* | k*bsd*-gnu) 30942265a131Smrg lt_cv_deplibs_check_method=pass_all 3095444c061aSmrg ;; 3096444c061aSmrg 30972265a131Smrgnetbsd*) 30982265a131Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 30992265a131Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 31002265a131Smrg else 31012265a131Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 31022265a131Smrg fi 3103444c061aSmrg ;; 3104444c061aSmrg 31052265a131Smrgnewos6*) 31062265a131Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 31072265a131Smrg lt_cv_file_magic_cmd=/usr/bin/file 31082265a131Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 31092265a131Smrg ;; 31102265a131Smrg 31112265a131Smrg*nto* | *qnx*) 31122265a131Smrg lt_cv_deplibs_check_method=pass_all 31132265a131Smrg ;; 31142265a131Smrg 31152265a131Smrgopenbsd*) 31162265a131Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 31172265a131Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3118444c061aSmrg else 31192265a131Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3120444c061aSmrg fi 31212265a131Smrg ;; 31222265a131Smrg 31232265a131Smrgosf3* | osf4* | osf5*) 31242265a131Smrg lt_cv_deplibs_check_method=pass_all 31252265a131Smrg ;; 31262265a131Smrg 31272265a131Smrgrdos*) 31282265a131Smrg lt_cv_deplibs_check_method=pass_all 31292265a131Smrg ;; 31302265a131Smrg 31312265a131Smrgsolaris*) 31322265a131Smrg lt_cv_deplibs_check_method=pass_all 31332265a131Smrg ;; 31342265a131Smrg 31352265a131Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 31362265a131Smrg lt_cv_deplibs_check_method=pass_all 31372265a131Smrg ;; 31382265a131Smrg 31392265a131Smrgsysv4 | sysv4.3*) 31402265a131Smrg case $host_vendor in 31412265a131Smrg motorola) 31422265a131Smrg 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]]' 31432265a131Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144444c061aSmrg ;; 31452265a131Smrg ncr) 31462265a131Smrg lt_cv_deplibs_check_method=pass_all 3147444c061aSmrg ;; 31482265a131Smrg sequent) 31492265a131Smrg lt_cv_file_magic_cmd='/bin/file' 31502265a131Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151444c061aSmrg ;; 31522265a131Smrg sni) 31532265a131Smrg lt_cv_file_magic_cmd='/bin/file' 31542265a131Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 31552265a131Smrg lt_cv_file_magic_test_file=/lib/libc.so 31562265a131Smrg ;; 31572265a131Smrg siemens) 31582265a131Smrg lt_cv_deplibs_check_method=pass_all 31592265a131Smrg ;; 31602265a131Smrg pc) 31612265a131Smrg lt_cv_deplibs_check_method=pass_all 3162444c061aSmrg ;; 3163444c061aSmrg esac 3164444c061aSmrg ;; 3165444c061aSmrg 31662265a131Smrgtpf*) 31672265a131Smrg lt_cv_deplibs_check_method=pass_all 3168444c061aSmrg ;; 31692265a131Smrgesac 31702265a131Smrg]) 31712265a131Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 31722265a131Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 31732265a131Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3174444c061aSmrg 31752265a131Smrg_LT_DECL([], [deplibs_check_method], [1], 31762265a131Smrg [Method to check whether dependent libraries are shared objects]) 31772265a131Smrg_LT_DECL([], [file_magic_cmd], [1], 31782265a131Smrg [Command to use when deplibs_check_method == "file_magic"]) 31792265a131Smrg])# _LT_CHECK_MAGIC_METHOD 3180444c061aSmrg 3181444c061aSmrg 31822265a131Smrg# LT_PATH_NM 31832265a131Smrg# ---------- 31842265a131Smrg# find the pathname to a BSD- or MS-compatible name lister 31852265a131SmrgAC_DEFUN([LT_PATH_NM], 31862265a131Smrg[AC_REQUIRE([AC_PROG_CC])dnl 31872265a131SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 31882265a131Smrg[if test -n "$NM"; then 31892265a131Smrg # Let the user override the test. 31902265a131Smrg lt_cv_path_NM="$NM" 31912265a131Smrgelse 31922265a131Smrg lt_nm_to_check="${ac_tool_prefix}nm" 31932265a131Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 31942265a131Smrg lt_nm_to_check="$lt_nm_to_check nm" 31952265a131Smrg fi 31962265a131Smrg for lt_tmp_nm in $lt_nm_to_check; do 31972265a131Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 31982265a131Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 31992265a131Smrg IFS="$lt_save_ifs" 32002265a131Smrg test -z "$ac_dir" && ac_dir=. 32012265a131Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 32022265a131Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 32032265a131Smrg # Check to see if the nm accepts a BSD-compat flag. 32042265a131Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 32052265a131Smrg # nm: unknown option "B" ignored 32062265a131Smrg # Tru64's nm complains that /dev/null is an invalid object file 32072265a131Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 32082265a131Smrg */dev/null* | *'Invalid file or object type'*) 32092265a131Smrg lt_cv_path_NM="$tmp_nm -B" 32102265a131Smrg break 32112265a131Smrg ;; 32122265a131Smrg *) 32132265a131Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 32142265a131Smrg */dev/null*) 32152265a131Smrg lt_cv_path_NM="$tmp_nm -p" 32162265a131Smrg break 32172265a131Smrg ;; 32182265a131Smrg *) 32192265a131Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 32202265a131Smrg continue # so that we can try to find one that supports BSD flags 32212265a131Smrg ;; 32222265a131Smrg esac 32232265a131Smrg ;; 32242265a131Smrg esac 32252265a131Smrg fi 32262265a131Smrg done 32272265a131Smrg IFS="$lt_save_ifs" 32282265a131Smrg done 32292265a131Smrg : ${lt_cv_path_NM=no} 32302265a131Smrgfi]) 32312265a131Smrgif test "$lt_cv_path_NM" != "no"; then 32322265a131Smrg NM="$lt_cv_path_NM" 32332265a131Smrgelse 32342265a131Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 32352265a131Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 32362265a131Smrg AC_SUBST([DUMPBIN]) 32372265a131Smrg if test "$DUMPBIN" != ":"; then 32382265a131Smrg NM="$DUMPBIN" 32392265a131Smrg fi 32402265a131Smrgfi 32412265a131Smrgtest -z "$NM" && NM=nm 32422265a131SmrgAC_SUBST([NM]) 32432265a131Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 32442265a131Smrg 32452265a131SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 32462265a131Smrg [lt_cv_nm_interface="BSD nm" 32472265a131Smrg echo "int some_variable = 0;" > conftest.$ac_ext 32482265a131Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 32492265a131Smrg (eval "$ac_compile" 2>conftest.err) 32502265a131Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 32512265a131Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 32522265a131Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 32532265a131Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 32542265a131Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 32552265a131Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 32562265a131Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 32572265a131Smrg lt_cv_nm_interface="MS dumpbin" 32582265a131Smrg fi 32592265a131Smrg rm -f conftest*]) 32602265a131Smrg])# LT_PATH_NM 3261444c061aSmrg 32622265a131Smrg# Old names: 32632265a131SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 32642265a131SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 32652265a131Smrgdnl aclocal-1.4 backwards compatibility: 32662265a131Smrgdnl AC_DEFUN([AM_PROG_NM], []) 32672265a131Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3268444c061aSmrg 3269444c061aSmrg 32702265a131Smrg# LT_LIB_M 32712265a131Smrg# -------- 32722265a131Smrg# check for math library 32732265a131SmrgAC_DEFUN([LT_LIB_M], 32742265a131Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 32752265a131SmrgLIBM= 32762265a131Smrgcase $host in 32772265a131Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 32782265a131Smrg # These system don't have libm, or don't need it 3279444c061aSmrg ;; 32802265a131Smrg*-ncr-sysv4.3*) 32812265a131Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 32822265a131Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3283444c061aSmrg ;; 32842265a131Smrg*) 32852265a131Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286444c061aSmrg ;; 32872265a131Smrgesac 32882265a131SmrgAC_SUBST([LIBM]) 32892265a131Smrg])# LT_LIB_M 3290444c061aSmrg 32912265a131Smrg# Old name: 32922265a131SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 32932265a131Smrgdnl aclocal-1.4 backwards compatibility: 32942265a131Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3295444c061aSmrg 3296444c061aSmrg 32972265a131Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 32982265a131Smrg# ------------------------------- 32992265a131Smrgm4_defun([_LT_COMPILER_NO_RTTI], 33002265a131Smrg[m4_require([_LT_TAG_COMPILER])dnl 3301444c061aSmrg 33022265a131Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3303444c061aSmrg 33042265a131Smrgif test "$GCC" = yes; then 33052265a131Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3306444c061aSmrg 33072265a131Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 33082265a131Smrg lt_cv_prog_compiler_rtti_exceptions, 33092265a131Smrg [-fno-rtti -fno-exceptions], [], 33102265a131Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 33112265a131Smrgfi 33122265a131Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 33132265a131Smrg [Compiler flag to turn off builtin functions]) 33142265a131Smrg])# _LT_COMPILER_NO_RTTI 3315444c061aSmrg 3316444c061aSmrg 33172265a131Smrg# _LT_CMD_GLOBAL_SYMBOLS 33182265a131Smrg# ---------------------- 33192265a131Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 33202265a131Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 33212265a131SmrgAC_REQUIRE([AC_PROG_CC])dnl 33222265a131SmrgAC_REQUIRE([LT_PATH_NM])dnl 33232265a131SmrgAC_REQUIRE([LT_PATH_LD])dnl 33242265a131Smrgm4_require([_LT_DECL_SED])dnl 33252265a131Smrgm4_require([_LT_DECL_EGREP])dnl 33262265a131Smrgm4_require([_LT_TAG_COMPILER])dnl 3327444c061aSmrg 33282265a131Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 33292265a131SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 33302265a131SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 33312265a131Smrg[ 33322265a131Smrg# These are sane defaults that work on at least a few old systems. 33332265a131Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3334444c061aSmrg 33352265a131Smrg# Character class describing NM global symbol codes. 33362265a131Smrgsymcode='[[BCDEGRST]]' 33372265a131Smrg 33382265a131Smrg# Regexp to match symbols that can be accessed directly from C. 33392265a131Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 33402265a131Smrg 33412265a131Smrg# Define system-specific variables. 33422265a131Smrgcase $host_os in 33432265a131Smrgaix*) 33442265a131Smrg symcode='[[BCDT]]' 33452265a131Smrg ;; 33462265a131Smrgcygwin* | mingw* | pw32* | cegcc*) 33472265a131Smrg symcode='[[ABCDGISTW]]' 33482265a131Smrg ;; 33492265a131Smrghpux*) 33502265a131Smrg if test "$host_cpu" = ia64; then 33512265a131Smrg symcode='[[ABCDEGRST]]' 3352444c061aSmrg fi 3353444c061aSmrg ;; 33542265a131Smrgirix* | nonstopux*) 33552265a131Smrg symcode='[[BCDEGRST]]' 33562265a131Smrg ;; 33572265a131Smrgosf*) 33582265a131Smrg symcode='[[BCDEGQRST]]' 33592265a131Smrg ;; 33602265a131Smrgsolaris*) 33612265a131Smrg symcode='[[BDRT]]' 33622265a131Smrg ;; 33632265a131Smrgsco3.2v5*) 33642265a131Smrg symcode='[[DT]]' 3365444c061aSmrg ;; 33662265a131Smrgsysv4.2uw2*) 33672265a131Smrg symcode='[[DT]]' 33682265a131Smrg ;; 33692265a131Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 33702265a131Smrg symcode='[[ABDT]]' 33712265a131Smrg ;; 33722265a131Smrgsysv4) 33732265a131Smrg symcode='[[DFNSTU]]' 33742265a131Smrg ;; 33752265a131Smrgesac 3376444c061aSmrg 33772265a131Smrg# If we're using GNU nm, then use its standard symbol codes. 33782265a131Smrgcase `$NM -V 2>&1` in 33792265a131Smrg*GNU* | *'with BFD'*) 33802265a131Smrg symcode='[[ABCDGIRSTW]]' ;; 33812265a131Smrgesac 33822265a131Smrg 33832265a131Smrg# Transform an extracted symbol line into a proper C declaration. 33842265a131Smrg# Some systems (esp. on ia64) link data and code symbols differently, 33852265a131Smrg# so use this general approach. 33862265a131Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 33872265a131Smrg 33882265a131Smrg# Transform an extracted symbol line into symbol name and symbol address 33892265a131Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 33902265a131Smrglt_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'" 33912265a131Smrg 33922265a131Smrg# Handle CRLF in mingw tool chain 33932265a131Smrgopt_cr= 33942265a131Smrgcase $build_os in 33952265a131Smrgmingw*) 33962265a131Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397444c061aSmrg ;; 3398444c061aSmrgesac 3399444c061aSmrg 34002265a131Smrg# Try without a prefix underscore, then with it. 34012265a131Smrgfor ac_symprfx in "" "_"; do 3402444c061aSmrg 34032265a131Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 34042265a131Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3405444c061aSmrg 34062265a131Smrg # Write the raw and C identifiers. 34072265a131Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 34082265a131Smrg # Fake it for dumpbin and say T for any non-static function 34092265a131Smrg # and D for any global variable. 34102265a131Smrg # Also find C++ and __fastcall symbols from MSVC++, 34112265a131Smrg # which start with @ or ?. 34122265a131Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 34132265a131Smrg" {last_section=section; section=\$ 3};"\ 34142265a131Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 34152265a131Smrg" \$ 0!~/External *\|/{next};"\ 34162265a131Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 34172265a131Smrg" {if(hide[section]) next};"\ 34182265a131Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 34192265a131Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 34202265a131Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 34212265a131Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 34222265a131Smrg" ' prfx=^$ac_symprfx]" 34232265a131Smrg else 34242265a131Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3425444c061aSmrg fi 3426444c061aSmrg 34272265a131Smrg # Check to see that the pipe works correctly. 34282265a131Smrg pipe_works=no 3429444c061aSmrg 34302265a131Smrg rm -f conftest* 34312265a131Smrg cat > conftest.$ac_ext <<_LT_EOF 34322265a131Smrg#ifdef __cplusplus 34332265a131Smrgextern "C" { 34342265a131Smrg#endif 34352265a131Smrgchar nm_test_var; 34362265a131Smrgvoid nm_test_func(void); 34372265a131Smrgvoid nm_test_func(void){} 34382265a131Smrg#ifdef __cplusplus 34392265a131Smrg} 34402265a131Smrg#endif 34412265a131Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 34422265a131Smrg_LT_EOF 3443444c061aSmrg 34442265a131Smrg if AC_TRY_EVAL(ac_compile); then 34452265a131Smrg # Now try to grab the symbols. 34462265a131Smrg nlist=conftest.nm 34472265a131Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 34482265a131Smrg # Try sorting and uniquifying the output. 34492265a131Smrg if sort "$nlist" | uniq > "$nlist"T; then 34502265a131Smrg mv -f "$nlist"T "$nlist" 34512265a131Smrg else 34522265a131Smrg rm -f "$nlist"T 34532265a131Smrg fi 3454444c061aSmrg 34552265a131Smrg # Make sure that we snagged all the symbols we need. 34562265a131Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 34572265a131Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 34582265a131Smrg cat <<_LT_EOF > conftest.$ac_ext 34592265a131Smrg#ifdef __cplusplus 34602265a131Smrgextern "C" { 34612265a131Smrg#endif 3462444c061aSmrg 34632265a131Smrg_LT_EOF 34642265a131Smrg # Now generate the symbol file. 34652265a131Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3466444c061aSmrg 34672265a131Smrg cat <<_LT_EOF >> conftest.$ac_ext 3468444c061aSmrg 34692265a131Smrg/* The mapping between symbol names and symbols. */ 34702265a131Smrgconst struct { 34712265a131Smrg const char *name; 34722265a131Smrg void *address; 34732265a131Smrg} 34742265a131Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 34752265a131Smrg{ 34762265a131Smrg { "@PROGRAM@", (void *) 0 }, 34772265a131Smrg_LT_EOF 34782265a131Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 34792265a131Smrg cat <<\_LT_EOF >> conftest.$ac_ext 34802265a131Smrg {0, (void *) 0} 34812265a131Smrg}; 34822265a131Smrg 34832265a131Smrg/* This works around a problem in FreeBSD linker */ 34842265a131Smrg#ifdef FREEBSD_WORKAROUND 34852265a131Smrgstatic const void *lt_preloaded_setup() { 34862265a131Smrg return lt__PROGRAM__LTX_preloaded_symbols; 34872265a131Smrg} 34882265a131Smrg#endif 3489444c061aSmrg 34902265a131Smrg#ifdef __cplusplus 34912265a131Smrg} 34922265a131Smrg#endif 34932265a131Smrg_LT_EOF 34942265a131Smrg # Now try linking the two files. 34952265a131Smrg mv conftest.$ac_objext conftstm.$ac_objext 34962265a131Smrg lt_save_LIBS="$LIBS" 34972265a131Smrg lt_save_CFLAGS="$CFLAGS" 34982265a131Smrg LIBS="conftstm.$ac_objext" 34992265a131Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 35002265a131Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 35012265a131Smrg pipe_works=yes 35022265a131Smrg fi 35032265a131Smrg LIBS="$lt_save_LIBS" 35042265a131Smrg CFLAGS="$lt_save_CFLAGS" 3505444c061aSmrg else 35062265a131Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3507444c061aSmrg fi 35082265a131Smrg else 35092265a131Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 35102265a131Smrg fi 35112265a131Smrg else 35122265a131Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3513444c061aSmrg fi 35142265a131Smrg else 35152265a131Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 35162265a131Smrg cat conftest.$ac_ext >&5 35172265a131Smrg fi 35182265a131Smrg rm -rf conftest* conftst* 3519444c061aSmrg 35202265a131Smrg # Do not use the global_symbol_pipe unless it works. 35212265a131Smrg if test "$pipe_works" = yes; then 35222265a131Smrg break 3523444c061aSmrg else 35242265a131Smrg lt_cv_sys_global_symbol_pipe= 3525444c061aSmrg fi 35262265a131Smrgdone 35272265a131Smrg]) 35282265a131Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 35292265a131Smrg lt_cv_sys_global_symbol_to_cdecl= 35302265a131Smrgfi 35312265a131Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 35322265a131Smrg AC_MSG_RESULT(failed) 35332265a131Smrgelse 35342265a131Smrg AC_MSG_RESULT(ok) 3535444c061aSmrgfi 3536444c061aSmrg 35372265a131Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 35382265a131Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 35392265a131Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 35402265a131Smrg [Transform the output of nm in a proper C declaration]) 35412265a131Smrg_LT_DECL([global_symbol_to_c_name_address], 35422265a131Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 35432265a131Smrg [Transform the output of nm in a C name address pair]) 35442265a131Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 35452265a131Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 35462265a131Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 35472265a131Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3548444c061aSmrg 3549444c061aSmrg 35502265a131Smrg# _LT_COMPILER_PIC([TAGNAME]) 35512265a131Smrg# --------------------------- 35522265a131Smrgm4_defun([_LT_COMPILER_PIC], 35532265a131Smrg[m4_require([_LT_TAG_COMPILER])dnl 35542265a131Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 35552265a131Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 35562265a131Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3557444c061aSmrg 35582265a131SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 35592265a131Smrgm4_if([$1], [CXX], [ 35602265a131Smrg # C++ specific cases for pic, static, wl, etc. 35612265a131Smrg if test "$GXX" = yes; then 35622265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 35632265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3564444c061aSmrg 35652265a131Smrg case $host_os in 35662265a131Smrg aix*) 35672265a131Smrg # All AIX code is PIC. 35682265a131Smrg if test "$host_cpu" = ia64; then 35692265a131Smrg # AIX 5 now supports IA64 processor 35702265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 35712265a131Smrg fi 3572444c061aSmrg ;; 3573444c061aSmrg 35742265a131Smrg amigaos*) 35752265a131Smrg case $host_cpu in 35762265a131Smrg powerpc) 35772265a131Smrg # see comment about AmigaOS4 .so support 35782265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 35792265a131Smrg ;; 35802265a131Smrg m68k) 35812265a131Smrg # FIXME: we need at least 68020 code to build shared libraries, but 35822265a131Smrg # adding the `-m68020' flag to GCC prevents building anything better, 35832265a131Smrg # like `-m68040'. 35842265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 35852265a131Smrg ;; 35862265a131Smrg esac 3587444c061aSmrg ;; 3588444c061aSmrg 35892265a131Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 35902265a131Smrg # PIC is the default for these OSes. 3591444c061aSmrg ;; 35922265a131Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 35932265a131Smrg # This hack is so that the source file can tell whether it is being 35942265a131Smrg # built for inclusion in a dll (and should export symbols for example). 35952265a131Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 35962265a131Smrg # (--disable-auto-import) libraries 35972265a131Smrg m4_if([$1], [GCJ], [], 35982265a131Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 35992265a131Smrg ;; 36002265a131Smrg darwin* | rhapsody*) 36012265a131Smrg # PIC is the default on this platform 36022265a131Smrg # Common symbols not allowed in MH_DYLIB files 36032265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 36042265a131Smrg ;; 36052265a131Smrg *djgpp*) 36062265a131Smrg # DJGPP does not support shared libraries at all 36072265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 36082265a131Smrg ;; 36092265a131Smrg interix[[3-9]]*) 36102265a131Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 36112265a131Smrg # Instead, we relocate shared libraries at runtime. 36122265a131Smrg ;; 36132265a131Smrg sysv4*MP*) 36142265a131Smrg if test -d /usr/nec; then 36152265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616444c061aSmrg fi 3617444c061aSmrg ;; 36182265a131Smrg hpux*) 36192265a131Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 36202265a131Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 36212265a131Smrg # sets the default TLS model and affects inlining. 36222265a131Smrg case $host_cpu in 36232265a131Smrg hppa*64*) 3624444c061aSmrg ;; 3625444c061aSmrg *) 36262265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3627444c061aSmrg ;; 3628444c061aSmrg esac 36292265a131Smrg ;; 36302265a131Smrg *qnx* | *nto*) 36312265a131Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 36322265a131Smrg # it will coredump. 36332265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 36342265a131Smrg ;; 36352265a131Smrg *) 36362265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637444c061aSmrg ;; 3638444c061aSmrg esac 3639444c061aSmrg else 36402265a131Smrg case $host_os in 36412265a131Smrg aix[[4-9]]*) 36422265a131Smrg # All AIX code is PIC. 36432265a131Smrg if test "$host_cpu" = ia64; then 36442265a131Smrg # AIX 5 now supports IA64 processor 36452265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 36462265a131Smrg else 36472265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 36482265a131Smrg fi 36492265a131Smrg ;; 36502265a131Smrg chorus*) 36512265a131Smrg case $cc_basename in 36522265a131Smrg cxch68*) 36532265a131Smrg # Green Hills C++ Compiler 36542265a131Smrg # _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" 3655444c061aSmrg ;; 36562265a131Smrg esac 36572265a131Smrg ;; 36582265a131Smrg dgux*) 36592265a131Smrg case $cc_basename in 36602265a131Smrg ec++*) 36612265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 36622265a131Smrg ;; 36632265a131Smrg ghcx*) 36642265a131Smrg # Green Hills C++ Compiler 36652265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666444c061aSmrg ;; 3667444c061aSmrg *) 3668444c061aSmrg ;; 3669444c061aSmrg esac 36702265a131Smrg ;; 36712265a131Smrg freebsd* | dragonfly*) 36722265a131Smrg # FreeBSD uses GNU C++ 36732265a131Smrg ;; 36742265a131Smrg hpux9* | hpux10* | hpux11*) 36752265a131Smrg case $cc_basename in 36762265a131Smrg CC*) 36772265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36782265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36792265a131Smrg if test "$host_cpu" != ia64; then 36802265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36812265a131Smrg fi 36822265a131Smrg ;; 36832265a131Smrg aCC*) 36842265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36852265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36862265a131Smrg case $host_cpu in 36872265a131Smrg hppa*64*|ia64*) 36882265a131Smrg # +Z the default 36892265a131Smrg ;; 36902265a131Smrg *) 36912265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36922265a131Smrg ;; 36932265a131Smrg esac 36942265a131Smrg ;; 36952265a131Smrg *) 36962265a131Smrg ;; 36972265a131Smrg esac 36982265a131Smrg ;; 36992265a131Smrg interix*) 37002265a131Smrg # This is c89, which is MS Visual C++ (no shared libs) 37012265a131Smrg # Anyone wants to do a port? 37022265a131Smrg ;; 37032265a131Smrg irix5* | irix6* | nonstopux*) 37042265a131Smrg case $cc_basename in 37052265a131Smrg CC*) 37062265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37072265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37082265a131Smrg # CC pic flag -KPIC is the default. 37092265a131Smrg ;; 37102265a131Smrg *) 37112265a131Smrg ;; 37122265a131Smrg esac 37132265a131Smrg ;; 37142265a131Smrg linux* | k*bsd*-gnu) 37152265a131Smrg case $cc_basename in 37162265a131Smrg KCC*) 37172265a131Smrg # KAI C++ Compiler 37182265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37192265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37202265a131Smrg ;; 37212265a131Smrg ecpc* ) 37222265a131Smrg # old Intel C++ for x86_64 which still supported -KPIC. 37232265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37242265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37252265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37262265a131Smrg ;; 37272265a131Smrg icpc* ) 37282265a131Smrg # Intel C++, used to be incompatible with GCC. 37292265a131Smrg # ICC 10 doesn't accept -KPIC any more. 37302265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37312265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37322265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37332265a131Smrg ;; 37342265a131Smrg pgCC* | pgcpp*) 37352265a131Smrg # Portland Group C++ compiler 37362265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37372265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 37382265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37392265a131Smrg ;; 37402265a131Smrg cxx*) 37412265a131Smrg # Compaq C++ 37422265a131Smrg # Make sure the PIC flag is empty. It appears that all Alpha 37432265a131Smrg # Linux and Compaq Tru64 Unix objects are PIC. 37442265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 37452265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37462265a131Smrg ;; 37472265a131Smrg xlc* | xlC*) 37482265a131Smrg # IBM XL 8.0 on PPC 37492265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37502265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 37512265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 37522265a131Smrg ;; 37532265a131Smrg *) 37542265a131Smrg case `$CC -V 2>&1 | sed 5q` in 37552265a131Smrg *Sun\ C*) 37562265a131Smrg # Sun C++ 5.9 37572265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37582265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37592265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 37602265a131Smrg ;; 37612265a131Smrg esac 37622265a131Smrg ;; 37632265a131Smrg esac 37642265a131Smrg ;; 37652265a131Smrg lynxos*) 37662265a131Smrg ;; 37672265a131Smrg m88k*) 37682265a131Smrg ;; 37692265a131Smrg mvs*) 37702265a131Smrg case $cc_basename in 37712265a131Smrg cxx*) 37722265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 37732265a131Smrg ;; 37742265a131Smrg *) 37752265a131Smrg ;; 37762265a131Smrg esac 37772265a131Smrg ;; 37782265a131Smrg netbsd*) 37792265a131Smrg ;; 37802265a131Smrg *qnx* | *nto*) 37812265a131Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 37822265a131Smrg # it will coredump. 37832265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 37842265a131Smrg ;; 37852265a131Smrg osf3* | osf4* | osf5*) 37862265a131Smrg case $cc_basename in 37872265a131Smrg KCC*) 37882265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37892265a131Smrg ;; 37902265a131Smrg RCC*) 37912265a131Smrg # Rational C++ 2.4.1 37922265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 37932265a131Smrg ;; 37942265a131Smrg cxx*) 37952265a131Smrg # Digital/Compaq C++ 37962265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37972265a131Smrg # Make sure the PIC flag is empty. It appears that all Alpha 37982265a131Smrg # Linux and Compaq Tru64 Unix objects are PIC. 37992265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 38002265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 38012265a131Smrg ;; 38022265a131Smrg *) 38032265a131Smrg ;; 38042265a131Smrg esac 38052265a131Smrg ;; 38062265a131Smrg psos*) 38072265a131Smrg ;; 38082265a131Smrg solaris*) 38092265a131Smrg case $cc_basename in 38102265a131Smrg CC*) 38112265a131Smrg # Sun C++ 4.2, 5.x and Centerline C++ 38122265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38132265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38142265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 38152265a131Smrg ;; 38162265a131Smrg gcx*) 38172265a131Smrg # Green Hills C++ Compiler 38182265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 38192265a131Smrg ;; 38202265a131Smrg *) 38212265a131Smrg ;; 38222265a131Smrg esac 38232265a131Smrg ;; 38242265a131Smrg sunos4*) 38252265a131Smrg case $cc_basename in 38262265a131Smrg CC*) 38272265a131Smrg # Sun C++ 4.x 38282265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38292265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38302265a131Smrg ;; 38312265a131Smrg lcc*) 38322265a131Smrg # Lucid 38332265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38342265a131Smrg ;; 38352265a131Smrg *) 38362265a131Smrg ;; 38372265a131Smrg esac 38382265a131Smrg ;; 38392265a131Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 38402265a131Smrg case $cc_basename in 38412265a131Smrg CC*) 38422265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38432265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38442265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38452265a131Smrg ;; 38462265a131Smrg esac 38472265a131Smrg ;; 38482265a131Smrg tandem*) 38492265a131Smrg case $cc_basename in 38502265a131Smrg NCC*) 38512265a131Smrg # NonStop-UX NCC 3.20 38522265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38532265a131Smrg ;; 38542265a131Smrg *) 38552265a131Smrg ;; 38562265a131Smrg esac 38572265a131Smrg ;; 38582265a131Smrg vxworks*) 38592265a131Smrg ;; 38602265a131Smrg *) 38612265a131Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 38622265a131Smrg ;; 38632265a131Smrg esac 3864444c061aSmrg fi 38652265a131Smrg], 3866444c061aSmrg[ 38672265a131Smrg if test "$GCC" = yes; then 38682265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38692265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3870444c061aSmrg 38712265a131Smrg case $host_os in 38722265a131Smrg aix*) 38732265a131Smrg # All AIX code is PIC. 38742265a131Smrg if test "$host_cpu" = ia64; then 38752265a131Smrg # AIX 5 now supports IA64 processor 38762265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38772265a131Smrg fi 38782265a131Smrg ;; 3879444c061aSmrg 38802265a131Smrg amigaos*) 38812265a131Smrg case $host_cpu in 38822265a131Smrg powerpc) 38832265a131Smrg # see comment about AmigaOS4 .so support 38842265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 38852265a131Smrg ;; 38862265a131Smrg m68k) 38872265a131Smrg # FIXME: we need at least 68020 code to build shared libraries, but 38882265a131Smrg # adding the `-m68020' flag to GCC prevents building anything better, 38892265a131Smrg # like `-m68040'. 38902265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 38912265a131Smrg ;; 38922265a131Smrg esac 38932265a131Smrg ;; 3894444c061aSmrg 38952265a131Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 38962265a131Smrg # PIC is the default for these OSes. 38972265a131Smrg ;; 3898444c061aSmrg 38992265a131Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39002265a131Smrg # This hack is so that the source file can tell whether it is being 39012265a131Smrg # built for inclusion in a dll (and should export symbols for example). 39022265a131Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39032265a131Smrg # (--disable-auto-import) libraries 39042265a131Smrg m4_if([$1], [GCJ], [], 39052265a131Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39062265a131Smrg ;; 3907444c061aSmrg 39082265a131Smrg darwin* | rhapsody*) 39092265a131Smrg # PIC is the default on this platform 39102265a131Smrg # Common symbols not allowed in MH_DYLIB files 39112265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39122265a131Smrg ;; 3913444c061aSmrg 39142265a131Smrg hpux*) 39152265a131Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39162265a131Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39172265a131Smrg # sets the default TLS model and affects inlining. 39182265a131Smrg case $host_cpu in 39192265a131Smrg hppa*64*) 39202265a131Smrg # +Z the default 39212265a131Smrg ;; 39222265a131Smrg *) 39232265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39242265a131Smrg ;; 39252265a131Smrg esac 39262265a131Smrg ;; 3927444c061aSmrg 39282265a131Smrg interix[[3-9]]*) 39292265a131Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39302265a131Smrg # Instead, we relocate shared libraries at runtime. 39312265a131Smrg ;; 3932444c061aSmrg 39332265a131Smrg msdosdjgpp*) 39342265a131Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 39352265a131Smrg # on systems that don't support them. 39362265a131Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 39372265a131Smrg enable_shared=no 39382265a131Smrg ;; 3939444c061aSmrg 39402265a131Smrg *nto* | *qnx*) 39412265a131Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39422265a131Smrg # it will coredump. 39432265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39442265a131Smrg ;; 3945444c061aSmrg 39462265a131Smrg sysv4*MP*) 39472265a131Smrg if test -d /usr/nec; then 39482265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39492265a131Smrg fi 39502265a131Smrg ;; 3951444c061aSmrg 39522265a131Smrg *) 39532265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39542265a131Smrg ;; 39552265a131Smrg esac 39562265a131Smrg else 39572265a131Smrg # PORTME Check for flag to pass linker flags through the system compiler. 39582265a131Smrg case $host_os in 39592265a131Smrg aix*) 39602265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39612265a131Smrg if test "$host_cpu" = ia64; then 39622265a131Smrg # AIX 5 now supports IA64 processor 39632265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39642265a131Smrg else 39652265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39662265a131Smrg fi 39672265a131Smrg ;; 3968444c061aSmrg 39692265a131Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39702265a131Smrg # This hack is so that the source file can tell whether it is being 39712265a131Smrg # built for inclusion in a dll (and should export symbols for example). 39722265a131Smrg m4_if([$1], [GCJ], [], 39732265a131Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39742265a131Smrg ;; 3975444c061aSmrg 39762265a131Smrg hpux9* | hpux10* | hpux11*) 39772265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39782265a131Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 39792265a131Smrg # not for PA HP-UX. 39802265a131Smrg case $host_cpu in 39812265a131Smrg hppa*64*|ia64*) 39822265a131Smrg # +Z the default 39832265a131Smrg ;; 39842265a131Smrg *) 39852265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 39862265a131Smrg ;; 39872265a131Smrg esac 39882265a131Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 39892265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 39902265a131Smrg ;; 3991444c061aSmrg 39922265a131Smrg irix5* | irix6* | nonstopux*) 39932265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39942265a131Smrg # PIC (with -KPIC) is the default. 39952265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 39962265a131Smrg ;; 3997444c061aSmrg 39982265a131Smrg linux* | k*bsd*-gnu) 39992265a131Smrg case $cc_basename in 40002265a131Smrg # old Intel for x86_64 which still supported -KPIC. 40012265a131Smrg ecc*) 40022265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40032265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40042265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40052265a131Smrg ;; 40062265a131Smrg # icc used to be incompatible with GCC. 40072265a131Smrg # ICC 10 doesn't accept -KPIC any more. 40082265a131Smrg icc* | ifort*) 40092265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40102265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40112265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40122265a131Smrg ;; 40132265a131Smrg # Lahey Fortran 8.1. 40142265a131Smrg lf95*) 40152265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40162265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 40172265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 40182265a131Smrg ;; 40192265a131Smrg pgcc* | pgf77* | pgf90* | pgf95*) 40202265a131Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 40212265a131Smrg # which looks to be a dead project) 40222265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40232265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40242265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40252265a131Smrg ;; 40262265a131Smrg ccc*) 40272265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40282265a131Smrg # All Alpha code is PIC. 40292265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40302265a131Smrg ;; 40312265a131Smrg xl*) 40322265a131Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 40332265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40342265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40352265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40362265a131Smrg ;; 40372265a131Smrg *) 40382265a131Smrg case `$CC -V 2>&1 | sed 5q` in 40392265a131Smrg *Sun\ C*) 40402265a131Smrg # Sun C 5.9 40412265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40422265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40432265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40442265a131Smrg ;; 40452265a131Smrg *Sun\ F*) 40462265a131Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 40472265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40482265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40492265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 40502265a131Smrg ;; 40512265a131Smrg esac 40522265a131Smrg ;; 40532265a131Smrg esac 40542265a131Smrg ;; 4055444c061aSmrg 40562265a131Smrg newsos6) 40572265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40582265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40592265a131Smrg ;; 4060444c061aSmrg 40612265a131Smrg *nto* | *qnx*) 40622265a131Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 40632265a131Smrg # it will coredump. 40642265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 40652265a131Smrg ;; 4066444c061aSmrg 40672265a131Smrg osf3* | osf4* | osf5*) 40682265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40692265a131Smrg # All OSF/1 code is PIC. 40702265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40712265a131Smrg ;; 4072444c061aSmrg 40732265a131Smrg rdos*) 40742265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40752265a131Smrg ;; 4076444c061aSmrg 40772265a131Smrg solaris*) 40782265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40792265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40802265a131Smrg case $cc_basename in 40812265a131Smrg f77* | f90* | f95*) 40822265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 40832265a131Smrg *) 40842265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 40852265a131Smrg esac 40862265a131Smrg ;; 4087444c061aSmrg 40882265a131Smrg sunos4*) 40892265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 40902265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 40912265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40922265a131Smrg ;; 4093444c061aSmrg 40942265a131Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 40952265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40962265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40972265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40982265a131Smrg ;; 4099444c061aSmrg 41002265a131Smrg sysv4*MP*) 41012265a131Smrg if test -d /usr/nec ;then 41022265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 41032265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41042265a131Smrg fi 41052265a131Smrg ;; 4106444c061aSmrg 41072265a131Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41082265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41092265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41102265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41112265a131Smrg ;; 4112444c061aSmrg 41132265a131Smrg unicos*) 41142265a131Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41152265a131Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41162265a131Smrg ;; 4117444c061aSmrg 41182265a131Smrg uts4*) 41192265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41202265a131Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41212265a131Smrg ;; 4122444c061aSmrg 41232265a131Smrg *) 41242265a131Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41252265a131Smrg ;; 41262265a131Smrg esac 41272265a131Smrg fi 41282265a131Smrg]) 41292265a131Smrgcase $host_os in 41302265a131Smrg # For platforms which do not support PIC, -DPIC is meaningless: 41312265a131Smrg *djgpp*) 41322265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41332265a131Smrg ;; 41342265a131Smrg *) 41352265a131Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 41362265a131Smrg ;; 41372265a131Smrgesac 41382265a131SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 41392265a131Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 41402265a131Smrg [How to pass a linker flag through the compiler]) 4141444c061aSmrg 41422265a131Smrg# 41432265a131Smrg# Check to make sure the PIC flag actually works. 41442265a131Smrg# 41452265a131Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 41462265a131Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 41472265a131Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 41482265a131Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 41492265a131Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 41502265a131Smrg "" | " "*) ;; 41512265a131Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 41522265a131Smrg esac], 41532265a131Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 41542265a131Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4155444c061aSmrgfi 41562265a131Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 41572265a131Smrg [Additional compiler flags for building library objects]) 4158444c061aSmrg 41592265a131Smrg# 41602265a131Smrg# Check to make sure the static flag actually works. 41612265a131Smrg# 41622265a131Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 41632265a131Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 41642265a131Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 41652265a131Smrg $lt_tmp_static_flag, 41662265a131Smrg [], 41672265a131Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 41682265a131Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 41692265a131Smrg [Compiler flag to prevent dynamic linking]) 41702265a131Smrg])# _LT_COMPILER_PIC 4171444c061aSmrg 4172444c061aSmrg 41732265a131Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 41742265a131Smrg# ---------------------------- 41752265a131Smrg# See if the linker supports building shared libraries. 41762265a131Smrgm4_defun([_LT_LINKER_SHLIBS], 41772265a131Smrg[AC_REQUIRE([LT_PATH_LD])dnl 41782265a131SmrgAC_REQUIRE([LT_PATH_NM])dnl 41792265a131Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 41802265a131Smrgm4_require([_LT_DECL_EGREP])dnl 41812265a131Smrgm4_require([_LT_DECL_SED])dnl 41822265a131Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 41832265a131Smrgm4_require([_LT_TAG_COMPILER])dnl 41842265a131SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 41852265a131Smrgm4_if([$1], [CXX], [ 41862265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 41872265a131Smrg case $host_os in 41882265a131Smrg aix[[4-9]]*) 41892265a131Smrg # If we're using GNU nm, then we don't want the "-C" option. 41902265a131Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 41912265a131Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 41922265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 41932265a131Smrg else 41942265a131Smrg _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' 41952265a131Smrg fi 41962265a131Smrg ;; 41972265a131Smrg pw32*) 41982265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 41992265a131Smrg ;; 42002265a131Smrg cygwin* | mingw* | cegcc*) 42012265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 42022265a131Smrg ;; 42032265a131Smrg *) 42042265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42052265a131Smrg ;; 42062265a131Smrg esac 42072265a131Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42082265a131Smrg], [ 42092265a131Smrg runpath_var= 42102265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 42112265a131Smrg _LT_TAGVAR(always_export_symbols, $1)=no 42122265a131Smrg _LT_TAGVAR(archive_cmds, $1)= 42132265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 42142265a131Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 42152265a131Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 42162265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 42172265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42182265a131Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 42192265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 42202265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 42212265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 42222265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 42232265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 42242265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 42252265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 42262265a131Smrg _LT_TAGVAR(inherit_rpath, $1)=no 42272265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 42282265a131Smrg _LT_TAGVAR(module_cmds, $1)= 42292265a131Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 42302265a131Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 42312265a131Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 42322265a131Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 42332265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42342265a131Smrg # include_expsyms should be a list of space-separated symbols to be *always* 42352265a131Smrg # included in the symbol list 42362265a131Smrg _LT_TAGVAR(include_expsyms, $1)= 42372265a131Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 42382265a131Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 42392265a131Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 42402265a131Smrg # as well as any symbol that contains `d'. 42412265a131Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42422265a131Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 42432265a131Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 42442265a131Smrg # the symbol is explicitly referenced. Since portable code cannot 42452265a131Smrg # rely on this symbol name, it's probably fine to never include it in 42462265a131Smrg # preloaded symbol tables. 42472265a131Smrg # Exclude shared library initialization/finalization symbols. 42482265a131Smrgdnl Note also adjust exclude_expsyms for C++ above. 42492265a131Smrg extract_expsyms_cmds= 4250444c061aSmrg 42512265a131Smrg case $host_os in 42522265a131Smrg cygwin* | mingw* | pw32* | cegcc*) 42532265a131Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 42542265a131Smrg # When not using gcc, we currently assume that we are using 42552265a131Smrg # Microsoft Visual C++. 42562265a131Smrg if test "$GCC" != yes; then 42572265a131Smrg with_gnu_ld=no 42582265a131Smrg fi 42592265a131Smrg ;; 42602265a131Smrg interix*) 42612265a131Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 42622265a131Smrg with_gnu_ld=yes 42632265a131Smrg ;; 42642265a131Smrg openbsd*) 42652265a131Smrg with_gnu_ld=no 42662265a131Smrg ;; 42672265a131Smrg esac 4268444c061aSmrg 42692265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 42702265a131Smrg if test "$with_gnu_ld" = yes; then 4271444c061aSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4272444c061aSmrg wlarc='${wl}' 4273444c061aSmrg 42742265a131Smrg # Set some defaults for GNU ld with shared library support. These 42752265a131Smrg # are reset later if shared libraries are not supported. Putting them 42762265a131Smrg # here allows them to be overridden if necessary. 42772265a131Smrg runpath_var=LD_RUN_PATH 42782265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 42792265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4280444c061aSmrg # ancient GNU ld didn't support --whole-archive et. al. 42812265a131Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 42822265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4283444c061aSmrg else 42842265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4285444c061aSmrg fi 42862265a131Smrg supports_anon_versioning=no 42872265a131Smrg case `$LD -v 2>&1` in 42882265a131Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 42892265a131Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 42902265a131Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 42912265a131Smrg *\ 2.11.*) ;; # other 2.11 versions 42922265a131Smrg *) supports_anon_versioning=yes ;; 42932265a131Smrg esac 4294444c061aSmrg 42952265a131Smrg # See if GNU ld supports shared libraries. 42962265a131Smrg case $host_os in 42972265a131Smrg aix[[3-9]]*) 42982265a131Smrg # On AIX/PPC, the GNU linker is very broken 42992265a131Smrg if test "$host_cpu" != ia64; then 43002265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 43012265a131Smrg cat <<_LT_EOF 1>&2 4302444c061aSmrg 43032265a131Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 43042265a131Smrg*** to be unable to reliably create shared libraries on AIX. 43052265a131Smrg*** Therefore, libtool is disabling shared libraries support. If you 43062265a131Smrg*** really care for shared libraries, you may want to modify your PATH 43072265a131Smrg*** so that a non-GNU linker is found, and then restart. 4308444c061aSmrg 43092265a131Smrg_LT_EOF 43102265a131Smrg fi 43112265a131Smrg ;; 4312444c061aSmrg 43132265a131Smrg amigaos*) 43142265a131Smrg case $host_cpu in 43152265a131Smrg powerpc) 43162265a131Smrg # see comment about AmigaOS4 .so support 43172265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43182265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 43192265a131Smrg ;; 43202265a131Smrg m68k) 43212265a131Smrg _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)' 43222265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43232265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 43242265a131Smrg ;; 4325444c061aSmrg esac 43262265a131Smrg ;; 43272265a131Smrg 43282265a131Smrg beos*) 43292265a131Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 43302265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43312265a131Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 43322265a131Smrg # support --undefined. This deserves some investigation. FIXME 43332265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334444c061aSmrg else 43352265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4336444c061aSmrg fi 43372265a131Smrg ;; 4338444c061aSmrg 43392265a131Smrg cygwin* | mingw* | pw32* | cegcc*) 43402265a131Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 43412265a131Smrg # as there is no search path for DLLs. 43422265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43432265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43442265a131Smrg _LT_TAGVAR(always_export_symbols, $1)=no 43452265a131Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 43462265a131Smrg _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' 43472265a131Smrg 43482265a131Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 43492265a131Smrg _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' 43502265a131Smrg # If the export-symbols file already is a .def file (1st line 43512265a131Smrg # is EXPORTS), use it as is; otherwise, prepend... 43522265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 43532265a131Smrg cp $export_symbols $output_objdir/$soname.def; 43542265a131Smrg else 43552265a131Smrg echo EXPORTS > $output_objdir/$soname.def; 43562265a131Smrg cat $export_symbols >> $output_objdir/$soname.def; 43572265a131Smrg fi~ 43582265a131Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359444c061aSmrg else 43602265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4361444c061aSmrg fi 43622265a131Smrg ;; 4363444c061aSmrg 43642265a131Smrg interix[[3-9]]*) 43652265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 43662265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 43672265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 43682265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 43692265a131Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 43702265a131Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 43712265a131Smrg # default) and relocated if they conflict, which is a slow very memory 43722265a131Smrg # consuming and fragmenting process. To avoid this, we pick a random, 43732265a131Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 43742265a131Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 43752265a131Smrg _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' 43762265a131Smrg _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' 43772265a131Smrg ;; 4378444c061aSmrg 43792265a131Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 43802265a131Smrg tmp_diet=no 43812265a131Smrg if test "$host_os" = linux-dietlibc; then 43822265a131Smrg case $cc_basename in 43832265a131Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 43842265a131Smrg esac 4385444c061aSmrg fi 43862265a131Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 43872265a131Smrg && test "$tmp_diet" = no 43882265a131Smrg then 43892265a131Smrg tmp_addflag= 43902265a131Smrg tmp_sharedflag='-shared' 43912265a131Smrg case $cc_basename,$host_cpu in 43922265a131Smrg pgcc*) # Portland Group C compiler 43932265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 43942265a131Smrg tmp_addflag=' $pic_flag' 43952265a131Smrg ;; 43962265a131Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 43972265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 43982265a131Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 43992265a131Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 44002265a131Smrg tmp_addflag=' -i_dynamic' ;; 44012265a131Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 44022265a131Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 44032265a131Smrg ifc* | ifort*) # Intel Fortran compiler 44042265a131Smrg tmp_addflag=' -nofor_main' ;; 44052265a131Smrg lf95*) # Lahey Fortran 8.1 44062265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 44072265a131Smrg tmp_sharedflag='--shared' ;; 44082265a131Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 44092265a131Smrg tmp_sharedflag='-qmkshrobj' 44102265a131Smrg tmp_addflag= ;; 44112265a131Smrg esac 44122265a131Smrg case `$CC -V 2>&1 | sed 5q` in 44132265a131Smrg *Sun\ C*) # Sun C 5.9 44142265a131Smrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 44152265a131Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 44162265a131Smrg tmp_sharedflag='-G' ;; 44172265a131Smrg *Sun\ F*) # Sun Fortran 8.3 44182265a131Smrg tmp_sharedflag='-G' ;; 44192265a131Smrg esac 44202265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44212265a131Smrg 44222265a131Smrg if test "x$supports_anon_versioning" = xyes; then 44232265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44242265a131Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44252265a131Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44262265a131Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427444c061aSmrg fi 44282265a131Smrg 44292265a131Smrg case $cc_basename in 44302265a131Smrg xlf*) 44312265a131Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 44322265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 44332265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 44342265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 44352265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 44362265a131Smrg if test "x$supports_anon_versioning" = xyes; then 44372265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44382265a131Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44392265a131Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44402265a131Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 44412265a131Smrg fi 44422265a131Smrg ;; 44432265a131Smrg esac 4444444c061aSmrg else 44452265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4446444c061aSmrg fi 44472265a131Smrg ;; 4448444c061aSmrg 44492265a131Smrg netbsd*) 44502265a131Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 44512265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 44522265a131Smrg wlarc= 44532265a131Smrg else 44542265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44552265a131Smrg _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' 44562265a131Smrg fi 44572265a131Smrg ;; 44582265a131Smrg 44592265a131Smrg solaris*) 44602265a131Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 44612265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44622265a131Smrg cat <<_LT_EOF 1>&2 44632265a131Smrg 44642265a131Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 44652265a131Smrg*** create shared libraries on Solaris systems. Therefore, libtool 44662265a131Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 44672265a131Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 44682265a131Smrg*** your PATH or compiler configuration so that the native linker is 44692265a131Smrg*** used, and then restart. 44702265a131Smrg 44712265a131Smrg_LT_EOF 44722265a131Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 44732265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44742265a131Smrg _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' 44752265a131Smrg else 44762265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44772265a131Smrg fi 44782265a131Smrg ;; 44792265a131Smrg 44802265a131Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 44812265a131Smrg case `$LD -v 2>&1` in 44822265a131Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 44832265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 44842265a131Smrg cat <<_LT_EOF 1>&2 44852265a131Smrg 44862265a131Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 44872265a131Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 44882265a131Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 44892265a131Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 44902265a131Smrg*** your PATH or compiler configuration so that the native linker is 44912265a131Smrg*** used, and then restart. 44922265a131Smrg 44932265a131Smrg_LT_EOF 4494444c061aSmrg ;; 44952265a131Smrg *) 44962265a131Smrg # For security reasons, it is highly recommended that you always 44972265a131Smrg # use absolute paths for naming shared libraries, and exclude the 44982265a131Smrg # DT_RUNPATH tag from executables and libraries. But doing so 44992265a131Smrg # requires that you compile everything twice, which is a pain. 45002265a131Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45012265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 45022265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45032265a131Smrg _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' 45042265a131Smrg else 45052265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 45062265a131Smrg fi 4507444c061aSmrg ;; 45082265a131Smrg esac 4509444c061aSmrg ;; 45102265a131Smrg 45112265a131Smrg sunos4*) 45122265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 45132265a131Smrg wlarc= 45142265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 45152265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4516444c061aSmrg ;; 45172265a131Smrg 4518444c061aSmrg *) 45192265a131Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45202265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45212265a131Smrg _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' 4522444c061aSmrg else 45232265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4524444c061aSmrg fi 4525444c061aSmrg ;; 4526444c061aSmrg esac 4527444c061aSmrg 45282265a131Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 45292265a131Smrg runpath_var= 45302265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 45312265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 45322265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4533444c061aSmrg fi 45342265a131Smrg else 45352265a131Smrg # PORTME fill in a description of your system's linker (not GNU ld) 45362265a131Smrg case $host_os in 45372265a131Smrg aix3*) 45382265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 45392265a131Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 45402265a131Smrg _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' 45412265a131Smrg # Note: this linker hardcodes the directories in LIBPATH if there 45422265a131Smrg # are no directories specified by -L. 45432265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 45442265a131Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 45452265a131Smrg # Neither direct hardcoding nor static linking is supported with a 45462265a131Smrg # broken collect2. 45472265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 45482265a131Smrg fi 4549444c061aSmrg ;; 4550444c061aSmrg 45512265a131Smrg aix[[4-9]]*) 45522265a131Smrg if test "$host_cpu" = ia64; then 45532265a131Smrg # On IA64, the linker does run time linking by default, so we don't 45542265a131Smrg # have to do anything special. 45552265a131Smrg aix_use_runtimelinking=no 45562265a131Smrg exp_sym_flag='-Bexport' 45572265a131Smrg no_entry_flag="" 45582265a131Smrg else 45592265a131Smrg # If we're using GNU nm, then we don't want the "-C" option. 45602265a131Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45612265a131Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45622265a131Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4563444c061aSmrg else 45642265a131Smrg _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' 4565444c061aSmrg fi 45662265a131Smrg aix_use_runtimelinking=no 45672265a131Smrg 45682265a131Smrg # Test if we are trying to use run time linking or normal 45692265a131Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 45702265a131Smrg # need to do runtime linking. 45712265a131Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 45722265a131Smrg for ld_flag in $LDFLAGS; do 45732265a131Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 45742265a131Smrg aix_use_runtimelinking=yes 45752265a131Smrg break 4576444c061aSmrg fi 45772265a131Smrg done 4578444c061aSmrg ;; 4579444c061aSmrg esac 4580444c061aSmrg 45812265a131Smrg exp_sym_flag='-bexport' 45822265a131Smrg no_entry_flag='-bnoentry' 45832265a131Smrg fi 4584444c061aSmrg 45852265a131Smrg # When large executables or shared objects are built, AIX ld can 45862265a131Smrg # have problems creating the table of contents. If linking a library 45872265a131Smrg # or program results in "error TOC overflow" add -mminimal-toc to 45882265a131Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 45892265a131Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4590444c061aSmrg 45912265a131Smrg _LT_TAGVAR(archive_cmds, $1)='' 45922265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 45932265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 45942265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 45952265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 45962265a131Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4597444c061aSmrg 45982265a131Smrg if test "$GCC" = yes; then 45992265a131Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 46002265a131Smrg # We only want to do this on AIX 4.2 and lower, the check 46012265a131Smrg # below for broken collect2 doesn't work under 4.3+ 46022265a131Smrg collect2name=`${CC} -print-prog-name=collect2` 46032265a131Smrg if test -f "$collect2name" && 46042265a131Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 46052265a131Smrg then 46062265a131Smrg # We have reworked collect2 46072265a131Smrg : 46082265a131Smrg else 46092265a131Smrg # We have old collect2 46102265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 46112265a131Smrg # It fails to find uninstalled libraries when the uninstalled 46122265a131Smrg # path is not listed in the libpath. Setting hardcode_minus_L 46132265a131Smrg # to unsupported forces relinking 46142265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46152265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46162265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46172265a131Smrg fi 46182265a131Smrg ;; 46192265a131Smrg esac 46202265a131Smrg shared_flag='-shared' 46212265a131Smrg if test "$aix_use_runtimelinking" = yes; then 46222265a131Smrg shared_flag="$shared_flag "'${wl}-G' 46232265a131Smrg fi 46242265a131Smrg else 46252265a131Smrg # not using gcc 46262265a131Smrg if test "$host_cpu" = ia64; then 46272265a131Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 46282265a131Smrg # chokes on -Wl,-G. The following line is correct: 46292265a131Smrg shared_flag='-G' 46302265a131Smrg else 46312265a131Smrg if test "$aix_use_runtimelinking" = yes; then 46322265a131Smrg shared_flag='${wl}-G' 46332265a131Smrg else 46342265a131Smrg shared_flag='${wl}-bM:SRE' 46352265a131Smrg fi 46362265a131Smrg fi 46372265a131Smrg fi 4638444c061aSmrg 46392265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 46402265a131Smrg # It seems that -bexpall does not export symbols beginning with 46412265a131Smrg # underscore (_), so it is better to generate a list of symbols to export. 46422265a131Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 46432265a131Smrg if test "$aix_use_runtimelinking" = yes; then 46442265a131Smrg # Warning - without using the other runtime loading flags (-brtl), 46452265a131Smrg # -berok will link without error, but may produce a broken library. 46462265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 46472265a131Smrg # Determine the default libpath from the value encoded in an 46482265a131Smrg # empty executable. 46492265a131Smrg _LT_SYS_MODULE_PATH_AIX 46502265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46512265a131Smrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 46522265a131Smrg else 46532265a131Smrg if test "$host_cpu" = ia64; then 46542265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 46552265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 46562265a131Smrg _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" 4657444c061aSmrg else 46582265a131Smrg # Determine the default libpath from the value encoded in an 46592265a131Smrg # empty executable. 46602265a131Smrg _LT_SYS_MODULE_PATH_AIX 46612265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46622265a131Smrg # Warning - without using the other run time loading flags, 46632265a131Smrg # -berok will link without error, but may produce a broken library. 46642265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 46652265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 46662265a131Smrg # Exported symbols can be pulled into shared objects from archives 46672265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 46682265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 46692265a131Smrg # This is similar to how AIX traditionally builds its shared libraries. 46702265a131Smrg _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' 4671444c061aSmrg fi 46722265a131Smrg fi 46732265a131Smrg ;; 4674444c061aSmrg 46752265a131Smrg amigaos*) 46762265a131Smrg case $host_cpu in 46772265a131Smrg powerpc) 46782265a131Smrg # see comment about AmigaOS4 .so support 46792265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 46802265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 46812265a131Smrg ;; 46822265a131Smrg m68k) 46832265a131Smrg _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)' 46842265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46852265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46862265a131Smrg ;; 46872265a131Smrg esac 46882265a131Smrg ;; 4689444c061aSmrg 46902265a131Smrg bsdi[[45]]*) 46912265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 46922265a131Smrg ;; 4693444c061aSmrg 46942265a131Smrg cygwin* | mingw* | pw32* | cegcc*) 46952265a131Smrg # When not using gcc, we currently assume that we are using 46962265a131Smrg # Microsoft Visual C++. 46972265a131Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 46982265a131Smrg # no search path for DLLs. 46992265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 47002265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47012265a131Smrg # Tell ltmain to make .lib files, not .a files. 47022265a131Smrg libext=lib 47032265a131Smrg # Tell ltmain to make .dll files, not .so files. 47042265a131Smrg shrext_cmds=".dll" 47052265a131Smrg # FIXME: Setting linknames here is a bad hack. 47062265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 47072265a131Smrg # The linker will automatically build a .lib file if we build a DLL. 47082265a131Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 47092265a131Smrg # FIXME: Should let the user specify the lib program. 47102265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 47112265a131Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 47122265a131Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47132265a131Smrg ;; 4714444c061aSmrg 47152265a131Smrg darwin* | rhapsody*) 47162265a131Smrg _LT_DARWIN_LINKER_FEATURES($1) 47172265a131Smrg ;; 4718444c061aSmrg 47192265a131Smrg dgux*) 47202265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 47212265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47222265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47232265a131Smrg ;; 4724444c061aSmrg 47252265a131Smrg freebsd1*) 47262265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47272265a131Smrg ;; 4728444c061aSmrg 47292265a131Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 47302265a131Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 47312265a131Smrg # does not break anything, and helps significantly (at the cost of a little 47322265a131Smrg # extra space). 47332265a131Smrg freebsd2.2*) 47342265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 47352265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47362265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47372265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47382265a131Smrg ;; 4739444c061aSmrg 47402265a131Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 47412265a131Smrg freebsd2*) 47422265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 47432265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47442265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47452265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47462265a131Smrg ;; 4747444c061aSmrg 47482265a131Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 47492265a131Smrg freebsd* | dragonfly*) 47502265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 47512265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47522265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47532265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47542265a131Smrg ;; 4755444c061aSmrg 47562265a131Smrg hpux9*) 47572265a131Smrg if test "$GCC" = yes; then 47582265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 47592265a131Smrg else 47602265a131Smrg _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' 47612265a131Smrg fi 47622265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47632265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47642265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4765444c061aSmrg 47662265a131Smrg # hardcode_minus_L: Not really in the search PATH, 47672265a131Smrg # but as the default location of the library. 47682265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47692265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47702265a131Smrg ;; 4771444c061aSmrg 47722265a131Smrg hpux10*) 47732265a131Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47742265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 47752265a131Smrg else 47762265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 47772265a131Smrg fi 47782265a131Smrg if test "$with_gnu_ld" = no; then 47792265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47802265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 47812265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47822265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 47832265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 47842265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47852265a131Smrg # hardcode_minus_L: Not really in the search PATH, 47862265a131Smrg # but as the default location of the library. 47872265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47882265a131Smrg fi 47892265a131Smrg ;; 4790444c061aSmrg 47912265a131Smrg hpux11*) 47922265a131Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47932265a131Smrg case $host_cpu in 47942265a131Smrg hppa*64*) 47952265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 47962265a131Smrg ;; 47972265a131Smrg ia64*) 47982265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 47992265a131Smrg ;; 48002265a131Smrg *) 48012265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48022265a131Smrg ;; 48032265a131Smrg esac 48042265a131Smrg else 48052265a131Smrg case $host_cpu in 48062265a131Smrg hppa*64*) 48072265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 48082265a131Smrg ;; 48092265a131Smrg ia64*) 48102265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 48112265a131Smrg ;; 48122265a131Smrg *) 48132265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48142265a131Smrg ;; 48152265a131Smrg esac 48162265a131Smrg fi 48172265a131Smrg if test "$with_gnu_ld" = no; then 48182265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 48192265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4820444c061aSmrg 48212265a131Smrg case $host_cpu in 48222265a131Smrg hppa*64*|ia64*) 48232265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 48242265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48252265a131Smrg ;; 48262265a131Smrg *) 48272265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48282265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48292265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4830444c061aSmrg 48312265a131Smrg # hardcode_minus_L: Not really in the search PATH, 48322265a131Smrg # but as the default location of the library. 48332265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 48342265a131Smrg ;; 48352265a131Smrg esac 48362265a131Smrg fi 48372265a131Smrg ;; 4838444c061aSmrg 48392265a131Smrg irix5* | irix6* | nonstopux*) 48402265a131Smrg if test "$GCC" = yes; then 48412265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 48422265a131Smrg # Try to use the -exported_symbol ld option, if it does not 48432265a131Smrg # work, assume that -exports_file does not work either and 48442265a131Smrg # implicitly export all symbols. 48452265a131Smrg save_LDFLAGS="$LDFLAGS" 48462265a131Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 48472265a131Smrg AC_LINK_IFELSE(int foo(void) {}, 48482265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 48492265a131Smrg ) 48502265a131Smrg LDFLAGS="$save_LDFLAGS" 48512265a131Smrg else 48522265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 48532265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 48542265a131Smrg fi 48552265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 48562265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48572265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48582265a131Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 48592265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 48602265a131Smrg ;; 4861444c061aSmrg 48622265a131Smrg netbsd*) 48632265a131Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48642265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 48652265a131Smrg else 48662265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 48672265a131Smrg fi 48682265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48692265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48702265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48712265a131Smrg ;; 4872444c061aSmrg 48732265a131Smrg newsos6) 48742265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 48752265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48762265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48772265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48782265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48792265a131Smrg ;; 4880444c061aSmrg 48812265a131Smrg *nto* | *qnx*) 48822265a131Smrg ;; 4883444c061aSmrg 48842265a131Smrg openbsd*) 48852265a131Smrg if test -f /usr/libexec/ld.so; then 48862265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 48872265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48882265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48892265a131Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 48902265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 48912265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 48922265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48932265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48942265a131Smrg else 48952265a131Smrg case $host_os in 48962265a131Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 48972265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 48982265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48992265a131Smrg ;; 49002265a131Smrg *) 49012265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 49022265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 49032265a131Smrg ;; 49042265a131Smrg esac 49052265a131Smrg fi 49062265a131Smrg else 49072265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49082265a131Smrg fi 49092265a131Smrg ;; 4910444c061aSmrg 49112265a131Smrg os2*) 49122265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 49132265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49142265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49152265a131Smrg _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' 49162265a131Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 49172265a131Smrg ;; 4918444c061aSmrg 49192265a131Smrg osf3*) 49202265a131Smrg if test "$GCC" = yes; then 49212265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49222265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 49232265a131Smrg else 49242265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49252265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 49262265a131Smrg fi 49272265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49282265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49292265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49302265a131Smrg ;; 4931444c061aSmrg 49322265a131Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 49332265a131Smrg if test "$GCC" = yes; then 49342265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49352265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 49362265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49372265a131Smrg else 49382265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49392265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 49402265a131Smrg _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~ 49412265a131Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 4942444c061aSmrg 49432265a131Smrg # Both c and cxx compiler support -rpath directly 49442265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 49452265a131Smrg fi 49462265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49472265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49482265a131Smrg ;; 4949444c061aSmrg 49502265a131Smrg solaris*) 49512265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 49522265a131Smrg if test "$GCC" = yes; then 49532265a131Smrg wlarc='${wl}' 49542265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 49552265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49562265a131Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49572265a131Smrg else 49582265a131Smrg case `$CC -V 2>&1` in 49592265a131Smrg *"Compilers 5.0"*) 49602265a131Smrg wlarc='' 49612265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 49622265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49632265a131Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 49642265a131Smrg ;; 49652265a131Smrg *) 49662265a131Smrg wlarc='${wl}' 49672265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 49682265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49692265a131Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49702265a131Smrg ;; 49712265a131Smrg esac 49722265a131Smrg fi 49732265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 49742265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49752265a131Smrg case $host_os in 49762265a131Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 49772265a131Smrg *) 49782265a131Smrg # The compiler driver will combine and reorder linker options, 49792265a131Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 49802265a131Smrg # but is careful enough not to reorder. 49812265a131Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 49822265a131Smrg if test "$GCC" = yes; then 49832265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 49842265a131Smrg else 49852265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 49862265a131Smrg fi 49872265a131Smrg ;; 49882265a131Smrg esac 49892265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 49902265a131Smrg ;; 4991444c061aSmrg 49922265a131Smrg sunos4*) 49932265a131Smrg if test "x$host_vendor" = xsequent; then 49942265a131Smrg # Use $CC to link under sequent, because it throws in some extra .o 49952265a131Smrg # files that make .init and .fini sections work. 49962265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 49972265a131Smrg else 49982265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 49992265a131Smrg fi 50002265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50012265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50022265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50032265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50042265a131Smrg ;; 5005444c061aSmrg 50062265a131Smrg sysv4) 50072265a131Smrg case $host_vendor in 50082265a131Smrg sni) 50092265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50102265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 50112265a131Smrg ;; 50122265a131Smrg siemens) 50132265a131Smrg ## LD is ld it makes a PLAMLIB 50142265a131Smrg ## CC just makes a GrossModule. 50152265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 50162265a131Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 50172265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 50182265a131Smrg ;; 50192265a131Smrg motorola) 50202265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50212265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 50222265a131Smrg ;; 50232265a131Smrg esac 50242265a131Smrg runpath_var='LD_RUN_PATH' 50252265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50262265a131Smrg ;; 5027444c061aSmrg 50282265a131Smrg sysv4.3*) 50292265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50302265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50312265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 50322265a131Smrg ;; 5033444c061aSmrg 50342265a131Smrg sysv4*MP*) 50352265a131Smrg if test -d /usr/nec; then 50362265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50372265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50382265a131Smrg runpath_var=LD_RUN_PATH 50392265a131Smrg hardcode_runpath_var=yes 50402265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 50412265a131Smrg fi 50422265a131Smrg ;; 5043444c061aSmrg 50442265a131Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 50452265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50462265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50472265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50482265a131Smrg runpath_var='LD_RUN_PATH' 5049444c061aSmrg 50502265a131Smrg if test "$GCC" = yes; then 50512265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50522265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50532265a131Smrg else 50542265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50552265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50562265a131Smrg fi 50572265a131Smrg ;; 5058444c061aSmrg 50592265a131Smrg sysv5* | sco3.2v5* | sco5v6*) 50602265a131Smrg # Note: We can NOT use -z defs as we might desire, because we do not 50612265a131Smrg # link with -lc, and that would cause any symbols used from libc to 50622265a131Smrg # always be unresolved, which means just about no library would 50632265a131Smrg # ever link correctly. If we're not using GNU ld we use -z text 50642265a131Smrg # though, which does catch some bad symbols but isn't as heavy-handed 50652265a131Smrg # as -z defs. 50662265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50672265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 50682265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50692265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50702265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 50712265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50722265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50732265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 50742265a131Smrg runpath_var='LD_RUN_PATH' 5075444c061aSmrg 50762265a131Smrg if test "$GCC" = yes; then 50772265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50782265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50792265a131Smrg else 50802265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50812265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50822265a131Smrg fi 50832265a131Smrg ;; 5084444c061aSmrg 50852265a131Smrg uts4*) 50862265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50872265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50882265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50892265a131Smrg ;; 5090444c061aSmrg 50912265a131Smrg *) 50922265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50932265a131Smrg ;; 50942265a131Smrg esac 5095444c061aSmrg 50962265a131Smrg if test x$host_vendor = xsni; then 50972265a131Smrg case $host in 50982265a131Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 50992265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 51002265a131Smrg ;; 51012265a131Smrg esac 51022265a131Smrg fi 5103444c061aSmrg fi 51042265a131Smrg]) 51052265a131SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 51062265a131Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5107444c061aSmrg 51082265a131Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5109444c061aSmrg 51102265a131Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 51112265a131Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 51122265a131Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 51132265a131Smrg [The commands to extract the exported symbol list from a shared archive]) 5114444c061aSmrg 51152265a131Smrg# 51162265a131Smrg# Do we need to explicitly link libc? 51172265a131Smrg# 51182265a131Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 51192265a131Smrgx|xyes) 51202265a131Smrg # Assume -lc should be added 51212265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5122444c061aSmrg 51232265a131Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 51242265a131Smrg case $_LT_TAGVAR(archive_cmds, $1) in 51252265a131Smrg *'~'*) 51262265a131Smrg # FIXME: we may have to deal with multi-command sequences. 51272265a131Smrg ;; 51282265a131Smrg '$CC '*) 51292265a131Smrg # Test whether the compiler implicitly links with -lc since on some 51302265a131Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 51312265a131Smrg # to ld, don't add -lc before -lgcc. 51322265a131Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 51332265a131Smrg $RM conftest* 51342265a131Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5135444c061aSmrg 51362265a131Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 51372265a131Smrg soname=conftest 51382265a131Smrg lib=conftest 51392265a131Smrg libobjs=conftest.$ac_objext 51402265a131Smrg deplibs= 51412265a131Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 51422265a131Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 51432265a131Smrg compiler_flags=-v 51442265a131Smrg linker_flags=-v 51452265a131Smrg verstring= 51462265a131Smrg output_objdir=. 51472265a131Smrg libname=conftest 51482265a131Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 51492265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 51502265a131Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 51512265a131Smrg then 51522265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 51532265a131Smrg else 51542265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51552265a131Smrg fi 51562265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 51572265a131Smrg else 51582265a131Smrg cat conftest.err 1>&5 51592265a131Smrg fi 51602265a131Smrg $RM conftest* 51612265a131Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 51622265a131Smrg ;; 51632265a131Smrg esac 51642265a131Smrg fi 51652265a131Smrg ;; 51662265a131Smrgesac 5167444c061aSmrg 51682265a131Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 51692265a131Smrg [Whether or not to add -lc for building shared libraries]) 51702265a131Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 51712265a131Smrg [enable_shared_with_static_runtimes], [0], 51722265a131Smrg [Whether or not to disallow shared libs when runtime libs are static]) 51732265a131Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 51742265a131Smrg [Compiler flag to allow reflexive dlopens]) 51752265a131Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 51762265a131Smrg [Compiler flag to generate shared objects directly from archives]) 51772265a131Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 51782265a131Smrg [Whether the compiler copes with passing no objects directly]) 51792265a131Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 51802265a131Smrg [Create an old-style archive from a shared archive]) 51812265a131Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 51822265a131Smrg [Create a temporary old-style archive to link instead of a shared archive]) 51832265a131Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 51842265a131Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 51852265a131Smrg_LT_TAGDECL([], [module_cmds], [2], 51862265a131Smrg [Commands used to build a loadable module if different from building 51872265a131Smrg a shared archive.]) 51882265a131Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 51892265a131Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 51902265a131Smrg [Whether we are building with GNU ld or not]) 51912265a131Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 51922265a131Smrg [Flag that allows shared libraries with undefined symbols to be built]) 51932265a131Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 51942265a131Smrg [Flag that enforces no undefined symbols]) 51952265a131Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 51962265a131Smrg [Flag to hardcode $libdir into a binary during linking. 51972265a131Smrg This must work even if $libdir does not exist]) 51982265a131Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 51992265a131Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 52002265a131Smrg during linking. This must work even if $libdir does not exist]]) 52012265a131Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 52022265a131Smrg [Whether we need a single "-rpath" flag with a separated argument]) 52032265a131Smrg_LT_TAGDECL([], [hardcode_direct], [0], 52042265a131Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52052265a131Smrg DIR into the resulting binary]) 52062265a131Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 52072265a131Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52082265a131Smrg DIR into the resulting binary and the resulting library dependency is 52092265a131Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 52102265a131Smrg library is relocated]) 52112265a131Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 52122265a131Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 52132265a131Smrg into the resulting binary]) 52142265a131Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 52152265a131Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 52162265a131Smrg into the resulting binary]) 52172265a131Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 52182265a131Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 52192265a131Smrg into the library and all subsequent libraries and executables linked 52202265a131Smrg against it]) 52212265a131Smrg_LT_TAGDECL([], [inherit_rpath], [0], 52222265a131Smrg [Set to yes if linker adds runtime paths of dependent libraries 52232265a131Smrg to runtime path list]) 52242265a131Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 52252265a131Smrg [Whether libtool must link a program against all its dependency libraries]) 52262265a131Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 52272265a131Smrg [Fix the shell variable $srcfile for the compiler]) 52282265a131Smrg_LT_TAGDECL([], [always_export_symbols], [0], 52292265a131Smrg [Set to "yes" if exported symbols are required]) 52302265a131Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 52312265a131Smrg [The commands to list exported symbols]) 52322265a131Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 52332265a131Smrg [Symbols that should not be listed in the preloaded symbols]) 52342265a131Smrg_LT_TAGDECL([], [include_expsyms], [1], 52352265a131Smrg [Symbols that must always be exported]) 52362265a131Smrg_LT_TAGDECL([], [prelink_cmds], [2], 52372265a131Smrg [Commands necessary for linking programs (against libraries) with templates]) 52382265a131Smrg_LT_TAGDECL([], [file_list_spec], [1], 52392265a131Smrg [Specify filename containing input files]) 52402265a131Smrgdnl FIXME: Not yet implemented 52412265a131Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 52422265a131Smrgdnl [Compiler flag to generate thread safe objects]) 52432265a131Smrg])# _LT_LINKER_SHLIBS 52442265a131Smrg 52452265a131Smrg 52462265a131Smrg# _LT_LANG_C_CONFIG([TAG]) 52472265a131Smrg# ------------------------ 52482265a131Smrg# Ensure that the configuration variables for a C compiler are suitably 52492265a131Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 52502265a131Smrg# the compiler configuration to `libtool'. 52512265a131Smrgm4_defun([_LT_LANG_C_CONFIG], 52522265a131Smrg[m4_require([_LT_DECL_EGREP])dnl 52532265a131Smrglt_save_CC="$CC" 52542265a131SmrgAC_LANG_PUSH(C) 5255444c061aSmrg 52562265a131Smrg# Source file extension for C test sources. 52572265a131Smrgac_ext=c 5258444c061aSmrg 52592265a131Smrg# Object file extension for compiled C test sources. 5260444c061aSmrgobjext=o 52612265a131Smrg_LT_TAGVAR(objext, $1)=$objext 5262444c061aSmrg 5263444c061aSmrg# Code to be used in simple compile tests 52642265a131Smrglt_simple_compile_test_code="int some_variable = 0;" 5265444c061aSmrg 5266444c061aSmrg# Code to be used in simple link tests 52672265a131Smrglt_simple_link_test_code='int main(){return(0);}' 5268444c061aSmrg 52692265a131Smrg_LT_TAG_COMPILER 52702265a131Smrg# Save the default compiler, since it gets overwritten when the other 52712265a131Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 52722265a131Smrgcompiler_DEFAULT=$CC 5273444c061aSmrg 5274444c061aSmrg# save warnings/boilerplate of simple test code 5275444c061aSmrg_LT_COMPILER_BOILERPLATE 5276444c061aSmrg_LT_LINKER_BOILERPLATE 5277444c061aSmrg 52782265a131Smrgif test -n "$compiler"; then 52792265a131Smrg _LT_COMPILER_NO_RTTI($1) 52802265a131Smrg _LT_COMPILER_PIC($1) 52812265a131Smrg _LT_COMPILER_C_O($1) 52822265a131Smrg _LT_COMPILER_FILE_LOCKS($1) 52832265a131Smrg _LT_LINKER_SHLIBS($1) 52842265a131Smrg _LT_SYS_DYNAMIC_LINKER($1) 52852265a131Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 52862265a131Smrg LT_SYS_DLOPEN_SELF 52872265a131Smrg _LT_CMD_STRIPLIB 52882265a131Smrg 52892265a131Smrg # Report which library types will actually be built 52902265a131Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 52912265a131Smrg AC_MSG_RESULT([$can_build_shared]) 52922265a131Smrg 52932265a131Smrg AC_MSG_CHECKING([whether to build shared libraries]) 52942265a131Smrg test "$can_build_shared" = "no" && enable_shared=no 52952265a131Smrg 52962265a131Smrg # On AIX, shared libraries and static libraries use the same namespace, and 52972265a131Smrg # are all built from PIC. 52982265a131Smrg case $host_os in 52992265a131Smrg aix3*) 53002265a131Smrg test "$enable_shared" = yes && enable_static=no 53012265a131Smrg if test -n "$RANLIB"; then 53022265a131Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 53032265a131Smrg postinstall_cmds='$RANLIB $lib' 53042265a131Smrg fi 53052265a131Smrg ;; 5306444c061aSmrg 53072265a131Smrg aix[[4-9]]*) 53082265a131Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 53092265a131Smrg test "$enable_shared" = yes && enable_static=no 53102265a131Smrg fi 53112265a131Smrg ;; 53122265a131Smrg esac 53132265a131Smrg AC_MSG_RESULT([$enable_shared]) 5314444c061aSmrg 53152265a131Smrg AC_MSG_CHECKING([whether to build static libraries]) 53162265a131Smrg # Make sure either enable_shared or enable_static is yes. 53172265a131Smrg test "$enable_shared" = yes || enable_static=yes 53182265a131Smrg AC_MSG_RESULT([$enable_static]) 5319444c061aSmrg 53202265a131Smrg _LT_CONFIG($1) 53212265a131Smrgfi 53222265a131SmrgAC_LANG_POP 53232265a131SmrgCC="$lt_save_CC" 53242265a131Smrg])# _LT_LANG_C_CONFIG 5325444c061aSmrg 5326444c061aSmrg 53272265a131Smrg# _LT_PROG_CXX 53282265a131Smrg# ------------ 53292265a131Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 53302265a131Smrg# compiler, we have our own version here. 53312265a131Smrgm4_defun([_LT_PROG_CXX], 53322265a131Smrg[ 53332265a131Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 53342265a131SmrgAC_PROG_CXX 53352265a131Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 53362265a131Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 53372265a131Smrg (test "X$CXX" != "Xg++"))) ; then 53382265a131Smrg AC_PROG_CXXCPP 53392265a131Smrgelse 53402265a131Smrg _lt_caught_CXX_error=yes 53412265a131Smrgfi 53422265a131Smrgpopdef([AC_MSG_ERROR]) 53432265a131Smrg])# _LT_PROG_CXX 5344444c061aSmrg 53452265a131Smrgdnl aclocal-1.4 backwards compatibility: 53462265a131Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 5347444c061aSmrg 5348444c061aSmrg 53492265a131Smrg# _LT_LANG_CXX_CONFIG([TAG]) 53502265a131Smrg# -------------------------- 53512265a131Smrg# Ensure that the configuration variables for a C++ compiler are suitably 53522265a131Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 53532265a131Smrg# the compiler configuration to `libtool'. 53542265a131Smrgm4_defun([_LT_LANG_CXX_CONFIG], 53552265a131Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 53562265a131Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 53572265a131Smrgm4_require([_LT_DECL_EGREP])dnl 53582265a131Smrg 53592265a131SmrgAC_LANG_PUSH(C++) 53602265a131Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 53612265a131Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 53622265a131Smrg_LT_TAGVAR(always_export_symbols, $1)=no 53632265a131Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 53642265a131Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 53652265a131Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 53662265a131Smrg_LT_TAGVAR(hardcode_direct, $1)=no 53672265a131Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 53682265a131Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53692265a131Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 53702265a131Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 53712265a131Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 53722265a131Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 53732265a131Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 53742265a131Smrg_LT_TAGVAR(inherit_rpath, $1)=no 53752265a131Smrg_LT_TAGVAR(module_cmds, $1)= 53762265a131Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 53772265a131Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 53782265a131Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 53792265a131Smrg_LT_TAGVAR(no_undefined_flag, $1)= 53802265a131Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 53812265a131Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5382444c061aSmrg 53832265a131Smrg# Source file extension for C++ test sources. 53842265a131Smrgac_ext=cpp 53852265a131Smrg 53862265a131Smrg# Object file extension for compiled C++ test sources. 5387444c061aSmrgobjext=o 53882265a131Smrg_LT_TAGVAR(objext, $1)=$objext 53892265a131Smrg 53902265a131Smrg# No sense in running all these tests if we already determined that 53912265a131Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 53922265a131Smrg# are currently assumed to apply to all compilers on this platform, 53932265a131Smrg# and will be corrupted by setting them based on a non-working compiler. 53942265a131Smrgif test "$_lt_caught_CXX_error" != yes; then 53952265a131Smrg # Code to be used in simple compile tests 53962265a131Smrg lt_simple_compile_test_code="int some_variable = 0;" 53972265a131Smrg 53982265a131Smrg # Code to be used in simple link tests 53992265a131Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 54002265a131Smrg 54012265a131Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 54022265a131Smrg _LT_TAG_COMPILER 54032265a131Smrg 54042265a131Smrg # save warnings/boilerplate of simple test code 54052265a131Smrg _LT_COMPILER_BOILERPLATE 54062265a131Smrg _LT_LINKER_BOILERPLATE 54072265a131Smrg 54082265a131Smrg # Allow CC to be a program name with arguments. 54092265a131Smrg lt_save_CC=$CC 54102265a131Smrg lt_save_LD=$LD 54112265a131Smrg lt_save_GCC=$GCC 54122265a131Smrg GCC=$GXX 54132265a131Smrg lt_save_with_gnu_ld=$with_gnu_ld 54142265a131Smrg lt_save_path_LD=$lt_cv_path_LD 54152265a131Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 54162265a131Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 54172265a131Smrg else 54182265a131Smrg $as_unset lt_cv_prog_gnu_ld 54192265a131Smrg fi 54202265a131Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 54212265a131Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 54222265a131Smrg else 54232265a131Smrg $as_unset lt_cv_path_LD 54242265a131Smrg fi 54252265a131Smrg test -z "${LDCXX+set}" || LD=$LDCXX 54262265a131Smrg CC=${CXX-"c++"} 54272265a131Smrg compiler=$CC 54282265a131Smrg _LT_TAGVAR(compiler, $1)=$CC 54292265a131Smrg _LT_CC_BASENAME([$compiler]) 5430444c061aSmrg 54312265a131Smrg if test -n "$compiler"; then 54322265a131Smrg # We don't want -fno-exception when compiling C++ code, so set the 54332265a131Smrg # no_builtin_flag separately 54342265a131Smrg if test "$GXX" = yes; then 54352265a131Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 54362265a131Smrg else 54372265a131Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 54382265a131Smrg fi 5439444c061aSmrg 54402265a131Smrg if test "$GXX" = yes; then 54412265a131Smrg # Set up default GNU C++ configuration 5442444c061aSmrg 54432265a131Smrg LT_PATH_LD 5444444c061aSmrg 54452265a131Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 54462265a131Smrg # archiving commands below assume that GNU ld is being used. 54472265a131Smrg if test "$with_gnu_ld" = yes; then 54482265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 54492265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5450444c061aSmrg 54512265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54522265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5453444c061aSmrg 54542265a131Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 54552265a131Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 54562265a131Smrg # investigate it a little bit more. (MM) 54572265a131Smrg wlarc='${wl}' 5458444c061aSmrg 54592265a131Smrg # ancient GNU ld didn't support --whole-archive et. al. 54602265a131Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 54612265a131Smrg $GREP 'no-whole-archive' > /dev/null; then 54622265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 54632265a131Smrg else 54642265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 54652265a131Smrg fi 54662265a131Smrg else 54672265a131Smrg with_gnu_ld=no 54682265a131Smrg wlarc= 54692265a131Smrg 54702265a131Smrg # A generic and very simple default shared library creation 54712265a131Smrg # command for GNU C++ for the case where it uses the native 54722265a131Smrg # linker, instead of GNU ld. If possible, this setting should 54732265a131Smrg # overridden to take advantage of the native linker features on 54742265a131Smrg # the platform it is being used on. 54752265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 54762265a131Smrg fi 5477444c061aSmrg 54782265a131Smrg # Commands to make compiler produce verbose output that lists 54792265a131Smrg # what "hidden" libraries, object files and flags are used when 54802265a131Smrg # linking a shared library. 54812265a131Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5482444c061aSmrg 54832265a131Smrg else 54842265a131Smrg GXX=no 54852265a131Smrg with_gnu_ld=no 54862265a131Smrg wlarc= 54872265a131Smrg fi 5488444c061aSmrg 54892265a131Smrg # PORTME: fill in a description of your system's C++ link characteristics 54902265a131Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 54912265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 54922265a131Smrg case $host_os in 54932265a131Smrg aix3*) 54942265a131Smrg # FIXME: insert proper C++ library support 54952265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54962265a131Smrg ;; 54972265a131Smrg aix[[4-9]]*) 54982265a131Smrg if test "$host_cpu" = ia64; then 54992265a131Smrg # On IA64, the linker does run time linking by default, so we don't 55002265a131Smrg # have to do anything special. 55012265a131Smrg aix_use_runtimelinking=no 55022265a131Smrg exp_sym_flag='-Bexport' 55032265a131Smrg no_entry_flag="" 55042265a131Smrg else 55052265a131Smrg aix_use_runtimelinking=no 55062265a131Smrg 55072265a131Smrg # Test if we are trying to use run time linking or normal 55082265a131Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 55092265a131Smrg # need to do runtime linking. 55102265a131Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 55112265a131Smrg for ld_flag in $LDFLAGS; do 55122265a131Smrg case $ld_flag in 55132265a131Smrg *-brtl*) 55142265a131Smrg aix_use_runtimelinking=yes 55152265a131Smrg break 55162265a131Smrg ;; 55172265a131Smrg esac 55182265a131Smrg done 55192265a131Smrg ;; 55202265a131Smrg esac 5521444c061aSmrg 55222265a131Smrg exp_sym_flag='-bexport' 55232265a131Smrg no_entry_flag='-bnoentry' 55242265a131Smrg fi 5525444c061aSmrg 55262265a131Smrg # When large executables or shared objects are built, AIX ld can 55272265a131Smrg # have problems creating the table of contents. If linking a library 55282265a131Smrg # or program results in "error TOC overflow" add -mminimal-toc to 55292265a131Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 55302265a131Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 55312265a131Smrg 55322265a131Smrg _LT_TAGVAR(archive_cmds, $1)='' 55332265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55342265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 55352265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55362265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55372265a131Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 55382265a131Smrg 55392265a131Smrg if test "$GXX" = yes; then 55402265a131Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 55412265a131Smrg # We only want to do this on AIX 4.2 and lower, the check 55422265a131Smrg # below for broken collect2 doesn't work under 4.3+ 55432265a131Smrg collect2name=`${CC} -print-prog-name=collect2` 55442265a131Smrg if test -f "$collect2name" && 55452265a131Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 55462265a131Smrg then 55472265a131Smrg # We have reworked collect2 55482265a131Smrg : 55492265a131Smrg else 55502265a131Smrg # We have old collect2 55512265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55522265a131Smrg # It fails to find uninstalled libraries when the uninstalled 55532265a131Smrg # path is not listed in the libpath. Setting hardcode_minus_L 55542265a131Smrg # to unsupported forces relinking 55552265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55562265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55572265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55582265a131Smrg fi 55592265a131Smrg esac 55602265a131Smrg shared_flag='-shared' 55612265a131Smrg if test "$aix_use_runtimelinking" = yes; then 55622265a131Smrg shared_flag="$shared_flag "'${wl}-G' 55632265a131Smrg fi 55642265a131Smrg else 55652265a131Smrg # not using gcc 55662265a131Smrg if test "$host_cpu" = ia64; then 55672265a131Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55682265a131Smrg # chokes on -Wl,-G. The following line is correct: 55692265a131Smrg shared_flag='-G' 55702265a131Smrg else 55712265a131Smrg if test "$aix_use_runtimelinking" = yes; then 55722265a131Smrg shared_flag='${wl}-G' 55732265a131Smrg else 55742265a131Smrg shared_flag='${wl}-bM:SRE' 55752265a131Smrg fi 55762265a131Smrg fi 55772265a131Smrg fi 5578444c061aSmrg 55792265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 55802265a131Smrg # It seems that -bexpall does not export symbols beginning with 55812265a131Smrg # underscore (_), so it is better to generate a list of symbols to 55822265a131Smrg # export. 55832265a131Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55842265a131Smrg if test "$aix_use_runtimelinking" = yes; then 55852265a131Smrg # Warning - without using the other runtime loading flags (-brtl), 55862265a131Smrg # -berok will link without error, but may produce a broken library. 55872265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55882265a131Smrg # Determine the default libpath from the value encoded in an empty 55892265a131Smrg # executable. 55902265a131Smrg _LT_SYS_MODULE_PATH_AIX 55912265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 55922265a131Smrg 55932265a131Smrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 55942265a131Smrg else 55952265a131Smrg if test "$host_cpu" = ia64; then 55962265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 55972265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55982265a131Smrg _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" 55992265a131Smrg else 56002265a131Smrg # Determine the default libpath from the value encoded in an 56012265a131Smrg # empty executable. 56022265a131Smrg _LT_SYS_MODULE_PATH_AIX 56032265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 56042265a131Smrg # Warning - without using the other run time loading flags, 56052265a131Smrg # -berok will link without error, but may produce a broken library. 56062265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 56072265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 56082265a131Smrg # Exported symbols can be pulled into shared objects from archives 56092265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 56102265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56112265a131Smrg # This is similar to how AIX traditionally builds its shared 56122265a131Smrg # libraries. 56132265a131Smrg _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' 56142265a131Smrg fi 56152265a131Smrg fi 56162265a131Smrg ;; 5617444c061aSmrg 56182265a131Smrg beos*) 56192265a131Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 56202265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56212265a131Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 56222265a131Smrg # support --undefined. This deserves some investigation. FIXME 56232265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 56242265a131Smrg else 56252265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56262265a131Smrg fi 56272265a131Smrg ;; 5628444c061aSmrg 56292265a131Smrg chorus*) 56302265a131Smrg case $cc_basename in 56312265a131Smrg *) 56322265a131Smrg # FIXME: insert proper C++ library support 56332265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56342265a131Smrg ;; 56352265a131Smrg esac 56362265a131Smrg ;; 5637444c061aSmrg 56382265a131Smrg cygwin* | mingw* | pw32* | cegcc*) 56392265a131Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 56402265a131Smrg # as there is no search path for DLLs. 56412265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56422265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56432265a131Smrg _LT_TAGVAR(always_export_symbols, $1)=no 56442265a131Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56452265a131Smrg 56462265a131Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 56472265a131Smrg _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' 56482265a131Smrg # If the export-symbols file already is a .def file (1st line 56492265a131Smrg # is EXPORTS), use it as is; otherwise, prepend... 56502265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 56512265a131Smrg cp $export_symbols $output_objdir/$soname.def; 56522265a131Smrg else 56532265a131Smrg echo EXPORTS > $output_objdir/$soname.def; 56542265a131Smrg cat $export_symbols >> $output_objdir/$soname.def; 56552265a131Smrg fi~ 56562265a131Smrg $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' 56572265a131Smrg else 56582265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56592265a131Smrg fi 56602265a131Smrg ;; 56612265a131Smrg darwin* | rhapsody*) 56622265a131Smrg _LT_DARWIN_LINKER_FEATURES($1) 56632265a131Smrg ;; 5664444c061aSmrg 56652265a131Smrg dgux*) 56662265a131Smrg case $cc_basename in 56672265a131Smrg ec++*) 56682265a131Smrg # FIXME: insert proper C++ library support 56692265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56702265a131Smrg ;; 56712265a131Smrg ghcx*) 56722265a131Smrg # Green Hills C++ Compiler 56732265a131Smrg # FIXME: insert proper C++ library support 56742265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56752265a131Smrg ;; 56762265a131Smrg *) 56772265a131Smrg # FIXME: insert proper C++ library support 56782265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56792265a131Smrg ;; 56802265a131Smrg esac 56812265a131Smrg ;; 5682444c061aSmrg 56832265a131Smrg freebsd[[12]]*) 56842265a131Smrg # C++ shared libraries reported to be fairly broken before 56852265a131Smrg # switch to ELF 56862265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 56872265a131Smrg ;; 5688444c061aSmrg 56892265a131Smrg freebsd-elf*) 56902265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 56912265a131Smrg ;; 5692444c061aSmrg 56932265a131Smrg freebsd* | dragonfly*) 56942265a131Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 56952265a131Smrg # conventions 56962265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 56972265a131Smrg ;; 5698444c061aSmrg 56992265a131Smrg gnu*) 57002265a131Smrg ;; 5701444c061aSmrg 57022265a131Smrg hpux9*) 57032265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57042265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57052265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57062265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57072265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57082265a131Smrg # but as the default 57092265a131Smrg # location of the library. 57102265a131Smrg 57112265a131Smrg case $cc_basename in 57122265a131Smrg CC*) 57132265a131Smrg # FIXME: insert proper C++ library support 57142265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57152265a131Smrg ;; 57162265a131Smrg aCC*) 57172265a131Smrg _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' 57182265a131Smrg # Commands to make compiler produce verbose output that lists 57192265a131Smrg # what "hidden" libraries, object files and flags are used when 57202265a131Smrg # linking a shared library. 57212265a131Smrg # 57222265a131Smrg # There doesn't appear to be a way to prevent this compiler from 57232265a131Smrg # explicitly linking system object files so we need to strip them 57242265a131Smrg # from the output so that they don't get included in the library 57252265a131Smrg # dependencies. 57262265a131Smrg 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; $ECHO "X$list" | $Xsed' 57272265a131Smrg ;; 57282265a131Smrg *) 57292265a131Smrg if test "$GXX" = yes; then 57302265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 57312265a131Smrg else 57322265a131Smrg # FIXME: insert proper C++ library support 57332265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57342265a131Smrg fi 57352265a131Smrg ;; 57362265a131Smrg esac 57372265a131Smrg ;; 5738444c061aSmrg 57392265a131Smrg hpux10*|hpux11*) 57402265a131Smrg if test $with_gnu_ld = no; then 57412265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57422265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57432265a131Smrg 57442265a131Smrg case $host_cpu in 57452265a131Smrg hppa*64*|ia64*) 57462265a131Smrg ;; 57472265a131Smrg *) 57482265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57492265a131Smrg ;; 57502265a131Smrg esac 57512265a131Smrg fi 57522265a131Smrg case $host_cpu in 57532265a131Smrg hppa*64*|ia64*) 57542265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57552265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57562265a131Smrg ;; 57572265a131Smrg *) 57582265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57592265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57602265a131Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57612265a131Smrg # but as the default 57622265a131Smrg # location of the library. 57632265a131Smrg ;; 57642265a131Smrg esac 5765444c061aSmrg 57662265a131Smrg case $cc_basename in 57672265a131Smrg CC*) 57682265a131Smrg # FIXME: insert proper C++ library support 57692265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57702265a131Smrg ;; 57712265a131Smrg aCC*) 57722265a131Smrg case $host_cpu in 57732265a131Smrg hppa*64*) 57742265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57752265a131Smrg ;; 57762265a131Smrg ia64*) 57772265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57782265a131Smrg ;; 57792265a131Smrg *) 57802265a131Smrg _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' 57812265a131Smrg ;; 57822265a131Smrg esac 57832265a131Smrg # Commands to make compiler produce verbose output that lists 57842265a131Smrg # what "hidden" libraries, object files and flags are used when 57852265a131Smrg # linking a shared library. 57862265a131Smrg # 57872265a131Smrg # There doesn't appear to be a way to prevent this compiler from 57882265a131Smrg # explicitly linking system object files so we need to strip them 57892265a131Smrg # from the output so that they don't get included in the library 57902265a131Smrg # dependencies. 57912265a131Smrg 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; $ECHO "X$list" | $Xsed' 57922265a131Smrg ;; 57932265a131Smrg *) 57942265a131Smrg if test "$GXX" = yes; then 57952265a131Smrg if test $with_gnu_ld = no; then 57962265a131Smrg case $host_cpu in 57972265a131Smrg hppa*64*) 57982265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57992265a131Smrg ;; 58002265a131Smrg ia64*) 58012265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 58022265a131Smrg ;; 58032265a131Smrg *) 58042265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 58052265a131Smrg ;; 58062265a131Smrg esac 58072265a131Smrg fi 58082265a131Smrg else 58092265a131Smrg # FIXME: insert proper C++ library support 58102265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58112265a131Smrg fi 58122265a131Smrg ;; 58132265a131Smrg esac 58142265a131Smrg ;; 5815444c061aSmrg 58162265a131Smrg interix[[3-9]]*) 58172265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=no 58182265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58192265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58202265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58212265a131Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58222265a131Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58232265a131Smrg # default) and relocated if they conflict, which is a slow very memory 58242265a131Smrg # consuming and fragmenting process. To avoid this, we pick a random, 58252265a131Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58262265a131Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58272265a131Smrg _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' 58282265a131Smrg _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' 58292265a131Smrg ;; 58302265a131Smrg irix5* | irix6*) 58312265a131Smrg case $cc_basename in 58322265a131Smrg CC*) 58332265a131Smrg # SGI C++ 58342265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 58352265a131Smrg 58362265a131Smrg # Archives containing C++ object files must be created using 58372265a131Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 58382265a131Smrg # necessary to make sure instantiated templates are included 58392265a131Smrg # in the archive. 58402265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 58412265a131Smrg ;; 58422265a131Smrg *) 58432265a131Smrg if test "$GXX" = yes; then 58442265a131Smrg if test "$with_gnu_ld" = no; then 58452265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 58462265a131Smrg else 58472265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 58482265a131Smrg fi 58492265a131Smrg fi 58502265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58512265a131Smrg ;; 58522265a131Smrg esac 58532265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58542265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58552265a131Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58562265a131Smrg ;; 5857444c061aSmrg 58582265a131Smrg linux* | k*bsd*-gnu) 58592265a131Smrg case $cc_basename in 58602265a131Smrg KCC*) 58612265a131Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5862444c061aSmrg 58632265a131Smrg # KCC will only create a shared library if the output file 58642265a131Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 58652265a131Smrg # to its proper name (with version) after linking. 58662265a131Smrg _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' 58672265a131Smrg _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' 58682265a131Smrg # Commands to make compiler produce verbose output that lists 58692265a131Smrg # what "hidden" libraries, object files and flags are used when 58702265a131Smrg # linking a shared library. 58712265a131Smrg # 58722265a131Smrg # There doesn't appear to be a way to prevent this compiler from 58732265a131Smrg # explicitly linking system object files so we need to strip them 58742265a131Smrg # from the output so that they don't get included in the library 58752265a131Smrg # dependencies. 58762265a131Smrg 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; $ECHO "X$list" | $Xsed' 58772265a131Smrg 58782265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58792265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58802265a131Smrg 58812265a131Smrg # Archives containing C++ object files must be created using 58822265a131Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 58832265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 58842265a131Smrg ;; 58852265a131Smrg icpc* | ecpc* ) 58862265a131Smrg # Intel C++ 58872265a131Smrg with_gnu_ld=yes 58882265a131Smrg # version 8.0 and above of icpc choke on multiply defined symbols 58892265a131Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 58902265a131Smrg # earlier do not add the objects themselves. 58912265a131Smrg case `$CC -V 2>&1` in 58922265a131Smrg *"Version 7."*) 58932265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 58942265a131Smrg _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' 58952265a131Smrg ;; 58962265a131Smrg *) # Version 8.0 or newer 58972265a131Smrg tmp_idyn= 58982265a131Smrg case $host_cpu in 58992265a131Smrg ia64*) tmp_idyn=' -i_dynamic';; 59002265a131Smrg esac 59012265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59022265a131Smrg _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' 59032265a131Smrg ;; 59042265a131Smrg esac 59052265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 59062265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59072265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59082265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 59092265a131Smrg ;; 59102265a131Smrg pgCC* | pgcpp*) 59112265a131Smrg # Portland Group C++ compiler 59122265a131Smrg case `$CC -V` in 59132265a131Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 59142265a131Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 59152265a131Smrg rm -rf $tpldir~ 59162265a131Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 59172265a131Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 59182265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 59192265a131Smrg rm -rf $tpldir~ 59202265a131Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 59212265a131Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 59222265a131Smrg $RANLIB $oldlib' 59232265a131Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 59242265a131Smrg rm -rf $tpldir~ 59252265a131Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59262265a131Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59272265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 59282265a131Smrg rm -rf $tpldir~ 59292265a131Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59302265a131Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 59312265a131Smrg ;; 59322265a131Smrg *) # Version 6 will use weak symbols 59332265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59342265a131Smrg _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' 59352265a131Smrg ;; 59362265a131Smrg esac 5937444c061aSmrg 59382265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 59392265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59402265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 59412265a131Smrg ;; 59422265a131Smrg cxx*) 59432265a131Smrg # Compaq C++ 59442265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59452265a131Smrg _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' 5946444c061aSmrg 59472265a131Smrg runpath_var=LD_RUN_PATH 59482265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59492265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5950444c061aSmrg 59512265a131Smrg # Commands to make compiler produce verbose output that lists 59522265a131Smrg # what "hidden" libraries, object files and flags are used when 59532265a131Smrg # linking a shared library. 59542265a131Smrg # 59552265a131Smrg # There doesn't appear to be a way to prevent this compiler from 59562265a131Smrg # explicitly linking system object files so we need to strip them 59572265a131Smrg # from the output so that they don't get included in the library 59582265a131Smrg # dependencies. 59592265a131Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 59602265a131Smrg ;; 59612265a131Smrg xl*) 59622265a131Smrg # IBM XL 8.0 on PPC, with GNU ld 59632265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59642265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59652265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59662265a131Smrg if test "x$supports_anon_versioning" = xyes; then 59672265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59682265a131Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59692265a131Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59702265a131Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59712265a131Smrg fi 59722265a131Smrg ;; 59732265a131Smrg *) 59742265a131Smrg case `$CC -V 2>&1 | sed 5q` in 59752265a131Smrg *Sun\ C*) 59762265a131Smrg # Sun C++ 5.9 59772265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 59782265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 59792265a131Smrg _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' 59802265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59812265a131Smrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 59822265a131Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59832265a131Smrg 59842265a131Smrg # Not sure whether something based on 59852265a131Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 59862265a131Smrg # would be better. 59872265a131Smrg output_verbose_link_cmd='echo' 59882265a131Smrg 59892265a131Smrg # Archives containing C++ object files must be created using 59902265a131Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 59912265a131Smrg # necessary to make sure instantiated templates are included 59922265a131Smrg # in the archive. 59932265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 59942265a131Smrg ;; 59952265a131Smrg esac 59962265a131Smrg ;; 59972265a131Smrg esac 59982265a131Smrg ;; 5999444c061aSmrg 60002265a131Smrg lynxos*) 60012265a131Smrg # FIXME: insert proper C++ library support 60022265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60032265a131Smrg ;; 6004444c061aSmrg 60052265a131Smrg m88k*) 60062265a131Smrg # FIXME: insert proper C++ library support 60072265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60082265a131Smrg ;; 6009444c061aSmrg 60102265a131Smrg mvs*) 60112265a131Smrg case $cc_basename in 60122265a131Smrg cxx*) 60132265a131Smrg # FIXME: insert proper C++ library support 60142265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60152265a131Smrg ;; 60162265a131Smrg *) 60172265a131Smrg # FIXME: insert proper C++ library support 60182265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60192265a131Smrg ;; 60202265a131Smrg esac 60212265a131Smrg ;; 6022444c061aSmrg 60232265a131Smrg netbsd*) 60242265a131Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60252265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 60262265a131Smrg wlarc= 60272265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 60282265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60292265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60302265a131Smrg fi 60312265a131Smrg # Workaround some broken pre-1.5 toolchains 60322265a131Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 60332265a131Smrg ;; 6034444c061aSmrg 60352265a131Smrg *nto* | *qnx*) 60362265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60372265a131Smrg ;; 6038444c061aSmrg 60392265a131Smrg openbsd2*) 60402265a131Smrg # C++ shared libraries are fairly broken 60412265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60422265a131Smrg ;; 6043444c061aSmrg 60442265a131Smrg openbsd*) 60452265a131Smrg if test -f /usr/libexec/ld.so; then 60462265a131Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60472265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60482265a131Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60492265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 60502265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60512265a131Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 60522265a131Smrg _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' 60532265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 60542265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 60552265a131Smrg fi 60562265a131Smrg output_verbose_link_cmd=echo 60572265a131Smrg else 60582265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60592265a131Smrg fi 60602265a131Smrg ;; 6061444c061aSmrg 60622265a131Smrg osf3* | osf4* | osf5*) 60632265a131Smrg case $cc_basename in 60642265a131Smrg KCC*) 60652265a131Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 60662265a131Smrg 60672265a131Smrg # KCC will only create a shared library if the output file 60682265a131Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 60692265a131Smrg # to its proper name (with version) after linking. 60702265a131Smrg _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' 60712265a131Smrg 60722265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60732265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 60742265a131Smrg 60752265a131Smrg # Archives containing C++ object files must be created using 60762265a131Smrg # the KAI C++ compiler. 60772265a131Smrg case $host in 60782265a131Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 60792265a131Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 60802265a131Smrg esac 60812265a131Smrg ;; 60822265a131Smrg RCC*) 60832265a131Smrg # Rational C++ 2.4.1 60842265a131Smrg # FIXME: insert proper C++ library support 60852265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60862265a131Smrg ;; 60872265a131Smrg cxx*) 60882265a131Smrg case $host in 60892265a131Smrg osf3*) 60902265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 60912265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 60922265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60932265a131Smrg ;; 60942265a131Smrg *) 60952265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 60962265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 60972265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 60982265a131Smrg echo "-hidden">> $lib.exp~ 60992265a131Smrg $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 61002265a131Smrg $RM $lib.exp' 61012265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 61022265a131Smrg ;; 61032265a131Smrg esac 6104444c061aSmrg 61052265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6106444c061aSmrg 61072265a131Smrg # Commands to make compiler produce verbose output that lists 61082265a131Smrg # what "hidden" libraries, object files and flags are used when 61092265a131Smrg # linking a shared library. 61102265a131Smrg # 61112265a131Smrg # There doesn't appear to be a way to prevent this compiler from 61122265a131Smrg # explicitly linking system object files so we need to strip them 61132265a131Smrg # from the output so that they don't get included in the library 61142265a131Smrg # dependencies. 61152265a131Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 61162265a131Smrg ;; 61172265a131Smrg *) 61182265a131Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 61192265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 61202265a131Smrg case $host in 61212265a131Smrg osf3*) 61222265a131Smrg _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 61232265a131Smrg ;; 61242265a131Smrg *) 61252265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 61262265a131Smrg ;; 61272265a131Smrg esac 61282265a131Smrg 61292265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 61302265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 61312265a131Smrg 61322265a131Smrg # Commands to make compiler produce verbose output that lists 61332265a131Smrg # what "hidden" libraries, object files and flags are used when 61342265a131Smrg # linking a shared library. 61352265a131Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 61362265a131Smrg 61372265a131Smrg else 61382265a131Smrg # FIXME: insert proper C++ library support 61392265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61402265a131Smrg fi 61412265a131Smrg ;; 61422265a131Smrg esac 61432265a131Smrg ;; 6144444c061aSmrg 61452265a131Smrg psos*) 61462265a131Smrg # FIXME: insert proper C++ library support 61472265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61482265a131Smrg ;; 6149444c061aSmrg 61502265a131Smrg sunos4*) 61512265a131Smrg case $cc_basename in 61522265a131Smrg CC*) 61532265a131Smrg # Sun C++ 4.x 61542265a131Smrg # FIXME: insert proper C++ library support 61552265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61562265a131Smrg ;; 61572265a131Smrg lcc*) 61582265a131Smrg # Lucid 61592265a131Smrg # FIXME: insert proper C++ library support 61602265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61612265a131Smrg ;; 61622265a131Smrg *) 61632265a131Smrg # FIXME: insert proper C++ library support 61642265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61652265a131Smrg ;; 61662265a131Smrg esac 61672265a131Smrg ;; 6168444c061aSmrg 61692265a131Smrg solaris*) 61702265a131Smrg case $cc_basename in 61712265a131Smrg CC*) 61722265a131Smrg # Sun C++ 4.2, 5.x and Centerline C++ 61732265a131Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 61742265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 61752265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 61762265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 61772265a131Smrg $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' 61782265a131Smrg 61792265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61802265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61812265a131Smrg case $host_os in 61822265a131Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 61832265a131Smrg *) 61842265a131Smrg # The compiler driver will combine and reorder linker options, 61852265a131Smrg # but understands `-z linker_flag'. 61862265a131Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 61872265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 61882265a131Smrg ;; 61892265a131Smrg esac 61902265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6191444c061aSmrg 61922265a131Smrg output_verbose_link_cmd='echo' 6193444c061aSmrg 61942265a131Smrg # Archives containing C++ object files must be created using 61952265a131Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 61962265a131Smrg # necessary to make sure instantiated templates are included 61972265a131Smrg # in the archive. 61982265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 61992265a131Smrg ;; 62002265a131Smrg gcx*) 62012265a131Smrg # Green Hills C++ Compiler 62022265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6203444c061aSmrg 62042265a131Smrg # The C++ compiler must be used to create the archive. 62052265a131Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 62062265a131Smrg ;; 62072265a131Smrg *) 62082265a131Smrg # GNU C++ compiler with Solaris linker 62092265a131Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 62102265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 62112265a131Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 62122265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62132265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62142265a131Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62152265a131Smrg 62162265a131Smrg # Commands to make compiler produce verbose output that lists 62172265a131Smrg # what "hidden" libraries, object files and flags are used when 62182265a131Smrg # linking a shared library. 62192265a131Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62202265a131Smrg else 62212265a131Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 62222265a131Smrg # platform. 62232265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62242265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62252265a131Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62262265a131Smrg 62272265a131Smrg # Commands to make compiler produce verbose output that lists 62282265a131Smrg # what "hidden" libraries, object files and flags are used when 62292265a131Smrg # linking a shared library. 62302265a131Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62312265a131Smrg fi 62322265a131Smrg 62332265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 62342265a131Smrg case $host_os in 62352265a131Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 62362265a131Smrg *) 62372265a131Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 62382265a131Smrg ;; 62392265a131Smrg esac 62402265a131Smrg fi 62412265a131Smrg ;; 62422265a131Smrg esac 62432265a131Smrg ;; 6244444c061aSmrg 62452265a131Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 62462265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62472265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62482265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62492265a131Smrg runpath_var='LD_RUN_PATH' 6250444c061aSmrg 62512265a131Smrg case $cc_basename in 62522265a131Smrg CC*) 62532265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62542265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62552265a131Smrg ;; 62562265a131Smrg *) 62572265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62582265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62592265a131Smrg ;; 62602265a131Smrg esac 62612265a131Smrg ;; 6262444c061aSmrg 62632265a131Smrg sysv5* | sco3.2v5* | sco5v6*) 62642265a131Smrg # Note: We can NOT use -z defs as we might desire, because we do not 62652265a131Smrg # link with -lc, and that would cause any symbols used from libc to 62662265a131Smrg # always be unresolved, which means just about no library would 62672265a131Smrg # ever link correctly. If we're not using GNU ld we use -z text 62682265a131Smrg # though, which does catch some bad symbols but isn't as heavy-handed 62692265a131Smrg # as -z defs. 62702265a131Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62712265a131Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 62722265a131Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62732265a131Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62742265a131Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 62752265a131Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 62762265a131Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62772265a131Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 62782265a131Smrg runpath_var='LD_RUN_PATH' 6279444c061aSmrg 62802265a131Smrg case $cc_basename in 62812265a131Smrg CC*) 62822265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62832265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62842265a131Smrg ;; 62852265a131Smrg *) 62862265a131Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62872265a131Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62882265a131Smrg ;; 62892265a131Smrg esac 62902265a131Smrg ;; 6291444c061aSmrg 62922265a131Smrg tandem*) 62932265a131Smrg case $cc_basename in 62942265a131Smrg NCC*) 62952265a131Smrg # NonStop-UX NCC 3.20 62962265a131Smrg # FIXME: insert proper C++ library support 62972265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62982265a131Smrg ;; 62992265a131Smrg *) 63002265a131Smrg # FIXME: insert proper C++ library support 63012265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63022265a131Smrg ;; 63032265a131Smrg esac 63042265a131Smrg ;; 6305444c061aSmrg 63062265a131Smrg vxworks*) 63072265a131Smrg # FIXME: insert proper C++ library support 63082265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63092265a131Smrg ;; 6310444c061aSmrg 63112265a131Smrg *) 63122265a131Smrg # FIXME: insert proper C++ library support 63132265a131Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63142265a131Smrg ;; 63152265a131Smrg esac 6316444c061aSmrg 63172265a131Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 63182265a131Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 63192265a131Smrg 63202265a131Smrg _LT_TAGVAR(GCC, $1)="$GXX" 63212265a131Smrg _LT_TAGVAR(LD, $1)="$LD" 63222265a131Smrg 63232265a131Smrg ## CAVEAT EMPTOR: 63242265a131Smrg ## There is no encapsulation within the following macros, do not change 63252265a131Smrg ## the running order or otherwise move them around unless you know exactly 63262265a131Smrg ## what you are doing... 63272265a131Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 63282265a131Smrg _LT_COMPILER_PIC($1) 63292265a131Smrg _LT_COMPILER_C_O($1) 63302265a131Smrg _LT_COMPILER_FILE_LOCKS($1) 63312265a131Smrg _LT_LINKER_SHLIBS($1) 63322265a131Smrg _LT_SYS_DYNAMIC_LINKER($1) 63332265a131Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 63342265a131Smrg 63352265a131Smrg _LT_CONFIG($1) 63362265a131Smrg fi # test -n "$compiler" 63372265a131Smrg 63382265a131Smrg CC=$lt_save_CC 63392265a131Smrg LDCXX=$LD 63402265a131Smrg LD=$lt_save_LD 63412265a131Smrg GCC=$lt_save_GCC 63422265a131Smrg with_gnu_ld=$lt_save_with_gnu_ld 63432265a131Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 63442265a131Smrg lt_cv_path_LD=$lt_save_path_LD 63452265a131Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 63462265a131Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 63472265a131Smrgfi # test "$_lt_caught_CXX_error" != yes 6348444c061aSmrg 63492265a131SmrgAC_LANG_POP 63502265a131Smrg])# _LT_LANG_CXX_CONFIG 6351444c061aSmrg 6352444c061aSmrg 63532265a131Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 63542265a131Smrg# --------------------------------- 63552265a131Smrg# Figure out "hidden" library dependencies from verbose 63562265a131Smrg# compiler output when linking a shared library. 63572265a131Smrg# Parse the compiler output and extract the necessary 63582265a131Smrg# objects, libraries and library flags. 63592265a131Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 63602265a131Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63612265a131Smrg# Dependencies to place before and after the object being linked: 63622265a131Smrg_LT_TAGVAR(predep_objects, $1)= 63632265a131Smrg_LT_TAGVAR(postdep_objects, $1)= 63642265a131Smrg_LT_TAGVAR(predeps, $1)= 63652265a131Smrg_LT_TAGVAR(postdeps, $1)= 63662265a131Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6367444c061aSmrg 63682265a131Smrgdnl we can't use the lt_simple_compile_test_code here, 63692265a131Smrgdnl because it contains code intended for an executable, 63702265a131Smrgdnl not a library. It's possible we should let each 63712265a131Smrgdnl tag define a new lt_????_link_test_code variable, 63722265a131Smrgdnl but it's only used here... 63732265a131Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 63742265a131Smrgint a; 63752265a131Smrgvoid foo (void) { a = 0; } 63762265a131Smrg_LT_EOF 63772265a131Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 63782265a131Smrgclass Foo 63792265a131Smrg{ 63802265a131Smrgpublic: 63812265a131Smrg Foo (void) { a = 0; } 63822265a131Smrgprivate: 63832265a131Smrg int a; 63842265a131Smrg}; 63852265a131Smrg_LT_EOF 63862265a131Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 63872265a131Smrg subroutine foo 63882265a131Smrg implicit none 63892265a131Smrg integer*4 a 63902265a131Smrg a=0 63912265a131Smrg return 63922265a131Smrg end 63932265a131Smrg_LT_EOF 63942265a131Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 63952265a131Smrg subroutine foo 63962265a131Smrg implicit none 63972265a131Smrg integer a 63982265a131Smrg a=0 63992265a131Smrg return 64002265a131Smrg end 64012265a131Smrg_LT_EOF 64022265a131Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 64032265a131Smrgpublic class foo { 64042265a131Smrg private int a; 64052265a131Smrg public void bar (void) { 64062265a131Smrg a = 0; 64072265a131Smrg } 64082265a131Smrg}; 64092265a131Smrg_LT_EOF 64102265a131Smrg]) 64112265a131Smrgdnl Parse the compiler output and extract the necessary 64122265a131Smrgdnl objects, libraries and library flags. 64132265a131Smrgif AC_TRY_EVAL(ac_compile); then 64142265a131Smrg # Parse the compiler output and extract the necessary 64152265a131Smrg # objects, libraries and library flags. 6416444c061aSmrg 64172265a131Smrg # Sentinel used to keep track of whether or not we are before 64182265a131Smrg # the conftest object file. 64192265a131Smrg pre_test_object_deps_done=no 6420444c061aSmrg 64212265a131Smrg for p in `eval "$output_verbose_link_cmd"`; do 64222265a131Smrg case $p in 6423444c061aSmrg 64242265a131Smrg -L* | -R* | -l*) 64252265a131Smrg # Some compilers place space between "-{L,R}" and the path. 64262265a131Smrg # Remove the space. 64272265a131Smrg if test $p = "-L" || 64282265a131Smrg test $p = "-R"; then 64292265a131Smrg prev=$p 64302265a131Smrg continue 64312265a131Smrg else 64322265a131Smrg prev= 64332265a131Smrg fi 6434444c061aSmrg 64352265a131Smrg if test "$pre_test_object_deps_done" = no; then 64362265a131Smrg case $p in 64372265a131Smrg -L* | -R*) 64382265a131Smrg # Internal compiler library paths should come after those 64392265a131Smrg # provided the user. The postdeps already come after the 64402265a131Smrg # user supplied libs so there is no need to process them. 64412265a131Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 64422265a131Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 64432265a131Smrg else 64442265a131Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 64452265a131Smrg fi 64462265a131Smrg ;; 64472265a131Smrg # The "-l" case would never come before the object being 64482265a131Smrg # linked, so don't bother handling this case. 64492265a131Smrg esac 64502265a131Smrg else 64512265a131Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 64522265a131Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 64532265a131Smrg else 64542265a131Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 64552265a131Smrg fi 64562265a131Smrg fi 64572265a131Smrg ;; 6458444c061aSmrg 64592265a131Smrg *.$objext) 64602265a131Smrg # This assumes that the test object file only shows up 64612265a131Smrg # once in the compiler output. 64622265a131Smrg if test "$p" = "conftest.$objext"; then 64632265a131Smrg pre_test_object_deps_done=yes 64642265a131Smrg continue 64652265a131Smrg fi 6466444c061aSmrg 64672265a131Smrg if test "$pre_test_object_deps_done" = no; then 64682265a131Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 64692265a131Smrg _LT_TAGVAR(predep_objects, $1)="$p" 64702265a131Smrg else 64712265a131Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 64722265a131Smrg fi 64732265a131Smrg else 64742265a131Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 64752265a131Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 64762265a131Smrg else 64772265a131Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 64782265a131Smrg fi 64792265a131Smrg fi 64802265a131Smrg ;; 6481444c061aSmrg 64822265a131Smrg *) ;; # Ignore the rest. 6483444c061aSmrg 64842265a131Smrg esac 64852265a131Smrg done 6486444c061aSmrg 64872265a131Smrg # Clean up. 64882265a131Smrg rm -f a.out a.exe 64892265a131Smrgelse 64902265a131Smrg echo "libtool.m4: error: problem compiling $1 test program" 64912265a131Smrgfi 6492444c061aSmrg 64932265a131Smrg$RM -f confest.$objext 6494444c061aSmrg 64952265a131Smrg# PORTME: override above test on systems where it is broken 64962265a131Smrgm4_if([$1], [CXX], 64972265a131Smrg[case $host_os in 64982265a131Smrginterix[[3-9]]*) 64992265a131Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 65002265a131Smrg # hack all around it, let's just trust "g++" to DTRT. 65012265a131Smrg _LT_TAGVAR(predep_objects,$1)= 65022265a131Smrg _LT_TAGVAR(postdep_objects,$1)= 65032265a131Smrg _LT_TAGVAR(postdeps,$1)= 65042265a131Smrg ;; 6505444c061aSmrg 65062265a131Smrglinux*) 65072265a131Smrg case `$CC -V 2>&1 | sed 5q` in 65082265a131Smrg *Sun\ C*) 65092265a131Smrg # Sun C++ 5.9 65102265a131Smrg 65112265a131Smrg # The more standards-conforming stlport4 library is 65122265a131Smrg # incompatible with the Cstd library. Avoid specifying 65132265a131Smrg # it if it's in CXXFLAGS. Ignore libCrun as 65142265a131Smrg # -library=stlport4 depends on it. 65152265a131Smrg case " $CXX $CXXFLAGS " in 65162265a131Smrg *" -library=stlport4 "*) 65172265a131Smrg solaris_use_stlport4=yes 65182265a131Smrg ;; 65192265a131Smrg esac 6520444c061aSmrg 65212265a131Smrg if test "$solaris_use_stlport4" != yes; then 65222265a131Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65232265a131Smrg fi 65242265a131Smrg ;; 65252265a131Smrg esac 65262265a131Smrg ;; 6527444c061aSmrg 65282265a131Smrgsolaris*) 65292265a131Smrg case $cc_basename in 65302265a131Smrg CC*) 65312265a131Smrg # The more standards-conforming stlport4 library is 65322265a131Smrg # incompatible with the Cstd library. Avoid specifying 65332265a131Smrg # it if it's in CXXFLAGS. Ignore libCrun as 65342265a131Smrg # -library=stlport4 depends on it. 65352265a131Smrg case " $CXX $CXXFLAGS " in 65362265a131Smrg *" -library=stlport4 "*) 65372265a131Smrg solaris_use_stlport4=yes 65382265a131Smrg ;; 65392265a131Smrg esac 6540444c061aSmrg 65412265a131Smrg # Adding this requires a known-good setup of shared libraries for 65422265a131Smrg # Sun compiler versions before 5.6, else PIC objects from an old 65432265a131Smrg # archive will be linked into the output, leading to subtle bugs. 65442265a131Smrg if test "$solaris_use_stlport4" != yes; then 65452265a131Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65462265a131Smrg fi 65472265a131Smrg ;; 65482265a131Smrg esac 65492265a131Smrg ;; 65502265a131Smrgesac 65512265a131Smrg]) 6552444c061aSmrg 65532265a131Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 65542265a131Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 65552265a131Smrgesac 65562265a131Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 65572265a131Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 65582265a131Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 65592265a131Smrgfi 65602265a131Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 65612265a131Smrg [The directories searched by this compiler when creating a shared library]) 65622265a131Smrg_LT_TAGDECL([], [predep_objects], [1], 65632265a131Smrg [Dependencies to place before and after the objects being linked to 65642265a131Smrg create a shared library]) 65652265a131Smrg_LT_TAGDECL([], [postdep_objects], [1]) 65662265a131Smrg_LT_TAGDECL([], [predeps], [1]) 65672265a131Smrg_LT_TAGDECL([], [postdeps], [1]) 65682265a131Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 65692265a131Smrg [The library search path used internally by the compiler when linking 65702265a131Smrg a shared library]) 65712265a131Smrg])# _LT_SYS_HIDDEN_LIBDEPS 65722265a131Smrg 65732265a131Smrg 65742265a131Smrg# _LT_PROG_F77 65752265a131Smrg# ------------ 65762265a131Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 65772265a131Smrg# if there is no fortran compiler, we have our own version here. 65782265a131Smrgm4_defun([_LT_PROG_F77], 65792265a131Smrg[ 65802265a131Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 65812265a131SmrgAC_PROG_F77 65822265a131Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 65832265a131Smrg _lt_disable_F77=yes 65842265a131Smrgfi 65852265a131Smrgpopdef([AC_MSG_ERROR]) 65862265a131Smrg])# _LT_PROG_F77 6587444c061aSmrg 65882265a131Smrgdnl aclocal-1.4 backwards compatibility: 65892265a131Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 6590444c061aSmrg 6591444c061aSmrg 65922265a131Smrg# _LT_LANG_F77_CONFIG([TAG]) 65932265a131Smrg# -------------------------- 65942265a131Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 65952265a131Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 65962265a131Smrg# to write the compiler configuration to `libtool'. 65972265a131Smrgm4_defun([_LT_LANG_F77_CONFIG], 65982265a131Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 65992265a131SmrgAC_LANG_PUSH(Fortran 77) 6600444c061aSmrg 66012265a131Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66022265a131Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 66032265a131Smrg_LT_TAGVAR(always_export_symbols, $1)=no 66042265a131Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 66052265a131Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 66062265a131Smrg_LT_TAGVAR(hardcode_direct, $1)=no 66072265a131Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 66082265a131Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 66092265a131Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 66102265a131Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 66112265a131Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 66122265a131Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 66132265a131Smrg_LT_TAGVAR(inherit_rpath, $1)=no 66142265a131Smrg_LT_TAGVAR(module_cmds, $1)= 66152265a131Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 66162265a131Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 66172265a131Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 66182265a131Smrg_LT_TAGVAR(no_undefined_flag, $1)= 66192265a131Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 66202265a131Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6621444c061aSmrg 66222265a131Smrg# Source file extension for f77 test sources. 66232265a131Smrgac_ext=f 6624444c061aSmrg 66252265a131Smrg# Object file extension for compiled f77 test sources. 66262265a131Smrgobjext=o 66272265a131Smrg_LT_TAGVAR(objext, $1)=$objext 66282265a131Smrg 66292265a131Smrg# No sense in running all these tests if we already determined that 66302265a131Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 66312265a131Smrg# are currently assumed to apply to all compilers on this platform, 66322265a131Smrg# and will be corrupted by setting them based on a non-working compiler. 66332265a131Smrgif test "$_lt_disable_F77" != yes; then 66342265a131Smrg # Code to be used in simple compile tests 66352265a131Smrg lt_simple_compile_test_code="\ 66362265a131Smrg subroutine t 66372265a131Smrg return 66382265a131Smrg end 66392265a131Smrg" 6640444c061aSmrg 66412265a131Smrg # Code to be used in simple link tests 66422265a131Smrg lt_simple_link_test_code="\ 66432265a131Smrg program t 66442265a131Smrg end 66452265a131Smrg" 6646444c061aSmrg 66472265a131Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 66482265a131Smrg _LT_TAG_COMPILER 6649444c061aSmrg 66502265a131Smrg # save warnings/boilerplate of simple test code 66512265a131Smrg _LT_COMPILER_BOILERPLATE 66522265a131Smrg _LT_LINKER_BOILERPLATE 6653444c061aSmrg 66542265a131Smrg # Allow CC to be a program name with arguments. 66552265a131Smrg lt_save_CC="$CC" 66562265a131Smrg lt_save_GCC=$GCC 66572265a131Smrg CC=${F77-"f77"} 66582265a131Smrg compiler=$CC 66592265a131Smrg _LT_TAGVAR(compiler, $1)=$CC 66602265a131Smrg _LT_CC_BASENAME([$compiler]) 66612265a131Smrg GCC=$G77 66622265a131Smrg if test -n "$compiler"; then 66632265a131Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 66642265a131Smrg AC_MSG_RESULT([$can_build_shared]) 6665444c061aSmrg 66662265a131Smrg AC_MSG_CHECKING([whether to build shared libraries]) 66672265a131Smrg test "$can_build_shared" = "no" && enable_shared=no 6668444c061aSmrg 66692265a131Smrg # On AIX, shared libraries and static libraries use the same namespace, and 66702265a131Smrg # are all built from PIC. 66712265a131Smrg case $host_os in 66722265a131Smrg aix3*) 66732265a131Smrg test "$enable_shared" = yes && enable_static=no 66742265a131Smrg if test -n "$RANLIB"; then 66752265a131Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 66762265a131Smrg postinstall_cmds='$RANLIB $lib' 66772265a131Smrg fi 66782265a131Smrg ;; 66792265a131Smrg aix[[4-9]]*) 66802265a131Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 66812265a131Smrg test "$enable_shared" = yes && enable_static=no 66822265a131Smrg fi 66832265a131Smrg ;; 66842265a131Smrg esac 66852265a131Smrg AC_MSG_RESULT([$enable_shared]) 66862265a131Smrg 66872265a131Smrg AC_MSG_CHECKING([whether to build static libraries]) 66882265a131Smrg # Make sure either enable_shared or enable_static is yes. 66892265a131Smrg test "$enable_shared" = yes || enable_static=yes 66902265a131Smrg AC_MSG_RESULT([$enable_static]) 66912265a131Smrg 66922265a131Smrg _LT_TAGVAR(GCC, $1)="$G77" 66932265a131Smrg _LT_TAGVAR(LD, $1)="$LD" 66942265a131Smrg 66952265a131Smrg ## CAVEAT EMPTOR: 66962265a131Smrg ## There is no encapsulation within the following macros, do not change 66972265a131Smrg ## the running order or otherwise move them around unless you know exactly 66982265a131Smrg ## what you are doing... 66992265a131Smrg _LT_COMPILER_PIC($1) 67002265a131Smrg _LT_COMPILER_C_O($1) 67012265a131Smrg _LT_COMPILER_FILE_LOCKS($1) 67022265a131Smrg _LT_LINKER_SHLIBS($1) 67032265a131Smrg _LT_SYS_DYNAMIC_LINKER($1) 67042265a131Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 67052265a131Smrg 67062265a131Smrg _LT_CONFIG($1) 67072265a131Smrg fi # test -n "$compiler" 67082265a131Smrg 67092265a131Smrg GCC=$lt_save_GCC 67102265a131Smrg CC="$lt_save_CC" 67112265a131Smrgfi # test "$_lt_disable_F77" != yes 6712444c061aSmrg 67132265a131SmrgAC_LANG_POP 67142265a131Smrg])# _LT_LANG_F77_CONFIG 6715444c061aSmrg 6716444c061aSmrg 67172265a131Smrg# _LT_PROG_FC 67182265a131Smrg# ----------- 67192265a131Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 67202265a131Smrg# if there is no fortran compiler, we have our own version here. 67212265a131Smrgm4_defun([_LT_PROG_FC], 67222265a131Smrg[ 67232265a131Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 67242265a131SmrgAC_PROG_FC 67252265a131Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 67262265a131Smrg _lt_disable_FC=yes 67272265a131Smrgfi 67282265a131Smrgpopdef([AC_MSG_ERROR]) 67292265a131Smrg])# _LT_PROG_FC 6730444c061aSmrg 67312265a131Smrgdnl aclocal-1.4 backwards compatibility: 67322265a131Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 6733444c061aSmrg 6734444c061aSmrg 67352265a131Smrg# _LT_LANG_FC_CONFIG([TAG]) 67362265a131Smrg# ------------------------- 67372265a131Smrg# Ensure that the configuration variables for a Fortran compiler are 67382265a131Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 67392265a131Smrg# to write the compiler configuration to `libtool'. 67402265a131Smrgm4_defun([_LT_LANG_FC_CONFIG], 67412265a131Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 67422265a131SmrgAC_LANG_PUSH(Fortran) 67432265a131Smrg 67442265a131Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67452265a131Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 67462265a131Smrg_LT_TAGVAR(always_export_symbols, $1)=no 67472265a131Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 67482265a131Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 67492265a131Smrg_LT_TAGVAR(hardcode_direct, $1)=no 67502265a131Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 67512265a131Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 67522265a131Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 67532265a131Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 67542265a131Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 67552265a131Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 67562265a131Smrg_LT_TAGVAR(inherit_rpath, $1)=no 67572265a131Smrg_LT_TAGVAR(module_cmds, $1)= 67582265a131Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 67592265a131Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 67602265a131Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 67612265a131Smrg_LT_TAGVAR(no_undefined_flag, $1)= 67622265a131Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 67632265a131Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 67642265a131Smrg 67652265a131Smrg# Source file extension for fc test sources. 67662265a131Smrgac_ext=${ac_fc_srcext-f} 67672265a131Smrg 67682265a131Smrg# Object file extension for compiled fc test sources. 67692265a131Smrgobjext=o 67702265a131Smrg_LT_TAGVAR(objext, $1)=$objext 67712265a131Smrg 67722265a131Smrg# No sense in running all these tests if we already determined that 67732265a131Smrg# the FC compiler isn't working. Some variables (like enable_shared) 67742265a131Smrg# are currently assumed to apply to all compilers on this platform, 67752265a131Smrg# and will be corrupted by setting them based on a non-working compiler. 67762265a131Smrgif test "$_lt_disable_FC" != yes; then 67772265a131Smrg # Code to be used in simple compile tests 67782265a131Smrg lt_simple_compile_test_code="\ 67792265a131Smrg subroutine t 67802265a131Smrg return 67812265a131Smrg end 67822265a131Smrg" 6783444c061aSmrg 67842265a131Smrg # Code to be used in simple link tests 67852265a131Smrg lt_simple_link_test_code="\ 67862265a131Smrg program t 67872265a131Smrg end 67882265a131Smrg" 6789444c061aSmrg 67902265a131Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 67912265a131Smrg _LT_TAG_COMPILER 6792444c061aSmrg 67932265a131Smrg # save warnings/boilerplate of simple test code 67942265a131Smrg _LT_COMPILER_BOILERPLATE 67952265a131Smrg _LT_LINKER_BOILERPLATE 6796444c061aSmrg 67972265a131Smrg # Allow CC to be a program name with arguments. 67982265a131Smrg lt_save_CC="$CC" 67992265a131Smrg lt_save_GCC=$GCC 68002265a131Smrg CC=${FC-"f95"} 68012265a131Smrg compiler=$CC 68022265a131Smrg GCC=$ac_cv_fc_compiler_gnu 6803444c061aSmrg 68042265a131Smrg _LT_TAGVAR(compiler, $1)=$CC 68052265a131Smrg _LT_CC_BASENAME([$compiler]) 6806444c061aSmrg 68072265a131Smrg if test -n "$compiler"; then 68082265a131Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68092265a131Smrg AC_MSG_RESULT([$can_build_shared]) 6810444c061aSmrg 68112265a131Smrg AC_MSG_CHECKING([whether to build shared libraries]) 68122265a131Smrg test "$can_build_shared" = "no" && enable_shared=no 6813444c061aSmrg 68142265a131Smrg # On AIX, shared libraries and static libraries use the same namespace, and 68152265a131Smrg # are all built from PIC. 68162265a131Smrg case $host_os in 68172265a131Smrg aix3*) 68182265a131Smrg test "$enable_shared" = yes && enable_static=no 68192265a131Smrg if test -n "$RANLIB"; then 68202265a131Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68212265a131Smrg postinstall_cmds='$RANLIB $lib' 68222265a131Smrg fi 68232265a131Smrg ;; 68242265a131Smrg aix[[4-9]]*) 68252265a131Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68262265a131Smrg test "$enable_shared" = yes && enable_static=no 68272265a131Smrg fi 68282265a131Smrg ;; 68292265a131Smrg esac 68302265a131Smrg AC_MSG_RESULT([$enable_shared]) 68312265a131Smrg 68322265a131Smrg AC_MSG_CHECKING([whether to build static libraries]) 68332265a131Smrg # Make sure either enable_shared or enable_static is yes. 68342265a131Smrg test "$enable_shared" = yes || enable_static=yes 68352265a131Smrg AC_MSG_RESULT([$enable_static]) 68362265a131Smrg 68372265a131Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 68382265a131Smrg _LT_TAGVAR(LD, $1)="$LD" 68392265a131Smrg 68402265a131Smrg ## CAVEAT EMPTOR: 68412265a131Smrg ## There is no encapsulation within the following macros, do not change 68422265a131Smrg ## the running order or otherwise move them around unless you know exactly 68432265a131Smrg ## what you are doing... 68442265a131Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68452265a131Smrg _LT_COMPILER_PIC($1) 68462265a131Smrg _LT_COMPILER_C_O($1) 68472265a131Smrg _LT_COMPILER_FILE_LOCKS($1) 68482265a131Smrg _LT_LINKER_SHLIBS($1) 68492265a131Smrg _LT_SYS_DYNAMIC_LINKER($1) 68502265a131Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68512265a131Smrg 68522265a131Smrg _LT_CONFIG($1) 68532265a131Smrg fi # test -n "$compiler" 68542265a131Smrg 68552265a131Smrg GCC=$lt_save_GCC 68562265a131Smrg CC="$lt_save_CC" 68572265a131Smrgfi # test "$_lt_disable_FC" != yes 6858444c061aSmrg 68592265a131SmrgAC_LANG_POP 68602265a131Smrg])# _LT_LANG_FC_CONFIG 6861444c061aSmrg 6862444c061aSmrg 68632265a131Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 68642265a131Smrg# -------------------------- 68652265a131Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 68662265a131Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 68672265a131Smrg# to write the compiler configuration to `libtool'. 68682265a131Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 68692265a131Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 68702265a131SmrgAC_LANG_SAVE 6871444c061aSmrg 68722265a131Smrg# Source file extension for Java test sources. 68732265a131Smrgac_ext=java 6874444c061aSmrg 68752265a131Smrg# Object file extension for compiled Java test sources. 68762265a131Smrgobjext=o 68772265a131Smrg_LT_TAGVAR(objext, $1)=$objext 6878444c061aSmrg 68792265a131Smrg# Code to be used in simple compile tests 68802265a131Smrglt_simple_compile_test_code="class foo {}" 6881444c061aSmrg 68822265a131Smrg# Code to be used in simple link tests 68832265a131Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6884444c061aSmrg 68852265a131Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 68862265a131Smrg_LT_TAG_COMPILER 6887444c061aSmrg 68882265a131Smrg# save warnings/boilerplate of simple test code 68892265a131Smrg_LT_COMPILER_BOILERPLATE 68902265a131Smrg_LT_LINKER_BOILERPLATE 6891444c061aSmrg 68922265a131Smrg# Allow CC to be a program name with arguments. 68932265a131Smrglt_save_CC="$CC" 68942265a131Smrglt_save_GCC=$GCC 68952265a131SmrgGCC=yes 68962265a131SmrgCC=${GCJ-"gcj"} 68972265a131Smrgcompiler=$CC 68982265a131Smrg_LT_TAGVAR(compiler, $1)=$CC 68992265a131Smrg_LT_TAGVAR(LD, $1)="$LD" 69002265a131Smrg_LT_CC_BASENAME([$compiler]) 6901444c061aSmrg 69022265a131Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 69032265a131Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904444c061aSmrg 69052265a131Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906444c061aSmrg 69072265a131Smrgif test -n "$compiler"; then 69082265a131Smrg _LT_COMPILER_NO_RTTI($1) 69092265a131Smrg _LT_COMPILER_PIC($1) 69102265a131Smrg _LT_COMPILER_C_O($1) 69112265a131Smrg _LT_COMPILER_FILE_LOCKS($1) 69122265a131Smrg _LT_LINKER_SHLIBS($1) 69132265a131Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914444c061aSmrg 69152265a131Smrg _LT_CONFIG($1) 69162265a131Smrgfi 6917444c061aSmrg 69182265a131SmrgAC_LANG_RESTORE 6919444c061aSmrg 69202265a131SmrgGCC=$lt_save_GCC 69212265a131SmrgCC="$lt_save_CC" 69222265a131Smrg])# _LT_LANG_GCJ_CONFIG 6923444c061aSmrg 6924444c061aSmrg 69252265a131Smrg# _LT_LANG_RC_CONFIG([TAG]) 69262265a131Smrg# ------------------------- 69272265a131Smrg# Ensure that the configuration variables for the Windows resource compiler 69282265a131Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 69292265a131Smrg# to write the compiler configuration to `libtool'. 69302265a131Smrgm4_defun([_LT_LANG_RC_CONFIG], 69312265a131Smrg[AC_REQUIRE([LT_PROG_RC])dnl 69322265a131SmrgAC_LANG_SAVE 6933444c061aSmrg 69342265a131Smrg# Source file extension for RC test sources. 69352265a131Smrgac_ext=rc 6936444c061aSmrg 69372265a131Smrg# Object file extension for compiled RC test sources. 69382265a131Smrgobjext=o 69392265a131Smrg_LT_TAGVAR(objext, $1)=$objext 6940444c061aSmrg 69412265a131Smrg# Code to be used in simple compile tests 69422265a131Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6943444c061aSmrg 69442265a131Smrg# Code to be used in simple link tests 69452265a131Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 6946444c061aSmrg 69472265a131Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 69482265a131Smrg_LT_TAG_COMPILER 6949444c061aSmrg 69502265a131Smrg# save warnings/boilerplate of simple test code 69512265a131Smrg_LT_COMPILER_BOILERPLATE 69522265a131Smrg_LT_LINKER_BOILERPLATE 6953444c061aSmrg 69542265a131Smrg# Allow CC to be a program name with arguments. 69552265a131Smrglt_save_CC="$CC" 69562265a131Smrglt_save_GCC=$GCC 69572265a131SmrgGCC= 69582265a131SmrgCC=${RC-"windres"} 69592265a131Smrgcompiler=$CC 69602265a131Smrg_LT_TAGVAR(compiler, $1)=$CC 69612265a131Smrg_LT_CC_BASENAME([$compiler]) 69622265a131Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6963444c061aSmrg 69642265a131Smrgif test -n "$compiler"; then 69652265a131Smrg : 69662265a131Smrg _LT_CONFIG($1) 69672265a131Smrgfi 6968444c061aSmrg 69692265a131SmrgGCC=$lt_save_GCC 69702265a131SmrgAC_LANG_RESTORE 69712265a131SmrgCC="$lt_save_CC" 69722265a131Smrg])# _LT_LANG_RC_CONFIG 6973444c061aSmrg 69742265a131Smrg 69752265a131Smrg# LT_PROG_GCJ 69762265a131Smrg# ----------- 69772265a131SmrgAC_DEFUN([LT_PROG_GCJ], 69782265a131Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 69792265a131Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 69802265a131Smrg [AC_CHECK_TOOL(GCJ, gcj,) 69812265a131Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 69822265a131Smrg AC_SUBST(GCJFLAGS)])])[]dnl 69832265a131Smrg]) 69842265a131Smrg 69852265a131Smrg# Old name: 69862265a131SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 69872265a131Smrgdnl aclocal-1.4 backwards compatibility: 69882265a131Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 69892265a131Smrg 69902265a131Smrg 69912265a131Smrg# LT_PROG_RC 69922265a131Smrg# ---------- 69932265a131SmrgAC_DEFUN([LT_PROG_RC], 69942265a131Smrg[AC_CHECK_TOOL(RC, windres,) 69952265a131Smrg]) 69962265a131Smrg 69972265a131Smrg# Old name: 69982265a131SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 69992265a131Smrgdnl aclocal-1.4 backwards compatibility: 70002265a131Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 70012265a131Smrg 70022265a131Smrg 70032265a131Smrg# _LT_DECL_EGREP 70042265a131Smrg# -------------- 70052265a131Smrg# If we don't have a new enough Autoconf to choose the best grep 70062265a131Smrg# available, choose the one first in the user's PATH. 70072265a131Smrgm4_defun([_LT_DECL_EGREP], 70082265a131Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 70092265a131SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 70102265a131Smrgtest -z "$GREP" && GREP=grep 70112265a131Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 70122265a131Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 70132265a131Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 70142265a131Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 70152265a131SmrgAC_SUBST([GREP]) 70162265a131Smrg]) 70172265a131Smrg 70182265a131Smrg 70192265a131Smrg# _LT_DECL_OBJDUMP 70202265a131Smrg# -------------- 70212265a131Smrg# If we don't have a new enough Autoconf to choose the best objdump 70222265a131Smrg# available, choose the one first in the user's PATH. 70232265a131Smrgm4_defun([_LT_DECL_OBJDUMP], 70242265a131Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 70252265a131Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 70262265a131Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 70272265a131SmrgAC_SUBST([OBJDUMP]) 70282265a131Smrg]) 70292265a131Smrg 70302265a131Smrg 70312265a131Smrg# _LT_DECL_SED 70322265a131Smrg# ------------ 70332265a131Smrg# Check for a fully-functional sed program, that truncates 70342265a131Smrg# as few characters as possible. Prefer GNU sed if found. 70352265a131Smrgm4_defun([_LT_DECL_SED], 70362265a131Smrg[AC_PROG_SED 70372265a131Smrgtest -z "$SED" && SED=sed 70382265a131SmrgXsed="$SED -e 1s/^X//" 70392265a131Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 70402265a131Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 70412265a131Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 70422265a131Smrg])# _LT_DECL_SED 70432265a131Smrg 70442265a131Smrgm4_ifndef([AC_PROG_SED], [ 70452265a131Smrg# NOTE: This macro has been submitted for inclusion into # 70462265a131Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 70472265a131Smrg# a released version of Autoconf we should remove this # 70482265a131Smrg# macro and use it instead. # 70492265a131Smrg 70502265a131Smrgm4_defun([AC_PROG_SED], 70512265a131Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 70522265a131SmrgAC_CACHE_VAL(lt_cv_path_SED, 70532265a131Smrg[# Loop through the user's path and test for sed and gsed. 70542265a131Smrg# Then use that list of sed's as ones to test for truncation. 70552265a131Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 70562265a131Smrgfor as_dir in $PATH 70572265a131Smrgdo 70582265a131Smrg IFS=$as_save_IFS 70592265a131Smrg test -z "$as_dir" && as_dir=. 70602265a131Smrg for lt_ac_prog in sed gsed; do 70612265a131Smrg for ac_exec_ext in '' $ac_executable_extensions; do 70622265a131Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 70632265a131Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 70642265a131Smrg fi 70652265a131Smrg done 70662265a131Smrg done 70672265a131Smrgdone 70682265a131SmrgIFS=$as_save_IFS 70692265a131Smrglt_ac_max=0 70702265a131Smrglt_ac_count=0 70712265a131Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 70722265a131Smrg# along with /bin/sed that truncates output. 70732265a131Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 70742265a131Smrg test ! -f $lt_ac_sed && continue 70752265a131Smrg cat /dev/null > conftest.in 70762265a131Smrg lt_ac_count=0 70772265a131Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 70782265a131Smrg # Check for GNU sed and select it if it is found. 70792265a131Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 70802265a131Smrg lt_cv_path_SED=$lt_ac_sed 7081444c061aSmrg break 7082444c061aSmrg fi 70832265a131Smrg while true; do 70842265a131Smrg cat conftest.in conftest.in >conftest.tmp 70852265a131Smrg mv conftest.tmp conftest.in 70862265a131Smrg cp conftest.in conftest.nl 70872265a131Smrg echo >>conftest.nl 70882265a131Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 70892265a131Smrg cmp -s conftest.out conftest.nl || break 70902265a131Smrg # 10000 chars as input seems more than enough 70912265a131Smrg test $lt_ac_count -gt 10 && break 70922265a131Smrg lt_ac_count=`expr $lt_ac_count + 1` 70932265a131Smrg if test $lt_ac_count -gt $lt_ac_max; then 70942265a131Smrg lt_ac_max=$lt_ac_count 70952265a131Smrg lt_cv_path_SED=$lt_ac_sed 70962265a131Smrg fi 70972265a131Smrg done 7098444c061aSmrgdone 7099444c061aSmrg]) 71002265a131SmrgSED=$lt_cv_path_SED 71012265a131SmrgAC_SUBST([SED]) 71022265a131SmrgAC_MSG_RESULT([$SED]) 71032265a131Smrg])#AC_PROG_SED 71042265a131Smrg])#m4_ifndef 71052265a131Smrg 71062265a131Smrg# Old name: 71072265a131SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 71082265a131Smrgdnl aclocal-1.4 backwards compatibility: 71092265a131Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 71102265a131Smrg 71112265a131Smrg 71122265a131Smrg# _LT_CHECK_SHELL_FEATURES 71132265a131Smrg# ------------------------ 71142265a131Smrg# Find out whether the shell is Bourne or XSI compatible, 71152265a131Smrg# or has some other useful features. 71162265a131Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 71172265a131Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 71182265a131Smrg# Try some XSI features 71192265a131Smrgxsi_shell=no 71202265a131Smrg( _lt_dummy="a/b/c" 71212265a131Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 71222265a131Smrg = c,a/b,, \ 71232265a131Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 71242265a131Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 71252265a131Smrg && xsi_shell=yes 71262265a131SmrgAC_MSG_RESULT([$xsi_shell]) 71272265a131Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 71282265a131Smrg 71292265a131SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 71302265a131Smrglt_shell_append=no 71312265a131Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 71322265a131Smrg >/dev/null 2>&1 \ 71332265a131Smrg && lt_shell_append=yes 71342265a131SmrgAC_MSG_RESULT([$lt_shell_append]) 71352265a131Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 71362265a131Smrg 71372265a131Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 71382265a131Smrg lt_unset=unset 7139444c061aSmrgelse 71402265a131Smrg lt_unset=false 7141444c061aSmrgfi 71422265a131Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 71432265a131Smrg 71442265a131Smrg# test EBCDIC or ASCII 71452265a131Smrgcase `echo X|tr X '\101'` in 71462265a131Smrg A) # ASCII based system 71472265a131Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 71482265a131Smrg lt_SP2NL='tr \040 \012' 71492265a131Smrg lt_NL2SP='tr \015\012 \040\040' 71502265a131Smrg ;; 71512265a131Smrg *) # EBCDIC based system 71522265a131Smrg lt_SP2NL='tr \100 \n' 71532265a131Smrg lt_NL2SP='tr \r\n \100\100' 71542265a131Smrg ;; 71552265a131Smrgesac 71562265a131Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 71572265a131Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 71582265a131Smrg])# _LT_CHECK_SHELL_FEATURES 7159444c061aSmrg 7160444c061aSmrg 71612265a131Smrg# _LT_PROG_XSI_SHELLFNS 71622265a131Smrg# --------------------- 71632265a131Smrg# Bourne and XSI compatible variants of some useful shell functions. 71642265a131Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 71652265a131Smrg[case $xsi_shell in 71662265a131Smrg yes) 71672265a131Smrg cat << \_LT_EOF >> "$cfgfile" 71682265a131Smrg 71692265a131Smrg# func_dirname file append nondir_replacement 71702265a131Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 71712265a131Smrg# otherwise set result to NONDIR_REPLACEMENT. 71722265a131Smrgfunc_dirname () 71732265a131Smrg{ 71742265a131Smrg case ${1} in 71752265a131Smrg */*) func_dirname_result="${1%/*}${2}" ;; 71762265a131Smrg * ) func_dirname_result="${3}" ;; 71772265a131Smrg esac 71782265a131Smrg} 7179444c061aSmrg 71802265a131Smrg# func_basename file 71812265a131Smrgfunc_basename () 71822265a131Smrg{ 71832265a131Smrg func_basename_result="${1##*/}" 71842265a131Smrg} 7185444c061aSmrg 71862265a131Smrg# func_dirname_and_basename file append nondir_replacement 71872265a131Smrg# perform func_basename and func_dirname in a single function 71882265a131Smrg# call: 71892265a131Smrg# dirname: Compute the dirname of FILE. If nonempty, 71902265a131Smrg# add APPEND to the result, otherwise set result 71912265a131Smrg# to NONDIR_REPLACEMENT. 71922265a131Smrg# value returned in "$func_dirname_result" 71932265a131Smrg# basename: Compute filename of FILE. 71942265a131Smrg# value retuned in "$func_basename_result" 71952265a131Smrg# Implementation must be kept synchronized with func_dirname 71962265a131Smrg# and func_basename. For efficiency, we do not delegate to 71972265a131Smrg# those functions but instead duplicate the functionality here. 71982265a131Smrgfunc_dirname_and_basename () 71992265a131Smrg{ 72002265a131Smrg case ${1} in 72012265a131Smrg */*) func_dirname_result="${1%/*}${2}" ;; 72022265a131Smrg * ) func_dirname_result="${3}" ;; 72032265a131Smrg esac 72042265a131Smrg func_basename_result="${1##*/}" 72052265a131Smrg} 72062265a131Smrg 72072265a131Smrg# func_stripname prefix suffix name 72082265a131Smrg# strip PREFIX and SUFFIX off of NAME. 72092265a131Smrg# PREFIX and SUFFIX must not contain globbing or regex special 72102265a131Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72112265a131Smrg# dot (in which case that matches only a dot). 72122265a131Smrgfunc_stripname () 72132265a131Smrg{ 72142265a131Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 72152265a131Smrg # positional parameters, so assign one to ordinary parameter first. 72162265a131Smrg func_stripname_result=${3} 72172265a131Smrg func_stripname_result=${func_stripname_result#"${1}"} 72182265a131Smrg func_stripname_result=${func_stripname_result%"${2}"} 72192265a131Smrg} 72202265a131Smrg 72212265a131Smrg# func_opt_split 72222265a131Smrgfunc_opt_split () 72232265a131Smrg{ 72242265a131Smrg func_opt_split_opt=${1%%=*} 72252265a131Smrg func_opt_split_arg=${1#*=} 72262265a131Smrg} 72272265a131Smrg 72282265a131Smrg# func_lo2o object 72292265a131Smrgfunc_lo2o () 72302265a131Smrg{ 72312265a131Smrg case ${1} in 72322265a131Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 72332265a131Smrg *) func_lo2o_result=${1} ;; 72342265a131Smrg esac 72352265a131Smrg} 72362265a131Smrg 72372265a131Smrg# func_xform libobj-or-source 72382265a131Smrgfunc_xform () 72392265a131Smrg{ 72402265a131Smrg func_xform_result=${1%.*}.lo 72412265a131Smrg} 72422265a131Smrg 72432265a131Smrg# func_arith arithmetic-term... 72442265a131Smrgfunc_arith () 72452265a131Smrg{ 72462265a131Smrg func_arith_result=$(( $[*] )) 72472265a131Smrg} 72482265a131Smrg 72492265a131Smrg# func_len string 72502265a131Smrg# STRING may not start with a hyphen. 72512265a131Smrgfunc_len () 72522265a131Smrg{ 72532265a131Smrg func_len_result=${#1} 72542265a131Smrg} 72552265a131Smrg 72562265a131Smrg_LT_EOF 72572265a131Smrg ;; 72582265a131Smrg *) # Bourne compatible functions. 72592265a131Smrg cat << \_LT_EOF >> "$cfgfile" 72602265a131Smrg 72612265a131Smrg# func_dirname file append nondir_replacement 72622265a131Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 72632265a131Smrg# otherwise set result to NONDIR_REPLACEMENT. 72642265a131Smrgfunc_dirname () 72652265a131Smrg{ 72662265a131Smrg # Extract subdirectory from the argument. 72672265a131Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 72682265a131Smrg if test "X$func_dirname_result" = "X${1}"; then 72692265a131Smrg func_dirname_result="${3}" 7270444c061aSmrg else 72712265a131Smrg func_dirname_result="$func_dirname_result${2}" 72722265a131Smrg fi 72732265a131Smrg} 72742265a131Smrg 72752265a131Smrg# func_basename file 72762265a131Smrgfunc_basename () 72772265a131Smrg{ 72782265a131Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 72792265a131Smrg} 72802265a131Smrg 72812265a131Smrgdnl func_dirname_and_basename 72822265a131Smrgdnl A portable version of this function is already defined in general.m4sh 72832265a131Smrgdnl so there is no need for it here. 72842265a131Smrg 72852265a131Smrg# func_stripname prefix suffix name 72862265a131Smrg# strip PREFIX and SUFFIX off of NAME. 72872265a131Smrg# PREFIX and SUFFIX must not contain globbing or regex special 72882265a131Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72892265a131Smrg# dot (in which case that matches only a dot). 72902265a131Smrg# func_strip_suffix prefix name 72912265a131Smrgfunc_stripname () 72922265a131Smrg{ 72932265a131Smrg case ${2} in 72942265a131Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 72952265a131Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 72962265a131Smrg *) func_stripname_result=`$ECHO "X${3}" \ 72972265a131Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 72982265a131Smrg esac 72992265a131Smrg} 73002265a131Smrg 73012265a131Smrg# sed scripts: 73022265a131Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 73032265a131Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 73042265a131Smrg 73052265a131Smrg# func_opt_split 73062265a131Smrgfunc_opt_split () 73072265a131Smrg{ 73082265a131Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 73092265a131Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 73102265a131Smrg} 73112265a131Smrg 73122265a131Smrg# func_lo2o object 73132265a131Smrgfunc_lo2o () 73142265a131Smrg{ 73152265a131Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 73162265a131Smrg} 73172265a131Smrg 73182265a131Smrg# func_xform libobj-or-source 73192265a131Smrgfunc_xform () 73202265a131Smrg{ 73212265a131Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 73222265a131Smrg} 73232265a131Smrg 73242265a131Smrg# func_arith arithmetic-term... 73252265a131Smrgfunc_arith () 73262265a131Smrg{ 73272265a131Smrg func_arith_result=`expr "$[@]"` 73282265a131Smrg} 73292265a131Smrg 73302265a131Smrg# func_len string 73312265a131Smrg# STRING may not start with a hyphen. 73322265a131Smrgfunc_len () 73332265a131Smrg{ 73342265a131Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 73352265a131Smrg} 73362265a131Smrg 73372265a131Smrg_LT_EOF 73382265a131Smrgesac 73392265a131Smrg 73402265a131Smrgcase $lt_shell_append in 73412265a131Smrg yes) 73422265a131Smrg cat << \_LT_EOF >> "$cfgfile" 73432265a131Smrg 73442265a131Smrg# func_append var value 73452265a131Smrg# Append VALUE to the end of shell variable VAR. 73462265a131Smrgfunc_append () 73472265a131Smrg{ 73482265a131Smrg eval "$[1]+=\$[2]" 73492265a131Smrg} 73502265a131Smrg_LT_EOF 73512265a131Smrg ;; 73522265a131Smrg *) 73532265a131Smrg cat << \_LT_EOF >> "$cfgfile" 73542265a131Smrg 73552265a131Smrg# func_append var value 73562265a131Smrg# Append VALUE to the end of shell variable VAR. 73572265a131Smrgfunc_append () 73582265a131Smrg{ 73592265a131Smrg eval "$[1]=\$$[1]\$[2]" 73602265a131Smrg} 73612265a131Smrg 73622265a131Smrg_LT_EOF 73632265a131Smrg ;; 73642265a131Smrg esac 73652265a131Smrg]) 73662265a131Smrg 73672265a131Smrg# Helper functions for option handling. -*- Autoconf -*- 73682265a131Smrg# 73692265a131Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 73702265a131Smrg# Written by Gary V. Vaughan, 2004 73712265a131Smrg# 73722265a131Smrg# This file is free software; the Free Software Foundation gives 73732265a131Smrg# unlimited permission to copy and/or distribute it, with or without 73742265a131Smrg# modifications, as long as this notice is preserved. 73752265a131Smrg 73762265a131Smrg# serial 6 ltoptions.m4 73772265a131Smrg 73782265a131Smrg# This is to help aclocal find these macros, as it can't see m4_define. 73792265a131SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 73802265a131Smrg 73812265a131Smrg 73822265a131Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 73832265a131Smrg# ------------------------------------------ 73842265a131Smrgm4_define([_LT_MANGLE_OPTION], 73852265a131Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 73862265a131Smrg 73872265a131Smrg 73882265a131Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 73892265a131Smrg# --------------------------------------- 73902265a131Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 73912265a131Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 73922265a131Smrg# saved as a flag. 73932265a131Smrgm4_define([_LT_SET_OPTION], 73942265a131Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 73952265a131Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 73962265a131Smrg _LT_MANGLE_DEFUN([$1], [$2]), 73972265a131Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 73982265a131Smrg]) 73992265a131Smrg 74002265a131Smrg 74012265a131Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 74022265a131Smrg# ------------------------------------------------------------ 74032265a131Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 74042265a131Smrgm4_define([_LT_IF_OPTION], 74052265a131Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 74062265a131Smrg 74072265a131Smrg 74082265a131Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 74092265a131Smrg# ------------------------------------------------------- 74102265a131Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 74112265a131Smrg# are set. 74122265a131Smrgm4_define([_LT_UNLESS_OPTIONS], 74132265a131Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74142265a131Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 74152265a131Smrg [m4_define([$0_found])])])[]dnl 74162265a131Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 74172265a131Smrg])[]dnl 74182265a131Smrg]) 74192265a131Smrg 74202265a131Smrg 74212265a131Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 74222265a131Smrg# ---------------------------------------- 74232265a131Smrg# OPTION-LIST is a space-separated list of Libtool options associated 74242265a131Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 74252265a131Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 74262265a131Smrg# the unknown option and exit. 74272265a131Smrgm4_defun([_LT_SET_OPTIONS], 74282265a131Smrg[# Set options 74292265a131Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74302265a131Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 74312265a131Smrg 74322265a131Smrgm4_if([$1],[LT_INIT],[ 74332265a131Smrg dnl 74342265a131Smrg dnl Simply set some default values (i.e off) if boolean options were not 74352265a131Smrg dnl specified: 74362265a131Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 74372265a131Smrg ]) 74382265a131Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 74392265a131Smrg ]) 74402265a131Smrg dnl 74412265a131Smrg dnl If no reference was made to various pairs of opposing options, then 74422265a131Smrg dnl we run the default mode handler for the pair. For example, if neither 74432265a131Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 74442265a131Smrg dnl archives by default: 74452265a131Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 74462265a131Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 74472265a131Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 74482265a131Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 74492265a131Smrg [_LT_ENABLE_FAST_INSTALL]) 74502265a131Smrg ]) 74512265a131Smrg])# _LT_SET_OPTIONS 74522265a131Smrg 74532265a131Smrg 74542265a131Smrg 74552265a131Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 74562265a131Smrg# ----------------------------------------- 74572265a131Smrgm4_define([_LT_MANGLE_DEFUN], 74582265a131Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 74592265a131Smrg 74602265a131Smrg 74612265a131Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 74622265a131Smrg# ----------------------------------------------- 74632265a131Smrgm4_define([LT_OPTION_DEFINE], 74642265a131Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 74652265a131Smrg])# LT_OPTION_DEFINE 74662265a131Smrg 74672265a131Smrg 74682265a131Smrg# dlopen 74692265a131Smrg# ------ 74702265a131SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 74712265a131Smrg]) 74722265a131Smrg 74732265a131SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 74742265a131Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 74752265a131SmrgAC_DIAGNOSE([obsolete], 74762265a131Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 74772265a131Smrgput the `dlopen' option into LT_INIT's first parameter.]) 74782265a131Smrg]) 74792265a131Smrg 74802265a131Smrgdnl aclocal-1.4 backwards compatibility: 74812265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 74822265a131Smrg 74832265a131Smrg 74842265a131Smrg# win32-dll 74852265a131Smrg# --------- 74862265a131Smrg# Declare package support for building win32 dll's. 74872265a131SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 74882265a131Smrg[enable_win32_dll=yes 74892265a131Smrg 74902265a131Smrgcase $host in 74912265a131Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 74922265a131Smrg AC_CHECK_TOOL(AS, as, false) 74932265a131Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 74942265a131Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 74952265a131Smrg ;; 74962265a131Smrgesac 74972265a131Smrg 74982265a131Smrgtest -z "$AS" && AS=as 74992265a131Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 75002265a131Smrg 75012265a131Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 75022265a131Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 75032265a131Smrg 75042265a131Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 75052265a131Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 75062265a131Smrg])# win32-dll 75072265a131Smrg 75082265a131SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 75092265a131Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 75102265a131Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 75112265a131SmrgAC_DIAGNOSE([obsolete], 75122265a131Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 75132265a131Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 75142265a131Smrg]) 75152265a131Smrg 75162265a131Smrgdnl aclocal-1.4 backwards compatibility: 75172265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 75182265a131Smrg 75192265a131Smrg 75202265a131Smrg# _LT_ENABLE_SHARED([DEFAULT]) 75212265a131Smrg# ---------------------------- 75222265a131Smrg# implement the --enable-shared flag, and supports the `shared' and 75232265a131Smrg# `disable-shared' LT_INIT options. 75242265a131Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75252265a131Smrgm4_define([_LT_ENABLE_SHARED], 75262265a131Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 75272265a131SmrgAC_ARG_ENABLE([shared], 75282265a131Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 75292265a131Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 75302265a131Smrg [p=${PACKAGE-default} 75312265a131Smrg case $enableval in 75322265a131Smrg yes) enable_shared=yes ;; 75332265a131Smrg no) enable_shared=no ;; 75342265a131Smrg *) 75352265a131Smrg enable_shared=no 75362265a131Smrg # Look at the argument we got. We use all the common list separators. 75372265a131Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75382265a131Smrg for pkg in $enableval; do 75392265a131Smrg IFS="$lt_save_ifs" 75402265a131Smrg if test "X$pkg" = "X$p"; then 75412265a131Smrg enable_shared=yes 75422265a131Smrg fi 75432265a131Smrg done 75442265a131Smrg IFS="$lt_save_ifs" 75452265a131Smrg ;; 75462265a131Smrg esac], 75472265a131Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 75482265a131Smrg 75492265a131Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 75502265a131Smrg [Whether or not to build shared libraries]) 75512265a131Smrg])# _LT_ENABLE_SHARED 75522265a131Smrg 75532265a131SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 75542265a131SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 75552265a131Smrg 75562265a131Smrg# Old names: 75572265a131SmrgAC_DEFUN([AC_ENABLE_SHARED], 75582265a131Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 75592265a131Smrg]) 75602265a131Smrg 75612265a131SmrgAC_DEFUN([AC_DISABLE_SHARED], 75622265a131Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 75632265a131Smrg]) 75642265a131Smrg 75652265a131SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 75662265a131SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 75672265a131Smrg 75682265a131Smrgdnl aclocal-1.4 backwards compatibility: 75692265a131Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 75702265a131Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 75712265a131Smrg 75722265a131Smrg 75732265a131Smrg 75742265a131Smrg# _LT_ENABLE_STATIC([DEFAULT]) 75752265a131Smrg# ---------------------------- 75762265a131Smrg# implement the --enable-static flag, and support the `static' and 75772265a131Smrg# `disable-static' LT_INIT options. 75782265a131Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75792265a131Smrgm4_define([_LT_ENABLE_STATIC], 75802265a131Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 75812265a131SmrgAC_ARG_ENABLE([static], 75822265a131Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 75832265a131Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 75842265a131Smrg [p=${PACKAGE-default} 75852265a131Smrg case $enableval in 75862265a131Smrg yes) enable_static=yes ;; 75872265a131Smrg no) enable_static=no ;; 75882265a131Smrg *) 75892265a131Smrg enable_static=no 75902265a131Smrg # Look at the argument we got. We use all the common list separators. 75912265a131Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75922265a131Smrg for pkg in $enableval; do 75932265a131Smrg IFS="$lt_save_ifs" 75942265a131Smrg if test "X$pkg" = "X$p"; then 75952265a131Smrg enable_static=yes 75962265a131Smrg fi 75972265a131Smrg done 75982265a131Smrg IFS="$lt_save_ifs" 75992265a131Smrg ;; 76002265a131Smrg esac], 76012265a131Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 76022265a131Smrg 76032265a131Smrg _LT_DECL([build_old_libs], [enable_static], [0], 76042265a131Smrg [Whether or not to build static libraries]) 76052265a131Smrg])# _LT_ENABLE_STATIC 76062265a131Smrg 76072265a131SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 76082265a131SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 76092265a131Smrg 76102265a131Smrg# Old names: 76112265a131SmrgAC_DEFUN([AC_ENABLE_STATIC], 76122265a131Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 76132265a131Smrg]) 76142265a131Smrg 76152265a131SmrgAC_DEFUN([AC_DISABLE_STATIC], 76162265a131Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 76172265a131Smrg]) 76182265a131Smrg 76192265a131SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 76202265a131SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 76212265a131Smrg 76222265a131Smrgdnl aclocal-1.4 backwards compatibility: 76232265a131Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 76242265a131Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 76252265a131Smrg 76262265a131Smrg 76272265a131Smrg 76282265a131Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 76292265a131Smrg# ---------------------------------- 76302265a131Smrg# implement the --enable-fast-install flag, and support the `fast-install' 76312265a131Smrg# and `disable-fast-install' LT_INIT options. 76322265a131Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 76332265a131Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 76342265a131Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 76352265a131SmrgAC_ARG_ENABLE([fast-install], 76362265a131Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 76372265a131Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 76382265a131Smrg [p=${PACKAGE-default} 76392265a131Smrg case $enableval in 76402265a131Smrg yes) enable_fast_install=yes ;; 76412265a131Smrg no) enable_fast_install=no ;; 76422265a131Smrg *) 76432265a131Smrg enable_fast_install=no 76442265a131Smrg # Look at the argument we got. We use all the common list separators. 76452265a131Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 76462265a131Smrg for pkg in $enableval; do 76472265a131Smrg IFS="$lt_save_ifs" 76482265a131Smrg if test "X$pkg" = "X$p"; then 76492265a131Smrg enable_fast_install=yes 76502265a131Smrg fi 76512265a131Smrg done 76522265a131Smrg IFS="$lt_save_ifs" 76532265a131Smrg ;; 76542265a131Smrg esac], 76552265a131Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 76562265a131Smrg 76572265a131Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 76582265a131Smrg [Whether or not to optimize for fast installation])dnl 76592265a131Smrg])# _LT_ENABLE_FAST_INSTALL 76602265a131Smrg 76612265a131SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 76622265a131SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 76632265a131Smrg 76642265a131Smrg# Old names: 76652265a131SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 76662265a131Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 76672265a131SmrgAC_DIAGNOSE([obsolete], 76682265a131Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76692265a131Smrgthe `fast-install' option into LT_INIT's first parameter.]) 76702265a131Smrg]) 76712265a131Smrg 76722265a131SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 76732265a131Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 76742265a131SmrgAC_DIAGNOSE([obsolete], 76752265a131Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76762265a131Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 76772265a131Smrg]) 76782265a131Smrg 76792265a131Smrgdnl aclocal-1.4 backwards compatibility: 76802265a131Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 76812265a131Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 76822265a131Smrg 76832265a131Smrg 76842265a131Smrg# _LT_WITH_PIC([MODE]) 76852265a131Smrg# -------------------- 76862265a131Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 76872265a131Smrg# LT_INIT options. 76882265a131Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 76892265a131Smrgm4_define([_LT_WITH_PIC], 76902265a131Smrg[AC_ARG_WITH([pic], 76912265a131Smrg [AS_HELP_STRING([--with-pic], 76922265a131Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 76932265a131Smrg [pic_mode="$withval"], 76942265a131Smrg [pic_mode=default]) 76952265a131Smrg 76962265a131Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 76972265a131Smrg 76982265a131Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 76992265a131Smrg])# _LT_WITH_PIC 77002265a131Smrg 77012265a131SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 77022265a131SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 77032265a131Smrg 77042265a131Smrg# Old name: 77052265a131SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 77062265a131Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 77072265a131SmrgAC_DIAGNOSE([obsolete], 77082265a131Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 77092265a131Smrgput the `pic-only' option into LT_INIT's first parameter.]) 77102265a131Smrg]) 77112265a131Smrg 77122265a131Smrgdnl aclocal-1.4 backwards compatibility: 77132265a131Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 77142265a131Smrg 77152265a131Smrg 77162265a131Smrgm4_define([_LTDL_MODE], []) 77172265a131SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 77182265a131Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 77192265a131SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 77202265a131Smrg [m4_define([_LTDL_MODE], [recursive])]) 77212265a131SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 77222265a131Smrg [m4_define([_LTDL_MODE], [subproject])]) 77232265a131Smrg 77242265a131Smrgm4_define([_LTDL_TYPE], []) 77252265a131SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 77262265a131Smrg [m4_define([_LTDL_TYPE], [installable])]) 77272265a131SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 77282265a131Smrg [m4_define([_LTDL_TYPE], [convenience])]) 77292265a131Smrg 77302265a131Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 77312265a131Smrg# 77322265a131Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 77332265a131Smrg# Written by Gary V. Vaughan, 2004 77342265a131Smrg# 77352265a131Smrg# This file is free software; the Free Software Foundation gives 77362265a131Smrg# unlimited permission to copy and/or distribute it, with or without 77372265a131Smrg# modifications, as long as this notice is preserved. 77382265a131Smrg 77392265a131Smrg# serial 6 ltsugar.m4 77402265a131Smrg 77412265a131Smrg# This is to help aclocal find these macros, as it can't see m4_define. 77422265a131SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 77432265a131Smrg 77442265a131Smrg 77452265a131Smrg# lt_join(SEP, ARG1, [ARG2...]) 77462265a131Smrg# ----------------------------- 77472265a131Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 77482265a131Smrg# associated separator. 77492265a131Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 77502265a131Smrg# versions in m4sugar had bugs. 77512265a131Smrgm4_define([lt_join], 77522265a131Smrg[m4_if([$#], [1], [], 77532265a131Smrg [$#], [2], [[$2]], 77542265a131Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 77552265a131Smrgm4_define([_lt_join], 77562265a131Smrg[m4_if([$#$2], [2], [], 77572265a131Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 77582265a131Smrg 77592265a131Smrg 77602265a131Smrg# lt_car(LIST) 77612265a131Smrg# lt_cdr(LIST) 77622265a131Smrg# ------------ 77632265a131Smrg# Manipulate m4 lists. 77642265a131Smrg# These macros are necessary as long as will still need to support 77652265a131Smrg# Autoconf-2.59 which quotes differently. 77662265a131Smrgm4_define([lt_car], [[$1]]) 77672265a131Smrgm4_define([lt_cdr], 77682265a131Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 77692265a131Smrg [$#], 1, [], 77702265a131Smrg [m4_dquote(m4_shift($@))])]) 77712265a131Smrgm4_define([lt_unquote], $1) 77722265a131Smrg 77732265a131Smrg 77742265a131Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 77752265a131Smrg# ------------------------------------------ 77762265a131Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 77772265a131Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 77782265a131Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 77792265a131Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 77802265a131Smrg# than defined and empty). 77812265a131Smrg# 77822265a131Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 77832265a131Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 77842265a131Smrgm4_define([lt_append], 77852265a131Smrg[m4_define([$1], 77862265a131Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 77872265a131Smrg 77882265a131Smrg 77892265a131Smrg 77902265a131Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 77912265a131Smrg# ---------------------------------------------------------- 77922265a131Smrg# Produce a SEP delimited list of all paired combinations of elements of 77932265a131Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 77942265a131Smrg# has the form PREFIXmINFIXSUFFIXn. 77952265a131Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 77962265a131Smrgm4_define([lt_combine], 77972265a131Smrg[m4_if(m4_eval([$# > 3]), [1], 77982265a131Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 77992265a131Smrg[[m4_foreach([_Lt_prefix], [$2], 78002265a131Smrg [m4_foreach([_Lt_suffix], 78012265a131Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 78022265a131Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 78032265a131Smrg 78042265a131Smrg 78052265a131Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 78062265a131Smrg# ----------------------------------------------------------------------- 78072265a131Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 78082265a131Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 78092265a131Smrgm4_define([lt_if_append_uniq], 78102265a131Smrg[m4_ifdef([$1], 78112265a131Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 78122265a131Smrg [lt_append([$1], [$2], [$3])$4], 78132265a131Smrg [$5])], 78142265a131Smrg [lt_append([$1], [$2], [$3])$4])]) 78152265a131Smrg 78162265a131Smrg 78172265a131Smrg# lt_dict_add(DICT, KEY, VALUE) 78182265a131Smrg# ----------------------------- 78192265a131Smrgm4_define([lt_dict_add], 78202265a131Smrg[m4_define([$1($2)], [$3])]) 78212265a131Smrg 78222265a131Smrg 78232265a131Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 78242265a131Smrg# -------------------------------------------- 78252265a131Smrgm4_define([lt_dict_add_subkey], 78262265a131Smrg[m4_define([$1($2:$3)], [$4])]) 78272265a131Smrg 78282265a131Smrg 78292265a131Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 78302265a131Smrg# ---------------------------------- 78312265a131Smrgm4_define([lt_dict_fetch], 78322265a131Smrg[m4_ifval([$3], 78332265a131Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 78342265a131Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 78352265a131Smrg 78362265a131Smrg 78372265a131Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 78382265a131Smrg# ----------------------------------------------------------------- 78392265a131Smrgm4_define([lt_if_dict_fetch], 78402265a131Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 78412265a131Smrg [$5], 78422265a131Smrg [$6])]) 78432265a131Smrg 78442265a131Smrg 78452265a131Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 78462265a131Smrg# -------------------------------------------------------------- 78472265a131Smrgm4_define([lt_dict_filter], 78482265a131Smrg[m4_if([$5], [], [], 78492265a131Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 78502265a131Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 78512265a131Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 78522265a131Smrg]) 78532265a131Smrg 78542265a131Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 78552265a131Smrg# 78562265a131Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 78572265a131Smrg# Written by Scott James Remnant, 2004 78582265a131Smrg# 78592265a131Smrg# This file is free software; the Free Software Foundation gives 78602265a131Smrg# unlimited permission to copy and/or distribute it, with or without 78612265a131Smrg# modifications, as long as this notice is preserved. 78622265a131Smrg 78632265a131Smrg# Generated from ltversion.in. 78642265a131Smrg 78652265a131Smrg# serial 3012 ltversion.m4 78662265a131Smrg# This file is part of GNU Libtool 78672265a131Smrg 78682265a131Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 78692265a131Smrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 78702265a131Smrg 78712265a131SmrgAC_DEFUN([LTVERSION_VERSION], 78722265a131Smrg[macro_version='2.2.6' 78732265a131Smrgmacro_revision='1.3012' 78742265a131Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 78752265a131Smrg_LT_DECL(, macro_revision, 0) 78762265a131Smrg]) 78772265a131Smrg 78782265a131Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 78792265a131Smrg# 78802265a131Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 78812265a131Smrg# Written by Scott James Remnant, 2004. 78822265a131Smrg# 78832265a131Smrg# This file is free software; the Free Software Foundation gives 78842265a131Smrg# unlimited permission to copy and/or distribute it, with or without 78852265a131Smrg# modifications, as long as this notice is preserved. 78862265a131Smrg 78872265a131Smrg# serial 4 lt~obsolete.m4 78882265a131Smrg 78892265a131Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 78902265a131Smrg# 78912265a131Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 78922265a131Smrg# which have later been changed to m4_define as they aren't part of the 78932265a131Smrg# exported API, or moved to Autoconf or Automake where they belong. 78942265a131Smrg# 78952265a131Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 78962265a131Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 78972265a131Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 78982265a131Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 78992265a131Smrg# and doesn't know about Autoconf macros at all.) 79002265a131Smrg# 79012265a131Smrg# So we provide this file, which has a silly filename so it's always 79022265a131Smrg# included after everything else. This provides aclocal with the 79032265a131Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 79042265a131Smrg# because those macros already exist, or will be overwritten later. 79052265a131Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 79062265a131Smrg# 79072265a131Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 79082265a131Smrg# Yes, that means every name once taken will need to remain here until 79092265a131Smrg# we give up compatibility with versions before 1.7, at which point 79102265a131Smrg# we need to keep only those names which we still refer to. 79112265a131Smrg 79122265a131Smrg# This is to help aclocal find these macros, as it can't see m4_define. 79132265a131SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 79142265a131Smrg 79152265a131Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 79162265a131Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 79172265a131Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 79182265a131Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 79192265a131Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 79202265a131Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 79212265a131Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 79222265a131Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 79232265a131Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 79242265a131Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 79252265a131Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 79262265a131Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 79272265a131Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 79282265a131Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 79292265a131Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 79302265a131Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 79312265a131Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 79322265a131Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 79332265a131Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 79342265a131Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 79352265a131Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 79362265a131Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 79372265a131Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 79382265a131Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 79392265a131Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 79402265a131Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 79412265a131Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 79422265a131Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 79432265a131Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 79442265a131Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 79452265a131Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 79462265a131Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 79472265a131Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 79482265a131Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 79492265a131Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 79502265a131Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 79512265a131Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 79522265a131Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 79532265a131Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 79542265a131Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 79552265a131Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 79562265a131Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 79572265a131Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 79582265a131Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 79592265a131Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 79602265a131Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 79612265a131Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 79622265a131Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 79632265a131Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 79642265a131Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 79652265a131Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 79662265a131Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 79672265a131Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 79682265a131Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 79692265a131Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 79702265a131Smrg 79712265a131Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 79722265a131Smrg# 79732265a131Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 79742265a131Smrg# 79752265a131Smrg# This program is free software; you can redistribute it and/or modify 79762265a131Smrg# it under the terms of the GNU General Public License as published by 79772265a131Smrg# the Free Software Foundation; either version 2 of the License, or 79782265a131Smrg# (at your option) any later version. 79792265a131Smrg# 79802265a131Smrg# This program is distributed in the hope that it will be useful, but 79812265a131Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 79822265a131Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 79832265a131Smrg# General Public License for more details. 79842265a131Smrg# 79852265a131Smrg# You should have received a copy of the GNU General Public License 79862265a131Smrg# along with this program; if not, write to the Free Software 79872265a131Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 79882265a131Smrg# 79892265a131Smrg# As a special exception to the GNU General Public License, if you 79902265a131Smrg# distribute this file as part of a program that contains a 79912265a131Smrg# configuration script generated by Autoconf, you may include it under 79922265a131Smrg# the same distribution terms that you use for the rest of that program. 79932265a131Smrg 79942265a131Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 79952265a131Smrg# ---------------------------------- 79962265a131SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 79972265a131Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 79982265a131Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 79992265a131SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 80002265a131Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 80012265a131Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 80022265a131Smrgfi 80032265a131Smrgif test -n "$PKG_CONFIG"; then 80042265a131Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 80052265a131Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 80062265a131Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 80072265a131Smrg AC_MSG_RESULT([yes]) 80082265a131Smrg else 80092265a131Smrg AC_MSG_RESULT([no]) 80102265a131Smrg PKG_CONFIG="" 80112265a131Smrg fi 80122265a131Smrg 80132265a131Smrgfi[]dnl 80142265a131Smrg])# PKG_PROG_PKG_CONFIG 80152265a131Smrg 80162265a131Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 80172265a131Smrg# 80182265a131Smrg# Check to see whether a particular set of modules exists. Similar 80192265a131Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 80202265a131Smrg# 80212265a131Smrg# 80222265a131Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 80232265a131Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 80242265a131Smrg# PKG_CHECK_EXISTS manually 80252265a131Smrg# -------------------------------------------------------------- 80262265a131SmrgAC_DEFUN([PKG_CHECK_EXISTS], 80272265a131Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 80282265a131Smrgif test -n "$PKG_CONFIG" && \ 80292265a131Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 80302265a131Smrg m4_ifval([$2], [$2], [:]) 80312265a131Smrgm4_ifvaln([$3], [else 80322265a131Smrg $3])dnl 80332265a131Smrgfi]) 80342265a131Smrg 80352265a131Smrg 80362265a131Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 80372265a131Smrg# --------------------------------------------- 80382265a131Smrgm4_define([_PKG_CONFIG], 80392265a131Smrg[if test -n "$$1"; then 80402265a131Smrg pkg_cv_[]$1="$$1" 80412265a131Smrg elif test -n "$PKG_CONFIG"; then 80422265a131Smrg PKG_CHECK_EXISTS([$3], 80432265a131Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 80442265a131Smrg [pkg_failed=yes]) 80452265a131Smrg else 80462265a131Smrg pkg_failed=untried 80472265a131Smrgfi[]dnl 80482265a131Smrg])# _PKG_CONFIG 80492265a131Smrg 80502265a131Smrg# _PKG_SHORT_ERRORS_SUPPORTED 80512265a131Smrg# ----------------------------- 80522265a131SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 80532265a131Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 80542265a131Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 80552265a131Smrg _pkg_short_errors_supported=yes 80562265a131Smrgelse 80572265a131Smrg _pkg_short_errors_supported=no 80582265a131Smrgfi[]dnl 80592265a131Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 80602265a131Smrg 80612265a131Smrg 80622265a131Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 80632265a131Smrg# [ACTION-IF-NOT-FOUND]) 80642265a131Smrg# 80652265a131Smrg# 80662265a131Smrg# Note that if there is a possibility the first call to 80672265a131Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 80682265a131Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 80692265a131Smrg# 80702265a131Smrg# 80712265a131Smrg# -------------------------------------------------------------- 80722265a131SmrgAC_DEFUN([PKG_CHECK_MODULES], 80732265a131Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 80742265a131SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 80752265a131SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 80762265a131Smrg 80772265a131Smrgpkg_failed=no 80782265a131SmrgAC_MSG_CHECKING([for $1]) 80792265a131Smrg 80802265a131Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 80812265a131Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 80822265a131Smrg 80832265a131Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 80842265a131Smrgand $1[]_LIBS to avoid the need to call pkg-config. 80852265a131SmrgSee the pkg-config man page for more details.]) 80862265a131Smrg 80872265a131Smrgif test $pkg_failed = yes; then 80882265a131Smrg _PKG_SHORT_ERRORS_SUPPORTED 80892265a131Smrg if test $_pkg_short_errors_supported = yes; then 80902265a131Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 80912265a131Smrg else 80922265a131Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 80932265a131Smrg fi 80942265a131Smrg # Put the nasty error message in config.log where it belongs 80952265a131Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 80962265a131Smrg 80972265a131Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 80982265a131Smrg[Package requirements ($2) were not met: 80992265a131Smrg 81002265a131Smrg$$1_PKG_ERRORS 81012265a131Smrg 81022265a131SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 81032265a131Smrginstalled software in a non-standard prefix. 81042265a131Smrg 81052265a131Smrg_PKG_TEXT 81062265a131Smrg])], 81072265a131Smrg [AC_MSG_RESULT([no]) 81082265a131Smrg $4]) 81092265a131Smrgelif test $pkg_failed = untried; then 81102265a131Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 81112265a131Smrg[The pkg-config script could not be found or is too old. Make sure it 81122265a131Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 81132265a131Smrgpath to pkg-config. 81142265a131Smrg 81152265a131Smrg_PKG_TEXT 81162265a131Smrg 81172265a131SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 81182265a131Smrg [$4]) 81192265a131Smrgelse 81202265a131Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 81212265a131Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 81222265a131Smrg AC_MSG_RESULT([yes]) 81232265a131Smrg ifelse([$3], , :, [$3]) 81242265a131Smrgfi[]dnl 81252265a131Smrg])# PKG_CHECK_MODULES 81262265a131Smrg 81272265a131Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 81282265a131Smrgdnl 81292265a131Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 81302265a131Smrgdnl 81312265a131Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 81322265a131Smrgdnl copy of this software and associated documentation files (the 81332265a131Smrgdnl "Software"), to deal in the Software without restriction, including 81342265a131Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 81352265a131Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 81362265a131Smrgdnl to whom the Software is furnished to do so, provided that the above 81372265a131Smrgdnl copyright notice(s) and this permission notice appear in all copies of 81382265a131Smrgdnl the Software and that both the above copyright notice(s) and this 81392265a131Smrgdnl permission notice appear in supporting documentation. 81402265a131Smrgdnl 81412265a131Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 81422265a131Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 81432265a131Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81442265a131Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 81452265a131Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 81462265a131Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 81472265a131Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 81482265a131Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 81492265a131Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 81502265a131Smrgdnl 81512265a131Smrgdnl Except as contained in this notice, the name of a copyright holder 81522265a131Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 81532265a131Smrgdnl or other dealings in this Software without prior written authorization 81542265a131Smrgdnl of the copyright holder. 81552265a131Smrg 81562265a131Smrg# XORG_MACROS_VERSION(required-version) 81572265a131Smrg# ------------------------------------- 81582265a131Smrg# Minimum version: 1.1.0 81592265a131Smrg# 81602265a131Smrg# If you're using a macro added in Version 1.1 or newer, include this in 81612265a131Smrg# your configure.ac with the minimum required version, such as: 81622265a131Smrg# XORG_MACROS_VERSION(1.1) 81632265a131Smrg# 81642265a131Smrg# To force at least a version with this macro defined, also add: 81652265a131Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 81662265a131Smrg# 81672265a131Smrg# 81682265a131Smrg# See the "minimum version" comment for each macro you use to see what 81692265a131Smrg# version you require. 81702265a131SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 81712265a131Smrg [XORG_MACROS_needed_version=$1 81722265a131Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 81732265a131Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 81742265a131Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 81752265a131Smrg [XORG_MACROS_version=1.2.1 81762265a131Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 81772265a131Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 81782265a131Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 81792265a131Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 81802265a131Smrg fi 81812265a131Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 81822265a131Smrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 81832265a131Smrg fi 81842265a131Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 81852265a131Smrg]) # XORG_MACROS_VERSION 81862265a131Smrg 81872265a131Smrg# XORG_PROG_RAWCPP() 81882265a131Smrg# ------------------ 81892265a131Smrg# Minimum version: 1.0.0 81902265a131Smrg# 81912265a131Smrg# Find cpp program and necessary flags for use in pre-processing text files 81922265a131Smrg# such as man pages and config files 81932265a131SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 81942265a131SmrgAC_REQUIRE([AC_PROG_CPP]) 81952265a131SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 81962265a131Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 81972265a131Smrg 81982265a131Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 81992265a131Smrg# which is not the best choice for supporting other OS'es, but covers most 82002265a131Smrg# of the ones we need for now. 82012265a131SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 82022265a131SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 82032265a131Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82042265a131Smrg AC_MSG_RESULT([no]) 82052265a131Smrgelse 82062265a131Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82072265a131Smrg RAWCPPFLAGS=-undef 82082265a131Smrg AC_MSG_RESULT([yes]) 82092265a131Smrg # under Cygwin unix is still defined even with -undef 82102265a131Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82112265a131Smrg RAWCPPFLAGS="-undef -ansi" 82122265a131Smrg AC_MSG_RESULT([yes, with -ansi]) 82132265a131Smrg else 82142265a131Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 82152265a131Smrg fi 82162265a131Smrgfi 82172265a131Smrgrm -f conftest.$ac_ext 82182265a131Smrg 82192265a131SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 82202265a131SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 82212265a131Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 82222265a131Smrg AC_MSG_RESULT([no]) 82232265a131Smrgelse 82242265a131Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 82252265a131Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 82262265a131Smrg AC_MSG_RESULT([yes]) 82272265a131Smrg else 82282265a131Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 82292265a131Smrg fi 82302265a131Smrgfi 82312265a131Smrgrm -f conftest.$ac_ext 82322265a131SmrgAC_SUBST(RAWCPPFLAGS) 82332265a131Smrg]) # XORG_PROG_RAWCPP 82342265a131Smrg 82352265a131Smrg# XORG_MANPAGE_SECTIONS() 82362265a131Smrg# ----------------------- 82372265a131Smrg# Minimum version: 1.0.0 82382265a131Smrg# 82392265a131Smrg# Determine which sections man pages go in for the different man page types 82402265a131Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 82412265a131Smrg# Not sure if there's any better way than just hardcoding by OS name. 82422265a131Smrg# Override default settings by setting environment variables 82432265a131Smrg 82442265a131SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 82452265a131SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 82462265a131Smrg 82472265a131Smrgif test x$APP_MAN_SUFFIX = x ; then 82482265a131Smrg APP_MAN_SUFFIX=1 82492265a131Smrgfi 82502265a131Smrgif test x$APP_MAN_DIR = x ; then 82512265a131Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 82522265a131Smrgfi 82532265a131Smrg 82542265a131Smrgif test x$LIB_MAN_SUFFIX = x ; then 82552265a131Smrg LIB_MAN_SUFFIX=3 82562265a131Smrgfi 82572265a131Smrgif test x$LIB_MAN_DIR = x ; then 82582265a131Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 82592265a131Smrgfi 82602265a131Smrg 82612265a131Smrgif test x$FILE_MAN_SUFFIX = x ; then 82622265a131Smrg case $host_os in 82632265a131Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 82642265a131Smrg *) FILE_MAN_SUFFIX=5 ;; 8265444c061aSmrg esac 82662265a131Smrgfi 82672265a131Smrgif test x$FILE_MAN_DIR = x ; then 82682265a131Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 82692265a131Smrgfi 8270444c061aSmrg 82712265a131Smrgif test x$MISC_MAN_SUFFIX = x ; then 8272444c061aSmrg case $host_os in 82732265a131Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 82742265a131Smrg *) MISC_MAN_SUFFIX=7 ;; 82752265a131Smrg esac 82762265a131Smrgfi 82772265a131Smrgif test x$MISC_MAN_DIR = x ; then 82782265a131Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 82792265a131Smrgfi 8280444c061aSmrg 82812265a131Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 82822265a131Smrg case $host_os in 82832265a131Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 82842265a131Smrg *) DRIVER_MAN_SUFFIX=4 ;; 82852265a131Smrg esac 82862265a131Smrgfi 82872265a131Smrgif test x$DRIVER_MAN_DIR = x ; then 82882265a131Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 82892265a131Smrgfi 8290444c061aSmrg 82912265a131Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 82922265a131Smrg case $host_os in 82932265a131Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 82942265a131Smrg *) ADMIN_MAN_SUFFIX=8 ;; 82952265a131Smrg esac 82962265a131Smrgfi 82972265a131Smrgif test x$ADMIN_MAN_DIR = x ; then 82982265a131Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 82992265a131Smrgfi 8300444c061aSmrg 8301444c061aSmrg 83022265a131SmrgAC_SUBST([APP_MAN_SUFFIX]) 83032265a131SmrgAC_SUBST([LIB_MAN_SUFFIX]) 83042265a131SmrgAC_SUBST([FILE_MAN_SUFFIX]) 83052265a131SmrgAC_SUBST([MISC_MAN_SUFFIX]) 83062265a131SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 83072265a131SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 83082265a131SmrgAC_SUBST([APP_MAN_DIR]) 83092265a131SmrgAC_SUBST([LIB_MAN_DIR]) 83102265a131SmrgAC_SUBST([FILE_MAN_DIR]) 83112265a131SmrgAC_SUBST([MISC_MAN_DIR]) 83122265a131SmrgAC_SUBST([DRIVER_MAN_DIR]) 83132265a131SmrgAC_SUBST([ADMIN_MAN_DIR]) 83142265a131Smrg]) # XORG_MANPAGE_SECTIONS 8315444c061aSmrg 83162265a131Smrg# XORG_CHECK_LINUXDOC 83172265a131Smrg# ------------------- 83182265a131Smrg# Minimum version: 1.0.0 83192265a131Smrg# 83202265a131Smrg# Defines the variable MAKE_TEXT if the necessary tools and 83212265a131Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 83222265a131Smrg# Whether or not the necessary tools and files are found can be checked 83232265a131Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 83242265a131SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 83252265a131Smrgif test x$XORG_SGML_PATH = x ; then 83262265a131Smrg XORG_SGML_PATH=$prefix/share/sgml 83272265a131Smrgfi 83282265a131SmrgHAVE_DEFS_ENT= 8329444c061aSmrg 83302265a131Smrgif test x"$cross_compiling" = x"yes" ; then 83312265a131Smrg HAVE_DEFS_ENT=no 83322265a131Smrgelse 83332265a131Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 83342265a131Smrgfi 8335444c061aSmrg 83362265a131SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 83372265a131SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 8338444c061aSmrg 83392265a131SmrgAC_MSG_CHECKING([Whether to build documentation]) 8340444c061aSmrg 83412265a131Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 83422265a131Smrg BUILDDOC=yes 83432265a131Smrgelse 83442265a131Smrg BUILDDOC=no 83452265a131Smrgfi 8346444c061aSmrg 83472265a131SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8348444c061aSmrg 83492265a131SmrgAC_MSG_RESULT([$BUILDDOC]) 8350444c061aSmrg 83512265a131SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 8352444c061aSmrg 83532265a131Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 83542265a131Smrg BUILDPDFDOC=yes 83552265a131Smrgelse 83562265a131Smrg BUILDPDFDOC=no 83572265a131Smrgfi 83582265a131Smrg 83592265a131SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 83602265a131Smrg 83612265a131SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 83622265a131Smrg 83632265a131SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 83642265a131SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 83652265a131SmrgMAKE_PDF="$PS2PDF" 83662265a131SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 83672265a131Smrg 83682265a131SmrgAC_SUBST(MAKE_TEXT) 83692265a131SmrgAC_SUBST(MAKE_PS) 83702265a131SmrgAC_SUBST(MAKE_PDF) 83712265a131SmrgAC_SUBST(MAKE_HTML) 83722265a131Smrg]) # XORG_CHECK_LINUXDOC 83732265a131Smrg 83742265a131Smrg# XORG_CHECK_DOCBOOK 83752265a131Smrg# ------------------- 83762265a131Smrg# Minimum version: 1.0.0 83772265a131Smrg# 83782265a131Smrg# Checks for the ability to build output formats from SGML DocBook source. 83792265a131Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 83802265a131Smrg# indicates whether the necessary tools and files are found and, if set, 83812265a131Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 83822265a131SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 83832265a131Smrgif test x$XORG_SGML_PATH = x ; then 83842265a131Smrg XORG_SGML_PATH=$prefix/share/sgml 83852265a131Smrgfi 83862265a131SmrgHAVE_DEFS_ENT= 83872265a131SmrgBUILDTXTDOC=no 83882265a131SmrgBUILDPDFDOC=no 83892265a131SmrgBUILDPSDOC=no 83902265a131SmrgBUILDHTMLDOC=no 83912265a131Smrg 83922265a131SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 83932265a131Smrg 83942265a131SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 83952265a131SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 83962265a131SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 83972265a131SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 83982265a131Smrg 83992265a131SmrgAC_MSG_CHECKING([Whether to build text documentation]) 84002265a131Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 84012265a131Smrg test x$BUILD_TXTDOC != xno; then 84022265a131Smrg BUILDTXTDOC=yes 84032265a131Smrgfi 84042265a131SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 84052265a131SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 84062265a131Smrg 84072265a131SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 84082265a131Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 84092265a131Smrg test x$BUILD_PDFDOC != xno; then 84102265a131Smrg BUILDPDFDOC=yes 84112265a131Smrgfi 84122265a131SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 84132265a131SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 84142265a131Smrg 84152265a131SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 84162265a131Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 84172265a131Smrg test x$BUILD_PSDOC != xno; then 84182265a131Smrg BUILDPSDOC=yes 84192265a131Smrgfi 84202265a131SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 84212265a131SmrgAC_MSG_RESULT([$BUILDPSDOC]) 84222265a131Smrg 84232265a131SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 84242265a131Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 84252265a131Smrg test x$BUILD_HTMLDOC != xno; then 84262265a131Smrg BUILDHTMLDOC=yes 84272265a131Smrgfi 84282265a131SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 84292265a131SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 84302265a131Smrg 84312265a131SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 84322265a131SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 84332265a131SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 84342265a131SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 84352265a131Smrg 84362265a131SmrgAC_SUBST(MAKE_TEXT) 84372265a131SmrgAC_SUBST(MAKE_PS) 84382265a131SmrgAC_SUBST(MAKE_PDF) 84392265a131SmrgAC_SUBST(MAKE_HTML) 84402265a131Smrg]) # XORG_CHECK_DOCBOOK 84412265a131Smrg 84422265a131Smrg# XORG_CHECK_MALLOC_ZERO 84432265a131Smrg# ---------------------- 84442265a131Smrg# Minimum version: 1.0.0 84452265a131Smrg# 84462265a131Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 84472265a131Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 84482265a131Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 84492265a131SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 84502265a131SmrgAC_ARG_ENABLE(malloc0returnsnull, 84512265a131Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 84522265a131Smrg [malloc(0) returns NULL (default: auto)]), 84532265a131Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 84542265a131Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 84552265a131Smrg 84562265a131SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 84572265a131Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 84582265a131Smrg AC_RUN_IFELSE([ 84592265a131Smrgchar *malloc(); 84602265a131Smrgchar *realloc(); 84612265a131Smrgchar *calloc(); 84622265a131Smrgmain() { 84632265a131Smrg char *m0, *r0, *c0, *p; 84642265a131Smrg m0 = malloc(0); 84652265a131Smrg p = malloc(10); 84662265a131Smrg r0 = realloc(p,0); 84672265a131Smrg c0 = calloc(0); 84682265a131Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 84692265a131Smrg}], 84702265a131Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 84712265a131Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 84722265a131Smrgfi 84732265a131SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 8474444c061aSmrg 84752265a131Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 84762265a131Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 84772265a131Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 84782265a131Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 84792265a131Smrgelse 84802265a131Smrg MALLOC_ZERO_CFLAGS="" 84812265a131Smrg XMALLOC_ZERO_CFLAGS="" 84822265a131Smrg XTMALLOC_ZERO_CFLAGS="" 84832265a131Smrgfi 8484444c061aSmrg 84852265a131SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 84862265a131SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 84872265a131SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 84882265a131Smrg]) # XORG_CHECK_MALLOC_ZERO 8489444c061aSmrg 84902265a131Smrg# XORG_WITH_LINT() 84912265a131Smrg# ---------------- 84922265a131Smrg# Minimum version: 1.1.0 84932265a131Smrg# 84942265a131Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 84952265a131Smrg# is specified. (Use --with-lint=sparse for sparse.) 84962265a131Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 84972265a131Smrg# Sets $LINT_FLAGS to flags to pass to source checker 84982265a131Smrg# Sets LINT automake conditional if enabled (default: disabled) 84992265a131Smrg# 85002265a131SmrgAC_DEFUN([XORG_WITH_LINT],[ 8501444c061aSmrg 85022265a131Smrg# Allow checking code with lint, sparse, etc. 85032265a131SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 85042265a131Smrg [Use a lint-style source code checker (default: disabled)])], 85052265a131Smrg [use_lint=$withval], [use_lint=no]) 85062265a131Smrgif test "x$use_lint" = "xyes" ; then 85072265a131Smrg LINT="lint" 85082265a131Smrgelse 85092265a131Smrg LINT="$use_lint" 85102265a131Smrgfi 85112265a131Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 85122265a131Smrg case $LINT in 85132265a131Smrg lint|*/lint) 85142265a131Smrg case $host_os in 85152265a131Smrg solaris*) 85162265a131Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 85172265a131Smrg ;; 85182265a131Smrg esac 85192265a131Smrg ;; 85202265a131Smrg esac 85212265a131Smrgfi 8522444c061aSmrg 85232265a131SmrgAC_SUBST(LINT) 85242265a131SmrgAC_SUBST(LINT_FLAGS) 85252265a131SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 8526444c061aSmrg 85272265a131Smrg]) # XORG_WITH_LINT 8528444c061aSmrg 85292265a131Smrg# XORG_LINT_LIBRARY(LIBNAME) 85302265a131Smrg# -------------------------- 85312265a131Smrg# Minimum version: 1.1.0 85322265a131Smrg# 85332265a131Smrg# Sets up flags for building lint libraries for checking programs that call 85342265a131Smrg# functions in the library. 85352265a131Smrg# Disabled by default, enable with --enable-lint-library 85362265a131Smrg# Sets: 85372265a131Smrg# @LINTLIB@ - name of lint library file to make 85382265a131Smrg# MAKE_LINT_LIB - automake conditional 85392265a131Smrg# 8540444c061aSmrg 85412265a131SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 85422265a131SmrgAC_REQUIRE([XORG_WITH_LINT]) 85432265a131Smrg# Build lint "library" for more indepth checks of programs calling this library 85442265a131SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 85452265a131Smrg [Create lint library (default: disabled)])], 85462265a131Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 85472265a131Smrgif test "x$make_lint_lib" != "xno" ; then 85482265a131Smrg if test "x$LINT" = "xno" ; then 85492265a131Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 85502265a131Smrg fi 85512265a131Smrg if test "x$make_lint_lib" = "xyes" ; then 85522265a131Smrg LINTLIB=llib-l$1.ln 85532265a131Smrg else 85542265a131Smrg LINTLIB=$make_lint_lib 85552265a131Smrg fi 85562265a131Smrgfi 85572265a131SmrgAC_SUBST(LINTLIB) 85582265a131SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 8559444c061aSmrg 85602265a131Smrg]) # XORG_LINT_LIBRARY 8561444c061aSmrg 85622265a131Smrg# XORG_CWARNFLAGS 85632265a131Smrg# --------------- 85642265a131Smrg# Minimum version: 1.2.0 85652265a131Smrg# 85662265a131Smrg# Defines CWARNFLAGS to enable C compiler warnings. 85672265a131Smrg# 85682265a131SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 85692265a131SmrgAC_REQUIRE([AC_PROG_CC]) 85702265a131Smrgif test "x$GCC" = xyes ; then 85712265a131Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 85722265a131Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 85732265a131Smrg-Wbad-function-cast" 85742265a131Smrg case `gcc -dumpversion` in 85752265a131Smrg 3.4.* | 4.*) 85762265a131Smrg CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" 85772265a131Smrg ;; 8578444c061aSmrg esac 85792265a131Smrgelse 85802265a131Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 85812265a131Smrg if test "x$SUNCC" = "xyes"; then 85822265a131Smrg CWARNFLAGS="-v" 85832265a131Smrg fi 85842265a131Smrgfi 85852265a131SmrgAC_SUBST(CWARNFLAGS) 85862265a131Smrg]) # XORG_CWARNFLAGS 85872265a131Smrgdnl Copyright 2005 Red Hat, Inc 85882265a131Smrgdnl 85892265a131Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 85902265a131Smrgdnl documentation for any purpose is hereby granted without fee, provided that 85912265a131Smrgdnl the above copyright notice appear in all copies and that both that 85922265a131Smrgdnl copyright notice and this permission notice appear in supporting 85932265a131Smrgdnl documentation. 85942265a131Smrgdnl 85952265a131Smrgdnl The above copyright notice and this permission notice shall be included 85962265a131Smrgdnl in all copies or substantial portions of the Software. 85972265a131Smrgdnl 85982265a131Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 85992265a131Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 86002265a131Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 86012265a131Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 86022265a131Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 86032265a131Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 86042265a131Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 86052265a131Smrgdnl 86062265a131Smrgdnl Except as contained in this notice, the name of the copyright holders shall 86072265a131Smrgdnl not be used in advertising or otherwise to promote the sale, use or 86082265a131Smrgdnl other dealings in this Software without prior written authorization 86092265a131Smrgdnl from the copyright holders. 86102265a131Smrgdnl 86112265a131Smrg 86122265a131Smrg# XORG_RELEASE_VERSION 86132265a131Smrg# -------------------- 86142265a131Smrg# Adds --with/without-release-string and changes the PACKAGE and 86152265a131Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 86162265a131Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 86172265a131Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 86182265a131Smrg 86192265a131SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 86202265a131Smrg AC_ARG_WITH(release-version, 86212265a131Smrg AC_HELP_STRING([--with-release-version=STRING], 86222265a131Smrg [Use release version string in package name]), 86232265a131Smrg [RELEASE_VERSION="$withval"], 86242265a131Smrg [RELEASE_VERSION=""]) 86252265a131Smrg if test "x$RELEASE_VERSION" != "x"; then 86262265a131Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 86272265a131Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 86282265a131Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 86292265a131Smrg fi 86302265a131Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 86312265a131Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 86322265a131Smrg [Major version of this package]) 86332265a131Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 86342265a131Smrg if test "x$PVM" = "x"; then 86352265a131Smrg PVM="0" 86362265a131Smrg fi 86372265a131Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 86382265a131Smrg [$PVM], 86392265a131Smrg [Minor version of this package]) 86402265a131Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 86412265a131Smrg if test "x$PVP" = "x"; then 86422265a131Smrg PVP="0" 86432265a131Smrg fi 86442265a131Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 86452265a131Smrg [$PVP], 86462265a131Smrg [Patch version of this package]) 8647444c061aSmrg]) 8648444c061aSmrg 86492265a131Smrg# XORG_CHANGELOG() 86502265a131Smrg# ---------------- 86512265a131Smrg# Minimum version: 1.2.0 8652444c061aSmrg# 86532265a131Smrg# Defines the variable CHANGELOG_CMD as the command to generate 86542265a131Smrg# ChangeLog from git. 8655444c061aSmrg# 86562265a131Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 8657444c061aSmrg# 86582265a131SmrgAC_DEFUN([XORG_CHANGELOG], [ 86592265a131SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 86602265a131Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 86612265a131Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 86622265a131SmrgAC_SUBST([CHANGELOG_CMD]) 86632265a131SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 86642265a131Smrg]) # XORG_CHANGELOG 86652265a131Smrg 86662265a131Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8667444c061aSmrg# 86682265a131Smrg# This file is free software; the Free Software Foundation 86692265a131Smrg# gives unlimited permission to copy and/or distribute it, 86702265a131Smrg# with or without modifications, as long as this notice is preserved. 8671444c061aSmrg 86722265a131Smrg# AM_AUTOMAKE_VERSION(VERSION) 86732265a131Smrg# ---------------------------- 86742265a131Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 86752265a131Smrg# generated from the m4 files accompanying Automake X.Y. 86762265a131Smrg# (This private macro should not be called outside this file.) 86772265a131SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 86782265a131Smrg[am__api_version='1.10' 86792265a131Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 86802265a131Smrgdnl require some minimum version. Point them to the right macro. 86812265a131Smrgm4_if([$1], [1.10.2], [], 86822265a131Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 86832265a131Smrg]) 8684444c061aSmrg 86852265a131Smrg# _AM_AUTOCONF_VERSION(VERSION) 86862265a131Smrg# ----------------------------- 86872265a131Smrg# aclocal traces this macro to find the Autoconf version. 86882265a131Smrg# This is a private macro too. Using m4_define simplifies 86892265a131Smrg# the logic in aclocal, which can simply ignore this definition. 86902265a131Smrgm4_define([_AM_AUTOCONF_VERSION], []) 8691444c061aSmrg 86922265a131Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 86932265a131Smrg# ------------------------------- 86942265a131Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 86952265a131Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 86962265a131SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 86972265a131Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl 86982265a131Smrgm4_ifndef([AC_AUTOCONF_VERSION], 86992265a131Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 87002265a131Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8701444c061aSmrg 87022265a131Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8703444c061aSmrg 87042265a131Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 87052265a131Smrg# 87062265a131Smrg# This file is free software; the Free Software Foundation 87072265a131Smrg# gives unlimited permission to copy and/or distribute it, 87082265a131Smrg# with or without modifications, as long as this notice is preserved. 8709444c061aSmrg 87102265a131Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 87112265a131Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 87122265a131Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 87132265a131Smrg# 87142265a131Smrg# Of course, Automake must honor this variable whenever it calls a 87152265a131Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 87162265a131Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 87172265a131Smrg# depending on how configure is run. This is pretty annoying, since 87182265a131Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 87192265a131Smrg# source directory, any form will work fine, but in subdirectories a 87202265a131Smrg# relative path needs to be adjusted first. 87212265a131Smrg# 87222265a131Smrg# $ac_aux_dir/missing 87232265a131Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 87242265a131Smrg# $top_srcdir/$ac_aux_dir/missing 87252265a131Smrg# fails if $ac_aux_dir is absolute, 87262265a131Smrg# fails when called from a subdirectory in a VPATH build with 87272265a131Smrg# a relative $ac_aux_dir 87282265a131Smrg# 87292265a131Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87302265a131Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87312265a131Smrg# harmless because $srcdir is `.', but things will broke when you 87322265a131Smrg# start a VPATH build or use an absolute $srcdir. 87332265a131Smrg# 87342265a131Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 87352265a131Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 87362265a131Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 87372265a131Smrg# and then we would define $MISSING as 87382265a131Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 87392265a131Smrg# This will work as long as MISSING is not called from configure, because 87402265a131Smrg# unfortunately $(top_srcdir) has no meaning in configure. 87412265a131Smrg# However there are other variables, like CC, which are often used in 87422265a131Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 87432265a131Smrg# 87442265a131Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 87452265a131Smrg# absolute PATH. The drawback is that using absolute paths prevent a 87462265a131Smrg# configured tree to be moved without reconfiguration. 8747444c061aSmrg 87482265a131SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 87492265a131Smrg[dnl Rely on autoconf to set up CDPATH properly. 87502265a131SmrgAC_PREREQ([2.50])dnl 87512265a131Smrg# expand $ac_aux_dir to an absolute path 87522265a131Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 87532265a131Smrg]) 8754444c061aSmrg 87552265a131Smrg# AM_CONDITIONAL -*- Autoconf -*- 8756444c061aSmrg 87572265a131Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 87582265a131Smrg# Free Software Foundation, Inc. 87592265a131Smrg# 87602265a131Smrg# This file is free software; the Free Software Foundation 87612265a131Smrg# gives unlimited permission to copy and/or distribute it, 87622265a131Smrg# with or without modifications, as long as this notice is preserved. 8763444c061aSmrg 87642265a131Smrg# serial 8 8765444c061aSmrg 87662265a131Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 87672265a131Smrg# ------------------------------------- 87682265a131Smrg# Define a conditional. 87692265a131SmrgAC_DEFUN([AM_CONDITIONAL], 87702265a131Smrg[AC_PREREQ(2.52)dnl 87712265a131Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 87722265a131Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 87732265a131SmrgAC_SUBST([$1_TRUE])dnl 87742265a131SmrgAC_SUBST([$1_FALSE])dnl 87752265a131Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 87762265a131Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 87772265a131Smrgif $2; then 87782265a131Smrg $1_TRUE= 87792265a131Smrg $1_FALSE='#' 87802265a131Smrgelse 87812265a131Smrg $1_TRUE='#' 87822265a131Smrg $1_FALSE= 87832265a131Smrgfi 87842265a131SmrgAC_CONFIG_COMMANDS_PRE( 87852265a131Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 87862265a131Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 87872265a131SmrgUsually this means the macro was only invoked conditionally.]]) 87882265a131Smrgfi])]) 8789444c061aSmrg 87902265a131Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 87912265a131Smrg# Free Software Foundation, Inc. 87922265a131Smrg# 87932265a131Smrg# This file is free software; the Free Software Foundation 87942265a131Smrg# gives unlimited permission to copy and/or distribute it, 87952265a131Smrg# with or without modifications, as long as this notice is preserved. 8796444c061aSmrg 87972265a131Smrg# serial 9 8798444c061aSmrg 87992265a131Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 88002265a131Smrg# written in clear, in which case automake, when reading aclocal.m4, 88012265a131Smrg# will think it sees a *use*, and therefore will trigger all it's 88022265a131Smrg# C support machinery. Also note that it means that autoscan, seeing 88032265a131Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8804444c061aSmrg 8805444c061aSmrg 88062265a131Smrg# _AM_DEPENDENCIES(NAME) 88072265a131Smrg# ---------------------- 88082265a131Smrg# See how the compiler implements dependency checking. 88092265a131Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 88102265a131Smrg# We try a few techniques and use that to set a single cache variable. 88112265a131Smrg# 88122265a131Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 88132265a131Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 88142265a131Smrg# dependency, and given that the user is not expected to run this macro, 88152265a131Smrg# just rely on AC_PROG_CC. 88162265a131SmrgAC_DEFUN([_AM_DEPENDENCIES], 88172265a131Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 88182265a131SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 88192265a131SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 88202265a131SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8821444c061aSmrg 88222265a131Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 88232265a131Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 88242265a131Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 88252265a131Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 88262265a131Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 88272265a131Smrg [depcc="$$1" am_compiler_list=]) 8828444c061aSmrg 88292265a131SmrgAC_CACHE_CHECK([dependency style of $depcc], 88302265a131Smrg [am_cv_$1_dependencies_compiler_type], 88312265a131Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 88322265a131Smrg # We make a subdir and do the tests there. Otherwise we can end up 88332265a131Smrg # making bogus files that we don't know about and never remove. For 88342265a131Smrg # instance it was reported that on HP-UX the gcc test will end up 88352265a131Smrg # making a dummy file named `D' -- because `-MD' means `put the output 88362265a131Smrg # in D'. 88372265a131Smrg mkdir conftest.dir 88382265a131Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 88392265a131Smrg # using a relative directory. 88402265a131Smrg cp "$am_depcomp" conftest.dir 88412265a131Smrg cd conftest.dir 88422265a131Smrg # We will build objects and dependencies in a subdirectory because 88432265a131Smrg # it helps to detect inapplicable dependency modes. For instance 88442265a131Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 88452265a131Smrg # side effect of compilation, but ICC will put the dependencies in 88462265a131Smrg # the current directory while Tru64 will put them in the object 88472265a131Smrg # directory. 88482265a131Smrg mkdir sub 8849444c061aSmrg 88502265a131Smrg am_cv_$1_dependencies_compiler_type=none 88512265a131Smrg if test "$am_compiler_list" = ""; then 88522265a131Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 88532265a131Smrg fi 88542265a131Smrg for depmode in $am_compiler_list; do 88552265a131Smrg # Setup a source with many dependencies, because some compilers 88562265a131Smrg # like to wrap large dependency lists on column 80 (with \), and 88572265a131Smrg # we should not choose a depcomp mode which is confused by this. 88582265a131Smrg # 88592265a131Smrg # We need to recreate these files for each test, as the compiler may 88602265a131Smrg # overwrite some of them when testing with obscure command lines. 88612265a131Smrg # This happens at least with the AIX C compiler. 88622265a131Smrg : > sub/conftest.c 88632265a131Smrg for i in 1 2 3 4 5 6; do 88642265a131Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 88652265a131Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 88662265a131Smrg # Solaris 8's {/usr,}/bin/sh. 88672265a131Smrg touch sub/conftst$i.h 88682265a131Smrg done 88692265a131Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8870444c061aSmrg 88712265a131Smrg case $depmode in 88722265a131Smrg nosideeffect) 88732265a131Smrg # after this tag, mechanisms are not by side-effect, so they'll 88742265a131Smrg # only be used when explicitly requested 88752265a131Smrg if test "x$enable_dependency_tracking" = xyes; then 88762265a131Smrg continue 8877444c061aSmrg else 88782265a131Smrg break 8879444c061aSmrg fi 8880444c061aSmrg ;; 88812265a131Smrg none) break ;; 8882444c061aSmrg esac 88832265a131Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 88842265a131Smrg # mode. It turns out that the SunPro C++ compiler does not properly 88852265a131Smrg # handle `-M -o', and we need to detect this. 88862265a131Smrg if depmode=$depmode \ 88872265a131Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 88882265a131Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 88892265a131Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 88902265a131Smrg >/dev/null 2>conftest.err && 88912265a131Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 88922265a131Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 88932265a131Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 88942265a131Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 88952265a131Smrg # icc doesn't choke on unknown options, it will just issue warnings 88962265a131Smrg # or remarks (even with -Werror). So we grep stderr for any message 88972265a131Smrg # that says an option was ignored or not supported. 88982265a131Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 88992265a131Smrg # icc: Command line warning: ignoring option '-M'; no argument required 89002265a131Smrg # The diagnosis changed in icc 8.0: 89012265a131Smrg # icc: Command line remark: option '-MP' not supported 89022265a131Smrg if (grep 'ignoring option' conftest.err || 89032265a131Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 89042265a131Smrg am_cv_$1_dependencies_compiler_type=$depmode 89052265a131Smrg break 8906444c061aSmrg fi 89072265a131Smrg fi 89082265a131Smrg done 8909444c061aSmrg 89102265a131Smrg cd .. 89112265a131Smrg rm -rf conftest.dir 89122265a131Smrgelse 89132265a131Smrg am_cv_$1_dependencies_compiler_type=none 89142265a131Smrgfi 89152265a131Smrg]) 89162265a131SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 89172265a131SmrgAM_CONDITIONAL([am__fastdep$1], [ 89182265a131Smrg test "x$enable_dependency_tracking" != xno \ 89192265a131Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 89202265a131Smrg]) 8921444c061aSmrg 8922444c061aSmrg 89232265a131Smrg# AM_SET_DEPDIR 89242265a131Smrg# ------------- 89252265a131Smrg# Choose a directory name for dependency files. 89262265a131Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 89272265a131SmrgAC_DEFUN([AM_SET_DEPDIR], 89282265a131Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 89292265a131SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 89302265a131Smrg]) 8931444c061aSmrg 8932444c061aSmrg 89332265a131Smrg# AM_DEP_TRACK 89342265a131Smrg# ------------ 89352265a131SmrgAC_DEFUN([AM_DEP_TRACK], 89362265a131Smrg[AC_ARG_ENABLE(dependency-tracking, 89372265a131Smrg[ --disable-dependency-tracking speeds up one-time build 89382265a131Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 89392265a131Smrgif test "x$enable_dependency_tracking" != xno; then 89402265a131Smrg am_depcomp="$ac_aux_dir/depcomp" 89412265a131Smrg AMDEPBACKSLASH='\' 89422265a131Smrgfi 89432265a131SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 89442265a131SmrgAC_SUBST([AMDEPBACKSLASH])dnl 89452265a131Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 89462265a131Smrg]) 8947444c061aSmrg 89482265a131Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8949444c061aSmrg 89502265a131Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 89512265a131Smrg# Free Software Foundation, Inc. 89522265a131Smrg# 89532265a131Smrg# This file is free software; the Free Software Foundation 89542265a131Smrg# gives unlimited permission to copy and/or distribute it, 89552265a131Smrg# with or without modifications, as long as this notice is preserved. 8956444c061aSmrg 89572265a131Smrg#serial 4 8958444c061aSmrg 89592265a131Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 89602265a131Smrg# ------------------------------ 89612265a131SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 89622265a131Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files 89632265a131Smrg# are listed without --file. Let's play safe and only enable the eval 89642265a131Smrg# if we detect the quoting. 89652265a131Smrgcase $CONFIG_FILES in 89662265a131Smrg*\'*) eval set x "$CONFIG_FILES" ;; 89672265a131Smrg*) set x $CONFIG_FILES ;; 89682265a131Smrgesac 89692265a131Smrgshift 89702265a131Smrgfor mf 89712265a131Smrgdo 89722265a131Smrg # Strip MF so we end up with the name of the file. 89732265a131Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 89742265a131Smrg # Check whether this is an Automake generated Makefile or not. 89752265a131Smrg # We used to match only the files named `Makefile.in', but 89762265a131Smrg # some people rename them; so instead we look at the file content. 89772265a131Smrg # Grep'ing the first line is not enough: some people post-process 89782265a131Smrg # each Makefile.in and add a new line on top of each file to say so. 89792265a131Smrg # Grep'ing the whole file is not good either: AIX grep has a line 89802265a131Smrg # limit of 2048, but all sed's we know have understand at least 4000. 89812265a131Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 89822265a131Smrg dirpart=`AS_DIRNAME("$mf")` 89832265a131Smrg else 89842265a131Smrg continue 89852265a131Smrg fi 89862265a131Smrg # Extract the definition of DEPDIR, am__include, and am__quote 89872265a131Smrg # from the Makefile without running `make'. 89882265a131Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 89892265a131Smrg test -z "$DEPDIR" && continue 89902265a131Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 89912265a131Smrg test -z "am__include" && continue 89922265a131Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 89932265a131Smrg # When using ansi2knr, U may be empty or an underscore; expand it 89942265a131Smrg U=`sed -n 's/^U = //p' < "$mf"` 89952265a131Smrg # Find all dependency output files, they are included files with 89962265a131Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 89972265a131Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 89982265a131Smrg # expansion. 89992265a131Smrg for file in `sed -n " 90002265a131Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 90012265a131Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 90022265a131Smrg # Make sure the directory exists. 90032265a131Smrg test -f "$dirpart/$file" && continue 90042265a131Smrg fdir=`AS_DIRNAME(["$file"])` 90052265a131Smrg AS_MKDIR_P([$dirpart/$fdir]) 90062265a131Smrg # echo "creating $dirpart/$file" 90072265a131Smrg echo '# dummy' > "$dirpart/$file" 90082265a131Smrg done 90092265a131Smrgdone 90102265a131Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9011444c061aSmrg 9012444c061aSmrg 90132265a131Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 90142265a131Smrg# ----------------------------- 90152265a131Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 90162265a131Smrg# 90172265a131Smrg# This code is only required when automatic dependency tracking 90182265a131Smrg# is enabled. FIXME. This creates each `.P' file that we will 90192265a131Smrg# need in order to bootstrap the dependency handling code. 90202265a131SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 90212265a131Smrg[AC_CONFIG_COMMANDS([depfiles], 90222265a131Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 90232265a131Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 90242265a131Smrg]) 9025444c061aSmrg 90262265a131Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 90272265a131Smrg# Free Software Foundation, Inc. 90282265a131Smrg# 90292265a131Smrg# This file is free software; the Free Software Foundation 90302265a131Smrg# gives unlimited permission to copy and/or distribute it, 90312265a131Smrg# with or without modifications, as long as this notice is preserved. 9032444c061aSmrg 90332265a131Smrg# serial 8 9034444c061aSmrg 90352265a131Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 90362265a131SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9037444c061aSmrg 90382265a131Smrg# Do all the work for Automake. -*- Autoconf -*- 9039444c061aSmrg 90402265a131Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 90412265a131Smrg# 2005, 2006, 2008 Free Software Foundation, Inc. 90422265a131Smrg# 90432265a131Smrg# This file is free software; the Free Software Foundation 90442265a131Smrg# gives unlimited permission to copy and/or distribute it, 90452265a131Smrg# with or without modifications, as long as this notice is preserved. 9046444c061aSmrg 90472265a131Smrg# serial 13 9048444c061aSmrg 90492265a131Smrg# This macro actually does too much. Some checks are only needed if 90502265a131Smrg# your package does certain things. But this isn't really a big deal. 9051444c061aSmrg 90522265a131Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 90532265a131Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 90542265a131Smrg# ----------------------------------------------- 90552265a131Smrg# The call with PACKAGE and VERSION arguments is the old style 90562265a131Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 90572265a131Smrg# and VERSION should now be passed to AC_INIT and removed from 90582265a131Smrg# the call to AM_INIT_AUTOMAKE. 90592265a131Smrg# We support both call styles for the transition. After 90602265a131Smrg# the next Automake release, Autoconf can make the AC_INIT 90612265a131Smrg# arguments mandatory, and then we can depend on a new Autoconf 90622265a131Smrg# release and drop the old call support. 90632265a131SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 90642265a131Smrg[AC_PREREQ([2.60])dnl 90652265a131Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 90662265a131Smrgdnl the ones we care about. 90672265a131Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 90682265a131SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 90692265a131SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 90702265a131Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 90712265a131Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 90722265a131Smrg # is not polluted with repeated "-I." 90732265a131Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 90742265a131Smrg # test to see if srcdir already configured 90752265a131Smrg if test -f $srcdir/config.status; then 90762265a131Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 90772265a131Smrg fi 90782265a131Smrgfi 9079444c061aSmrg 90802265a131Smrg# test whether we have cygpath 90812265a131Smrgif test -z "$CYGPATH_W"; then 90822265a131Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 90832265a131Smrg CYGPATH_W='cygpath -w' 90842265a131Smrg else 90852265a131Smrg CYGPATH_W=echo 90862265a131Smrg fi 90872265a131Smrgfi 90882265a131SmrgAC_SUBST([CYGPATH_W]) 9089444c061aSmrg 90902265a131Smrg# Define the identity of the package. 90912265a131Smrgdnl Distinguish between old-style and new-style calls. 90922265a131Smrgm4_ifval([$2], 90932265a131Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 90942265a131Smrg AC_SUBST([PACKAGE], [$1])dnl 90952265a131Smrg AC_SUBST([VERSION], [$2])], 90962265a131Smrg[_AM_SET_OPTIONS([$1])dnl 90972265a131Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 90982265a131Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 90992265a131Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 91002265a131Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 91012265a131Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9102444c061aSmrg 91032265a131Smrg_AM_IF_OPTION([no-define],, 91042265a131Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 91052265a131Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 9106444c061aSmrg 91072265a131Smrg# Some tools Automake needs. 91082265a131SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 91092265a131SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 91102265a131SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 91112265a131SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 91122265a131SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 91132265a131SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 91142265a131SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 91152265a131SmrgAM_PROG_INSTALL_SH 91162265a131SmrgAM_PROG_INSTALL_STRIP 91172265a131SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 91182265a131Smrg# We need awk for the "check" target. The system "awk" is bad on 91192265a131Smrg# some platforms. 91202265a131SmrgAC_REQUIRE([AC_PROG_AWK])dnl 91212265a131SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 91222265a131SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 91232265a131Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 91242265a131Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 91252265a131Smrg [_AM_PROG_TAR([v7])])]) 91262265a131Smrg_AM_IF_OPTION([no-dependencies],, 91272265a131Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 91282265a131Smrg [_AM_DEPENDENCIES(CC)], 91292265a131Smrg [define([AC_PROG_CC], 91302265a131Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 91312265a131SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 91322265a131Smrg [_AM_DEPENDENCIES(CXX)], 91332265a131Smrg [define([AC_PROG_CXX], 91342265a131Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 91352265a131SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 91362265a131Smrg [_AM_DEPENDENCIES(OBJC)], 91372265a131Smrg [define([AC_PROG_OBJC], 91382265a131Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 91392265a131Smrg]) 91402265a131Smrg]) 9141444c061aSmrg 9142444c061aSmrg 91432265a131Smrg# When config.status generates a header, we must update the stamp-h file. 91442265a131Smrg# This file resides in the same directory as the config header 91452265a131Smrg# that is generated. The stamp files are numbered to have different names. 9146444c061aSmrg 91472265a131Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 91482265a131Smrg# loop where config.status creates the headers, so we can generate 91492265a131Smrg# our stamp files there. 91502265a131SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 91512265a131Smrg[# Compute $1's index in $config_headers. 91522265a131Smrg_am_arg=$1 91532265a131Smrg_am_stamp_count=1 91542265a131Smrgfor _am_header in $config_headers :; do 91552265a131Smrg case $_am_header in 91562265a131Smrg $_am_arg | $_am_arg:* ) 91572265a131Smrg break ;; 91582265a131Smrg * ) 91592265a131Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 91602265a131Smrg esac 91612265a131Smrgdone 91622265a131Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9163444c061aSmrg 91642265a131Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 91652265a131Smrg# 91662265a131Smrg# This file is free software; the Free Software Foundation 91672265a131Smrg# gives unlimited permission to copy and/or distribute it, 91682265a131Smrg# with or without modifications, as long as this notice is preserved. 9169444c061aSmrg 91702265a131Smrg# AM_PROG_INSTALL_SH 91712265a131Smrg# ------------------ 91722265a131Smrg# Define $install_sh. 91732265a131SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 91742265a131Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 91752265a131Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 91762265a131SmrgAC_SUBST(install_sh)]) 9177444c061aSmrg 91782265a131Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 91792265a131Smrg# 91802265a131Smrg# This file is free software; the Free Software Foundation 91812265a131Smrg# gives unlimited permission to copy and/or distribute it, 91822265a131Smrg# with or without modifications, as long as this notice is preserved. 9183444c061aSmrg 91842265a131Smrg# serial 2 9185444c061aSmrg 91862265a131Smrg# Check whether the underlying file-system supports filenames 91872265a131Smrg# with a leading dot. For instance MS-DOS doesn't. 91882265a131SmrgAC_DEFUN([AM_SET_LEADING_DOT], 91892265a131Smrg[rm -rf .tst 2>/dev/null 91902265a131Smrgmkdir .tst 2>/dev/null 91912265a131Smrgif test -d .tst; then 91922265a131Smrg am__leading_dot=. 91932265a131Smrgelse 91942265a131Smrg am__leading_dot=_ 91952265a131Smrgfi 91962265a131Smrgrmdir .tst 2>/dev/null 91972265a131SmrgAC_SUBST([am__leading_dot])]) 9198444c061aSmrg 91992265a131Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 92002265a131Smrg# From Jim Meyering 9201444c061aSmrg 92022265a131Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 92032265a131Smrg# Free Software Foundation, Inc. 92042265a131Smrg# 92052265a131Smrg# This file is free software; the Free Software Foundation 92062265a131Smrg# gives unlimited permission to copy and/or distribute it, 92072265a131Smrg# with or without modifications, as long as this notice is preserved. 9208444c061aSmrg 92092265a131Smrg# serial 4 9210444c061aSmrg 92112265a131SmrgAC_DEFUN([AM_MAINTAINER_MODE], 92122265a131Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 92132265a131Smrg dnl maintainer-mode is disabled by default 92142265a131Smrg AC_ARG_ENABLE(maintainer-mode, 92152265a131Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 92162265a131Smrg (and sometimes confusing) to the casual installer], 92172265a131Smrg USE_MAINTAINER_MODE=$enableval, 92182265a131Smrg USE_MAINTAINER_MODE=no) 92192265a131Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 92202265a131Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 92212265a131Smrg MAINT=$MAINTAINER_MODE_TRUE 92222265a131Smrg AC_SUBST(MAINT)dnl 92232265a131Smrg] 92242265a131Smrg) 9225444c061aSmrg 92262265a131SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9227444c061aSmrg 92282265a131Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9229444c061aSmrg 92302265a131Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 92312265a131Smrg# 92322265a131Smrg# This file is free software; the Free Software Foundation 92332265a131Smrg# gives unlimited permission to copy and/or distribute it, 92342265a131Smrg# with or without modifications, as long as this notice is preserved. 9235444c061aSmrg 92362265a131Smrg# serial 3 9237444c061aSmrg 92382265a131Smrg# AM_MAKE_INCLUDE() 92392265a131Smrg# ----------------- 92402265a131Smrg# Check to see how make treats includes. 92412265a131SmrgAC_DEFUN([AM_MAKE_INCLUDE], 92422265a131Smrg[am_make=${MAKE-make} 92432265a131Smrgcat > confinc << 'END' 92442265a131Smrgam__doit: 92452265a131Smrg @echo done 92462265a131Smrg.PHONY: am__doit 92472265a131SmrgEND 92482265a131Smrg# If we don't find an include directive, just comment out the code. 92492265a131SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 92502265a131Smrgam__include="#" 92512265a131Smrgam__quote= 92522265a131Smrg_am_result=none 92532265a131Smrg# First try GNU make style include. 92542265a131Smrgecho "include confinc" > confmf 92552265a131Smrg# We grep out `Entering directory' and `Leaving directory' 92562265a131Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 92572265a131Smrg# In particular we don't look at `^make:' because GNU make might 92582265a131Smrg# be invoked under some other name (usually "gmake"), in which 92592265a131Smrg# case it prints its new name instead of `make'. 92602265a131Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 92612265a131Smrg am__include=include 92622265a131Smrg am__quote= 92632265a131Smrg _am_result=GNU 92642265a131Smrgfi 92652265a131Smrg# Now try BSD make style include. 92662265a131Smrgif test "$am__include" = "#"; then 92672265a131Smrg echo '.include "confinc"' > confmf 92682265a131Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 92692265a131Smrg am__include=.include 92702265a131Smrg am__quote="\"" 92712265a131Smrg _am_result=BSD 92722265a131Smrg fi 92732265a131Smrgfi 92742265a131SmrgAC_SUBST([am__include]) 92752265a131SmrgAC_SUBST([am__quote]) 92762265a131SmrgAC_MSG_RESULT([$_am_result]) 92772265a131Smrgrm -f confinc confmf 9278444c061aSmrg]) 9279444c061aSmrg 92802265a131Smrg# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 92812265a131Smrg# Free Software Foundation, Inc. 9282444c061aSmrg# 92832265a131Smrg# This file is free software; the Free Software Foundation 92842265a131Smrg# gives unlimited permission to copy and/or distribute it, 92852265a131Smrg# with or without modifications, as long as this notice is preserved. 9286444c061aSmrg 92872265a131Smrg# serial 6 9288444c061aSmrg 92892265a131Smrg# AM_PROG_CC_C_O 92902265a131Smrg# -------------- 92912265a131Smrg# Like AC_PROG_CC_C_O, but changed for automake. 92922265a131SmrgAC_DEFUN([AM_PROG_CC_C_O], 92932265a131Smrg[AC_REQUIRE([AC_PROG_CC_C_O])dnl 92942265a131SmrgAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 92952265a131SmrgAC_REQUIRE_AUX_FILE([compile])dnl 92962265a131Smrg# FIXME: we rely on the cache variable name because 92972265a131Smrg# there is no other way. 92982265a131Smrgset dummy $CC 92992265a131Smrgam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 93002265a131Smrgeval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 93012265a131Smrgif test "$am_t" != yes; then 93022265a131Smrg # Losing compiler, so override with the script. 93032265a131Smrg # FIXME: It is wrong to rewrite CC. 93042265a131Smrg # But if we don't then we get into trouble of one sort or another. 93052265a131Smrg # A longer-term fix would be to have automake use am__CC in this case, 93062265a131Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 93072265a131Smrg CC="$am_aux_dir/compile $CC" 93082265a131Smrgfi 93092265a131Smrgdnl Make sure AC_PROG_CC is never called again, or it will override our 93102265a131Smrgdnl setting of CC. 93112265a131Smrgm4_define([AC_PROG_CC], 93122265a131Smrg [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 93132265a131Smrg]) 9314444c061aSmrg 93152265a131Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9316444c061aSmrg 93172265a131Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 93182265a131Smrg# Free Software Foundation, Inc. 9319444c061aSmrg# 93202265a131Smrg# This file is free software; the Free Software Foundation 93212265a131Smrg# gives unlimited permission to copy and/or distribute it, 93222265a131Smrg# with or without modifications, as long as this notice is preserved. 9323444c061aSmrg 93242265a131Smrg# serial 5 9325444c061aSmrg 93262265a131Smrg# AM_MISSING_PROG(NAME, PROGRAM) 93272265a131Smrg# ------------------------------ 93282265a131SmrgAC_DEFUN([AM_MISSING_PROG], 93292265a131Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 93302265a131Smrg$1=${$1-"${am_missing_run}$2"} 93312265a131SmrgAC_SUBST($1)]) 9332444c061aSmrg 9333444c061aSmrg 93342265a131Smrg# AM_MISSING_HAS_RUN 93352265a131Smrg# ------------------ 93362265a131Smrg# Define MISSING if not defined so far and test if it supports --run. 93372265a131Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 93382265a131SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 93392265a131Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 93402265a131SmrgAC_REQUIRE_AUX_FILE([missing])dnl 93412265a131Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 93422265a131Smrg# Use eval to expand $SHELL 93432265a131Smrgif eval "$MISSING --run true"; then 93442265a131Smrg am_missing_run="$MISSING --run " 93452265a131Smrgelse 93462265a131Smrg am_missing_run= 93472265a131Smrg AC_MSG_WARN([`missing' script is too old or missing]) 93482265a131Smrgfi 9349444c061aSmrg]) 9350444c061aSmrg 93512265a131Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 93522265a131Smrg# 93532265a131Smrg# This file is free software; the Free Software Foundation 93542265a131Smrg# gives unlimited permission to copy and/or distribute it, 93552265a131Smrg# with or without modifications, as long as this notice is preserved. 9356444c061aSmrg 93572265a131Smrg# AM_PROG_MKDIR_P 93582265a131Smrg# --------------- 93592265a131Smrg# Check for `mkdir -p'. 93602265a131SmrgAC_DEFUN([AM_PROG_MKDIR_P], 93612265a131Smrg[AC_PREREQ([2.60])dnl 93622265a131SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 93632265a131Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 93642265a131Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 93652265a131Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 93662265a131Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 93672265a131Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 93682265a131Smrgdnl adjustment using top_builddir (which is defined more often than 93692265a131Smrgdnl MKDIR_P). 93702265a131SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 93712265a131Smrgcase $mkdir_p in 93722265a131Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 93732265a131Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 93742265a131Smrgesac 9375444c061aSmrg]) 9376444c061aSmrg 93772265a131Smrg# Helper functions for option handling. -*- Autoconf -*- 93782265a131Smrg 93792265a131Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 9380444c061aSmrg# 93812265a131Smrg# This file is free software; the Free Software Foundation 93822265a131Smrg# gives unlimited permission to copy and/or distribute it, 93832265a131Smrg# with or without modifications, as long as this notice is preserved. 93842265a131Smrg 93852265a131Smrg# serial 4 93862265a131Smrg 93872265a131Smrg# _AM_MANGLE_OPTION(NAME) 93882265a131Smrg# ----------------------- 93892265a131SmrgAC_DEFUN([_AM_MANGLE_OPTION], 93902265a131Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 93912265a131Smrg 93922265a131Smrg# _AM_SET_OPTION(NAME) 93932265a131Smrg# ------------------------------ 93942265a131Smrg# Set option NAME. Presently that only means defining a flag for this option. 93952265a131SmrgAC_DEFUN([_AM_SET_OPTION], 93962265a131Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 9397444c061aSmrg 93982265a131Smrg# _AM_SET_OPTIONS(OPTIONS) 9399444c061aSmrg# ---------------------------------- 94002265a131Smrg# OPTIONS is a space-separated list of Automake options. 94012265a131SmrgAC_DEFUN([_AM_SET_OPTIONS], 94022265a131Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9403444c061aSmrg 94042265a131Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 94052265a131Smrg# ------------------------------------------- 94062265a131Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 94072265a131SmrgAC_DEFUN([_AM_IF_OPTION], 94082265a131Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 94092265a131Smrg 94102265a131Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 94112265a131Smrg 94122265a131Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 94132265a131Smrg# Free Software Foundation, Inc. 9414444c061aSmrg# 94152265a131Smrg# This file is free software; the Free Software Foundation 94162265a131Smrg# gives unlimited permission to copy and/or distribute it, 94172265a131Smrg# with or without modifications, as long as this notice is preserved. 9418444c061aSmrg 94192265a131Smrg# serial 4 9420444c061aSmrg 94212265a131Smrg# AM_SANITY_CHECK 94222265a131Smrg# --------------- 94232265a131SmrgAC_DEFUN([AM_SANITY_CHECK], 94242265a131Smrg[AC_MSG_CHECKING([whether build environment is sane]) 94252265a131Smrg# Just in case 94262265a131Smrgsleep 1 94272265a131Smrgecho timestamp > conftest.file 94282265a131Smrg# Do `set' in a subshell so we don't clobber the current shell's 94292265a131Smrg# arguments. Must try -L first in case configure is actually a 94302265a131Smrg# symlink; some systems play weird games with the mod time of symlinks 94312265a131Smrg# (eg FreeBSD returns the mod time of the symlink's containing 94322265a131Smrg# directory). 94332265a131Smrgif ( 94342265a131Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 94352265a131Smrg if test "$[*]" = "X"; then 94362265a131Smrg # -L didn't work. 94372265a131Smrg set X `ls -t $srcdir/configure conftest.file` 94382265a131Smrg fi 94392265a131Smrg rm -f conftest.file 94402265a131Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 94412265a131Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 94422265a131Smrg 94432265a131Smrg # If neither matched, then we have a broken ls. This can happen 94442265a131Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 94452265a131Smrg # broken ls alias from the environment. This has actually 94462265a131Smrg # happened. Such a system could not be considered "sane". 94472265a131Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 94482265a131Smrgalias in your environment]) 94492265a131Smrg fi 94502265a131Smrg 94512265a131Smrg test "$[2]" = conftest.file 94522265a131Smrg ) 94532265a131Smrgthen 94542265a131Smrg # Ok. 94552265a131Smrg : 9456444c061aSmrgelse 94572265a131Smrg AC_MSG_ERROR([newly created file is older than distributed files! 94582265a131SmrgCheck your system clock]) 94592265a131Smrgfi 94602265a131SmrgAC_MSG_RESULT(yes)]) 9461444c061aSmrg 94622265a131Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9463444c061aSmrg# 94642265a131Smrg# This file is free software; the Free Software Foundation 94652265a131Smrg# gives unlimited permission to copy and/or distribute it, 94662265a131Smrg# with or without modifications, as long as this notice is preserved. 94672265a131Smrg 94682265a131Smrg# AM_PROG_INSTALL_STRIP 94692265a131Smrg# --------------------- 94702265a131Smrg# One issue with vendor `install' (even GNU) is that you can't 94712265a131Smrg# specify the program used to strip binaries. This is especially 94722265a131Smrg# annoying in cross-compiling environments, where the build's strip 94732265a131Smrg# is unlikely to handle the host's binaries. 94742265a131Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 94752265a131Smrg# always use install-sh in `make install-strip', and initialize 94762265a131Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 94772265a131SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 94782265a131Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 94792265a131Smrg# Installed binaries are usually stripped using `strip' when the user 94802265a131Smrg# run `make install-strip'. However `strip' might not be the right 94812265a131Smrg# tool to use in cross-compilation environments, therefore Automake 94822265a131Smrg# will honor the `STRIP' environment variable to overrule this program. 94832265a131Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 94842265a131Smrgif test "$cross_compiling" != no; then 94852265a131Smrg AC_CHECK_TOOL([STRIP], [strip], :) 94862265a131Smrgfi 94872265a131SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 94882265a131SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 94892265a131Smrg 94902265a131Smrg# Copyright (C) 2006 Free Software Foundation, Inc. 9491444c061aSmrg# 94922265a131Smrg# This file is free software; the Free Software Foundation 94932265a131Smrg# gives unlimited permission to copy and/or distribute it, 94942265a131Smrg# with or without modifications, as long as this notice is preserved. 9495444c061aSmrg 94962265a131Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 94972265a131Smrg# --------------------------- 94982265a131Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 94992265a131Smrg# This macro is traced by Automake. 95002265a131SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9501444c061aSmrg 95022265a131Smrg# Check how to create a tarball. -*- Autoconf -*- 9503444c061aSmrg 95042265a131Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 95052265a131Smrg# 95062265a131Smrg# This file is free software; the Free Software Foundation 95072265a131Smrg# gives unlimited permission to copy and/or distribute it, 95082265a131Smrg# with or without modifications, as long as this notice is preserved. 9509444c061aSmrg 95102265a131Smrg# serial 2 9511444c061aSmrg 95122265a131Smrg# _AM_PROG_TAR(FORMAT) 95132265a131Smrg# -------------------- 95142265a131Smrg# Check how to create a tarball in format FORMAT. 95152265a131Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 95162265a131Smrg# 95172265a131Smrg# Substitute a variable $(am__tar) that is a command 95182265a131Smrg# writing to stdout a FORMAT-tarball containing the directory 95192265a131Smrg# $tardir. 95202265a131Smrg# tardir=directory && $(am__tar) > result.tar 95212265a131Smrg# 95222265a131Smrg# Substitute a variable $(am__untar) that extract such 95232265a131Smrg# a tarball read from stdin. 95242265a131Smrg# $(am__untar) < result.tar 95252265a131SmrgAC_DEFUN([_AM_PROG_TAR], 95262265a131Smrg[# Always define AMTAR for backward compatibility. 95272265a131SmrgAM_MISSING_PROG([AMTAR], [tar]) 95282265a131Smrgm4_if([$1], [v7], 95292265a131Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 95302265a131Smrg [m4_case([$1], [ustar],, [pax],, 95312265a131Smrg [m4_fatal([Unknown tar format])]) 95322265a131SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 95332265a131Smrg# Loop over all known methods to create a tar archive until one works. 95342265a131Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 95352265a131Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 95362265a131Smrg# Do not fold the above two line into one, because Tru64 sh and 95372265a131Smrg# Solaris sh will not grok spaces in the rhs of `-'. 95382265a131Smrgfor _am_tool in $_am_tools 95392265a131Smrgdo 95402265a131Smrg case $_am_tool in 95412265a131Smrg gnutar) 95422265a131Smrg for _am_tar in tar gnutar gtar; 95432265a131Smrg do 95442265a131Smrg AM_RUN_LOG([$_am_tar --version]) && break 95452265a131Smrg done 95462265a131Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 95472265a131Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 95482265a131Smrg am__untar="$_am_tar -xf -" 95492265a131Smrg ;; 95502265a131Smrg plaintar) 95512265a131Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 95522265a131Smrg # ustar tarball either. 95532265a131Smrg (tar --version) >/dev/null 2>&1 && continue 95542265a131Smrg am__tar='tar chf - "$$tardir"' 95552265a131Smrg am__tar_='tar chf - "$tardir"' 95562265a131Smrg am__untar='tar xf -' 95572265a131Smrg ;; 95582265a131Smrg pax) 95592265a131Smrg am__tar='pax -L -x $1 -w "$$tardir"' 95602265a131Smrg am__tar_='pax -L -x $1 -w "$tardir"' 95612265a131Smrg am__untar='pax -r' 95622265a131Smrg ;; 95632265a131Smrg cpio) 95642265a131Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 95652265a131Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 95662265a131Smrg am__untar='cpio -i -H $1 -d' 95672265a131Smrg ;; 95682265a131Smrg none) 95692265a131Smrg am__tar=false 95702265a131Smrg am__tar_=false 95712265a131Smrg am__untar=false 95722265a131Smrg ;; 95732265a131Smrg esac 9574444c061aSmrg 95752265a131Smrg # If the value was cached, stop now. We just wanted to have am__tar 95762265a131Smrg # and am__untar set. 95772265a131Smrg test -n "${am_cv_prog_tar_$1}" && break 9578444c061aSmrg 95792265a131Smrg # tar/untar a dummy directory, and stop if the command works 95802265a131Smrg rm -rf conftest.dir 95812265a131Smrg mkdir conftest.dir 95822265a131Smrg echo GrepMe > conftest.dir/file 95832265a131Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 95842265a131Smrg rm -rf conftest.dir 95852265a131Smrg if test -s conftest.tar; then 95862265a131Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 95872265a131Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 95882265a131Smrg fi 95892265a131Smrgdone 95902265a131Smrgrm -rf conftest.dir 95912265a131Smrg 95922265a131SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 95932265a131SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 95942265a131SmrgAC_SUBST([am__tar]) 95952265a131SmrgAC_SUBST([am__untar]) 95962265a131Smrg]) # _AM_PROG_TAR 9597444c061aSmrg 9598444c061aSmrgm4_include([acinclude.m4]) 9599