aclocal.m4 revision 1477040f
11477040fSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2444c061aSmrg 3444c061aSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42ae83157Smrg# 2005, 2006, 2007, 2008, 2009 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 161477040fSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 171477040fSmrg[m4_warning([this file was generated for autoconf 2.65. 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 221477040fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23444c061aSmrg# 241477040fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 251477040fSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 261477040fSmrg# Written by Gordon Matzigkeit, 1996 27444c061aSmrg# 281477040fSmrg# This file is free software; the Free Software Foundation gives 291477040fSmrg# unlimited permission to copy and/or distribute it, with or without 301477040fSmrg# modifications, as long as this notice is preserved. 311477040fSmrg 321477040fSmrgm4_define([_LT_COPYING], [dnl 331477040fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 341477040fSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 351477040fSmrg# Written by Gordon Matzigkeit, 1996 36444c061aSmrg# 371477040fSmrg# This file is part of GNU Libtool. 38444c061aSmrg# 391477040fSmrg# GNU Libtool is free software; you can redistribute it and/or 401477040fSmrg# modify it under the terms of the GNU General Public License as 411477040fSmrg# published by the Free Software Foundation; either version 2 of 421477040fSmrg# the License, or (at your option) any later version. 43444c061aSmrg# 441477040fSmrg# As a special exception to the GNU General Public License, 451477040fSmrg# if you distribute this file as part of a program or library that 461477040fSmrg# is built using GNU Libtool, you may include this file under the 471477040fSmrg# same distribution terms that you use for the rest of that program. 48444c061aSmrg# 491477040fSmrg# GNU Libtool is distributed in the hope that it will be useful, 501477040fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 511477040fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 521477040fSmrg# GNU General Public License for more details. 532265a131Smrg# 541477040fSmrg# You should have received a copy of the GNU General Public License 551477040fSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 561477040fSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 571477040fSmrg# obtained by writing to the Free Software Foundation, Inc., 581477040fSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 591477040fSmrg]) 60444c061aSmrg 611477040fSmrg# serial 56 LT_INIT 621477040fSmrg 631477040fSmrg 641477040fSmrg# LT_PREREQ(VERSION) 651477040fSmrg# ------------------ 661477040fSmrg# Complain and exit if this libtool version is less that VERSION. 671477040fSmrgm4_defun([LT_PREREQ], 681477040fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 691477040fSmrg [m4_default([$3], 701477040fSmrg [m4_fatal([Libtool version $1 or higher is required], 711477040fSmrg 63)])], 721477040fSmrg [$2])]) 731477040fSmrg 741477040fSmrg 751477040fSmrg# _LT_CHECK_BUILDDIR 761477040fSmrg# ------------------ 771477040fSmrg# Complain if the absolute build directory name contains unusual characters 781477040fSmrgm4_defun([_LT_CHECK_BUILDDIR], 791477040fSmrg[case `pwd` in 801477040fSmrg *\ * | *\ *) 811477040fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 821477040fSmrgesac 832265a131Smrg]) 84444c061aSmrg 85444c061aSmrg 861477040fSmrg# LT_INIT([OPTIONS]) 871477040fSmrg# ------------------ 881477040fSmrgAC_DEFUN([LT_INIT], 891477040fSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 901477040fSmrgAC_BEFORE([$0], [LT_LANG])dnl 911477040fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 921477040fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 931477040fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 941477040fSmrg 951477040fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 961477040fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 971477040fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 981477040fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 991477040fSmrgdnl unless we require an AC_DEFUNed macro: 1001477040fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1011477040fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1021477040fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1031477040fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1041477040fSmrgm4_require([_LT_PROG_LTMAIN])dnl 1051477040fSmrg 1061477040fSmrgdnl Parse OPTIONS 1071477040fSmrg_LT_SET_OPTIONS([$0], [$1]) 108444c061aSmrg 1091477040fSmrg# This can be used to rebuild libtool when needed 1101477040fSmrgLIBTOOL_DEPS="$ltmain" 111444c061aSmrg 1121477040fSmrg# Always use our own libtool. 1131477040fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1141477040fSmrgAC_SUBST(LIBTOOL)dnl 115444c061aSmrg 1161477040fSmrg_LT_SETUP 117444c061aSmrg 1181477040fSmrg# Only expand once: 1191477040fSmrgm4_define([LT_INIT]) 1201477040fSmrg])# LT_INIT 121444c061aSmrg 1221477040fSmrg# Old names: 1231477040fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1241477040fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1251477040fSmrgdnl aclocal-1.4 backwards compatibility: 1261477040fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1271477040fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128444c061aSmrg 1292265a131Smrg 1301477040fSmrg# _LT_CC_BASENAME(CC) 1311477040fSmrg# ------------------- 1321477040fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1331477040fSmrgm4_defun([_LT_CC_BASENAME], 1341477040fSmrg[for cc_temp in $1""; do 1351477040fSmrg case $cc_temp in 1361477040fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1371477040fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1381477040fSmrg \-*) ;; 1391477040fSmrg *) break;; 1401477040fSmrg esac 1411477040fSmrgdone 1421477040fSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1431477040fSmrg]) 1441477040fSmrg 1451477040fSmrg 1461477040fSmrg# _LT_FILEUTILS_DEFAULTS 1472265a131Smrg# ---------------------- 1481477040fSmrg# It is okay to use these file commands and assume they have been set 1491477040fSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1501477040fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1511477040fSmrg[: ${CP="cp -f"} 1521477040fSmrg: ${MV="mv -f"} 1531477040fSmrg: ${RM="rm -f"} 1541477040fSmrg])# _LT_FILEUTILS_DEFAULTS 1551477040fSmrg 1561477040fSmrg 1571477040fSmrg# _LT_SETUP 1581477040fSmrg# --------- 1591477040fSmrgm4_defun([_LT_SETUP], 1601477040fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611477040fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1621477040fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1631477040fSmrg_LT_DECL([], [host], [0])dnl 1641477040fSmrg_LT_DECL([], [host_os], [0])dnl 1651477040fSmrgdnl 1661477040fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1671477040fSmrg_LT_DECL([], [build], [0])dnl 1681477040fSmrg_LT_DECL([], [build_os], [0])dnl 1691477040fSmrgdnl 1701477040fSmrgAC_REQUIRE([AC_PROG_CC])dnl 1711477040fSmrgAC_REQUIRE([LT_PATH_LD])dnl 1721477040fSmrgAC_REQUIRE([LT_PATH_NM])dnl 1731477040fSmrgdnl 1741477040fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1751477040fSmrgtest -z "$LN_S" && LN_S="ln -s" 1761477040fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1771477040fSmrgdnl 1781477040fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1791477040fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1801477040fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1811477040fSmrgdnl 1821477040fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1831477040fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1841477040fSmrgm4_require([_LT_CMD_RELOAD])dnl 1851477040fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1861477040fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1871477040fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1881477040fSmrg 1891477040fSmrg_LT_CONFIG_LIBTOOL_INIT([ 1901477040fSmrg# See if we are running on zsh, and set the options which allow our 1911477040fSmrg# commands through without removal of \ escapes INIT. 1921477040fSmrgif test -n "\${ZSH_VERSION+set}" ; then 1931477040fSmrg setopt NO_GLOB_SUBST 1941477040fSmrgfi 1951477040fSmrg]) 1961477040fSmrgif test -n "${ZSH_VERSION+set}" ; then 1971477040fSmrg setopt NO_GLOB_SUBST 1981477040fSmrgfi 199444c061aSmrg 2001477040fSmrg_LT_CHECK_OBJDIR 201444c061aSmrg 2021477040fSmrgm4_require([_LT_TAG_COMPILER])dnl 2031477040fSmrg_LT_PROG_ECHO_BACKSLASH 204444c061aSmrg 2051477040fSmrgcase $host_os in 2061477040fSmrgaix3*) 2071477040fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2081477040fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2091477040fSmrg # vanish in a puff of smoke. 2101477040fSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 2111477040fSmrg COLLECT_NAMES= 2121477040fSmrg export COLLECT_NAMES 2132265a131Smrg fi 2141477040fSmrg ;; 2151477040fSmrgesac 2162265a131Smrg 2171477040fSmrg# Sed substitution that helps us do robust quoting. It backslashifies 2181477040fSmrg# metacharacters that are still active within double-quoted strings. 2191477040fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220444c061aSmrg 2211477040fSmrg# Same as above, but do not quote variable references. 2221477040fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223444c061aSmrg 2241477040fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2251477040fSmrg# double_quote_subst'ed string. 2261477040fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2271477040fSmrg 2281477040fSmrg# Sed substitution to delay expansion of an escaped single quote. 2291477040fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2301477040fSmrg 2311477040fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2321477040fSmrgno_glob_subst='s/\*/\\\*/g' 2331477040fSmrg 2341477040fSmrg# Global variables: 2351477040fSmrgofile=libtool 2361477040fSmrgcan_build_shared=yes 2371477040fSmrg 2381477040fSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 2391477040fSmrg# which needs '.lib'). 2401477040fSmrglibext=a 2411477040fSmrg 2421477040fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2431477040fSmrg 2441477040fSmrgold_CC="$CC" 2451477040fSmrgold_CFLAGS="$CFLAGS" 2461477040fSmrg 2471477040fSmrg# Set sane defaults for various variables 2481477040fSmrgtest -z "$CC" && CC=cc 2491477040fSmrgtest -z "$LTCC" && LTCC=$CC 2501477040fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2511477040fSmrgtest -z "$LD" && LD=ld 2521477040fSmrgtest -z "$ac_objext" && ac_objext=o 2531477040fSmrg 2541477040fSmrg_LT_CC_BASENAME([$compiler]) 2551477040fSmrg 2561477040fSmrg# Only perform the check for file, if the check method requires it 2571477040fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2581477040fSmrgcase $deplibs_check_method in 2591477040fSmrgfile_magic*) 2601477040fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2611477040fSmrg _LT_PATH_MAGIC 2621477040fSmrg fi 2631477040fSmrg ;; 2641477040fSmrgesac 2651477040fSmrg 2661477040fSmrg# Use C for the default configuration in the libtool script 2671477040fSmrgLT_SUPPORTED_TAG([CC]) 2681477040fSmrg_LT_LANG_C_CONFIG 2691477040fSmrg_LT_LANG_DEFAULT_CONFIG 2701477040fSmrg_LT_CONFIG_COMMANDS 2711477040fSmrg])# _LT_SETUP 2721477040fSmrg 2731477040fSmrg 2741477040fSmrg# _LT_PROG_LTMAIN 2751477040fSmrg# --------------- 2761477040fSmrg# Note that this code is called both from `configure', and `config.status' 2771477040fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2781477040fSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2791477040fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 2801477040fSmrgm4_defun([_LT_PROG_LTMAIN], 2811477040fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2821477040fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2831477040fSmrgltmain="$ac_aux_dir/ltmain.sh" 2841477040fSmrg])# _LT_PROG_LTMAIN 2851477040fSmrg 2861477040fSmrg 2871477040fSmrg 2881477040fSmrg# So that we can recreate a full libtool script including additional 2891477040fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2901477040fSmrg# in macros and then make a single call at the end using the `libtool' 2911477040fSmrg# label. 2921477040fSmrg 2931477040fSmrg 2941477040fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2951477040fSmrg# ---------------------------------------- 2961477040fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2971477040fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2981477040fSmrg[m4_ifval([$1], 2991477040fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3001477040fSmrg [$1 3011477040fSmrg])])]) 3021477040fSmrg 3031477040fSmrg# Initialize. 3041477040fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3051477040fSmrg 3061477040fSmrg 3071477040fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3081477040fSmrg# ------------------------------ 3091477040fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3101477040fSmrgm4_define([_LT_CONFIG_LIBTOOL], 3111477040fSmrg[m4_ifval([$1], 3121477040fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3131477040fSmrg [$1 3141477040fSmrg])])]) 3151477040fSmrg 3161477040fSmrg# Initialize. 3171477040fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3181477040fSmrg 3191477040fSmrg 3201477040fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3211477040fSmrg# ----------------------------------------------------- 3221477040fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3231477040fSmrg[_LT_CONFIG_LIBTOOL([$1]) 3241477040fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3252ae83157Smrg]) 3261477040fSmrg 3271477040fSmrg 3281477040fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3291477040fSmrg# ----------------------------- 3301477040fSmrg# Add leading comment marks to the start of each line, and a trailing 3311477040fSmrg# full-stop to the whole comment if one is not present already. 3321477040fSmrgm4_define([_LT_FORMAT_COMMENT], 3331477040fSmrg[m4_ifval([$1], [ 3341477040fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3351477040fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3361477040fSmrg)]) 3371477040fSmrg 3381477040fSmrg 3391477040fSmrg 3401477040fSmrg 3411477040fSmrg 3421477040fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3431477040fSmrg# ------------------------------------------------------------------- 3441477040fSmrg# CONFIGNAME is the name given to the value in the libtool script. 3451477040fSmrg# VARNAME is the (base) name used in the configure script. 3461477040fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3471477040fSmrg# VARNAME. Any other value will be used directly. 3481477040fSmrgm4_define([_LT_DECL], 3491477040fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3501477040fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3511477040fSmrg [m4_ifval([$1], [$1], [$2])]) 3521477040fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3531477040fSmrg m4_ifval([$4], 3541477040fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3551477040fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3561477040fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3572ae83157Smrg]) 3582265a131Smrg 3592265a131Smrg 3601477040fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3611477040fSmrg# -------------------------------------------------------- 3621477040fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3631477040fSmrg 3641477040fSmrg 3651477040fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3661477040fSmrg# ------------------------------------------------ 3671477040fSmrgm4_define([lt_decl_tag_varnames], 3681477040fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3691477040fSmrg 3701477040fSmrg 3711477040fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3721477040fSmrg# --------------------------------------------------------- 3731477040fSmrgm4_define([_lt_decl_filter], 3741477040fSmrg[m4_case([$#], 3751477040fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3761477040fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3771477040fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3781477040fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3791477040fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3802ae83157Smrg]) 3812265a131Smrg 3822265a131Smrg 3831477040fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3841477040fSmrg# -------------------------------------------------- 3851477040fSmrgm4_define([lt_decl_quote_varnames], 3861477040fSmrg[_lt_decl_filter([value], [1], $@)]) 3871477040fSmrg 3881477040fSmrg 3891477040fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3901477040fSmrg# --------------------------------------------------- 3911477040fSmrgm4_define([lt_decl_dquote_varnames], 3921477040fSmrg[_lt_decl_filter([value], [2], $@)]) 3931477040fSmrg 3941477040fSmrg 3951477040fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3961477040fSmrg# --------------------------------------------------- 3971477040fSmrgm4_define([lt_decl_varnames_tagged], 3981477040fSmrg[m4_assert([$# <= 2])dnl 3991477040fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4001477040fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4011477040fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4021477040fSmrgm4_define([_lt_decl_varnames_tagged], 4031477040fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4041477040fSmrg 4051477040fSmrg 4061477040fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4071477040fSmrg# ------------------------------------------------ 4081477040fSmrgm4_define([lt_decl_all_varnames], 4091477040fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4101477040fSmrg m4_if([$2], [], 4111477040fSmrg m4_quote(lt_decl_varnames), 4121477040fSmrg m4_quote(m4_shift($@))))[]dnl 4131477040fSmrg]) 4141477040fSmrgm4_define([_lt_decl_all_varnames], 4151477040fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4161477040fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4172ae83157Smrg]) 4182265a131Smrg 4192265a131Smrg 4201477040fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4211477040fSmrg# ------------------------------------ 4221477040fSmrg# Quote a variable value, and forward it to `config.status' so that its 4231477040fSmrg# declaration there will have the same value as in `configure'. VARNAME 4241477040fSmrg# must have a single quote delimited value for this to work. 4251477040fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4261477040fSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 4272265a131Smrg 4282265a131Smrg 4291477040fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4302265a131Smrg# ------------------------------ 4311477040fSmrg# We delimit libtool config variables with single quotes, so when 4321477040fSmrg# we write them to config.status, we have to be sure to quote all 4331477040fSmrg# embedded single quotes properly. In configure, this macro expands 4341477040fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4351477040fSmrg# 4361477040fSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 4371477040fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4381477040fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4391477040fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4402265a131Smrg 4412265a131Smrg 4421477040fSmrg# _LT_LIBTOOL_TAGS 4431477040fSmrg# ---------------- 4441477040fSmrg# Output comment and list of tags supported by the script 4451477040fSmrgm4_defun([_LT_LIBTOOL_TAGS], 4461477040fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4471477040fSmrgavailable_tags="_LT_TAGS"dnl 448444c061aSmrg]) 449444c061aSmrg 4501477040fSmrg 4511477040fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4521477040fSmrg# ----------------------------------- 4531477040fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4541477040fSmrg# expand to a commented shell variable setting: 4552ae83157Smrg# 4561477040fSmrg# # Some comment about what VAR is for. 4571477040fSmrg# visible_name=$lt_internal_name 4581477040fSmrgm4_define([_LT_LIBTOOL_DECLARE], 4591477040fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4601477040fSmrg [description])))[]dnl 4611477040fSmrgm4_pushdef([_libtool_name], 4621477040fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4631477040fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4641477040fSmrg [0], [_libtool_name=[$]$1], 4651477040fSmrg [1], [_libtool_name=$lt_[]$1], 4661477040fSmrg [2], [_libtool_name=$lt_[]$1], 4671477040fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4681477040fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4691477040fSmrg]) 470444c061aSmrg 471444c061aSmrg 4721477040fSmrg# _LT_LIBTOOL_CONFIG_VARS 4731477040fSmrg# ----------------------- 4741477040fSmrg# Produce commented declarations of non-tagged libtool config variables 4751477040fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4761477040fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4771477040fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4781477040fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4791477040fSmrg[m4_foreach([_lt_var], 4801477040fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4811477040fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482444c061aSmrg 483444c061aSmrg 4841477040fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 4851477040fSmrg# ------------------------- 4861477040fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 4871477040fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4881477040fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489444c061aSmrg 490444c061aSmrg 4911477040fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4921477040fSmrg# ------------------------------ 4931477040fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494444c061aSmrg 495444c061aSmrg 4961477040fSmrg# _LT_CONFIG_COMMANDS 4971477040fSmrg# ------------------- 4981477040fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4991477040fSmrg# variables for single and double quote escaping we saved from calls 5001477040fSmrg# to _LT_DECL, we can put quote escaped variables declarations 5011477040fSmrg# into `config.status', and then the shell code to quote escape them in 5021477040fSmrg# for loops in `config.status'. Finally, any additional code accumulated 5031477040fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5041477040fSmrgm4_defun([_LT_CONFIG_COMMANDS], 5051477040fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5061477040fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5071477040fSmrg dnl instead of duplicating it all over again into config.status, 5081477040fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5091477040fSmrg dnl needs to know what name is stored there: 5101477040fSmrg [AC_CONFIG_COMMANDS([libtool], 5111477040fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5121477040fSmrg dnl If the libtool generation code is destined for config.status, 5131477040fSmrg dnl expand the accumulated commands and init code now: 5141477040fSmrg [AC_CONFIG_COMMANDS([libtool], 5151477040fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5161477040fSmrg])#_LT_CONFIG_COMMANDS 5171477040fSmrg 5181477040fSmrg 5191477040fSmrg# Initialize. 5201477040fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5211477040fSmrg[ 522444c061aSmrg 5231477040fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5241477040fSmrg# if CDPATH is set. 5251477040fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5262265a131Smrg 5271477040fSmrgsed_quote_subst='$sed_quote_subst' 5281477040fSmrgdouble_quote_subst='$double_quote_subst' 5291477040fSmrgdelay_variable_subst='$delay_variable_subst' 5301477040fSmrg_LT_CONFIG_STATUS_DECLARATIONS 5311477040fSmrgLTCC='$LTCC' 5321477040fSmrgLTCFLAGS='$LTCFLAGS' 5331477040fSmrgcompiler='$compiler_DEFAULT' 5341477040fSmrg 5351477040fSmrg# Quote evaled strings. 5361477040fSmrgfor var in lt_decl_all_varnames([[ \ 5371477040fSmrg]], lt_decl_quote_varnames); do 5381477040fSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5391477040fSmrg *[[\\\\\\\`\\"\\\$]]*) 5401477040fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5411477040fSmrg ;; 5421477040fSmrg *) 5431477040fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5441477040fSmrg ;; 5451477040fSmrg esac 5461477040fSmrgdone 5472265a131Smrg 5481477040fSmrg# Double-quote double-evaled strings. 5491477040fSmrgfor var in lt_decl_all_varnames([[ \ 5501477040fSmrg]], lt_decl_dquote_varnames); do 5511477040fSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5521477040fSmrg *[[\\\\\\\`\\"\\\$]]*) 5531477040fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5541477040fSmrg ;; 5551477040fSmrg *) 5561477040fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5571477040fSmrg ;; 5581477040fSmrg esac 5591477040fSmrgdone 5601477040fSmrg 5611477040fSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 5621477040fSmrgcase \$lt_ECHO in 5631477040fSmrg*'\\\[$]0 --fallback-echo"')dnl " 5641477040fSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 5651477040fSmrg ;; 5661477040fSmrgesac 5671477040fSmrg 5681477040fSmrg_LT_OUTPUT_LIBTOOL_INIT 569444c061aSmrg]) 570444c061aSmrg 571444c061aSmrg 5721477040fSmrg# LT_OUTPUT 5731477040fSmrg# --------- 5741477040fSmrg# This macro allows early generation of the libtool script (before 5751477040fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 5761477040fSmrg# tests. 5771477040fSmrgAC_DEFUN([LT_OUTPUT], 5781477040fSmrg[: ${CONFIG_LT=./config.lt} 5791477040fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 5801477040fSmrgcat >"$CONFIG_LT" <<_LTEOF 5811477040fSmrg#! $SHELL 5821477040fSmrg# Generated by $as_me. 5831477040fSmrg# Run this file to recreate a libtool stub with the current configuration. 5841477040fSmrg 5851477040fSmrglt_cl_silent=false 5861477040fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 5871477040fSmrg_LTEOF 5881477040fSmrg 5891477040fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 5901477040fSmrgAS_SHELL_SANITIZE 5911477040fSmrg_AS_PREPARE 5921477040fSmrg 5931477040fSmrgexec AS_MESSAGE_FD>&1 5941477040fSmrgexec AS_MESSAGE_LOG_FD>>config.log 5951477040fSmrg{ 5961477040fSmrg echo 5971477040fSmrg AS_BOX([Running $as_me.]) 5981477040fSmrg} >&AS_MESSAGE_LOG_FD 599444c061aSmrg 6001477040fSmrglt_cl_help="\ 6011477040fSmrg\`$as_me' creates a local libtool stub from the current configuration, 6021477040fSmrgfor use in further configure time tests before the real libtool is 6031477040fSmrggenerated. 604444c061aSmrg 6051477040fSmrgUsage: $[0] [[OPTIONS]] 6062265a131Smrg 6071477040fSmrg -h, --help print this help, then exit 6081477040fSmrg -V, --version print version number, then exit 6091477040fSmrg -q, --quiet do not print progress messages 6101477040fSmrg -d, --debug don't remove temporary files 611444c061aSmrg 6121477040fSmrgReport bugs to <bug-libtool@gnu.org>." 6131477040fSmrg 6141477040fSmrglt_cl_version="\ 6151477040fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6161477040fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6171477040fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6181477040fSmrg 6191477040fSmrgCopyright (C) 2008 Free Software Foundation, Inc. 6201477040fSmrgThis config.lt script is free software; the Free Software Foundation 6211477040fSmrggives unlimited permision to copy, distribute and modify it." 6221477040fSmrg 6231477040fSmrgwhile test $[#] != 0 6241477040fSmrgdo 6251477040fSmrg case $[1] in 6261477040fSmrg --version | --v* | -V ) 6271477040fSmrg echo "$lt_cl_version"; exit 0 ;; 6281477040fSmrg --help | --h* | -h ) 6291477040fSmrg echo "$lt_cl_help"; exit 0 ;; 6301477040fSmrg --debug | --d* | -d ) 6311477040fSmrg debug=: ;; 6321477040fSmrg --quiet | --q* | --silent | --s* | -q ) 6331477040fSmrg lt_cl_silent=: ;; 6341477040fSmrg 6351477040fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6361477040fSmrgTry \`$[0] --help' for more information.]) ;; 6371477040fSmrg 6381477040fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6391477040fSmrgTry \`$[0] --help' for more information.]) ;; 6402ae83157Smrg esac 6411477040fSmrg shift 6421477040fSmrgdone 6431477040fSmrg 6441477040fSmrgif $lt_cl_silent; then 6451477040fSmrg exec AS_MESSAGE_FD>/dev/null 6462ae83157Smrgfi 6471477040fSmrg_LTEOF 6481477040fSmrg 6491477040fSmrgcat >>"$CONFIG_LT" <<_LTEOF 6501477040fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6511477040fSmrg_LTEOF 6521477040fSmrg 6531477040fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6541477040fSmrgAC_MSG_NOTICE([creating $ofile]) 6551477040fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 6561477040fSmrgAS_EXIT(0) 6571477040fSmrg_LTEOF 6581477040fSmrgchmod +x "$CONFIG_LT" 6591477040fSmrg 6601477040fSmrg# configure is writing to config.log, but config.lt does its own redirection, 6611477040fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 6621477040fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6631477040fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6641477040fSmrgif test "$no_create" != yes; then 6651477040fSmrg lt_cl_success=: 6661477040fSmrg test "$silent" = yes && 6671477040fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 6681477040fSmrg exec AS_MESSAGE_LOG_FD>/dev/null 6691477040fSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 6701477040fSmrg exec AS_MESSAGE_LOG_FD>>config.log 6711477040fSmrg $lt_cl_success || AS_EXIT(1) 6721477040fSmrgfi 6731477040fSmrg])# LT_OUTPUT 674444c061aSmrg 6751477040fSmrg 6761477040fSmrg# _LT_CONFIG(TAG) 6771477040fSmrg# --------------- 6781477040fSmrg# If TAG is the built-in tag, create an initial libtool script with a 6791477040fSmrg# default configuration from the untagged config vars. Otherwise add code 6801477040fSmrg# to config.status for appending the configuration named by TAG from the 6811477040fSmrg# matching tagged config vars. 6821477040fSmrgm4_defun([_LT_CONFIG], 6831477040fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6841477040fSmrg_LT_CONFIG_SAVE_COMMANDS([ 6851477040fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 6861477040fSmrg m4_if(_LT_TAG, [C], [ 6871477040fSmrg # See if we are running on zsh, and set the options which allow our 6881477040fSmrg # commands through without removal of \ escapes. 6891477040fSmrg if test -n "${ZSH_VERSION+set}" ; then 6901477040fSmrg setopt NO_GLOB_SUBST 6911477040fSmrg fi 6921477040fSmrg 6931477040fSmrg cfgfile="${ofile}T" 6941477040fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 6951477040fSmrg $RM "$cfgfile" 6961477040fSmrg 6971477040fSmrg cat <<_LT_EOF >> "$cfgfile" 6981477040fSmrg#! $SHELL 6991477040fSmrg 7001477040fSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7011477040fSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7021477040fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7031477040fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7042ae83157Smrg# 7051477040fSmrg_LT_COPYING 7061477040fSmrg_LT_LIBTOOL_TAGS 707444c061aSmrg 7081477040fSmrg# ### BEGIN LIBTOOL CONFIG 7091477040fSmrg_LT_LIBTOOL_CONFIG_VARS 7101477040fSmrg_LT_LIBTOOL_TAG_VARS 7111477040fSmrg# ### END LIBTOOL CONFIG 712444c061aSmrg 7131477040fSmrg_LT_EOF 7141477040fSmrg 7151477040fSmrg case $host_os in 7161477040fSmrg aix3*) 7171477040fSmrg cat <<\_LT_EOF >> "$cfgfile" 7181477040fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7191477040fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7201477040fSmrg# vanish in a puff of smoke. 7211477040fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 7221477040fSmrg COLLECT_NAMES= 7231477040fSmrg export COLLECT_NAMES 7242ae83157Smrgfi 7251477040fSmrg_LT_EOF 7261477040fSmrg ;; 7271477040fSmrg esac 728444c061aSmrg 7291477040fSmrg _LT_PROG_LTMAIN 730444c061aSmrg 7311477040fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7321477040fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7331477040fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7341477040fSmrg # is reportedly fixed, but why not run on old versions too? 7351477040fSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 7361477040fSmrg || (rm -f "$cfgfile"; exit 1) 737444c061aSmrg 7381477040fSmrg _LT_PROG_XSI_SHELLFNS 739444c061aSmrg 7401477040fSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 7411477040fSmrg || (rm -f "$cfgfile"; exit 1) 742444c061aSmrg 7431477040fSmrg mv -f "$cfgfile" "$ofile" || 7441477040fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7451477040fSmrg chmod +x "$ofile" 7461477040fSmrg], 7471477040fSmrg[cat <<_LT_EOF >> "$ofile" 748444c061aSmrg 7491477040fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7501477040fSmrgdnl in a comment (ie after a #). 7511477040fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7521477040fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7531477040fSmrg# ### END LIBTOOL TAG CONFIG: $1 7541477040fSmrg_LT_EOF 7551477040fSmrg])dnl /m4_if 7561477040fSmrg], 7571477040fSmrg[m4_if([$1], [], [ 7581477040fSmrg PACKAGE='$PACKAGE' 7591477040fSmrg VERSION='$VERSION' 7601477040fSmrg TIMESTAMP='$TIMESTAMP' 7611477040fSmrg RM='$RM' 7621477040fSmrg ofile='$ofile'], []) 7631477040fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7641477040fSmrg])# _LT_CONFIG 7652ae83157Smrg 7662ae83157Smrg 7671477040fSmrg# LT_SUPPORTED_TAG(TAG) 7681477040fSmrg# --------------------- 7691477040fSmrg# Trace this macro to discover what tags are supported by the libtool 7701477040fSmrg# --tag option, using: 7711477040fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 7721477040fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 7732265a131Smrg 774444c061aSmrg 7751477040fSmrg# C support is built-in for now 7761477040fSmrgm4_define([_LT_LANG_C_enabled], []) 7771477040fSmrgm4_define([_LT_TAGS], []) 778444c061aSmrg 779444c061aSmrg 7801477040fSmrg# LT_LANG(LANG) 7811477040fSmrg# ------------- 7821477040fSmrg# Enable libtool support for the given language if not already enabled. 7831477040fSmrgAC_DEFUN([LT_LANG], 7841477040fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 7851477040fSmrgm4_case([$1], 7861477040fSmrg [C], [_LT_LANG(C)], 7871477040fSmrg [C++], [_LT_LANG(CXX)], 7881477040fSmrg [Java], [_LT_LANG(GCJ)], 7891477040fSmrg [Fortran 77], [_LT_LANG(F77)], 7901477040fSmrg [Fortran], [_LT_LANG(FC)], 7911477040fSmrg [Windows Resource], [_LT_LANG(RC)], 7921477040fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 7931477040fSmrg [_LT_LANG($1)], 7941477040fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 7951477040fSmrg])# LT_LANG 7961477040fSmrg 7971477040fSmrg 7981477040fSmrg# _LT_LANG(LANGNAME) 7991477040fSmrg# ------------------ 8001477040fSmrgm4_defun([_LT_LANG], 8011477040fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8021477040fSmrg [LT_SUPPORTED_TAG([$1])dnl 8031477040fSmrg m4_append([_LT_TAGS], [$1 ])dnl 8041477040fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8051477040fSmrg _LT_LANG_$1_CONFIG($1)])dnl 8061477040fSmrg])# _LT_LANG 807444c061aSmrg 808444c061aSmrg 8091477040fSmrg# _LT_LANG_DEFAULT_CONFIG 8101477040fSmrg# ----------------------- 8111477040fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8121477040fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8131477040fSmrg [LT_LANG(CXX)], 8141477040fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8151477040fSmrg 8161477040fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8171477040fSmrg [LT_LANG(F77)], 8181477040fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8191477040fSmrg 8201477040fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8211477040fSmrg [LT_LANG(FC)], 8221477040fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8231477040fSmrg 8241477040fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8251477040fSmrgdnl pulling things in needlessly. 8261477040fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8271477040fSmrg [LT_LANG(GCJ)], 8281477040fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8291477040fSmrg [LT_LANG(GCJ)], 8301477040fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8311477040fSmrg [LT_LANG(GCJ)], 8321477040fSmrg [m4_ifdef([AC_PROG_GCJ], 8331477040fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8341477040fSmrg m4_ifdef([A][M_PROG_GCJ], 8351477040fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8361477040fSmrg m4_ifdef([LT_PROG_GCJ], 8371477040fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8381477040fSmrg 8391477040fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 8401477040fSmrg [LT_LANG(RC)], 8411477040fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 8421477040fSmrg])# _LT_LANG_DEFAULT_CONFIG 8431477040fSmrg 8441477040fSmrg# Obsolete macros: 8451477040fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 8461477040fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 8471477040fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 8481477040fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 8491477040fSmrgdnl aclocal-1.4 backwards compatibility: 8501477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 8511477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 8521477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 8531477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 8541477040fSmrg 8551477040fSmrg 8561477040fSmrg# _LT_TAG_COMPILER 8571477040fSmrg# ---------------- 8581477040fSmrgm4_defun([_LT_TAG_COMPILER], 8591477040fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 860444c061aSmrg 8611477040fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 8621477040fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 8631477040fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 8641477040fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 8652265a131Smrg 8661477040fSmrg# If no C compiler was specified, use CC. 8671477040fSmrgLTCC=${LTCC-"$CC"} 8682265a131Smrg 8691477040fSmrg# If no C compiler flags were specified, use CFLAGS. 8701477040fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 8712265a131Smrg 8721477040fSmrg# Allow CC to be a program name with arguments. 8731477040fSmrgcompiler=$CC 8741477040fSmrg])# _LT_TAG_COMPILER 875444c061aSmrg 876444c061aSmrg 8771477040fSmrg# _LT_COMPILER_BOILERPLATE 8781477040fSmrg# ------------------------ 8791477040fSmrg# Check for compiler boilerplate output or warnings with 8801477040fSmrg# the simple compiler test code. 8811477040fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 8821477040fSmrg[m4_require([_LT_DECL_SED])dnl 8831477040fSmrgac_outfile=conftest.$ac_objext 8841477040fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 8851477040fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 8861477040fSmrg_lt_compiler_boilerplate=`cat conftest.err` 8871477040fSmrg$RM conftest* 8881477040fSmrg])# _LT_COMPILER_BOILERPLATE 8892265a131Smrg 8902265a131Smrg 8911477040fSmrg# _LT_LINKER_BOILERPLATE 8921477040fSmrg# ---------------------- 8931477040fSmrg# Check for linker boilerplate output or warnings with 8941477040fSmrg# the simple link test code. 8951477040fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 8961477040fSmrg[m4_require([_LT_DECL_SED])dnl 8971477040fSmrgac_outfile=conftest.$ac_objext 8981477040fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 8991477040fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9001477040fSmrg_lt_linker_boilerplate=`cat conftest.err` 9011477040fSmrg$RM -r conftest* 9021477040fSmrg])# _LT_LINKER_BOILERPLATE 903444c061aSmrg 9041477040fSmrg# _LT_REQUIRED_DARWIN_CHECKS 9051477040fSmrg# ------------------------- 9061477040fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9071477040fSmrg case $host_os in 9081477040fSmrg rhapsody* | darwin*) 9091477040fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9101477040fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9111477040fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9121477040fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9131477040fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9141477040fSmrg _LT_DECL([], [DSYMUTIL], [1], 9151477040fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9161477040fSmrg _LT_DECL([], [NMEDIT], [1], 9171477040fSmrg [Tool to change global to local symbols on Mac OS X]) 9181477040fSmrg _LT_DECL([], [LIPO], [1], 9191477040fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 9201477040fSmrg _LT_DECL([], [OTOOL], [1], 9211477040fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9221477040fSmrg _LT_DECL([], [OTOOL64], [1], 9231477040fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 924444c061aSmrg 9251477040fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9261477040fSmrg [lt_cv_apple_cc_single_mod=no 9271477040fSmrg if test -z "${LT_MULTI_MODULE}"; then 9281477040fSmrg # By default we will add the -single_module flag. You can override 9291477040fSmrg # by either setting the environment variable LT_MULTI_MODULE 9301477040fSmrg # non-empty at configure time, or by adding -multi_module to the 9311477040fSmrg # link flags. 9321477040fSmrg rm -rf libconftest.dylib* 9331477040fSmrg echo "int foo(void){return 1;}" > conftest.c 9341477040fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9351477040fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 9361477040fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9371477040fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 9381477040fSmrg _lt_result=$? 9391477040fSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 9401477040fSmrg lt_cv_apple_cc_single_mod=yes 9411477040fSmrg else 9421477040fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 9431477040fSmrg fi 9441477040fSmrg rm -rf libconftest.dylib* 9451477040fSmrg rm -f conftest.* 9461477040fSmrg fi]) 9471477040fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 9481477040fSmrg [lt_cv_ld_exported_symbols_list], 9491477040fSmrg [lt_cv_ld_exported_symbols_list=no 9501477040fSmrg save_LDFLAGS=$LDFLAGS 9511477040fSmrg echo "_main" > conftest.sym 9521477040fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 9531477040fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 9541477040fSmrg [lt_cv_ld_exported_symbols_list=yes], 9551477040fSmrg [lt_cv_ld_exported_symbols_list=no]) 9561477040fSmrg LDFLAGS="$save_LDFLAGS" 9571477040fSmrg ]) 9581477040fSmrg case $host_os in 9591477040fSmrg rhapsody* | darwin1.[[012]]) 9601477040fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 9611477040fSmrg darwin1.*) 9621477040fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9631477040fSmrg darwin*) # darwin 5.x on 9641477040fSmrg # if running on 10.5 or later, the deployment target defaults 9651477040fSmrg # to the OS version, if on x86, and 10.4, the deployment 9661477040fSmrg # target defaults to 10.4. Don't you love it? 9671477040fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 9681477040fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 9691477040fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9701477040fSmrg 10.[[012]]*) 9711477040fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9721477040fSmrg 10.*) 9731477040fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9741477040fSmrg esac 9751477040fSmrg ;; 9761477040fSmrg esac 9771477040fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 9781477040fSmrg _lt_dar_single_mod='$single_module' 9791477040fSmrg fi 9801477040fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 9811477040fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 9821477040fSmrg else 9831477040fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 9841477040fSmrg fi 9851477040fSmrg if test "$DSYMUTIL" != ":"; then 9861477040fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 9871477040fSmrg else 9881477040fSmrg _lt_dsymutil= 9891477040fSmrg fi 9901477040fSmrg ;; 9911477040fSmrg esac 9921477040fSmrg]) 993444c061aSmrg 994444c061aSmrg 9951477040fSmrg# _LT_DARWIN_LINKER_FEATURES 9961477040fSmrg# -------------------------- 9971477040fSmrg# Checks for linker and compiler features on darwin 9981477040fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 9991477040fSmrg[ 10001477040fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 10011477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10021477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10031477040fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 10041477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10051477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 10061477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10071477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 10081477040fSmrg case $cc_basename in 10091477040fSmrg ifort*) _lt_dar_can_shared=yes ;; 10101477040fSmrg *) _lt_dar_can_shared=$GCC ;; 10111477040fSmrg esac 10121477040fSmrg if test "$_lt_dar_can_shared" = "yes"; then 10131477040fSmrg output_verbose_link_cmd=echo 10141477040fSmrg _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}" 10151477040fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 10161477040fSmrg _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}" 10171477040fSmrg _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}" 10181477040fSmrg m4_if([$1], [CXX], 10191477040fSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 10201477040fSmrg _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}" 10211477040fSmrg _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}" 10221477040fSmrg fi 10231477040fSmrg],[]) 10241477040fSmrg else 10251477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10261477040fSmrg fi 10271477040fSmrg]) 1028444c061aSmrg 10291477040fSmrg# _LT_SYS_MODULE_PATH_AIX 10301477040fSmrg# ----------------------- 10311477040fSmrg# Links a minimal program and checks the executable 10321477040fSmrg# for the system default hardcoded library path. In most cases, 10331477040fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 10341477040fSmrg# the location of the communication and MPI libs are included too. 10351477040fSmrg# If we don't find anything, use the default library path according 10361477040fSmrg# to the aix ld manual. 10371477040fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 10381477040fSmrg[m4_require([_LT_DECL_SED])dnl 10391477040fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 10401477040fSmrglt_aix_libpath_sed=' 10411477040fSmrg /Import File Strings/,/^$/ { 10421477040fSmrg /^0/ { 10431477040fSmrg s/^0 *\(.*\)$/\1/ 10441477040fSmrg p 10451477040fSmrg } 10461477040fSmrg }' 10471477040fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10481477040fSmrg# Check for a 64-bit object if we didn't find anything. 10491477040fSmrgif test -z "$aix_libpath"; then 10501477040fSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 10511477040fSmrgfi],[]) 10521477040fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 10531477040fSmrg])# _LT_SYS_MODULE_PATH_AIX 1054444c061aSmrg 1055444c061aSmrg 10561477040fSmrg# _LT_SHELL_INIT(ARG) 10571477040fSmrg# ------------------- 10581477040fSmrgm4_define([_LT_SHELL_INIT], 10591477040fSmrg[ifdef([AC_DIVERSION_NOTICE], 10601477040fSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 10611477040fSmrg [AC_DIVERT_PUSH(NOTICE)]) 10621477040fSmrg$1 10631477040fSmrgAC_DIVERT_POP 10641477040fSmrg])# _LT_SHELL_INIT 1065444c061aSmrg 1066444c061aSmrg 10671477040fSmrg# _LT_PROG_ECHO_BACKSLASH 10681477040fSmrg# ----------------------- 10691477040fSmrg# Add some code to the start of the generated configure script which 10701477040fSmrg# will find an echo command which doesn't interpret backslashes. 10711477040fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 10721477040fSmrg[_LT_SHELL_INIT([ 10731477040fSmrg# Check that we are running under the correct shell. 10741477040fSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075444c061aSmrg 10761477040fSmrgcase X$lt_ECHO in 10771477040fSmrgX*--fallback-echo) 10781477040fSmrg # Remove one level of quotation (which was required for Make). 10791477040fSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 10801477040fSmrg ;; 10811477040fSmrgesac 1082444c061aSmrg 10831477040fSmrgECHO=${lt_ECHO-echo} 10841477040fSmrgif test "X[$]1" = X--no-reexec; then 10851477040fSmrg # Discard the --no-reexec flag, and continue. 10861477040fSmrg shift 10871477040fSmrgelif test "X[$]1" = X--fallback-echo; then 10881477040fSmrg # Avoid inline document here, it may be left over 10891477040fSmrg : 10901477040fSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 10911477040fSmrg # Yippee, $ECHO works! 10921477040fSmrg : 10932ae83157Smrgelse 10941477040fSmrg # Restart under the correct shell. 10951477040fSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 10962ae83157Smrgfi 1097444c061aSmrg 10981477040fSmrgif test "X[$]1" = X--fallback-echo; then 10991477040fSmrg # used as fallback echo 11001477040fSmrg shift 11011477040fSmrg cat <<_LT_EOF 11021477040fSmrg[$]* 11031477040fSmrg_LT_EOF 11041477040fSmrg exit 0 11052ae83157Smrgfi 1106444c061aSmrg 11071477040fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 11081477040fSmrg# if CDPATH is set. 11091477040fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 11102265a131Smrg 11111477040fSmrgif test -z "$lt_ECHO"; then 11121477040fSmrg if test "X${echo_test_string+set}" != Xset; then 11131477040fSmrg # find a string as large as possible, as long as the shell can cope with it 11141477040fSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 11151477040fSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 11161477040fSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 11171477040fSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 11181477040fSmrg then 11191477040fSmrg break 11201477040fSmrg fi 11211477040fSmrg done 11221477040fSmrg fi 11232265a131Smrg 11241477040fSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11251477040fSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11261477040fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11271477040fSmrg : 11281477040fSmrg else 11291477040fSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 11301477040fSmrg # backslashes. This makes it impossible to quote backslashes using 11311477040fSmrg # echo "$something" | sed 's/\\/\\\\/g' 11321477040fSmrg # 11331477040fSmrg # So, first we look for a working echo in the user's PATH. 11342265a131Smrg 11351477040fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 11361477040fSmrg for dir in $PATH /usr/ucb; do 11371477040fSmrg IFS="$lt_save_ifs" 11381477040fSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 11391477040fSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 11401477040fSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 11411477040fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11421477040fSmrg ECHO="$dir/echo" 11431477040fSmrg break 11441477040fSmrg fi 11451477040fSmrg done 11461477040fSmrg IFS="$lt_save_ifs" 11472265a131Smrg 11481477040fSmrg if test "X$ECHO" = Xecho; then 11491477040fSmrg # We didn't find a better echo, so look for alternatives. 11501477040fSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 11511477040fSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 11521477040fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11531477040fSmrg # This shell has a builtin print -r that does the trick. 11541477040fSmrg ECHO='print -r' 11551477040fSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 11561477040fSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 11571477040fSmrg # If we have ksh, try running configure again with it. 11581477040fSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 11591477040fSmrg export ORIGINAL_CONFIG_SHELL 11601477040fSmrg CONFIG_SHELL=/bin/ksh 11611477040fSmrg export CONFIG_SHELL 11621477040fSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 11631477040fSmrg else 11641477040fSmrg # Try using printf. 11651477040fSmrg ECHO='printf %s\n' 11661477040fSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11671477040fSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11681477040fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11691477040fSmrg # Cool, printf works 11701477040fSmrg : 11711477040fSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11721477040fSmrg test "X$echo_testing_string" = 'X\t' && 11731477040fSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11741477040fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11751477040fSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 11761477040fSmrg export CONFIG_SHELL 11771477040fSmrg SHELL="$CONFIG_SHELL" 11781477040fSmrg export SHELL 11791477040fSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11801477040fSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11811477040fSmrg test "X$echo_testing_string" = 'X\t' && 11821477040fSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11831477040fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11841477040fSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11851477040fSmrg else 11861477040fSmrg # maybe with a smaller string... 11871477040fSmrg prev=: 11882265a131Smrg 11891477040fSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 11901477040fSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 11911477040fSmrg then 11921477040fSmrg break 11931477040fSmrg fi 11941477040fSmrg prev="$cmd" 11951477040fSmrg done 11962ae83157Smrg 11971477040fSmrg if test "$prev" != 'sed 50q "[$]0"'; then 11981477040fSmrg echo_test_string=`eval $prev` 11991477040fSmrg export echo_test_string 12001477040fSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 12011477040fSmrg else 12021477040fSmrg # Oops. We lost completely, so just stick with echo. 12031477040fSmrg ECHO=echo 12041477040fSmrg fi 12051477040fSmrg fi 12061477040fSmrg fi 12071477040fSmrg fi 12081477040fSmrg fi 12091477040fSmrgfi 1210444c061aSmrg 12111477040fSmrg# Copy echo and quote the copy suitably for passing to libtool from 12121477040fSmrg# the Makefile, instead of quoting the original, which is used later. 12131477040fSmrglt_ECHO=$ECHO 12141477040fSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 12151477040fSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 12161477040fSmrgfi 1217444c061aSmrg 12181477040fSmrgAC_SUBST(lt_ECHO) 12191477040fSmrg]) 12201477040fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12211477040fSmrg_LT_DECL([], [ECHO], [1], 12221477040fSmrg [An echo program that does not interpret backslashes]) 12231477040fSmrg])# _LT_PROG_ECHO_BACKSLASH 1224444c061aSmrg 1225444c061aSmrg 12261477040fSmrg# _LT_ENABLE_LOCK 12271477040fSmrg# --------------- 12281477040fSmrgm4_defun([_LT_ENABLE_LOCK], 12291477040fSmrg[AC_ARG_ENABLE([libtool-lock], 12301477040fSmrg [AS_HELP_STRING([--disable-libtool-lock], 12311477040fSmrg [avoid locking (might break parallel builds)])]) 12321477040fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12332ae83157Smrg 12341477040fSmrg# Some flags need to be propagated to the compiler or linker for good 12351477040fSmrg# libtool support. 12361477040fSmrgcase $host in 12371477040fSmrgia64-*-hpux*) 12381477040fSmrg # Find out which ABI we are using. 12391477040fSmrg echo 'int i;' > conftest.$ac_ext 12401477040fSmrg if AC_TRY_EVAL(ac_compile); then 12411477040fSmrg case `/usr/bin/file conftest.$ac_objext` in 12421477040fSmrg *ELF-32*) 12431477040fSmrg HPUX_IA64_MODE="32" 12441477040fSmrg ;; 12451477040fSmrg *ELF-64*) 12461477040fSmrg HPUX_IA64_MODE="64" 12471477040fSmrg ;; 12481477040fSmrg esac 12491477040fSmrg fi 12501477040fSmrg rm -rf conftest* 12511477040fSmrg ;; 12521477040fSmrg*-*-irix6*) 12531477040fSmrg # Find out which ABI we are using. 12541477040fSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 12551477040fSmrg if AC_TRY_EVAL(ac_compile); then 12561477040fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 12571477040fSmrg case `/usr/bin/file conftest.$ac_objext` in 12581477040fSmrg *32-bit*) 12591477040fSmrg LD="${LD-ld} -melf32bsmip" 12601477040fSmrg ;; 12611477040fSmrg *N32*) 12621477040fSmrg LD="${LD-ld} -melf32bmipn32" 12631477040fSmrg ;; 12641477040fSmrg *64-bit*) 12651477040fSmrg LD="${LD-ld} -melf64bmip" 12661477040fSmrg ;; 12671477040fSmrg esac 12681477040fSmrg else 12691477040fSmrg case `/usr/bin/file conftest.$ac_objext` in 12701477040fSmrg *32-bit*) 12711477040fSmrg LD="${LD-ld} -32" 12721477040fSmrg ;; 12731477040fSmrg *N32*) 12741477040fSmrg LD="${LD-ld} -n32" 12751477040fSmrg ;; 12761477040fSmrg *64-bit*) 12771477040fSmrg LD="${LD-ld} -64" 12781477040fSmrg ;; 12791477040fSmrg esac 12801477040fSmrg fi 12811477040fSmrg fi 12821477040fSmrg rm -rf conftest* 12831477040fSmrg ;; 12842ae83157Smrg 12851477040fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 12861477040fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 12871477040fSmrg # Find out which ABI we are using. 12881477040fSmrg echo 'int i;' > conftest.$ac_ext 12891477040fSmrg if AC_TRY_EVAL(ac_compile); then 12901477040fSmrg case `/usr/bin/file conftest.o` in 12911477040fSmrg *32-bit*) 12921477040fSmrg case $host in 12931477040fSmrg x86_64-*kfreebsd*-gnu) 12941477040fSmrg LD="${LD-ld} -m elf_i386_fbsd" 12951477040fSmrg ;; 12961477040fSmrg x86_64-*linux*) 12971477040fSmrg LD="${LD-ld} -m elf_i386" 12981477040fSmrg ;; 12991477040fSmrg ppc64-*linux*|powerpc64-*linux*) 13001477040fSmrg LD="${LD-ld} -m elf32ppclinux" 13011477040fSmrg ;; 13021477040fSmrg s390x-*linux*) 13031477040fSmrg LD="${LD-ld} -m elf_s390" 13041477040fSmrg ;; 13051477040fSmrg sparc64-*linux*) 13061477040fSmrg LD="${LD-ld} -m elf32_sparc" 13071477040fSmrg ;; 13081477040fSmrg esac 13091477040fSmrg ;; 13101477040fSmrg *64-bit*) 13111477040fSmrg case $host in 13121477040fSmrg x86_64-*kfreebsd*-gnu) 13131477040fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 13141477040fSmrg ;; 13151477040fSmrg x86_64-*linux*) 13161477040fSmrg LD="${LD-ld} -m elf_x86_64" 13171477040fSmrg ;; 13181477040fSmrg ppc*-*linux*|powerpc*-*linux*) 13191477040fSmrg LD="${LD-ld} -m elf64ppc" 13201477040fSmrg ;; 13211477040fSmrg s390*-*linux*|s390*-*tpf*) 13221477040fSmrg LD="${LD-ld} -m elf64_s390" 13231477040fSmrg ;; 13241477040fSmrg sparc*-*linux*) 13251477040fSmrg LD="${LD-ld} -m elf64_sparc" 13261477040fSmrg ;; 13271477040fSmrg esac 13281477040fSmrg ;; 13291477040fSmrg esac 13301477040fSmrg fi 13311477040fSmrg rm -rf conftest* 13321477040fSmrg ;; 1333444c061aSmrg 13341477040fSmrg*-*-sco3.2v5*) 13351477040fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13361477040fSmrg SAVE_CFLAGS="$CFLAGS" 13371477040fSmrg CFLAGS="$CFLAGS -belf" 13381477040fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13391477040fSmrg [AC_LANG_PUSH(C) 13401477040fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13411477040fSmrg AC_LANG_POP]) 13421477040fSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13431477040fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13441477040fSmrg CFLAGS="$SAVE_CFLAGS" 13451477040fSmrg fi 13461477040fSmrg ;; 13471477040fSmrgsparc*-*solaris*) 13481477040fSmrg # Find out which ABI we are using. 13491477040fSmrg echo 'int i;' > conftest.$ac_ext 13501477040fSmrg if AC_TRY_EVAL(ac_compile); then 13511477040fSmrg case `/usr/bin/file conftest.o` in 13521477040fSmrg *64-bit*) 13531477040fSmrg case $lt_cv_prog_gnu_ld in 13541477040fSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 13551477040fSmrg *) 13561477040fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 13571477040fSmrg LD="${LD-ld} -64" 13582ae83157Smrg fi 13591477040fSmrg ;; 13601477040fSmrg esac 13611477040fSmrg ;; 13621477040fSmrg esac 13631477040fSmrg fi 13641477040fSmrg rm -rf conftest* 13651477040fSmrg ;; 13661477040fSmrgesac 1367444c061aSmrg 13681477040fSmrgneed_locks="$enable_libtool_lock" 13691477040fSmrg])# _LT_ENABLE_LOCK 1370444c061aSmrg 1371444c061aSmrg 13721477040fSmrg# _LT_CMD_OLD_ARCHIVE 13731477040fSmrg# ------------------- 13741477040fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 13751477040fSmrg[AC_CHECK_TOOL(AR, ar, false) 13761477040fSmrgtest -z "$AR" && AR=ar 13771477040fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 13781477040fSmrg_LT_DECL([], [AR], [1], [The archiver]) 13791477040fSmrg_LT_DECL([], [AR_FLAGS], [1]) 13802265a131Smrg 13811477040fSmrgAC_CHECK_TOOL(STRIP, strip, :) 13821477040fSmrgtest -z "$STRIP" && STRIP=: 13831477040fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 13842265a131Smrg 13851477040fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 13861477040fSmrgtest -z "$RANLIB" && RANLIB=: 13871477040fSmrg_LT_DECL([], [RANLIB], [1], 13881477040fSmrg [Commands used to install an old-style archive]) 13892265a131Smrg 13901477040fSmrg# Determine commands to create old-style static archives. 13911477040fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 13921477040fSmrgold_postinstall_cmds='chmod 644 $oldlib' 13931477040fSmrgold_postuninstall_cmds= 13942265a131Smrg 13951477040fSmrgif test -n "$RANLIB"; then 13961477040fSmrg case $host_os in 13971477040fSmrg openbsd*) 13981477040fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 13991477040fSmrg ;; 14001477040fSmrg *) 14011477040fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 14021477040fSmrg ;; 14031477040fSmrg esac 14041477040fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405444c061aSmrgfi 14061477040fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 14071477040fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 14081477040fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 14091477040fSmrg [Commands used to build an old-style archive]) 14101477040fSmrg])# _LT_CMD_OLD_ARCHIVE 1411444c061aSmrg 14122265a131Smrg 14131477040fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14141477040fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 14151477040fSmrg# ---------------------------------------------------------------- 14161477040fSmrg# Check whether the given compiler option works 14171477040fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 14181477040fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14191477040fSmrgm4_require([_LT_DECL_SED])dnl 14201477040fSmrgAC_CACHE_CHECK([$1], [$2], 14211477040fSmrg [$2=no 14221477040fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 14231477040fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 14241477040fSmrg lt_compiler_flag="$3" 14251477040fSmrg # Insert the option either (1) after the last *FLAGS variable, or 14261477040fSmrg # (2) before a word containing "conftest.", or (3) at the end. 14271477040fSmrg # Note that $ac_compile itself does not contain backslashes and begins 14281477040fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 14291477040fSmrg # The option is referenced via a variable to avoid confusing sed. 14301477040fSmrg lt_compile=`echo "$ac_compile" | $SED \ 14311477040fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 14321477040fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 14331477040fSmrg -e 's:$: $lt_compiler_flag:'` 14341477040fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 14351477040fSmrg (eval "$lt_compile" 2>conftest.err) 14361477040fSmrg ac_status=$? 14371477040fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 14381477040fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 14391477040fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 14401477040fSmrg # The compiler can only warn and ignore the option if not recognized 14411477040fSmrg # So say no if there are warnings other than the usual output. 14421477040fSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 14431477040fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 14441477040fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 14451477040fSmrg $2=yes 14461477040fSmrg fi 14471477040fSmrg fi 14481477040fSmrg $RM conftest* 14491477040fSmrg]) 14502265a131Smrg 14511477040fSmrgif test x"[$]$2" = xyes; then 14521477040fSmrg m4_if([$5], , :, [$5]) 14532ae83157Smrgelse 14541477040fSmrg m4_if([$6], , :, [$6]) 14552ae83157Smrgfi 14561477040fSmrg])# _LT_COMPILER_OPTION 1457444c061aSmrg 14581477040fSmrg# Old name: 14591477040fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 14601477040fSmrgdnl aclocal-1.4 backwards compatibility: 14611477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1462444c061aSmrg 1463444c061aSmrg 14641477040fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14651477040fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 14661477040fSmrg# ---------------------------------------------------- 14671477040fSmrg# Check whether the given linker option works 14681477040fSmrgAC_DEFUN([_LT_LINKER_OPTION], 14691477040fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14701477040fSmrgm4_require([_LT_DECL_SED])dnl 14711477040fSmrgAC_CACHE_CHECK([$1], [$2], 14721477040fSmrg [$2=no 14731477040fSmrg save_LDFLAGS="$LDFLAGS" 14741477040fSmrg LDFLAGS="$LDFLAGS $3" 14751477040fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 14761477040fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 14771477040fSmrg # The linker can only warn and ignore the option if not recognized 14781477040fSmrg # So say no if there are warnings 14791477040fSmrg if test -s conftest.err; then 14801477040fSmrg # Append any errors to the config.log. 14811477040fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 14821477040fSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 14831477040fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 14841477040fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 14851477040fSmrg $2=yes 14861477040fSmrg fi 14871477040fSmrg else 14881477040fSmrg $2=yes 14891477040fSmrg fi 14901477040fSmrg fi 14911477040fSmrg $RM -r conftest* 14921477040fSmrg LDFLAGS="$save_LDFLAGS" 14931477040fSmrg]) 14941477040fSmrg 14951477040fSmrgif test x"[$]$2" = xyes; then 14961477040fSmrg m4_if([$4], , :, [$4]) 14972ae83157Smrgelse 14981477040fSmrg m4_if([$5], , :, [$5]) 14992ae83157Smrgfi 15001477040fSmrg])# _LT_LINKER_OPTION 1501444c061aSmrg 15021477040fSmrg# Old name: 15031477040fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 15041477040fSmrgdnl aclocal-1.4 backwards compatibility: 15051477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1506444c061aSmrg 1507444c061aSmrg 15081477040fSmrg# LT_CMD_MAX_LEN 15091477040fSmrg#--------------- 15101477040fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 15111477040fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 15121477040fSmrg# find the maximum length of command line arguments 15131477040fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 15141477040fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 15151477040fSmrg i=0 15161477040fSmrg teststring="ABCD" 1517444c061aSmrg 15181477040fSmrg case $build_os in 15191477040fSmrg msdosdjgpp*) 15201477040fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 15211477040fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 15221477040fSmrg # during glob expansion). Even if it were fixed, the result of this 15231477040fSmrg # check would be larger than it should be. 15241477040fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 15251477040fSmrg ;; 1526444c061aSmrg 15271477040fSmrg gnu*) 15281477040fSmrg # Under GNU Hurd, this test is not required because there is 15291477040fSmrg # no limit to the length of command line arguments. 15301477040fSmrg # Libtool will interpret -1 as no limit whatsoever 15311477040fSmrg lt_cv_sys_max_cmd_len=-1; 15321477040fSmrg ;; 1533444c061aSmrg 15341477040fSmrg cygwin* | mingw* | cegcc*) 15351477040fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 15361477040fSmrg # about 5 minutes as the teststring grows exponentially. 15371477040fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 15381477040fSmrg # you end up with a "frozen" computer, even though with patience 15391477040fSmrg # the test eventually succeeds (with a max line length of 256k). 15401477040fSmrg # Instead, let's just punt: use the minimum linelength reported by 15411477040fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 15421477040fSmrg lt_cv_sys_max_cmd_len=8192; 15431477040fSmrg ;; 1544444c061aSmrg 15451477040fSmrg amigaos*) 15461477040fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 15471477040fSmrg # So we just punt and use a minimum line length of 8192. 15481477040fSmrg lt_cv_sys_max_cmd_len=8192; 15491477040fSmrg ;; 1550444c061aSmrg 15511477040fSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 15521477040fSmrg # This has been around since 386BSD, at least. Likely further. 15531477040fSmrg if test -x /sbin/sysctl; then 15541477040fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 15551477040fSmrg elif test -x /usr/sbin/sysctl; then 15561477040fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 15571477040fSmrg else 15581477040fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 15591477040fSmrg fi 15601477040fSmrg # And add a safety zone 15611477040fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 15621477040fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 15631477040fSmrg ;; 1564444c061aSmrg 15651477040fSmrg interix*) 15661477040fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 15671477040fSmrg lt_cv_sys_max_cmd_len=196608 15681477040fSmrg ;; 1569444c061aSmrg 15701477040fSmrg osf*) 15711477040fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 15721477040fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 15731477040fSmrg # nice to cause kernel panics so lets avoid the loop below. 15741477040fSmrg # First set a reasonable default. 15751477040fSmrg lt_cv_sys_max_cmd_len=16384 15761477040fSmrg # 15771477040fSmrg if test -x /sbin/sysconfig; then 15781477040fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 15791477040fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 15801477040fSmrg esac 15811477040fSmrg fi 15821477040fSmrg ;; 15831477040fSmrg sco3.2v5*) 15841477040fSmrg lt_cv_sys_max_cmd_len=102400 15851477040fSmrg ;; 15861477040fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 15871477040fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 15881477040fSmrg if test -n "$kargmax"; then 15891477040fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 15901477040fSmrg else 15911477040fSmrg lt_cv_sys_max_cmd_len=32768 15921477040fSmrg fi 15931477040fSmrg ;; 15941477040fSmrg *) 15951477040fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 15961477040fSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 15971477040fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 15981477040fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 15991477040fSmrg else 16001477040fSmrg # Make teststring a little bigger before we do anything with it. 16011477040fSmrg # a 1K string should be a reasonable start. 16021477040fSmrg for i in 1 2 3 4 5 6 7 8 ; do 16031477040fSmrg teststring=$teststring$teststring 16041477040fSmrg done 16051477040fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 16061477040fSmrg # If test is not a shell built-in, we'll probably end up computing a 16071477040fSmrg # maximum length that is only half of the actual maximum length, but 16081477040fSmrg # we can't tell. 16091477040fSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 16101477040fSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 16111477040fSmrg test $i != 17 # 1/2 MB should be enough 16121477040fSmrg do 16131477040fSmrg i=`expr $i + 1` 16141477040fSmrg teststring=$teststring$teststring 16151477040fSmrg done 16161477040fSmrg # Only check the string length outside the loop. 16171477040fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 16181477040fSmrg teststring= 16191477040fSmrg # Add a significant safety factor because C++ compilers can tack on 16201477040fSmrg # massive amounts of additional arguments before passing them to the 16211477040fSmrg # linker. It appears as though 1/2 is a usable value. 16221477040fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 16231477040fSmrg fi 16241477040fSmrg ;; 16251477040fSmrg esac 16261477040fSmrg]) 16271477040fSmrgif test -n $lt_cv_sys_max_cmd_len ; then 16281477040fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 16291477040fSmrgelse 16301477040fSmrg AC_MSG_RESULT(none) 16312265a131Smrgfi 16321477040fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 16331477040fSmrg_LT_DECL([], [max_cmd_len], [0], 16341477040fSmrg [What is the maximum length of a command?]) 16351477040fSmrg])# LT_CMD_MAX_LEN 1636444c061aSmrg 16371477040fSmrg# Old name: 16381477040fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 16391477040fSmrgdnl aclocal-1.4 backwards compatibility: 16401477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641444c061aSmrg 1642444c061aSmrg 16431477040fSmrg# _LT_HEADER_DLFCN 16441477040fSmrg# ---------------- 16451477040fSmrgm4_defun([_LT_HEADER_DLFCN], 16461477040fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 16471477040fSmrg])# _LT_HEADER_DLFCN 1648444c061aSmrg 1649444c061aSmrg 16501477040fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 16511477040fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 16521477040fSmrg# ---------------------------------------------------------------- 16531477040fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 16541477040fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 16551477040fSmrgif test "$cross_compiling" = yes; then : 16561477040fSmrg [$4] 1657444c061aSmrgelse 16581477040fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 16591477040fSmrg lt_status=$lt_dlunknown 16601477040fSmrg cat > conftest.$ac_ext <<_LT_EOF 16611477040fSmrg[#line __oline__ "configure" 16621477040fSmrg#include "confdefs.h" 1663444c061aSmrg 16641477040fSmrg#if HAVE_DLFCN_H 16651477040fSmrg#include <dlfcn.h> 16661477040fSmrg#endif 16672265a131Smrg 16681477040fSmrg#include <stdio.h> 16692265a131Smrg 16701477040fSmrg#ifdef RTLD_GLOBAL 16711477040fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 16721477040fSmrg#else 16731477040fSmrg# ifdef DL_GLOBAL 16741477040fSmrg# define LT_DLGLOBAL DL_GLOBAL 16751477040fSmrg# else 16761477040fSmrg# define LT_DLGLOBAL 0 16771477040fSmrg# endif 16781477040fSmrg#endif 1679444c061aSmrg 16801477040fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 16811477040fSmrg find out it does not work in some platform. */ 16821477040fSmrg#ifndef LT_DLLAZY_OR_NOW 16831477040fSmrg# ifdef RTLD_LAZY 16841477040fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 16851477040fSmrg# else 16861477040fSmrg# ifdef DL_LAZY 16871477040fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 16881477040fSmrg# else 16891477040fSmrg# ifdef RTLD_NOW 16901477040fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 16911477040fSmrg# else 16921477040fSmrg# ifdef DL_NOW 16931477040fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 16941477040fSmrg# else 16951477040fSmrg# define LT_DLLAZY_OR_NOW 0 16961477040fSmrg# endif 16971477040fSmrg# endif 16981477040fSmrg# endif 16991477040fSmrg# endif 17001477040fSmrg#endif 1701444c061aSmrg 17021477040fSmrgvoid fnord() { int i=42;} 17031477040fSmrgint main () 17041477040fSmrg{ 17051477040fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 17061477040fSmrg int status = $lt_dlunknown; 1707444c061aSmrg 17081477040fSmrg if (self) 17091477040fSmrg { 17101477040fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 17111477040fSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 17121477040fSmrg /* dlclose (self); */ 17131477040fSmrg } 17141477040fSmrg else 17151477040fSmrg puts (dlerror ()); 1716444c061aSmrg 17171477040fSmrg return status; 17181477040fSmrg}] 17191477040fSmrg_LT_EOF 17201477040fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 17211477040fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 17221477040fSmrg lt_status=$? 17231477040fSmrg case x$lt_status in 17241477040fSmrg x$lt_dlno_uscore) $1 ;; 17251477040fSmrg x$lt_dlneed_uscore) $2 ;; 17261477040fSmrg x$lt_dlunknown|x*) $3 ;; 17271477040fSmrg esac 17281477040fSmrg else : 17291477040fSmrg # compilation failed 17301477040fSmrg $3 17311477040fSmrg fi 17322ae83157Smrgfi 17331477040fSmrgrm -fr conftest* 17341477040fSmrg])# _LT_TRY_DLOPEN_SELF 1735444c061aSmrg 1736444c061aSmrg 17371477040fSmrg# LT_SYS_DLOPEN_SELF 17381477040fSmrg# ------------------ 17391477040fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 17401477040fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 17411477040fSmrgif test "x$enable_dlopen" != xyes; then 17421477040fSmrg enable_dlopen=unknown 17431477040fSmrg enable_dlopen_self=unknown 17441477040fSmrg enable_dlopen_self_static=unknown 17452ae83157Smrgelse 17461477040fSmrg lt_cv_dlopen=no 17471477040fSmrg lt_cv_dlopen_libs= 1748444c061aSmrg 17491477040fSmrg case $host_os in 17501477040fSmrg beos*) 17511477040fSmrg lt_cv_dlopen="load_add_on" 17521477040fSmrg lt_cv_dlopen_libs= 17531477040fSmrg lt_cv_dlopen_self=yes 17541477040fSmrg ;; 17552ae83157Smrg 17561477040fSmrg mingw* | pw32* | cegcc*) 17571477040fSmrg lt_cv_dlopen="LoadLibrary" 17581477040fSmrg lt_cv_dlopen_libs= 17591477040fSmrg ;; 1760444c061aSmrg 17611477040fSmrg cygwin*) 17621477040fSmrg lt_cv_dlopen="dlopen" 17631477040fSmrg lt_cv_dlopen_libs= 17641477040fSmrg ;; 1765444c061aSmrg 17661477040fSmrg darwin*) 17671477040fSmrg # if libdl is installed we need to link against it 17681477040fSmrg AC_CHECK_LIB([dl], [dlopen], 17691477040fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 17701477040fSmrg lt_cv_dlopen="dyld" 17711477040fSmrg lt_cv_dlopen_libs= 17721477040fSmrg lt_cv_dlopen_self=yes 17731477040fSmrg ]) 17741477040fSmrg ;; 1775444c061aSmrg 17761477040fSmrg *) 17771477040fSmrg AC_CHECK_FUNC([shl_load], 17781477040fSmrg [lt_cv_dlopen="shl_load"], 17791477040fSmrg [AC_CHECK_LIB([dld], [shl_load], 17801477040fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 17811477040fSmrg [AC_CHECK_FUNC([dlopen], 17821477040fSmrg [lt_cv_dlopen="dlopen"], 17831477040fSmrg [AC_CHECK_LIB([dl], [dlopen], 17841477040fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 17851477040fSmrg [AC_CHECK_LIB([svld], [dlopen], 17861477040fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 17871477040fSmrg [AC_CHECK_LIB([dld], [dld_link], 17881477040fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 17891477040fSmrg ]) 17901477040fSmrg ]) 17911477040fSmrg ]) 17921477040fSmrg ]) 17931477040fSmrg ]) 17941477040fSmrg ;; 17951477040fSmrg esac 1796444c061aSmrg 17971477040fSmrg if test "x$lt_cv_dlopen" != xno; then 17981477040fSmrg enable_dlopen=yes 17991477040fSmrg else 18001477040fSmrg enable_dlopen=no 18011477040fSmrg fi 1802444c061aSmrg 18031477040fSmrg case $lt_cv_dlopen in 18041477040fSmrg dlopen) 18051477040fSmrg save_CPPFLAGS="$CPPFLAGS" 18061477040fSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807444c061aSmrg 18081477040fSmrg save_LDFLAGS="$LDFLAGS" 18091477040fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810444c061aSmrg 18111477040fSmrg save_LIBS="$LIBS" 18121477040fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813444c061aSmrg 18141477040fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 18151477040fSmrg lt_cv_dlopen_self, [dnl 18161477040fSmrg _LT_TRY_DLOPEN_SELF( 18171477040fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 18181477040fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 18191477040fSmrg ]) 1820444c061aSmrg 18211477040fSmrg if test "x$lt_cv_dlopen_self" = xyes; then 18221477040fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 18231477040fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 18241477040fSmrg lt_cv_dlopen_self_static, [dnl 18251477040fSmrg _LT_TRY_DLOPEN_SELF( 18261477040fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 18271477040fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 18281477040fSmrg ]) 18291477040fSmrg fi 1830444c061aSmrg 18311477040fSmrg CPPFLAGS="$save_CPPFLAGS" 18321477040fSmrg LDFLAGS="$save_LDFLAGS" 18331477040fSmrg LIBS="$save_LIBS" 18341477040fSmrg ;; 18351477040fSmrg esac 1836444c061aSmrg 18371477040fSmrg case $lt_cv_dlopen_self in 18381477040fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 18391477040fSmrg *) enable_dlopen_self=unknown ;; 18401477040fSmrg esac 1841444c061aSmrg 18421477040fSmrg case $lt_cv_dlopen_self_static in 18431477040fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 18441477040fSmrg *) enable_dlopen_self_static=unknown ;; 18451477040fSmrg esac 18461477040fSmrgfi 18471477040fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 18481477040fSmrg [Whether dlopen is supported]) 18491477040fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 18501477040fSmrg [Whether dlopen of programs is supported]) 18511477040fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 18521477040fSmrg [Whether dlopen of statically linked programs is supported]) 18531477040fSmrg])# LT_SYS_DLOPEN_SELF 1854444c061aSmrg 18551477040fSmrg# Old name: 18561477040fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 18571477040fSmrgdnl aclocal-1.4 backwards compatibility: 18581477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859444c061aSmrg 1860444c061aSmrg 18611477040fSmrg# _LT_COMPILER_C_O([TAGNAME]) 18621477040fSmrg# --------------------------- 18631477040fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 18641477040fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 18651477040fSmrgm4_defun([_LT_COMPILER_C_O], 18661477040fSmrg[m4_require([_LT_DECL_SED])dnl 18671477040fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 18681477040fSmrgm4_require([_LT_TAG_COMPILER])dnl 18691477040fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 18701477040fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 18711477040fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 18721477040fSmrg $RM -r conftest 2>/dev/null 18731477040fSmrg mkdir conftest 18741477040fSmrg cd conftest 18751477040fSmrg mkdir out 18761477040fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877444c061aSmrg 18781477040fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 18791477040fSmrg # Insert the option either (1) after the last *FLAGS variable, or 18801477040fSmrg # (2) before a word containing "conftest.", or (3) at the end. 18811477040fSmrg # Note that $ac_compile itself does not contain backslashes and begins 18821477040fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 18831477040fSmrg lt_compile=`echo "$ac_compile" | $SED \ 18841477040fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 18851477040fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 18861477040fSmrg -e 's:$: $lt_compiler_flag:'` 18871477040fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 18881477040fSmrg (eval "$lt_compile" 2>out/conftest.err) 18891477040fSmrg ac_status=$? 18901477040fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 18911477040fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 18921477040fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 18931477040fSmrg then 18941477040fSmrg # The compiler can only warn and ignore the option if not recognized 18951477040fSmrg # So say no if there are warnings 18961477040fSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 18971477040fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 18981477040fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 18991477040fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 19001477040fSmrg fi 19011477040fSmrg fi 19021477040fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 19031477040fSmrg $RM conftest* 19041477040fSmrg # SGI C++ compiler will create directory out/ii_files/ for 19051477040fSmrg # template instantiation 19061477040fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 19071477040fSmrg $RM out/* && rmdir out 19081477040fSmrg cd .. 19091477040fSmrg $RM -r conftest 19101477040fSmrg $RM conftest* 19111477040fSmrg]) 19121477040fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 19131477040fSmrg [Does compiler simultaneously support -c and -o options?]) 19141477040fSmrg])# _LT_COMPILER_C_O 1915444c061aSmrg 1916444c061aSmrg 19171477040fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 19181477040fSmrg# ---------------------------------- 19191477040fSmrg# Check to see if we can do hard links to lock some files if needed 19201477040fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 19211477040fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 19221477040fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19231477040fSmrg_LT_COMPILER_C_O([$1]) 1924444c061aSmrg 19251477040fSmrghard_links="nottested" 19261477040fSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 19271477040fSmrg # do not overwrite the value of need_locks provided by the user 19281477040fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 19291477040fSmrg hard_links=yes 19301477040fSmrg $RM conftest* 19311477040fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 19321477040fSmrg touch conftest.a 19331477040fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 19341477040fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 19351477040fSmrg AC_MSG_RESULT([$hard_links]) 19361477040fSmrg if test "$hard_links" = no; then 19371477040fSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 19381477040fSmrg need_locks=warn 19391477040fSmrg fi 19401477040fSmrgelse 19411477040fSmrg need_locks=no 19421477040fSmrgfi 19431477040fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 19441477040fSmrg])# _LT_COMPILER_FILE_LOCKS 1945444c061aSmrg 1946444c061aSmrg 19471477040fSmrg# _LT_CHECK_OBJDIR 19481477040fSmrg# ---------------- 19491477040fSmrgm4_defun([_LT_CHECK_OBJDIR], 19501477040fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 19511477040fSmrg[rm -f .libs 2>/dev/null 19521477040fSmrgmkdir .libs 2>/dev/null 19531477040fSmrgif test -d .libs; then 19541477040fSmrg lt_cv_objdir=.libs 19551477040fSmrgelse 19561477040fSmrg # MS-DOS does not allow filenames that begin with a dot. 19571477040fSmrg lt_cv_objdir=_libs 19581477040fSmrgfi 19591477040fSmrgrmdir .libs 2>/dev/null]) 19601477040fSmrgobjdir=$lt_cv_objdir 19611477040fSmrg_LT_DECL([], [objdir], [0], 19621477040fSmrg [The name of the directory that contains temporary libtool files])dnl 19631477040fSmrgm4_pattern_allow([LT_OBJDIR])dnl 19641477040fSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 19651477040fSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 19661477040fSmrg])# _LT_CHECK_OBJDIR 1967444c061aSmrg 1968444c061aSmrg 19691477040fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 19701477040fSmrg# -------------------------------------- 19711477040fSmrg# Check hardcoding attributes. 19721477040fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 19731477040fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 19741477040fSmrg_LT_TAGVAR(hardcode_action, $1)= 19751477040fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 19761477040fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 19771477040fSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978444c061aSmrg 19791477040fSmrg # We can hardcode non-existent directories. 19801477040fSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 19811477040fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 19821477040fSmrg # have to relink, otherwise we might link with an installed library 19831477040fSmrg # when we should be linking with a yet-to-be-installed one 19841477040fSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 19851477040fSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 19861477040fSmrg # Linking always hardcodes the temporary library directory. 19871477040fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 19881477040fSmrg else 19891477040fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 19901477040fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 19911477040fSmrg fi 19921477040fSmrgelse 19931477040fSmrg # We cannot hardcode anything, or else we can only hardcode existing 19941477040fSmrg # directories. 19951477040fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 19961477040fSmrgfi 19971477040fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 19982265a131Smrg 19991477040fSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 20001477040fSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 20011477040fSmrg # Fast installation is not supported 20021477040fSmrg enable_fast_install=no 20031477040fSmrgelif test "$shlibpath_overrides_runpath" = yes || 20041477040fSmrg test "$enable_shared" = no; then 20051477040fSmrg # Fast installation is not necessary 20061477040fSmrg enable_fast_install=needless 20071477040fSmrgfi 20081477040fSmrg_LT_TAGDECL([], [hardcode_action], [0], 20091477040fSmrg [How to hardcode a shared library path into an executable]) 20101477040fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 20112265a131Smrg 20122265a131Smrg 20131477040fSmrg# _LT_CMD_STRIPLIB 20141477040fSmrg# ---------------- 20151477040fSmrgm4_defun([_LT_CMD_STRIPLIB], 20161477040fSmrg[m4_require([_LT_DECL_EGREP]) 20171477040fSmrgstriplib= 20181477040fSmrgold_striplib= 20191477040fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 20201477040fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 20211477040fSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 20221477040fSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 20231477040fSmrg AC_MSG_RESULT([yes]) 20241477040fSmrgelse 20251477040fSmrg# FIXME - insert some real tests, host_os isn't really good enough 2026444c061aSmrg case $host_os in 20271477040fSmrg darwin*) 20281477040fSmrg if test -n "$STRIP" ; then 20291477040fSmrg striplib="$STRIP -x" 20301477040fSmrg old_striplib="$STRIP -S" 20311477040fSmrg AC_MSG_RESULT([yes]) 20321477040fSmrg else 20331477040fSmrg AC_MSG_RESULT([no]) 20341477040fSmrg fi 2035444c061aSmrg ;; 2036444c061aSmrg *) 20371477040fSmrg AC_MSG_RESULT([no]) 2038444c061aSmrg ;; 2039444c061aSmrg esac 2040444c061aSmrgfi 20411477040fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 20421477040fSmrg_LT_DECL([], [striplib], [1]) 20431477040fSmrg])# _LT_CMD_STRIPLIB 2044444c061aSmrg 2045444c061aSmrg 20461477040fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 20471477040fSmrg# ----------------------------- 20481477040fSmrg# PORTME Fill in your ld.so characteristics 20491477040fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 20501477040fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 20511477040fSmrgm4_require([_LT_DECL_EGREP])dnl 20521477040fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20531477040fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 20541477040fSmrgm4_require([_LT_DECL_SED])dnl 20551477040fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 20561477040fSmrgm4_if([$1], 20571477040fSmrg [], [ 20581477040fSmrgif test "$GCC" = yes; then 20591477040fSmrg case $host_os in 20601477040fSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 20611477040fSmrg *) lt_awk_arg="/^libraries:/" ;; 20621477040fSmrg esac 20631477040fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 20641477040fSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 20651477040fSmrg # if the path contains ";" then we assume it to be the separator 20661477040fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 20671477040fSmrg # assumed that no part of a normal pathname contains ";" but that should 20681477040fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 20691477040fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 20701477040fSmrg else 20711477040fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2072444c061aSmrg fi 20731477040fSmrg # Ok, now we have the path, separated by spaces, we can step through it 20741477040fSmrg # and add multilib dir if necessary. 20751477040fSmrg lt_tmp_lt_search_path_spec= 20761477040fSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 20771477040fSmrg for lt_sys_path in $lt_search_path_spec; do 20781477040fSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 20791477040fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 20801477040fSmrg else 20811477040fSmrg test -d "$lt_sys_path" && \ 20821477040fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 20831477040fSmrg fi 20841477040fSmrg done 20851477040fSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 20861477040fSmrgBEGIN {RS=" "; FS="/|\n";} { 20871477040fSmrg lt_foo=""; 20881477040fSmrg lt_count=0; 20891477040fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 20901477040fSmrg if ($lt_i != "" && $lt_i != ".") { 20911477040fSmrg if ($lt_i == "..") { 20921477040fSmrg lt_count++; 20931477040fSmrg } else { 20941477040fSmrg if (lt_count == 0) { 20951477040fSmrg lt_foo="/" $lt_i lt_foo; 20961477040fSmrg } else { 20971477040fSmrg lt_count--; 20981477040fSmrg } 20991477040fSmrg } 21001477040fSmrg } 21011477040fSmrg } 21021477040fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 21031477040fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 21041477040fSmrg}'` 21051477040fSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 21061477040fSmrgelse 21071477040fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 21081477040fSmrgfi]) 21091477040fSmrglibrary_names_spec= 21101477040fSmrglibname_spec='lib$name' 21111477040fSmrgsoname_spec= 21121477040fSmrgshrext_cmds=".so" 21131477040fSmrgpostinstall_cmds= 21141477040fSmrgpostuninstall_cmds= 21151477040fSmrgfinish_cmds= 21161477040fSmrgfinish_eval= 21171477040fSmrgshlibpath_var= 21181477040fSmrgshlibpath_overrides_runpath=unknown 21191477040fSmrgversion_type=none 21201477040fSmrgdynamic_linker="$host_os ld.so" 21211477040fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 21221477040fSmrgneed_lib_prefix=unknown 21231477040fSmrghardcode_into_libs=no 2124444c061aSmrg 21251477040fSmrg# when you set need_version to no, make sure it does not cause -set_version 21261477040fSmrg# flags to be left without arguments 21271477040fSmrgneed_version=unknown 2128444c061aSmrg 21291477040fSmrgcase $host_os in 21301477040fSmrgaix3*) 21311477040fSmrg version_type=linux 21321477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 21331477040fSmrg shlibpath_var=LIBPATH 21342265a131Smrg 21351477040fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 21361477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 21371477040fSmrg ;; 21382265a131Smrg 21391477040fSmrgaix[[4-9]]*) 21401477040fSmrg version_type=linux 21411477040fSmrg need_lib_prefix=no 21421477040fSmrg need_version=no 21431477040fSmrg hardcode_into_libs=yes 21441477040fSmrg if test "$host_cpu" = ia64; then 21451477040fSmrg # AIX 5 supports IA64 21461477040fSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 21471477040fSmrg shlibpath_var=LD_LIBRARY_PATH 21481477040fSmrg else 21491477040fSmrg # With GCC up to 2.95.x, collect2 would create an import file 21501477040fSmrg # for dependence libraries. The import file would start with 21511477040fSmrg # the line `#! .'. This would cause the generated library to 21521477040fSmrg # depend on `.', always an invalid library. This was fixed in 21531477040fSmrg # development snapshots of GCC prior to 3.0. 21541477040fSmrg case $host_os in 21551477040fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 21561477040fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 21571477040fSmrg echo ' yes ' 21581477040fSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 21591477040fSmrg : 21601477040fSmrg else 21611477040fSmrg can_build_shared=no 21621477040fSmrg fi 21631477040fSmrg ;; 21641477040fSmrg esac 21651477040fSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 21661477040fSmrg # soname into executable. Probably we can add versioning support to 21671477040fSmrg # collect2, so additional links can be useful in future. 21681477040fSmrg if test "$aix_use_runtimelinking" = yes; then 21691477040fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 21701477040fSmrg # instead of lib<name>.a to let people know that these are not 21711477040fSmrg # typical AIX shared libraries. 21721477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 21731477040fSmrg else 21741477040fSmrg # We preserve .a as extension for shared libraries through AIX4.2 21751477040fSmrg # and later when we are not doing run time linking. 21761477040fSmrg library_names_spec='${libname}${release}.a $libname.a' 21771477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 21781477040fSmrg fi 21791477040fSmrg shlibpath_var=LIBPATH 21801477040fSmrg fi 21811477040fSmrg ;; 21822ae83157Smrg 21831477040fSmrgamigaos*) 21841477040fSmrg case $host_cpu in 21851477040fSmrg powerpc) 21861477040fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 21871477040fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 21881477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 21891477040fSmrg ;; 21901477040fSmrg m68k) 21911477040fSmrg library_names_spec='$libname.ixlibrary $libname.a' 21921477040fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 21931477040fSmrg 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' 21941477040fSmrg ;; 21952265a131Smrg esac 21961477040fSmrg ;; 2197444c061aSmrg 21981477040fSmrgbeos*) 21991477040fSmrg library_names_spec='${libname}${shared_ext}' 22001477040fSmrg dynamic_linker="$host_os ld.so" 22011477040fSmrg shlibpath_var=LIBRARY_PATH 22021477040fSmrg ;; 2203444c061aSmrg 22041477040fSmrgbsdi[[45]]*) 22051477040fSmrg version_type=linux 22061477040fSmrg need_version=no 22071477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 22081477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 22091477040fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 22101477040fSmrg shlibpath_var=LD_LIBRARY_PATH 22111477040fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 22121477040fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 22131477040fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 22141477040fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 22151477040fSmrg # libtool to hard-code these into programs 22161477040fSmrg ;; 2217444c061aSmrg 22181477040fSmrgcygwin* | mingw* | pw32* | cegcc*) 22191477040fSmrg version_type=windows 22201477040fSmrg shrext_cmds=".dll" 22211477040fSmrg need_version=no 22221477040fSmrg need_lib_prefix=no 2223444c061aSmrg 22241477040fSmrg case $GCC,$host_os in 22251477040fSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 22261477040fSmrg library_names_spec='$libname.dll.a' 22271477040fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 22281477040fSmrg postinstall_cmds='base_file=`basename \${file}`~ 22291477040fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 22301477040fSmrg dldir=$destdir/`dirname \$dlpath`~ 22311477040fSmrg test -d \$dldir || mkdir -p \$dldir~ 22321477040fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 22331477040fSmrg chmod a+x \$dldir/$dlname~ 22341477040fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 22351477040fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 22361477040fSmrg fi' 22371477040fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 22381477040fSmrg dlpath=$dir/\$dldll~ 22391477040fSmrg $RM \$dlpath' 22401477040fSmrg shlibpath_overrides_runpath=yes 22412ae83157Smrg 22422ae83157Smrg case $host_os in 22431477040fSmrg cygwin*) 22441477040fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 22451477040fSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22461477040fSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 22471477040fSmrg ;; 22481477040fSmrg mingw* | cegcc*) 22491477040fSmrg # MinGW DLLs use traditional 'lib' prefix 22501477040fSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22511477040fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 22521477040fSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 22531477040fSmrg # It is most probably a Windows format PATH printed by 22541477040fSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 22551477040fSmrg # path with ; separators, and with drive letters. We can handle the 22561477040fSmrg # drive letters (cygwin fileutils understands them), so leave them, 22571477040fSmrg # especially as we might pass files found there to a mingw objdump, 22581477040fSmrg # which wouldn't understand a cygwinified path. Ahh. 22591477040fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 22601477040fSmrg else 22611477040fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 22621477040fSmrg fi 22631477040fSmrg ;; 22641477040fSmrg pw32*) 22651477040fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 22661477040fSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22671477040fSmrg ;; 22681477040fSmrg esac 2269444c061aSmrg ;; 22701477040fSmrg 22711477040fSmrg *) 22721477040fSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273444c061aSmrg ;; 2274444c061aSmrg esac 22751477040fSmrg dynamic_linker='Win32 ld.exe' 22761477040fSmrg # FIXME: first we should search . and the directory the executable is in 22771477040fSmrg shlibpath_var=PATH 22782265a131Smrg ;; 2279444c061aSmrg 22801477040fSmrgdarwin* | rhapsody*) 22811477040fSmrg dynamic_linker="$host_os dyld" 22821477040fSmrg version_type=darwin 22831477040fSmrg need_lib_prefix=no 22841477040fSmrg need_version=no 22851477040fSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 22861477040fSmrg soname_spec='${libname}${release}${major}$shared_ext' 22871477040fSmrg shlibpath_overrides_runpath=yes 22881477040fSmrg shlibpath_var=DYLD_LIBRARY_PATH 22891477040fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 22901477040fSmrgm4_if([$1], [],[ 22911477040fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 22921477040fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 22931477040fSmrg ;; 22942ae83157Smrg 22951477040fSmrgdgux*) 22961477040fSmrg version_type=linux 22971477040fSmrg need_lib_prefix=no 22981477040fSmrg need_version=no 22991477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 23001477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 23011477040fSmrg shlibpath_var=LD_LIBRARY_PATH 23021477040fSmrg ;; 23032ae83157Smrg 23041477040fSmrgfreebsd1*) 23051477040fSmrg dynamic_linker=no 23061477040fSmrg ;; 23072ae83157Smrg 23081477040fSmrgfreebsd* | dragonfly*) 23091477040fSmrg # DragonFly does not have aout. When/if they implement a new 23101477040fSmrg # versioning mechanism, adjust this. 23111477040fSmrg if test -x /usr/bin/objformat; then 23121477040fSmrg objformat=`/usr/bin/objformat` 23131477040fSmrg else 23141477040fSmrg case $host_os in 23151477040fSmrg freebsd[[123]]*) objformat=aout ;; 23161477040fSmrg *) objformat=elf ;; 23172ae83157Smrg esac 2318444c061aSmrg fi 23191477040fSmrg # Handle Gentoo/FreeBSD as it was Linux 23201477040fSmrg case $host_vendor in 23211477040fSmrg gentoo) 23221477040fSmrg version_type=linux ;; 23231477040fSmrg *) 23241477040fSmrg version_type=freebsd-$objformat ;; 23251477040fSmrg esac 23261477040fSmrg 23271477040fSmrg case $version_type in 23281477040fSmrg freebsd-elf*) 23291477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 23301477040fSmrg need_version=no 23311477040fSmrg need_lib_prefix=no 23322ae83157Smrg ;; 23331477040fSmrg freebsd-*) 23341477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 23351477040fSmrg need_version=yes 23362ae83157Smrg ;; 23371477040fSmrg linux) 23381477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 23391477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 23401477040fSmrg need_lib_prefix=no 23411477040fSmrg need_version=no 23422ae83157Smrg ;; 23431477040fSmrg esac 23441477040fSmrg shlibpath_var=LD_LIBRARY_PATH 23451477040fSmrg case $host_os in 23461477040fSmrg freebsd2*) 23471477040fSmrg shlibpath_overrides_runpath=yes 23481477040fSmrg ;; 23491477040fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 23501477040fSmrg shlibpath_overrides_runpath=yes 23511477040fSmrg hardcode_into_libs=yes 23521477040fSmrg ;; 23531477040fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 23541477040fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 23551477040fSmrg shlibpath_overrides_runpath=no 23561477040fSmrg hardcode_into_libs=yes 23571477040fSmrg ;; 23581477040fSmrg *) # from 4.6 on, and DragonFly 23591477040fSmrg shlibpath_overrides_runpath=yes 23601477040fSmrg hardcode_into_libs=yes 23611477040fSmrg ;; 23621477040fSmrg esac 23632265a131Smrg ;; 2364444c061aSmrg 23651477040fSmrggnu*) 23661477040fSmrg version_type=linux 23671477040fSmrg need_lib_prefix=no 23681477040fSmrg need_version=no 23691477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 23701477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 23711477040fSmrg shlibpath_var=LD_LIBRARY_PATH 23721477040fSmrg hardcode_into_libs=yes 23732265a131Smrg ;; 2374444c061aSmrg 23751477040fSmrghpux9* | hpux10* | hpux11*) 23761477040fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 23771477040fSmrg # link against other versions. 23781477040fSmrg version_type=sunos 23791477040fSmrg need_lib_prefix=no 23801477040fSmrg need_version=no 23811477040fSmrg case $host_cpu in 23821477040fSmrg ia64*) 23831477040fSmrg shrext_cmds='.so' 23841477040fSmrg hardcode_into_libs=yes 23851477040fSmrg dynamic_linker="$host_os dld.so" 23861477040fSmrg shlibpath_var=LD_LIBRARY_PATH 23871477040fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 23881477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23891477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 23901477040fSmrg if test "X$HPUX_IA64_MODE" = X32; then 23911477040fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 23921477040fSmrg else 23931477040fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 23941477040fSmrg fi 23951477040fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 23961477040fSmrg ;; 23971477040fSmrg hppa*64*) 23981477040fSmrg shrext_cmds='.sl' 23991477040fSmrg hardcode_into_libs=yes 24001477040fSmrg dynamic_linker="$host_os dld.sl" 24011477040fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 24021477040fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 24031477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 24041477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 24051477040fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 24061477040fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 24071477040fSmrg ;; 24081477040fSmrg *) 24091477040fSmrg shrext_cmds='.sl' 24101477040fSmrg dynamic_linker="$host_os dld.sl" 24111477040fSmrg shlibpath_var=SHLIB_PATH 24121477040fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 24131477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 24141477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 24151477040fSmrg ;; 24161477040fSmrg esac 24171477040fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 24181477040fSmrg postinstall_cmds='chmod 555 $lib' 24192ae83157Smrg ;; 24201477040fSmrg 24211477040fSmrginterix[[3-9]]*) 24221477040fSmrg version_type=linux 24231477040fSmrg need_lib_prefix=no 24241477040fSmrg need_version=no 24251477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 24261477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 24271477040fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 24281477040fSmrg shlibpath_var=LD_LIBRARY_PATH 24291477040fSmrg shlibpath_overrides_runpath=no 24301477040fSmrg hardcode_into_libs=yes 24311477040fSmrg ;; 24321477040fSmrg 24331477040fSmrgirix5* | irix6* | nonstopux*) 24341477040fSmrg case $host_os in 24351477040fSmrg nonstopux*) version_type=nonstopux ;; 24361477040fSmrg *) 24371477040fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 24381477040fSmrg version_type=linux 24391477040fSmrg else 24401477040fSmrg version_type=irix 24411477040fSmrg fi ;; 24421477040fSmrg esac 24431477040fSmrg need_lib_prefix=no 24441477040fSmrg need_version=no 24451477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 24461477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 24471477040fSmrg case $host_os in 24481477040fSmrg irix5* | nonstopux*) 24491477040fSmrg libsuff= shlibsuff= 24501477040fSmrg ;; 24511477040fSmrg *) 24521477040fSmrg case $LD in # libtool.m4 will add one of these switches to LD 24531477040fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 24541477040fSmrg libsuff= shlibsuff= libmagic=32-bit;; 24551477040fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 24561477040fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 24571477040fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 24581477040fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 24591477040fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 24602ae83157Smrg esac 24611477040fSmrg ;; 24621477040fSmrg esac 24631477040fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 24641477040fSmrg shlibpath_overrides_runpath=no 24651477040fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 24661477040fSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 24671477040fSmrg hardcode_into_libs=yes 24682265a131Smrg ;; 2469444c061aSmrg 24701477040fSmrg# No shared lib support for Linux oldld, aout, or coff. 24711477040fSmrglinux*oldld* | linux*aout* | linux*coff*) 24721477040fSmrg dynamic_linker=no 24732265a131Smrg ;; 2474444c061aSmrg 24751477040fSmrg# This must be Linux ELF. 24761477040fSmrglinux* | k*bsd*-gnu) 24771477040fSmrg version_type=linux 24781477040fSmrg need_lib_prefix=no 24791477040fSmrg need_version=no 24801477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 24811477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 24821477040fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 24831477040fSmrg shlibpath_var=LD_LIBRARY_PATH 24841477040fSmrg shlibpath_overrides_runpath=no 24851477040fSmrg # Some binutils ld are patched to set DT_RUNPATH 24861477040fSmrg save_LDFLAGS=$LDFLAGS 24871477040fSmrg save_libdir=$libdir 24881477040fSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 24891477040fSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 24901477040fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 24911477040fSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 24921477040fSmrg [shlibpath_overrides_runpath=yes])]) 24931477040fSmrg LDFLAGS=$save_LDFLAGS 24941477040fSmrg libdir=$save_libdir 24952265a131Smrg 24961477040fSmrg # This implies no fast_install, which is unacceptable. 24971477040fSmrg # Some rework will be needed to allow for fast_install 24981477040fSmrg # before this can be enabled. 24991477040fSmrg hardcode_into_libs=yes 2500444c061aSmrg 25011477040fSmrg # Append ld.so.conf contents to the search path 25021477040fSmrg if test -f /etc/ld.so.conf; then 25031477040fSmrg 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' ' '` 25041477040fSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 25051477040fSmrg fi 25062265a131Smrg 25071477040fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 25081477040fSmrg # powerpc, because MkLinux only supported shared libraries with the 25091477040fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 25101477040fSmrg # most powerpc-linux boxes support dynamic linking these days and 25111477040fSmrg # people can always --disable-shared, the test was removed, and we 25121477040fSmrg # assume the GNU/Linux dynamic linker is in use. 25131477040fSmrg dynamic_linker='GNU/Linux ld.so' 25141477040fSmrg ;; 2515444c061aSmrg 25161477040fSmrgnetbsd*) 25171477040fSmrg version_type=sunos 25181477040fSmrg need_lib_prefix=no 25191477040fSmrg need_version=no 25201477040fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 25211477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 25221477040fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 25231477040fSmrg dynamic_linker='NetBSD (a.out) ld.so' 25241477040fSmrg else 25251477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 25261477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 25271477040fSmrg dynamic_linker='NetBSD ld.elf_so' 25281477040fSmrg fi 25291477040fSmrg shlibpath_var=LD_LIBRARY_PATH 25301477040fSmrg shlibpath_overrides_runpath=yes 25311477040fSmrg hardcode_into_libs=yes 25321477040fSmrg ;; 2533444c061aSmrg 25341477040fSmrgnewsos6) 25351477040fSmrg version_type=linux 25361477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25371477040fSmrg shlibpath_var=LD_LIBRARY_PATH 25381477040fSmrg shlibpath_overrides_runpath=yes 25391477040fSmrg ;; 2540444c061aSmrg 25411477040fSmrg*nto* | *qnx*) 25421477040fSmrg version_type=qnx 25431477040fSmrg need_lib_prefix=no 25441477040fSmrg need_version=no 25451477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25461477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 25471477040fSmrg shlibpath_var=LD_LIBRARY_PATH 25481477040fSmrg shlibpath_overrides_runpath=no 25491477040fSmrg hardcode_into_libs=yes 25501477040fSmrg dynamic_linker='ldqnx.so' 25511477040fSmrg ;; 25522265a131Smrg 25531477040fSmrgopenbsd*) 25541477040fSmrg version_type=sunos 25551477040fSmrg sys_lib_dlsearch_path_spec="/usr/lib" 25561477040fSmrg need_lib_prefix=no 25571477040fSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 25581477040fSmrg case $host_os in 25591477040fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 25601477040fSmrg *) need_version=no ;; 25611477040fSmrg esac 25621477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 25631477040fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 25641477040fSmrg shlibpath_var=LD_LIBRARY_PATH 25651477040fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 25661477040fSmrg case $host_os in 25671477040fSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 25681477040fSmrg shlibpath_overrides_runpath=no 25691477040fSmrg ;; 25701477040fSmrg *) 25711477040fSmrg shlibpath_overrides_runpath=yes 25721477040fSmrg ;; 25731477040fSmrg esac 25741477040fSmrg else 25751477040fSmrg shlibpath_overrides_runpath=yes 25761477040fSmrg fi 25771477040fSmrg ;; 25782265a131Smrg 25791477040fSmrgos2*) 25801477040fSmrg libname_spec='$name' 25811477040fSmrg shrext_cmds=".dll" 25821477040fSmrg need_lib_prefix=no 25831477040fSmrg library_names_spec='$libname${shared_ext} $libname.a' 25841477040fSmrg dynamic_linker='OS/2 ld.exe' 25851477040fSmrg shlibpath_var=LIBPATH 25861477040fSmrg ;; 2587444c061aSmrg 25881477040fSmrgosf3* | osf4* | osf5*) 25891477040fSmrg version_type=osf 25901477040fSmrg need_lib_prefix=no 25911477040fSmrg need_version=no 25921477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 25931477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25941477040fSmrg shlibpath_var=LD_LIBRARY_PATH 25951477040fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 25961477040fSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 25971477040fSmrg ;; 2598444c061aSmrg 25991477040fSmrgrdos*) 26001477040fSmrg dynamic_linker=no 26011477040fSmrg ;; 2602444c061aSmrg 26031477040fSmrgsolaris*) 26041477040fSmrg version_type=linux 26051477040fSmrg need_lib_prefix=no 26061477040fSmrg need_version=no 26071477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26081477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 26091477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26101477040fSmrg shlibpath_overrides_runpath=yes 26111477040fSmrg hardcode_into_libs=yes 26121477040fSmrg # ldd complains unless libraries are executable 26131477040fSmrg postinstall_cmds='chmod +x $lib' 26141477040fSmrg ;; 2615444c061aSmrg 26161477040fSmrgsunos4*) 26171477040fSmrg version_type=sunos 26181477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 26191477040fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 26201477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26211477040fSmrg shlibpath_overrides_runpath=yes 26221477040fSmrg if test "$with_gnu_ld" = yes; then 26231477040fSmrg need_lib_prefix=no 26241477040fSmrg fi 26251477040fSmrg need_version=yes 26261477040fSmrg ;; 2627444c061aSmrg 26281477040fSmrgsysv4 | sysv4.3*) 26291477040fSmrg version_type=linux 26301477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26311477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 26321477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26331477040fSmrg case $host_vendor in 26341477040fSmrg sni) 26351477040fSmrg shlibpath_overrides_runpath=no 26361477040fSmrg need_lib_prefix=no 26371477040fSmrg runpath_var=LD_RUN_PATH 26381477040fSmrg ;; 26391477040fSmrg siemens) 26401477040fSmrg need_lib_prefix=no 26411477040fSmrg ;; 26421477040fSmrg motorola) 26431477040fSmrg need_lib_prefix=no 26441477040fSmrg need_version=no 26451477040fSmrg shlibpath_overrides_runpath=no 26461477040fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 26471477040fSmrg ;; 26482265a131Smrg esac 26491477040fSmrg ;; 2650444c061aSmrg 26511477040fSmrgsysv4*MP*) 26521477040fSmrg if test -d /usr/nec ;then 26531477040fSmrg version_type=linux 26541477040fSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 26551477040fSmrg soname_spec='$libname${shared_ext}.$major' 26561477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26571477040fSmrg fi 26581477040fSmrg ;; 2659444c061aSmrg 26601477040fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 26611477040fSmrg version_type=freebsd-elf 26621477040fSmrg need_lib_prefix=no 26631477040fSmrg need_version=no 26641477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 26651477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 26661477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26671477040fSmrg shlibpath_overrides_runpath=yes 26681477040fSmrg hardcode_into_libs=yes 26691477040fSmrg if test "$with_gnu_ld" = yes; then 26701477040fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 26711477040fSmrg else 26721477040fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 26731477040fSmrg case $host_os in 26741477040fSmrg sco3.2v5*) 26751477040fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 26761477040fSmrg ;; 26771477040fSmrg esac 26781477040fSmrg fi 26791477040fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 26801477040fSmrg ;; 2681444c061aSmrg 26821477040fSmrgtpf*) 26831477040fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 26841477040fSmrg version_type=linux 26851477040fSmrg need_lib_prefix=no 26861477040fSmrg need_version=no 26871477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26881477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26891477040fSmrg shlibpath_overrides_runpath=no 26901477040fSmrg hardcode_into_libs=yes 26911477040fSmrg ;; 2692444c061aSmrg 26931477040fSmrguts4*) 26941477040fSmrg version_type=linux 26951477040fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26961477040fSmrg soname_spec='${libname}${release}${shared_ext}$major' 26971477040fSmrg shlibpath_var=LD_LIBRARY_PATH 26981477040fSmrg ;; 2699444c061aSmrg 27001477040fSmrg*) 27011477040fSmrg dynamic_linker=no 27021477040fSmrg ;; 27031477040fSmrgesac 27041477040fSmrgAC_MSG_RESULT([$dynamic_linker]) 27051477040fSmrgtest "$dynamic_linker" = no && can_build_shared=no 2706444c061aSmrg 27071477040fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 27081477040fSmrgif test "$GCC" = yes; then 27091477040fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 27101477040fSmrgfi 2711444c061aSmrg 27121477040fSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 27131477040fSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 27141477040fSmrgfi 27151477040fSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 27161477040fSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 27171477040fSmrgfi 2718444c061aSmrg 27191477040fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 27201477040fSmrg [Variables whose values should be saved in libtool wrapper scripts and 27211477040fSmrg restored at link time]) 27221477040fSmrg_LT_DECL([], [need_lib_prefix], [0], 27231477040fSmrg [Do we need the "lib" prefix for modules?]) 27241477040fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 27251477040fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 27261477040fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 27271477040fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 27281477040fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 27291477040fSmrg [Is shlibpath searched before the hard-coded library search path?]) 27301477040fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 27311477040fSmrg_LT_DECL([], [library_names_spec], [1], 27321477040fSmrg [[List of archive names. First name is the real one, the rest are links. 27331477040fSmrg The last name is the one that the linker finds with -lNAME]]) 27341477040fSmrg_LT_DECL([], [soname_spec], [1], 27351477040fSmrg [[The coded name of the library, if different from the real name]]) 27361477040fSmrg_LT_DECL([], [postinstall_cmds], [2], 27371477040fSmrg [Command to use after installation of a shared archive]) 27381477040fSmrg_LT_DECL([], [postuninstall_cmds], [2], 27391477040fSmrg [Command to use after uninstallation of a shared archive]) 27401477040fSmrg_LT_DECL([], [finish_cmds], [2], 27411477040fSmrg [Commands used to finish a libtool library installation in a directory]) 27421477040fSmrg_LT_DECL([], [finish_eval], [1], 27431477040fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 27441477040fSmrg not shown]]) 27451477040fSmrg_LT_DECL([], [hardcode_into_libs], [0], 27461477040fSmrg [Whether we should hardcode library paths into libraries]) 27471477040fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 27481477040fSmrg [Compile-time system search path for libraries]) 27491477040fSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 27501477040fSmrg [Run-time system search path for libraries]) 27511477040fSmrg])# _LT_SYS_DYNAMIC_LINKER 27521477040fSmrg 27531477040fSmrg 27541477040fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 27551477040fSmrg# -------------------------- 27561477040fSmrg# find a file program which can recognize shared library 27571477040fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 27581477040fSmrg[m4_require([_LT_DECL_EGREP])dnl 27591477040fSmrgAC_MSG_CHECKING([for $1]) 27601477040fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 27611477040fSmrg[case $MAGIC_CMD in 27621477040fSmrg[[\\/*] | ?:[\\/]*]) 27631477040fSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 27641477040fSmrg ;; 27651477040fSmrg*) 27661477040fSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 27671477040fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 27681477040fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 27691477040fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 27701477040fSmrgdnl not every word. This closes a longstanding sh security hole. 27711477040fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 27721477040fSmrg for ac_dir in $ac_dummy; do 27731477040fSmrg IFS="$lt_save_ifs" 27741477040fSmrg test -z "$ac_dir" && ac_dir=. 27751477040fSmrg if test -f $ac_dir/$1; then 27761477040fSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 27771477040fSmrg if test -n "$file_magic_test_file"; then 27781477040fSmrg case $deplibs_check_method in 27791477040fSmrg "file_magic "*) 27801477040fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 27811477040fSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 27821477040fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 27831477040fSmrg $EGREP "$file_magic_regex" > /dev/null; then 27841477040fSmrg : 27851477040fSmrg else 27861477040fSmrg cat <<_LT_EOF 1>&2 2787444c061aSmrg 27881477040fSmrg*** Warning: the command libtool uses to detect shared libraries, 27891477040fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 27901477040fSmrg*** The result is that libtool may fail to recognize shared libraries 27911477040fSmrg*** as such. This will affect the creation of libtool libraries that 27921477040fSmrg*** depend on shared libraries, but programs linked with such libtool 27931477040fSmrg*** libraries will work regardless of this problem. Nevertheless, you 27941477040fSmrg*** may want to report the problem to your system manager and/or to 27951477040fSmrg*** bug-libtool@gnu.org 2796444c061aSmrg 27971477040fSmrg_LT_EOF 27981477040fSmrg fi ;; 27991477040fSmrg esac 28001477040fSmrg fi 28011477040fSmrg break 28021477040fSmrg fi 28031477040fSmrg done 28041477040fSmrg IFS="$lt_save_ifs" 28051477040fSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 28061477040fSmrg ;; 28071477040fSmrgesac]) 28081477040fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 28091477040fSmrgif test -n "$MAGIC_CMD"; then 28101477040fSmrg AC_MSG_RESULT($MAGIC_CMD) 28111477040fSmrgelse 28121477040fSmrg AC_MSG_RESULT(no) 28131477040fSmrgfi 28141477040fSmrg_LT_DECL([], [MAGIC_CMD], [0], 28151477040fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 28161477040fSmrg])# _LT_PATH_TOOL_PREFIX 28172265a131Smrg 28181477040fSmrg# Old name: 28191477040fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 28201477040fSmrgdnl aclocal-1.4 backwards compatibility: 28211477040fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 28222265a131Smrg 28231477040fSmrg 28241477040fSmrg# _LT_PATH_MAGIC 28251477040fSmrg# -------------- 28261477040fSmrg# find a file program which can recognize a shared library 28271477040fSmrgm4_defun([_LT_PATH_MAGIC], 28281477040fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 28291477040fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 28301477040fSmrg if test -n "$ac_tool_prefix"; then 28311477040fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 28321477040fSmrg else 28331477040fSmrg MAGIC_CMD=: 2834444c061aSmrg fi 28352ae83157Smrgfi 28361477040fSmrg])# _LT_PATH_MAGIC 2837444c061aSmrg 2838444c061aSmrg 28391477040fSmrg# LT_PATH_LD 28401477040fSmrg# ---------- 28411477040fSmrg# find the pathname to the GNU or non-GNU linker 28421477040fSmrgAC_DEFUN([LT_PATH_LD], 28431477040fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 28441477040fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 28451477040fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 28461477040fSmrgm4_require([_LT_DECL_SED])dnl 28471477040fSmrgm4_require([_LT_DECL_EGREP])dnl 2848444c061aSmrg 28491477040fSmrgAC_ARG_WITH([gnu-ld], 28501477040fSmrg [AS_HELP_STRING([--with-gnu-ld], 28511477040fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 28521477040fSmrg [test "$withval" = no || with_gnu_ld=yes], 28531477040fSmrg [with_gnu_ld=no])dnl 28541477040fSmrg 28551477040fSmrgac_prog=ld 28561477040fSmrgif test "$GCC" = yes; then 28571477040fSmrg # Check if gcc -print-prog-name=ld gives a path. 28581477040fSmrg AC_MSG_CHECKING([for ld used by $CC]) 28591477040fSmrg case $host in 28601477040fSmrg *-*-mingw*) 28611477040fSmrg # gcc leaves a trailing carriage return which upsets mingw 28621477040fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 28631477040fSmrg *) 28641477040fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 28651477040fSmrg esac 28661477040fSmrg case $ac_prog in 28671477040fSmrg # Accept absolute paths. 28681477040fSmrg [[\\/]]* | ?:[[\\/]]*) 28691477040fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 28701477040fSmrg # Canonicalize the pathname of ld 28711477040fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 28721477040fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 28731477040fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 28741477040fSmrg done 28751477040fSmrg test -z "$LD" && LD="$ac_prog" 28761477040fSmrg ;; 28771477040fSmrg "") 28781477040fSmrg # If it fails, then pretend we aren't using GCC. 28791477040fSmrg ac_prog=ld 28801477040fSmrg ;; 28811477040fSmrg *) 28821477040fSmrg # If it is relative, then search for the first ld in PATH. 28831477040fSmrg with_gnu_ld=unknown 28842ae83157Smrg ;; 28851477040fSmrg esac 28861477040fSmrgelif test "$with_gnu_ld" = yes; then 28871477040fSmrg AC_MSG_CHECKING([for GNU ld]) 28881477040fSmrgelse 28891477040fSmrg AC_MSG_CHECKING([for non-GNU ld]) 28901477040fSmrgfi 28911477040fSmrgAC_CACHE_VAL(lt_cv_path_LD, 28921477040fSmrg[if test -z "$LD"; then 28931477040fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 28941477040fSmrg for ac_dir in $PATH; do 28951477040fSmrg IFS="$lt_save_ifs" 28961477040fSmrg test -z "$ac_dir" && ac_dir=. 28971477040fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 28981477040fSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 28991477040fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 29001477040fSmrg # but apparently some variants of GNU ld only accept -v. 29011477040fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 29021477040fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 29031477040fSmrg *GNU* | *'with BFD'*) 29041477040fSmrg test "$with_gnu_ld" != no && break 29051477040fSmrg ;; 29061477040fSmrg *) 29071477040fSmrg test "$with_gnu_ld" != yes && break 29081477040fSmrg ;; 29091477040fSmrg esac 29101477040fSmrg fi 29111477040fSmrg done 29121477040fSmrg IFS="$lt_save_ifs" 29131477040fSmrgelse 29141477040fSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 29151477040fSmrgfi]) 29161477040fSmrgLD="$lt_cv_path_LD" 29171477040fSmrgif test -n "$LD"; then 29181477040fSmrg AC_MSG_RESULT($LD) 29191477040fSmrgelse 29201477040fSmrg AC_MSG_RESULT(no) 29211477040fSmrgfi 29221477040fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 29231477040fSmrg_LT_PATH_LD_GNU 29241477040fSmrgAC_SUBST([LD]) 2925444c061aSmrg 29261477040fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 29271477040fSmrg])# LT_PATH_LD 2928444c061aSmrg 29291477040fSmrg# Old names: 29301477040fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 29311477040fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 29321477040fSmrgdnl aclocal-1.4 backwards compatibility: 29331477040fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 29341477040fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 2935444c061aSmrg 2936444c061aSmrg 29371477040fSmrg# _LT_PATH_LD_GNU 29381477040fSmrg#- -------------- 29391477040fSmrgm4_defun([_LT_PATH_LD_GNU], 29401477040fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 29411477040fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 29421477040fSmrgcase `$LD -v 2>&1 </dev/null` in 29431477040fSmrg*GNU* | *'with BFD'*) 29441477040fSmrg lt_cv_prog_gnu_ld=yes 29451477040fSmrg ;; 29461477040fSmrg*) 29471477040fSmrg lt_cv_prog_gnu_ld=no 29481477040fSmrg ;; 29491477040fSmrgesac]) 29501477040fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 29511477040fSmrg])# _LT_PATH_LD_GNU 29522265a131Smrg 29532265a131Smrg 29541477040fSmrg# _LT_CMD_RELOAD 29551477040fSmrg# -------------- 29561477040fSmrg# find reload flag for linker 29571477040fSmrg# -- PORTME Some linkers may need a different reload flag. 29581477040fSmrgm4_defun([_LT_CMD_RELOAD], 29591477040fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 29601477040fSmrg lt_cv_ld_reload_flag, 29611477040fSmrg [lt_cv_ld_reload_flag='-r']) 29621477040fSmrgreload_flag=$lt_cv_ld_reload_flag 29631477040fSmrgcase $reload_flag in 29641477040fSmrg"" | " "*) ;; 29651477040fSmrg*) reload_flag=" $reload_flag" ;; 29661477040fSmrgesac 29671477040fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 29681477040fSmrgcase $host_os in 29691477040fSmrg darwin*) 29701477040fSmrg if test "$GCC" = yes; then 29711477040fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 29721477040fSmrg else 29731477040fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 29742ae83157Smrg fi 29752ae83157Smrg ;; 29761477040fSmrgesac 29771477040fSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 29781477040fSmrg_LT_DECL([], [reload_cmds], [2])dnl 29791477040fSmrg])# _LT_CMD_RELOAD 29802265a131Smrg 2981444c061aSmrg 29821477040fSmrg# _LT_CHECK_MAGIC_METHOD 29831477040fSmrg# ---------------------- 29841477040fSmrg# how to check for library dependencies 29851477040fSmrg# -- PORTME fill in with the dynamic library characteristics 29861477040fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 29871477040fSmrg[m4_require([_LT_DECL_EGREP]) 29881477040fSmrgm4_require([_LT_DECL_OBJDUMP]) 29891477040fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 29901477040fSmrglt_cv_deplibs_check_method, 29911477040fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 29921477040fSmrglt_cv_file_magic_test_file= 29931477040fSmrglt_cv_deplibs_check_method='unknown' 29941477040fSmrg# Need to set the preceding variable on all platforms that support 29951477040fSmrg# interlibrary dependencies. 29961477040fSmrg# 'none' -- dependencies not supported. 29971477040fSmrg# `unknown' -- same as none, but documents that we really don't know. 29981477040fSmrg# 'pass_all' -- all dependencies passed with no checks. 29991477040fSmrg# 'test_compile' -- check by making test program. 30001477040fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 30011477040fSmrg# which responds to the $file_magic_cmd with a given extended regex. 30021477040fSmrg# If you have `file' or equivalent on your system and you're not sure 30031477040fSmrg# whether `pass_all' will *always* work, you probably want this one. 30042ae83157Smrg 30051477040fSmrgcase $host_os in 30061477040fSmrgaix[[4-9]]*) 30071477040fSmrg lt_cv_deplibs_check_method=pass_all 30081477040fSmrg ;; 30092ae83157Smrg 30101477040fSmrgbeos*) 30111477040fSmrg lt_cv_deplibs_check_method=pass_all 30121477040fSmrg ;; 3013444c061aSmrg 30141477040fSmrgbsdi[[45]]*) 30151477040fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 30161477040fSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 30171477040fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 30181477040fSmrg ;; 3019444c061aSmrg 30201477040fSmrgcygwin*) 30211477040fSmrg # func_win32_libid is a shell function defined in ltmain.sh 30221477040fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 30231477040fSmrg lt_cv_file_magic_cmd='func_win32_libid' 30241477040fSmrg ;; 3025444c061aSmrg 30261477040fSmrgmingw* | pw32*) 30271477040fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 30281477040fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 30291477040fSmrg # unless we find 'file', for example because we are cross-compiling. 30301477040fSmrg if ( file / ) >/dev/null 2>&1; then 30311477040fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 30321477040fSmrg lt_cv_file_magic_cmd='func_win32_libid' 30331477040fSmrg else 30341477040fSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 30351477040fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30362265a131Smrg fi 30371477040fSmrg ;; 3038444c061aSmrg 30391477040fSmrgcegcc) 30401477040fSmrg # use the weaker test based on 'objdump'. See mingw*. 30411477040fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 30421477040fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30431477040fSmrg ;; 3044444c061aSmrg 30451477040fSmrgdarwin* | rhapsody*) 30461477040fSmrg lt_cv_deplibs_check_method=pass_all 30471477040fSmrg ;; 3048444c061aSmrg 30491477040fSmrgfreebsd* | dragonfly*) 30501477040fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 30511477040fSmrg case $host_cpu in 30521477040fSmrg i*86 ) 30531477040fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 30541477040fSmrg # Let's accept both of them until this is cleared up. 30551477040fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 30561477040fSmrg lt_cv_file_magic_cmd=/usr/bin/file 30571477040fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 30581477040fSmrg ;; 30591477040fSmrg esac 30602ae83157Smrg else 30611477040fSmrg lt_cv_deplibs_check_method=pass_all 30622ae83157Smrg fi 30631477040fSmrg ;; 3064444c061aSmrg 30651477040fSmrggnu*) 30661477040fSmrg lt_cv_deplibs_check_method=pass_all 30671477040fSmrg ;; 3068444c061aSmrg 30691477040fSmrghpux10.20* | hpux11*) 30701477040fSmrg lt_cv_file_magic_cmd=/usr/bin/file 30711477040fSmrg case $host_cpu in 30721477040fSmrg ia64*) 30731477040fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 30741477040fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 30751477040fSmrg ;; 30761477040fSmrg hppa*64*) 30771477040fSmrg [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]'] 30781477040fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 30791477040fSmrg ;; 30801477040fSmrg *) 30811477040fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 30821477040fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 30832ae83157Smrg ;; 30842ae83157Smrg esac 30851477040fSmrg ;; 30862265a131Smrg 30871477040fSmrginterix[[3-9]]*) 30881477040fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 30891477040fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 30901477040fSmrg ;; 30911477040fSmrg 30921477040fSmrgirix5* | irix6* | nonstopux*) 30931477040fSmrg case $LD in 30941477040fSmrg *-32|*"-32 ") libmagic=32-bit;; 30951477040fSmrg *-n32|*"-n32 ") libmagic=N32;; 30961477040fSmrg *-64|*"-64 ") libmagic=64-bit;; 30971477040fSmrg *) libmagic=never-match;; 30982ae83157Smrg esac 30991477040fSmrg lt_cv_deplibs_check_method=pass_all 31001477040fSmrg ;; 31011477040fSmrg 31021477040fSmrg# This must be Linux ELF. 31031477040fSmrglinux* | k*bsd*-gnu) 31041477040fSmrg lt_cv_deplibs_check_method=pass_all 31051477040fSmrg ;; 31061477040fSmrg 31071477040fSmrgnetbsd*) 31081477040fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 31091477040fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 31102ae83157Smrg else 31111477040fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3112444c061aSmrg fi 31131477040fSmrg ;; 31142265a131Smrg 31151477040fSmrgnewos6*) 31161477040fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 31171477040fSmrg lt_cv_file_magic_cmd=/usr/bin/file 31181477040fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 31191477040fSmrg ;; 31202265a131Smrg 31211477040fSmrg*nto* | *qnx*) 31221477040fSmrg lt_cv_deplibs_check_method=pass_all 3123444c061aSmrg ;; 3124444c061aSmrg 31251477040fSmrgopenbsd*) 31261477040fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 31271477040fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 31282265a131Smrg else 31291477040fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 31302265a131Smrg fi 31312ae83157Smrg ;; 3132444c061aSmrg 31331477040fSmrgosf3* | osf4* | osf5*) 31341477040fSmrg lt_cv_deplibs_check_method=pass_all 31352ae83157Smrg ;; 3136444c061aSmrg 31371477040fSmrgrdos*) 31381477040fSmrg lt_cv_deplibs_check_method=pass_all 31392ae83157Smrg ;; 3140444c061aSmrg 31411477040fSmrgsolaris*) 31421477040fSmrg lt_cv_deplibs_check_method=pass_all 31432ae83157Smrg ;; 3144444c061aSmrg 31451477040fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 31461477040fSmrg lt_cv_deplibs_check_method=pass_all 31471477040fSmrg ;; 3148444c061aSmrg 31491477040fSmrgsysv4 | sysv4.3*) 31501477040fSmrg case $host_vendor in 31511477040fSmrg motorola) 31521477040fSmrg 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]]' 31531477040fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 31542ae83157Smrg ;; 31551477040fSmrg ncr) 31561477040fSmrg lt_cv_deplibs_check_method=pass_all 31571477040fSmrg ;; 31581477040fSmrg sequent) 31591477040fSmrg lt_cv_file_magic_cmd='/bin/file' 31601477040fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 31611477040fSmrg ;; 31621477040fSmrg sni) 31631477040fSmrg lt_cv_file_magic_cmd='/bin/file' 31641477040fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 31651477040fSmrg lt_cv_file_magic_test_file=/lib/libc.so 31661477040fSmrg ;; 31671477040fSmrg siemens) 31681477040fSmrg lt_cv_deplibs_check_method=pass_all 31691477040fSmrg ;; 31701477040fSmrg pc) 31711477040fSmrg lt_cv_deplibs_check_method=pass_all 31722ae83157Smrg ;; 31732ae83157Smrg esac 31742ae83157Smrg ;; 31752ae83157Smrg 31761477040fSmrgtpf*) 31771477040fSmrg lt_cv_deplibs_check_method=pass_all 31782ae83157Smrg ;; 31791477040fSmrgesac 31801477040fSmrg]) 31811477040fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 31821477040fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 31831477040fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 31842ae83157Smrg 31851477040fSmrg_LT_DECL([], [deplibs_check_method], [1], 31861477040fSmrg [Method to check whether dependent libraries are shared objects]) 31871477040fSmrg_LT_DECL([], [file_magic_cmd], [1], 31881477040fSmrg [Command to use when deplibs_check_method == "file_magic"]) 31891477040fSmrg])# _LT_CHECK_MAGIC_METHOD 31902ae83157Smrg 31912ae83157Smrg 31921477040fSmrg# LT_PATH_NM 31931477040fSmrg# ---------- 31941477040fSmrg# find the pathname to a BSD- or MS-compatible name lister 31951477040fSmrgAC_DEFUN([LT_PATH_NM], 31961477040fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 31971477040fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 31981477040fSmrg[if test -n "$NM"; then 31991477040fSmrg # Let the user override the test. 32001477040fSmrg lt_cv_path_NM="$NM" 32011477040fSmrgelse 32021477040fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 32031477040fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 32041477040fSmrg lt_nm_to_check="$lt_nm_to_check nm" 32052ae83157Smrg fi 32061477040fSmrg for lt_tmp_nm in $lt_nm_to_check; do 32071477040fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 32081477040fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 32091477040fSmrg IFS="$lt_save_ifs" 32101477040fSmrg test -z "$ac_dir" && ac_dir=. 32111477040fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 32121477040fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 32131477040fSmrg # Check to see if the nm accepts a BSD-compat flag. 32141477040fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 32151477040fSmrg # nm: unknown option "B" ignored 32161477040fSmrg # Tru64's nm complains that /dev/null is an invalid object file 32171477040fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 32181477040fSmrg */dev/null* | *'Invalid file or object type'*) 32191477040fSmrg lt_cv_path_NM="$tmp_nm -B" 32201477040fSmrg break 32211477040fSmrg ;; 32221477040fSmrg *) 32231477040fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 32241477040fSmrg */dev/null*) 32251477040fSmrg lt_cv_path_NM="$tmp_nm -p" 32261477040fSmrg break 32271477040fSmrg ;; 32281477040fSmrg *) 32291477040fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 32301477040fSmrg continue # so that we can try to find one that supports BSD flags 32311477040fSmrg ;; 32321477040fSmrg esac 32331477040fSmrg ;; 32341477040fSmrg esac 32351477040fSmrg fi 32361477040fSmrg done 32371477040fSmrg IFS="$lt_save_ifs" 32381477040fSmrg done 32391477040fSmrg : ${lt_cv_path_NM=no} 32401477040fSmrgfi]) 32411477040fSmrgif test "$lt_cv_path_NM" != "no"; then 32421477040fSmrg NM="$lt_cv_path_NM" 32431477040fSmrgelse 32441477040fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 32451477040fSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 32461477040fSmrg AC_SUBST([DUMPBIN]) 32471477040fSmrg if test "$DUMPBIN" != ":"; then 32481477040fSmrg NM="$DUMPBIN" 32491477040fSmrg fi 32501477040fSmrgfi 32511477040fSmrgtest -z "$NM" && NM=nm 32521477040fSmrgAC_SUBST([NM]) 32531477040fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 32541477040fSmrg 32551477040fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 32561477040fSmrg [lt_cv_nm_interface="BSD nm" 32571477040fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 32581477040fSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 32591477040fSmrg (eval "$ac_compile" 2>conftest.err) 32601477040fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 32611477040fSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 32621477040fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 32631477040fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 32641477040fSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 32651477040fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 32661477040fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 32671477040fSmrg lt_cv_nm_interface="MS dumpbin" 32681477040fSmrg fi 32691477040fSmrg rm -f conftest*]) 32701477040fSmrg])# LT_PATH_NM 32712ae83157Smrg 32721477040fSmrg# Old names: 32731477040fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 32741477040fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 32751477040fSmrgdnl aclocal-1.4 backwards compatibility: 32761477040fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 32771477040fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 32782ae83157Smrg 32792ae83157Smrg 32801477040fSmrg# LT_LIB_M 32811477040fSmrg# -------- 32821477040fSmrg# check for math library 32831477040fSmrgAC_DEFUN([LT_LIB_M], 32841477040fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 32851477040fSmrgLIBM= 32861477040fSmrgcase $host in 32871477040fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 32881477040fSmrg # These system don't have libm, or don't need it 32892ae83157Smrg ;; 32901477040fSmrg*-ncr-sysv4.3*) 32911477040fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 32921477040fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 32932ae83157Smrg ;; 32941477040fSmrg*) 32951477040fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 32962ae83157Smrg ;; 32971477040fSmrgesac 32981477040fSmrgAC_SUBST([LIBM]) 32991477040fSmrg])# LT_LIB_M 33002ae83157Smrg 33011477040fSmrg# Old name: 33021477040fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 33031477040fSmrgdnl aclocal-1.4 backwards compatibility: 33041477040fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 33052ae83157Smrg 33062ae83157Smrg 33071477040fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 33081477040fSmrg# ------------------------------- 33091477040fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 33101477040fSmrg[m4_require([_LT_TAG_COMPILER])dnl 33112ae83157Smrg 33121477040fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 33132ae83157Smrg 33141477040fSmrgif test "$GCC" = yes; then 33151477040fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 33162ae83157Smrg 33171477040fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 33181477040fSmrg lt_cv_prog_compiler_rtti_exceptions, 33191477040fSmrg [-fno-rtti -fno-exceptions], [], 33201477040fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 33211477040fSmrgfi 33221477040fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 33231477040fSmrg [Compiler flag to turn off builtin functions]) 33241477040fSmrg])# _LT_COMPILER_NO_RTTI 33252ae83157Smrg 3326444c061aSmrg 33271477040fSmrg# _LT_CMD_GLOBAL_SYMBOLS 33281477040fSmrg# ---------------------- 33291477040fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 33301477040fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 33311477040fSmrgAC_REQUIRE([AC_PROG_CC])dnl 33321477040fSmrgAC_REQUIRE([LT_PATH_NM])dnl 33331477040fSmrgAC_REQUIRE([LT_PATH_LD])dnl 33341477040fSmrgm4_require([_LT_DECL_SED])dnl 33351477040fSmrgm4_require([_LT_DECL_EGREP])dnl 33361477040fSmrgm4_require([_LT_TAG_COMPILER])dnl 3337444c061aSmrg 33381477040fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 33391477040fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 33401477040fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 33411477040fSmrg[ 33421477040fSmrg# These are sane defaults that work on at least a few old systems. 33431477040fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3344444c061aSmrg 33451477040fSmrg# Character class describing NM global symbol codes. 33461477040fSmrgsymcode='[[BCDEGRST]]' 3347444c061aSmrg 33481477040fSmrg# Regexp to match symbols that can be accessed directly from C. 33491477040fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3350444c061aSmrg 33511477040fSmrg# Define system-specific variables. 33521477040fSmrgcase $host_os in 33531477040fSmrgaix*) 33541477040fSmrg symcode='[[BCDT]]' 33552ae83157Smrg ;; 33561477040fSmrgcygwin* | mingw* | pw32* | cegcc*) 33571477040fSmrg symcode='[[ABCDGISTW]]' 33582ae83157Smrg ;; 33591477040fSmrghpux*) 33601477040fSmrg if test "$host_cpu" = ia64; then 33611477040fSmrg symcode='[[ABCDEGRST]]' 33622ae83157Smrg fi 33632ae83157Smrg ;; 33641477040fSmrgirix* | nonstopux*) 33651477040fSmrg symcode='[[BCDEGRST]]' 33662ae83157Smrg ;; 33671477040fSmrgosf*) 33681477040fSmrg symcode='[[BCDEGQRST]]' 33692ae83157Smrg ;; 33701477040fSmrgsolaris*) 33711477040fSmrg symcode='[[BDRT]]' 33721477040fSmrg ;; 33731477040fSmrgsco3.2v5*) 33741477040fSmrg symcode='[[DT]]' 33751477040fSmrg ;; 33761477040fSmrgsysv4.2uw2*) 33771477040fSmrg symcode='[[DT]]' 33781477040fSmrg ;; 33791477040fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 33801477040fSmrg symcode='[[ABDT]]' 33811477040fSmrg ;; 33821477040fSmrgsysv4) 33831477040fSmrg symcode='[[DFNSTU]]' 33842ae83157Smrg ;; 33852ae83157Smrgesac 33862ae83157Smrg 33871477040fSmrg# If we're using GNU nm, then use its standard symbol codes. 33881477040fSmrgcase `$NM -V 2>&1` in 33891477040fSmrg*GNU* | *'with BFD'*) 33901477040fSmrg symcode='[[ABCDGIRSTW]]' ;; 33911477040fSmrgesac 33922ae83157Smrg 33931477040fSmrg# Transform an extracted symbol line into a proper C declaration. 33941477040fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 33951477040fSmrg# so use this general approach. 33961477040fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 33972ae83157Smrg 33981477040fSmrg# Transform an extracted symbol line into symbol name and symbol address 33991477040fSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 34001477040fSmrglt_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'" 34012ae83157Smrg 34021477040fSmrg# Handle CRLF in mingw tool chain 34031477040fSmrgopt_cr= 34041477040fSmrgcase $build_os in 34051477040fSmrgmingw*) 34061477040fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 34071477040fSmrg ;; 34081477040fSmrgesac 34092ae83157Smrg 34101477040fSmrg# Try without a prefix underscore, then with it. 34111477040fSmrgfor ac_symprfx in "" "_"; do 34122ae83157Smrg 34131477040fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 34141477040fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 34152ae83157Smrg 34161477040fSmrg # Write the raw and C identifiers. 34171477040fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 34181477040fSmrg # Fake it for dumpbin and say T for any non-static function 34191477040fSmrg # and D for any global variable. 34201477040fSmrg # Also find C++ and __fastcall symbols from MSVC++, 34211477040fSmrg # which start with @ or ?. 34221477040fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 34231477040fSmrg" {last_section=section; section=\$ 3};"\ 34241477040fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 34251477040fSmrg" \$ 0!~/External *\|/{next};"\ 34261477040fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 34271477040fSmrg" {if(hide[section]) next};"\ 34281477040fSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 34291477040fSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 34301477040fSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 34311477040fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 34321477040fSmrg" ' prfx=^$ac_symprfx]" 34331477040fSmrg else 34341477040fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 34351477040fSmrg fi 34362ae83157Smrg 34371477040fSmrg # Check to see that the pipe works correctly. 34381477040fSmrg pipe_works=no 34392ae83157Smrg 34401477040fSmrg rm -f conftest* 34411477040fSmrg cat > conftest.$ac_ext <<_LT_EOF 34421477040fSmrg#ifdef __cplusplus 34431477040fSmrgextern "C" { 34441477040fSmrg#endif 34451477040fSmrgchar nm_test_var; 34461477040fSmrgvoid nm_test_func(void); 34471477040fSmrgvoid nm_test_func(void){} 34481477040fSmrg#ifdef __cplusplus 34491477040fSmrg} 34501477040fSmrg#endif 34511477040fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 34521477040fSmrg_LT_EOF 34532ae83157Smrg 34541477040fSmrg if AC_TRY_EVAL(ac_compile); then 34551477040fSmrg # Now try to grab the symbols. 34561477040fSmrg nlist=conftest.nm 34571477040fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 34581477040fSmrg # Try sorting and uniquifying the output. 34591477040fSmrg if sort "$nlist" | uniq > "$nlist"T; then 34601477040fSmrg mv -f "$nlist"T "$nlist" 34611477040fSmrg else 34621477040fSmrg rm -f "$nlist"T 34631477040fSmrg fi 3464444c061aSmrg 34651477040fSmrg # Make sure that we snagged all the symbols we need. 34661477040fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 34671477040fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 34681477040fSmrg cat <<_LT_EOF > conftest.$ac_ext 34691477040fSmrg#ifdef __cplusplus 34701477040fSmrgextern "C" { 34711477040fSmrg#endif 3472444c061aSmrg 34731477040fSmrg_LT_EOF 34741477040fSmrg # Now generate the symbol file. 34751477040fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 34762ae83157Smrg 34771477040fSmrg cat <<_LT_EOF >> conftest.$ac_ext 34782ae83157Smrg 34791477040fSmrg/* The mapping between symbol names and symbols. */ 34801477040fSmrgconst struct { 34811477040fSmrg const char *name; 34821477040fSmrg void *address; 34831477040fSmrg} 34841477040fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 34851477040fSmrg{ 34861477040fSmrg { "@PROGRAM@", (void *) 0 }, 34871477040fSmrg_LT_EOF 34881477040fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 34891477040fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 34901477040fSmrg {0, (void *) 0} 34911477040fSmrg}; 3492444c061aSmrg 34931477040fSmrg/* This works around a problem in FreeBSD linker */ 34941477040fSmrg#ifdef FREEBSD_WORKAROUND 34951477040fSmrgstatic const void *lt_preloaded_setup() { 34961477040fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 34971477040fSmrg} 34981477040fSmrg#endif 3499444c061aSmrg 35001477040fSmrg#ifdef __cplusplus 35011477040fSmrg} 35021477040fSmrg#endif 35031477040fSmrg_LT_EOF 35041477040fSmrg # Now try linking the two files. 35051477040fSmrg mv conftest.$ac_objext conftstm.$ac_objext 35061477040fSmrg lt_save_LIBS="$LIBS" 35071477040fSmrg lt_save_CFLAGS="$CFLAGS" 35081477040fSmrg LIBS="conftstm.$ac_objext" 35091477040fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 35101477040fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 35111477040fSmrg pipe_works=yes 35121477040fSmrg fi 35131477040fSmrg LIBS="$lt_save_LIBS" 35141477040fSmrg CFLAGS="$lt_save_CFLAGS" 35151477040fSmrg else 35161477040fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 35172ae83157Smrg fi 35181477040fSmrg else 35191477040fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 35201477040fSmrg fi 35211477040fSmrg else 35221477040fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 35231477040fSmrg fi 35241477040fSmrg else 35251477040fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 35261477040fSmrg cat conftest.$ac_ext >&5 35271477040fSmrg fi 35281477040fSmrg rm -rf conftest* conftst* 3529444c061aSmrg 35301477040fSmrg # Do not use the global_symbol_pipe unless it works. 35311477040fSmrg if test "$pipe_works" = yes; then 35321477040fSmrg break 35331477040fSmrg else 35341477040fSmrg lt_cv_sys_global_symbol_pipe= 35351477040fSmrg fi 35361477040fSmrgdone 35371477040fSmrg]) 35381477040fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 35391477040fSmrg lt_cv_sys_global_symbol_to_cdecl= 35401477040fSmrgfi 35411477040fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 35421477040fSmrg AC_MSG_RESULT(failed) 35431477040fSmrgelse 35441477040fSmrg AC_MSG_RESULT(ok) 35451477040fSmrgfi 3546444c061aSmrg 35471477040fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 35481477040fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 35491477040fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 35501477040fSmrg [Transform the output of nm in a proper C declaration]) 35511477040fSmrg_LT_DECL([global_symbol_to_c_name_address], 35521477040fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 35531477040fSmrg [Transform the output of nm in a C name address pair]) 35541477040fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 35551477040fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 35561477040fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 35571477040fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3558444c061aSmrg 35592ae83157Smrg 35601477040fSmrg# _LT_COMPILER_PIC([TAGNAME]) 35612ae83157Smrg# --------------------------- 35621477040fSmrgm4_defun([_LT_COMPILER_PIC], 35631477040fSmrg[m4_require([_LT_TAG_COMPILER])dnl 35641477040fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 35651477040fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 35661477040fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 35672ae83157Smrg 35681477040fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 35691477040fSmrgm4_if([$1], [CXX], [ 35701477040fSmrg # C++ specific cases for pic, static, wl, etc. 35711477040fSmrg if test "$GXX" = yes; then 35721477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 35731477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3574444c061aSmrg 35751477040fSmrg case $host_os in 35761477040fSmrg aix*) 35771477040fSmrg # All AIX code is PIC. 35781477040fSmrg if test "$host_cpu" = ia64; then 35791477040fSmrg # AIX 5 now supports IA64 processor 35801477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 35811477040fSmrg fi 35822265a131Smrg ;; 3583444c061aSmrg 35841477040fSmrg amigaos*) 35851477040fSmrg case $host_cpu in 35861477040fSmrg powerpc) 35871477040fSmrg # see comment about AmigaOS4 .so support 35881477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 35891477040fSmrg ;; 35901477040fSmrg m68k) 35911477040fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 35921477040fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 35931477040fSmrg # like `-m68040'. 35941477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 35951477040fSmrg ;; 35961477040fSmrg esac 35971477040fSmrg ;; 3598444c061aSmrg 35991477040fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 36001477040fSmrg # PIC is the default for these OSes. 36011477040fSmrg ;; 36021477040fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 36031477040fSmrg # This hack is so that the source file can tell whether it is being 36041477040fSmrg # built for inclusion in a dll (and should export symbols for example). 36051477040fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 36061477040fSmrg # (--disable-auto-import) libraries 36071477040fSmrg m4_if([$1], [GCJ], [], 36081477040fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 36091477040fSmrg ;; 36101477040fSmrg darwin* | rhapsody*) 36111477040fSmrg # PIC is the default on this platform 36121477040fSmrg # Common symbols not allowed in MH_DYLIB files 36131477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 36141477040fSmrg ;; 36151477040fSmrg *djgpp*) 36161477040fSmrg # DJGPP does not support shared libraries at all 36171477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 36181477040fSmrg ;; 36191477040fSmrg interix[[3-9]]*) 36201477040fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 36211477040fSmrg # Instead, we relocate shared libraries at runtime. 36221477040fSmrg ;; 36231477040fSmrg sysv4*MP*) 36241477040fSmrg if test -d /usr/nec; then 36251477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 36262ae83157Smrg fi 36272ae83157Smrg ;; 36281477040fSmrg hpux*) 36291477040fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 36301477040fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 36311477040fSmrg # sets the default TLS model and affects inlining. 36321477040fSmrg case $host_cpu in 36331477040fSmrg hppa*64*) 36342ae83157Smrg ;; 36352ae83157Smrg *) 36361477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 36372ae83157Smrg ;; 36382ae83157Smrg esac 36391477040fSmrg ;; 36401477040fSmrg *qnx* | *nto*) 36411477040fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 36421477040fSmrg # it will coredump. 36431477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 36441477040fSmrg ;; 36451477040fSmrg *) 36461477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 36471477040fSmrg ;; 36481477040fSmrg esac 36491477040fSmrg else 36501477040fSmrg case $host_os in 36511477040fSmrg aix[[4-9]]*) 36521477040fSmrg # All AIX code is PIC. 36531477040fSmrg if test "$host_cpu" = ia64; then 36541477040fSmrg # AIX 5 now supports IA64 processor 36551477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 36561477040fSmrg else 36571477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 36581477040fSmrg fi 36591477040fSmrg ;; 36601477040fSmrg chorus*) 36611477040fSmrg case $cc_basename in 36621477040fSmrg cxch68*) 36631477040fSmrg # Green Hills C++ Compiler 36641477040fSmrg # _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" 36651477040fSmrg ;; 36661477040fSmrg esac 36671477040fSmrg ;; 36681477040fSmrg dgux*) 36691477040fSmrg case $cc_basename in 36701477040fSmrg ec++*) 36711477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 36721477040fSmrg ;; 36731477040fSmrg ghcx*) 36741477040fSmrg # Green Hills C++ Compiler 36751477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 36761477040fSmrg ;; 36771477040fSmrg *) 36781477040fSmrg ;; 36791477040fSmrg esac 36801477040fSmrg ;; 36811477040fSmrg freebsd* | dragonfly*) 36821477040fSmrg # FreeBSD uses GNU C++ 36831477040fSmrg ;; 36841477040fSmrg hpux9* | hpux10* | hpux11*) 36851477040fSmrg case $cc_basename in 36861477040fSmrg CC*) 36871477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36881477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36891477040fSmrg if test "$host_cpu" != ia64; then 36901477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36911477040fSmrg fi 36921477040fSmrg ;; 36931477040fSmrg aCC*) 36941477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36951477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36961477040fSmrg case $host_cpu in 36971477040fSmrg hppa*64*|ia64*) 36981477040fSmrg # +Z the default 36991477040fSmrg ;; 37001477040fSmrg *) 37011477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 37021477040fSmrg ;; 37031477040fSmrg esac 37041477040fSmrg ;; 37051477040fSmrg *) 37061477040fSmrg ;; 37071477040fSmrg esac 37081477040fSmrg ;; 37091477040fSmrg interix*) 37101477040fSmrg # This is c89, which is MS Visual C++ (no shared libs) 37111477040fSmrg # Anyone wants to do a port? 37121477040fSmrg ;; 37131477040fSmrg irix5* | irix6* | nonstopux*) 37141477040fSmrg case $cc_basename in 37151477040fSmrg CC*) 37161477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37171477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37181477040fSmrg # CC pic flag -KPIC is the default. 37191477040fSmrg ;; 37201477040fSmrg *) 37211477040fSmrg ;; 37221477040fSmrg esac 37231477040fSmrg ;; 37241477040fSmrg linux* | k*bsd*-gnu) 37251477040fSmrg case $cc_basename in 37261477040fSmrg KCC*) 37271477040fSmrg # KAI C++ Compiler 37281477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37291477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37301477040fSmrg ;; 37311477040fSmrg ecpc* ) 37321477040fSmrg # old Intel C++ for x86_64 which still supported -KPIC. 37331477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37341477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37351477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37361477040fSmrg ;; 37371477040fSmrg icpc* ) 37381477040fSmrg # Intel C++, used to be incompatible with GCC. 37391477040fSmrg # ICC 10 doesn't accept -KPIC any more. 37401477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37411477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37421477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37431477040fSmrg ;; 37441477040fSmrg pgCC* | pgcpp*) 37451477040fSmrg # Portland Group C++ compiler 37461477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37471477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 37481477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37491477040fSmrg ;; 37501477040fSmrg cxx*) 37511477040fSmrg # Compaq C++ 37521477040fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 37531477040fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 37541477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 37551477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37561477040fSmrg ;; 37571477040fSmrg xlc* | xlC*) 37581477040fSmrg # IBM XL 8.0 on PPC 37591477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37601477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 37611477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 37621477040fSmrg ;; 37631477040fSmrg *) 37641477040fSmrg case `$CC -V 2>&1 | sed 5q` in 37651477040fSmrg *Sun\ C*) 37661477040fSmrg # Sun C++ 5.9 37671477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37681477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37691477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 37701477040fSmrg ;; 37711477040fSmrg esac 37721477040fSmrg ;; 37731477040fSmrg esac 37741477040fSmrg ;; 37751477040fSmrg lynxos*) 37761477040fSmrg ;; 37771477040fSmrg m88k*) 37781477040fSmrg ;; 37791477040fSmrg mvs*) 37801477040fSmrg case $cc_basename in 37811477040fSmrg cxx*) 37821477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 37831477040fSmrg ;; 37841477040fSmrg *) 37851477040fSmrg ;; 37861477040fSmrg esac 37871477040fSmrg ;; 37881477040fSmrg netbsd*) 37891477040fSmrg ;; 37901477040fSmrg *qnx* | *nto*) 37911477040fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 37921477040fSmrg # it will coredump. 37931477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 37941477040fSmrg ;; 37951477040fSmrg osf3* | osf4* | osf5*) 37961477040fSmrg case $cc_basename in 37971477040fSmrg KCC*) 37981477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37991477040fSmrg ;; 38001477040fSmrg RCC*) 38011477040fSmrg # Rational C++ 2.4.1 38021477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38031477040fSmrg ;; 38041477040fSmrg cxx*) 38051477040fSmrg # Digital/Compaq C++ 38061477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38071477040fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 38081477040fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 38091477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 38101477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 38111477040fSmrg ;; 38121477040fSmrg *) 38131477040fSmrg ;; 38141477040fSmrg esac 38151477040fSmrg ;; 38161477040fSmrg psos*) 38171477040fSmrg ;; 38181477040fSmrg solaris*) 38191477040fSmrg case $cc_basename in 38201477040fSmrg CC*) 38211477040fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 38221477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38231477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38241477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 38251477040fSmrg ;; 38261477040fSmrg gcx*) 38271477040fSmrg # Green Hills C++ Compiler 38281477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 38291477040fSmrg ;; 38301477040fSmrg *) 38311477040fSmrg ;; 38321477040fSmrg esac 38331477040fSmrg ;; 38341477040fSmrg sunos4*) 38351477040fSmrg case $cc_basename in 38361477040fSmrg CC*) 38371477040fSmrg # Sun C++ 4.x 38381477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38391477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38401477040fSmrg ;; 38411477040fSmrg lcc*) 38421477040fSmrg # Lucid 38431477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38441477040fSmrg ;; 38451477040fSmrg *) 38461477040fSmrg ;; 38471477040fSmrg esac 38481477040fSmrg ;; 38491477040fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 38501477040fSmrg case $cc_basename in 38511477040fSmrg CC*) 38521477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38531477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38541477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38551477040fSmrg ;; 38561477040fSmrg esac 38571477040fSmrg ;; 38581477040fSmrg tandem*) 38591477040fSmrg case $cc_basename in 38601477040fSmrg NCC*) 38611477040fSmrg # NonStop-UX NCC 3.20 38621477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38631477040fSmrg ;; 38641477040fSmrg *) 38651477040fSmrg ;; 38661477040fSmrg esac 38671477040fSmrg ;; 38681477040fSmrg vxworks*) 38691477040fSmrg ;; 38701477040fSmrg *) 38711477040fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 38721477040fSmrg ;; 38731477040fSmrg esac 38741477040fSmrg fi 38751477040fSmrg], 38761477040fSmrg[ 38771477040fSmrg if test "$GCC" = yes; then 38781477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38791477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3880444c061aSmrg 38811477040fSmrg case $host_os in 38821477040fSmrg aix*) 38831477040fSmrg # All AIX code is PIC. 38841477040fSmrg if test "$host_cpu" = ia64; then 38851477040fSmrg # AIX 5 now supports IA64 processor 38861477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38871477040fSmrg fi 38881477040fSmrg ;; 3889444c061aSmrg 38901477040fSmrg amigaos*) 38911477040fSmrg case $host_cpu in 38921477040fSmrg powerpc) 38931477040fSmrg # see comment about AmigaOS4 .so support 38941477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 38951477040fSmrg ;; 38961477040fSmrg m68k) 38971477040fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 38981477040fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 38991477040fSmrg # like `-m68040'. 39001477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39011477040fSmrg ;; 39021477040fSmrg esac 39031477040fSmrg ;; 39042ae83157Smrg 39051477040fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39061477040fSmrg # PIC is the default for these OSes. 39071477040fSmrg ;; 39082ae83157Smrg 39091477040fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39101477040fSmrg # This hack is so that the source file can tell whether it is being 39111477040fSmrg # built for inclusion in a dll (and should export symbols for example). 39121477040fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39131477040fSmrg # (--disable-auto-import) libraries 39141477040fSmrg m4_if([$1], [GCJ], [], 39151477040fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39161477040fSmrg ;; 3917444c061aSmrg 39181477040fSmrg darwin* | rhapsody*) 39191477040fSmrg # PIC is the default on this platform 39201477040fSmrg # Common symbols not allowed in MH_DYLIB files 39211477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39221477040fSmrg ;; 3923444c061aSmrg 39241477040fSmrg hpux*) 39251477040fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39261477040fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39271477040fSmrg # sets the default TLS model and affects inlining. 39281477040fSmrg case $host_cpu in 39291477040fSmrg hppa*64*) 39301477040fSmrg # +Z the default 39311477040fSmrg ;; 39321477040fSmrg *) 39331477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39341477040fSmrg ;; 39351477040fSmrg esac 39361477040fSmrg ;; 3937444c061aSmrg 39381477040fSmrg interix[[3-9]]*) 39391477040fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39401477040fSmrg # Instead, we relocate shared libraries at runtime. 39411477040fSmrg ;; 3942444c061aSmrg 39431477040fSmrg msdosdjgpp*) 39441477040fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 39451477040fSmrg # on systems that don't support them. 39461477040fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 39471477040fSmrg enable_shared=no 39481477040fSmrg ;; 39492265a131Smrg 39501477040fSmrg *nto* | *qnx*) 39511477040fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39521477040fSmrg # it will coredump. 39531477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39541477040fSmrg ;; 3955444c061aSmrg 39561477040fSmrg sysv4*MP*) 39571477040fSmrg if test -d /usr/nec; then 39581477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39591477040fSmrg fi 39601477040fSmrg ;; 39612265a131Smrg 39621477040fSmrg *) 39631477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39641477040fSmrg ;; 39651477040fSmrg esac 39662ae83157Smrg else 39671477040fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 39681477040fSmrg case $host_os in 39691477040fSmrg aix*) 39701477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39711477040fSmrg if test "$host_cpu" = ia64; then 39721477040fSmrg # AIX 5 now supports IA64 processor 39731477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39741477040fSmrg else 39751477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39761477040fSmrg fi 39771477040fSmrg ;; 39782265a131Smrg 39791477040fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39801477040fSmrg # This hack is so that the source file can tell whether it is being 39811477040fSmrg # built for inclusion in a dll (and should export symbols for example). 39821477040fSmrg m4_if([$1], [GCJ], [], 39831477040fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39841477040fSmrg ;; 3985444c061aSmrg 39861477040fSmrg hpux9* | hpux10* | hpux11*) 39871477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39881477040fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 39891477040fSmrg # not for PA HP-UX. 39901477040fSmrg case $host_cpu in 39911477040fSmrg hppa*64*|ia64*) 39921477040fSmrg # +Z the default 39931477040fSmrg ;; 39941477040fSmrg *) 39951477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 39961477040fSmrg ;; 39971477040fSmrg esac 39981477040fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 39991477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40002265a131Smrg ;; 40012265a131Smrg 40021477040fSmrg irix5* | irix6* | nonstopux*) 40031477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40041477040fSmrg # PIC (with -KPIC) is the default. 40051477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40061477040fSmrg ;; 40072265a131Smrg 40081477040fSmrg linux* | k*bsd*-gnu) 40091477040fSmrg case $cc_basename in 40101477040fSmrg # old Intel for x86_64 which still supported -KPIC. 40111477040fSmrg ecc*) 40121477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40131477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40141477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40151477040fSmrg ;; 40161477040fSmrg # icc used to be incompatible with GCC. 40171477040fSmrg # ICC 10 doesn't accept -KPIC any more. 40181477040fSmrg icc* | ifort*) 40191477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40201477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40211477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40221477040fSmrg ;; 40231477040fSmrg # Lahey Fortran 8.1. 40241477040fSmrg lf95*) 40251477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40261477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 40271477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 40281477040fSmrg ;; 40291477040fSmrg pgcc* | pgf77* | pgf90* | pgf95*) 40301477040fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 40311477040fSmrg # which looks to be a dead project) 40321477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40331477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40341477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40351477040fSmrg ;; 40361477040fSmrg ccc*) 40371477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40381477040fSmrg # All Alpha code is PIC. 40391477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40401477040fSmrg ;; 40411477040fSmrg xl*) 40421477040fSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 40431477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40441477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40451477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40461477040fSmrg ;; 40471477040fSmrg *) 40481477040fSmrg case `$CC -V 2>&1 | sed 5q` in 40491477040fSmrg *Sun\ C*) 40501477040fSmrg # Sun C 5.9 40511477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40521477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40531477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40541477040fSmrg ;; 40551477040fSmrg *Sun\ F*) 40561477040fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 40571477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40581477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40591477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 40601477040fSmrg ;; 40611477040fSmrg esac 40621477040fSmrg ;; 40631477040fSmrg esac 40641477040fSmrg ;; 40652265a131Smrg 40661477040fSmrg newsos6) 40671477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40681477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40691477040fSmrg ;; 40702265a131Smrg 40711477040fSmrg *nto* | *qnx*) 40721477040fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 40731477040fSmrg # it will coredump. 40741477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 40751477040fSmrg ;; 40762265a131Smrg 40771477040fSmrg osf3* | osf4* | osf5*) 40781477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40791477040fSmrg # All OSF/1 code is PIC. 40801477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40811477040fSmrg ;; 40822265a131Smrg 40831477040fSmrg rdos*) 40841477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40851477040fSmrg ;; 40862265a131Smrg 40871477040fSmrg solaris*) 40881477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40891477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40901477040fSmrg case $cc_basename in 40911477040fSmrg f77* | f90* | f95*) 40921477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 40931477040fSmrg *) 40941477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 40951477040fSmrg esac 40961477040fSmrg ;; 40972265a131Smrg 40981477040fSmrg sunos4*) 40991477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41001477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41011477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41021477040fSmrg ;; 4103444c061aSmrg 41041477040fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 41051477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41061477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41071477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41081477040fSmrg ;; 4109444c061aSmrg 41101477040fSmrg sysv4*MP*) 41111477040fSmrg if test -d /usr/nec ;then 41121477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 41131477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41141477040fSmrg fi 41151477040fSmrg ;; 41162265a131Smrg 41171477040fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41181477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41191477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41201477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41211477040fSmrg ;; 4122444c061aSmrg 41231477040fSmrg unicos*) 41241477040fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41251477040fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41261477040fSmrg ;; 4127444c061aSmrg 41281477040fSmrg uts4*) 41291477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41301477040fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41311477040fSmrg ;; 41321477040fSmrg 41331477040fSmrg *) 41341477040fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41351477040fSmrg ;; 41361477040fSmrg esac 41371477040fSmrg fi 41381477040fSmrg]) 41391477040fSmrgcase $host_os in 41401477040fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 41411477040fSmrg *djgpp*) 41421477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41432ae83157Smrg ;; 41441477040fSmrg *) 41451477040fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 41462ae83157Smrg ;; 41472ae83157Smrgesac 41481477040fSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 41491477040fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 41501477040fSmrg [How to pass a linker flag through the compiler]) 4151444c061aSmrg 41521477040fSmrg# 41531477040fSmrg# Check to make sure the PIC flag actually works. 41541477040fSmrg# 41551477040fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 41561477040fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 41571477040fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 41581477040fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 41591477040fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 41601477040fSmrg "" | " "*) ;; 41611477040fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 41621477040fSmrg esac], 41631477040fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 41641477040fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 41651477040fSmrgfi 41661477040fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 41671477040fSmrg [Additional compiler flags for building library objects]) 41682ae83157Smrg 41691477040fSmrg# 41701477040fSmrg# Check to make sure the static flag actually works. 41711477040fSmrg# 41721477040fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 41731477040fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 41741477040fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 41751477040fSmrg $lt_tmp_static_flag, 41761477040fSmrg [], 41771477040fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 41781477040fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 41791477040fSmrg [Compiler flag to prevent dynamic linking]) 41801477040fSmrg])# _LT_COMPILER_PIC 4181444c061aSmrg 4182444c061aSmrg 41831477040fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 41841477040fSmrg# ---------------------------- 41851477040fSmrg# See if the linker supports building shared libraries. 41861477040fSmrgm4_defun([_LT_LINKER_SHLIBS], 41871477040fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 41881477040fSmrgAC_REQUIRE([LT_PATH_NM])dnl 41891477040fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 41901477040fSmrgm4_require([_LT_DECL_EGREP])dnl 41911477040fSmrgm4_require([_LT_DECL_SED])dnl 41921477040fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 41931477040fSmrgm4_require([_LT_TAG_COMPILER])dnl 41941477040fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 41951477040fSmrgm4_if([$1], [CXX], [ 41961477040fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 41971477040fSmrg case $host_os in 41981477040fSmrg aix[[4-9]]*) 41991477040fSmrg # If we're using GNU nm, then we don't want the "-C" option. 42001477040fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 42011477040fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 42021477040fSmrg _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' 42031477040fSmrg else 42041477040fSmrg _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' 42051477040fSmrg fi 42061477040fSmrg ;; 42071477040fSmrg pw32*) 42081477040fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 42092ae83157Smrg ;; 42101477040fSmrg cygwin* | mingw* | cegcc*) 42111477040fSmrg _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' 42122ae83157Smrg ;; 42131477040fSmrg *) 42141477040fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42152ae83157Smrg ;; 42162ae83157Smrg esac 42171477040fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42181477040fSmrg], [ 42191477040fSmrg runpath_var= 42201477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 42211477040fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 42221477040fSmrg _LT_TAGVAR(archive_cmds, $1)= 42231477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 42241477040fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 42251477040fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 42261477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 42271477040fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42281477040fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 42291477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 42301477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 42311477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 42321477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 42331477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 42341477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 42351477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 42361477040fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 42371477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 42381477040fSmrg _LT_TAGVAR(module_cmds, $1)= 42391477040fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 42401477040fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 42411477040fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 42421477040fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 42431477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42441477040fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 42451477040fSmrg # included in the symbol list 42461477040fSmrg _LT_TAGVAR(include_expsyms, $1)= 42471477040fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 42481477040fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 42491477040fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 42501477040fSmrg # as well as any symbol that contains `d'. 42511477040fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42521477040fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 42531477040fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 42541477040fSmrg # the symbol is explicitly referenced. Since portable code cannot 42551477040fSmrg # rely on this symbol name, it's probably fine to never include it in 42561477040fSmrg # preloaded symbol tables. 42571477040fSmrg # Exclude shared library initialization/finalization symbols. 42581477040fSmrgdnl Note also adjust exclude_expsyms for C++ above. 42591477040fSmrg extract_expsyms_cmds= 4260444c061aSmrg 42611477040fSmrg case $host_os in 42621477040fSmrg cygwin* | mingw* | pw32* | cegcc*) 42631477040fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 42641477040fSmrg # When not using gcc, we currently assume that we are using 42651477040fSmrg # Microsoft Visual C++. 42661477040fSmrg if test "$GCC" != yes; then 42671477040fSmrg with_gnu_ld=no 42681477040fSmrg fi 42691477040fSmrg ;; 42701477040fSmrg interix*) 42711477040fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 42721477040fSmrg with_gnu_ld=yes 42731477040fSmrg ;; 42741477040fSmrg openbsd*) 42751477040fSmrg with_gnu_ld=no 42761477040fSmrg ;; 42771477040fSmrg esac 4278444c061aSmrg 42791477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 42801477040fSmrg if test "$with_gnu_ld" = yes; then 42811477040fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 42821477040fSmrg wlarc='${wl}' 4283444c061aSmrg 42841477040fSmrg # Set some defaults for GNU ld with shared library support. These 42851477040fSmrg # are reset later if shared libraries are not supported. Putting them 42861477040fSmrg # here allows them to be overridden if necessary. 42871477040fSmrg runpath_var=LD_RUN_PATH 42881477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 42891477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 42901477040fSmrg # ancient GNU ld didn't support --whole-archive et. al. 42911477040fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 42921477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 42931477040fSmrg else 42941477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42951477040fSmrg fi 42961477040fSmrg supports_anon_versioning=no 42971477040fSmrg case `$LD -v 2>&1` in 42981477040fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 42991477040fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 43001477040fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 43011477040fSmrg *\ 2.11.*) ;; # other 2.11 versions 43021477040fSmrg *) supports_anon_versioning=yes ;; 43031477040fSmrg esac 4304444c061aSmrg 43051477040fSmrg # See if GNU ld supports shared libraries. 43061477040fSmrg case $host_os in 43071477040fSmrg aix[[3-9]]*) 43081477040fSmrg # On AIX/PPC, the GNU linker is very broken 43091477040fSmrg if test "$host_cpu" != ia64; then 43101477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 43111477040fSmrg cat <<_LT_EOF 1>&2 4312444c061aSmrg 43131477040fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 43141477040fSmrg*** to be unable to reliably create shared libraries on AIX. 43151477040fSmrg*** Therefore, libtool is disabling shared libraries support. If you 43161477040fSmrg*** really care for shared libraries, you may want to modify your PATH 43171477040fSmrg*** so that a non-GNU linker is found, and then restart. 4318444c061aSmrg 43191477040fSmrg_LT_EOF 43201477040fSmrg fi 43211477040fSmrg ;; 4322444c061aSmrg 43231477040fSmrg amigaos*) 43241477040fSmrg case $host_cpu in 43251477040fSmrg powerpc) 43261477040fSmrg # see comment about AmigaOS4 .so support 43271477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43281477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 43291477040fSmrg ;; 43301477040fSmrg m68k) 43311477040fSmrg _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)' 43321477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43331477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 43341477040fSmrg ;; 43351477040fSmrg esac 43361477040fSmrg ;; 4337444c061aSmrg 43381477040fSmrg beos*) 43391477040fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 43401477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43411477040fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 43421477040fSmrg # support --undefined. This deserves some investigation. FIXME 43431477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43441477040fSmrg else 43451477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 43461477040fSmrg fi 43471477040fSmrg ;; 4348444c061aSmrg 43491477040fSmrg cygwin* | mingw* | pw32* | cegcc*) 43501477040fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 43511477040fSmrg # as there is no search path for DLLs. 43521477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43531477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43541477040fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 43551477040fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 43561477040fSmrg _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' 43571477040fSmrg 43581477040fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 43591477040fSmrg _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' 43601477040fSmrg # If the export-symbols file already is a .def file (1st line 43611477040fSmrg # is EXPORTS), use it as is; otherwise, prepend... 43621477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 43631477040fSmrg cp $export_symbols $output_objdir/$soname.def; 43641477040fSmrg else 43651477040fSmrg echo EXPORTS > $output_objdir/$soname.def; 43661477040fSmrg cat $export_symbols >> $output_objdir/$soname.def; 43671477040fSmrg fi~ 43681477040fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 43691477040fSmrg else 43701477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 43711477040fSmrg fi 43721477040fSmrg ;; 4373444c061aSmrg 43741477040fSmrg interix[[3-9]]*) 43751477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 43761477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 43771477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 43781477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 43791477040fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 43801477040fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 43811477040fSmrg # default) and relocated if they conflict, which is a slow very memory 43821477040fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 43831477040fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 43841477040fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 43851477040fSmrg _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' 43861477040fSmrg _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' 43871477040fSmrg ;; 4388444c061aSmrg 43891477040fSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 43901477040fSmrg tmp_diet=no 43911477040fSmrg if test "$host_os" = linux-dietlibc; then 43921477040fSmrg case $cc_basename in 43931477040fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 43941477040fSmrg esac 43951477040fSmrg fi 43961477040fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 43971477040fSmrg && test "$tmp_diet" = no 43981477040fSmrg then 43991477040fSmrg tmp_addflag= 44001477040fSmrg tmp_sharedflag='-shared' 44011477040fSmrg case $cc_basename,$host_cpu in 44021477040fSmrg pgcc*) # Portland Group C compiler 44031477040fSmrg _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' 44041477040fSmrg tmp_addflag=' $pic_flag' 44051477040fSmrg ;; 44061477040fSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 44071477040fSmrg _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' 44081477040fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 44091477040fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 44101477040fSmrg tmp_addflag=' -i_dynamic' ;; 44111477040fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 44121477040fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 44131477040fSmrg ifc* | ifort*) # Intel Fortran compiler 44141477040fSmrg tmp_addflag=' -nofor_main' ;; 44151477040fSmrg lf95*) # Lahey Fortran 8.1 44161477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 44171477040fSmrg tmp_sharedflag='--shared' ;; 44181477040fSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 44191477040fSmrg tmp_sharedflag='-qmkshrobj' 44201477040fSmrg tmp_addflag= ;; 44211477040fSmrg esac 44221477040fSmrg case `$CC -V 2>&1 | sed 5q` in 44231477040fSmrg *Sun\ C*) # Sun C 5.9 44241477040fSmrg _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' 44251477040fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 44261477040fSmrg tmp_sharedflag='-G' ;; 44271477040fSmrg *Sun\ F*) # Sun Fortran 8.3 44281477040fSmrg tmp_sharedflag='-G' ;; 44291477040fSmrg esac 44301477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4431444c061aSmrg 44321477040fSmrg if test "x$supports_anon_versioning" = xyes; then 44331477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44341477040fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44351477040fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44361477040fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 44371477040fSmrg fi 4438444c061aSmrg 44391477040fSmrg case $cc_basename in 44401477040fSmrg xlf*) 44411477040fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 44421477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 44431477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 44441477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 44451477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 44461477040fSmrg if test "x$supports_anon_versioning" = xyes; then 44471477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44481477040fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44491477040fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44501477040fSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 44511477040fSmrg fi 44521477040fSmrg ;; 44531477040fSmrg esac 44541477040fSmrg else 44551477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44561477040fSmrg fi 44571477040fSmrg ;; 4458444c061aSmrg 44591477040fSmrg netbsd*) 44601477040fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 44611477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 44621477040fSmrg wlarc= 44631477040fSmrg else 44641477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44651477040fSmrg _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' 44661477040fSmrg fi 44671477040fSmrg ;; 4468444c061aSmrg 44691477040fSmrg solaris*) 44701477040fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 44711477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44721477040fSmrg cat <<_LT_EOF 1>&2 4473444c061aSmrg 44741477040fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 44751477040fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 44761477040fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 44771477040fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 44781477040fSmrg*** your PATH or compiler configuration so that the native linker is 44791477040fSmrg*** used, and then restart. 4480444c061aSmrg 44811477040fSmrg_LT_EOF 44821477040fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 44831477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44841477040fSmrg _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' 44851477040fSmrg else 44861477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44871477040fSmrg fi 44881477040fSmrg ;; 4489444c061aSmrg 44901477040fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 44911477040fSmrg case `$LD -v 2>&1` in 44921477040fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 44931477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44941477040fSmrg cat <<_LT_EOF 1>&2 4495444c061aSmrg 44961477040fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 44971477040fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 44981477040fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 44991477040fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 45001477040fSmrg*** your PATH or compiler configuration so that the native linker is 45011477040fSmrg*** used, and then restart. 4502444c061aSmrg 45031477040fSmrg_LT_EOF 45041477040fSmrg ;; 45051477040fSmrg *) 45061477040fSmrg # For security reasons, it is highly recommended that you always 45071477040fSmrg # use absolute paths for naming shared libraries, and exclude the 45081477040fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 45091477040fSmrg # requires that you compile everything twice, which is a pain. 45101477040fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45111477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 45121477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45131477040fSmrg _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' 45141477040fSmrg else 45151477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45161477040fSmrg fi 45171477040fSmrg ;; 45181477040fSmrg esac 45191477040fSmrg ;; 4520444c061aSmrg 45211477040fSmrg sunos4*) 45221477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 45231477040fSmrg wlarc= 45241477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 45251477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 45261477040fSmrg ;; 45272265a131Smrg 45281477040fSmrg *) 45291477040fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45301477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45311477040fSmrg _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' 45321477040fSmrg else 45331477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45341477040fSmrg fi 45351477040fSmrg ;; 45361477040fSmrg esac 4537444c061aSmrg 45381477040fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 45391477040fSmrg runpath_var= 45401477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 45411477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 45421477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 45432265a131Smrg fi 45442ae83157Smrg else 45451477040fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 45461477040fSmrg case $host_os in 45471477040fSmrg aix3*) 45481477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 45491477040fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 45501477040fSmrg _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' 45511477040fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 45521477040fSmrg # are no directories specified by -L. 45531477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 45541477040fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 45551477040fSmrg # Neither direct hardcoding nor static linking is supported with a 45561477040fSmrg # broken collect2. 45571477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 45581477040fSmrg fi 45591477040fSmrg ;; 45602ae83157Smrg 45611477040fSmrg aix[[4-9]]*) 45621477040fSmrg if test "$host_cpu" = ia64; then 45631477040fSmrg # On IA64, the linker does run time linking by default, so we don't 45641477040fSmrg # have to do anything special. 45651477040fSmrg aix_use_runtimelinking=no 45661477040fSmrg exp_sym_flag='-Bexport' 45671477040fSmrg no_entry_flag="" 45681477040fSmrg else 45691477040fSmrg # If we're using GNU nm, then we don't want the "-C" option. 45701477040fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45711477040fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45721477040fSmrg _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' 45731477040fSmrg else 45741477040fSmrg _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' 45751477040fSmrg fi 45761477040fSmrg aix_use_runtimelinking=no 4577444c061aSmrg 45781477040fSmrg # Test if we are trying to use run time linking or normal 45791477040fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 45801477040fSmrg # need to do runtime linking. 45811477040fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 45821477040fSmrg for ld_flag in $LDFLAGS; do 45831477040fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 45842ae83157Smrg aix_use_runtimelinking=yes 45852ae83157Smrg break 45861477040fSmrg fi 45871477040fSmrg done 45881477040fSmrg ;; 45891477040fSmrg esac 4590444c061aSmrg 45911477040fSmrg exp_sym_flag='-bexport' 45921477040fSmrg no_entry_flag='-bnoentry' 45931477040fSmrg fi 4594444c061aSmrg 45951477040fSmrg # When large executables or shared objects are built, AIX ld can 45961477040fSmrg # have problems creating the table of contents. If linking a library 45971477040fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 45981477040fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 45991477040fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4600444c061aSmrg 46011477040fSmrg _LT_TAGVAR(archive_cmds, $1)='' 46021477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 46031477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 46041477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 46051477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 46061477040fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4607444c061aSmrg 46081477040fSmrg if test "$GCC" = yes; then 46091477040fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 46101477040fSmrg # We only want to do this on AIX 4.2 and lower, the check 46111477040fSmrg # below for broken collect2 doesn't work under 4.3+ 46121477040fSmrg collect2name=`${CC} -print-prog-name=collect2` 46131477040fSmrg if test -f "$collect2name" && 46141477040fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 46151477040fSmrg then 46162ae83157Smrg # We have reworked collect2 46172ae83157Smrg : 46181477040fSmrg else 46192ae83157Smrg # We have old collect2 46201477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 46212ae83157Smrg # It fails to find uninstalled libraries when the uninstalled 46222ae83157Smrg # path is not listed in the libpath. Setting hardcode_minus_L 46232ae83157Smrg # to unsupported forces relinking 46241477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46251477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46261477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46271477040fSmrg fi 46281477040fSmrg ;; 46291477040fSmrg esac 46301477040fSmrg shared_flag='-shared' 46311477040fSmrg if test "$aix_use_runtimelinking" = yes; then 46321477040fSmrg shared_flag="$shared_flag "'${wl}-G' 46332ae83157Smrg fi 46341477040fSmrg else 46351477040fSmrg # not using gcc 46361477040fSmrg if test "$host_cpu" = ia64; then 46372ae83157Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 46382ae83157Smrg # chokes on -Wl,-G. The following line is correct: 46391477040fSmrg shared_flag='-G' 46402ae83157Smrg else 46411477040fSmrg if test "$aix_use_runtimelinking" = yes; then 46421477040fSmrg shared_flag='${wl}-G' 46431477040fSmrg else 46441477040fSmrg shared_flag='${wl}-bM:SRE' 46451477040fSmrg fi 46462ae83157Smrg fi 46472265a131Smrg fi 4648444c061aSmrg 46491477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 46501477040fSmrg # It seems that -bexpall does not export symbols beginning with 46511477040fSmrg # underscore (_), so it is better to generate a list of symbols to export. 46521477040fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 46531477040fSmrg if test "$aix_use_runtimelinking" = yes; then 46541477040fSmrg # Warning - without using the other runtime loading flags (-brtl), 46552ae83157Smrg # -berok will link without error, but may produce a broken library. 46561477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 46571477040fSmrg # Determine the default libpath from the value encoded in an 46581477040fSmrg # empty executable. 46591477040fSmrg _LT_SYS_MODULE_PATH_AIX 46601477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46611477040fSmrg _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" 46622ae83157Smrg else 46631477040fSmrg if test "$host_cpu" = ia64; then 46641477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 46651477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 46661477040fSmrg _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" 46671477040fSmrg else 46681477040fSmrg # Determine the default libpath from the value encoded in an 46691477040fSmrg # empty executable. 46701477040fSmrg _LT_SYS_MODULE_PATH_AIX 46711477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46721477040fSmrg # Warning - without using the other run time loading flags, 46731477040fSmrg # -berok will link without error, but may produce a broken library. 46741477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 46751477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 46761477040fSmrg # Exported symbols can be pulled into shared objects from archives 46771477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 46781477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 46791477040fSmrg # This is similar to how AIX traditionally builds its shared libraries. 46801477040fSmrg _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' 46811477040fSmrg fi 46822ae83157Smrg fi 46831477040fSmrg ;; 46841477040fSmrg 46851477040fSmrg amigaos*) 46861477040fSmrg case $host_cpu in 46871477040fSmrg powerpc) 46881477040fSmrg # see comment about AmigaOS4 .so support 46891477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 46901477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 46912ae83157Smrg ;; 46921477040fSmrg m68k) 46931477040fSmrg _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)' 46941477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46951477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46961477040fSmrg ;; 46971477040fSmrg esac 46981477040fSmrg ;; 4699444c061aSmrg 47001477040fSmrg bsdi[[45]]*) 47011477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 47022ae83157Smrg ;; 47031477040fSmrg 47041477040fSmrg cygwin* | mingw* | pw32* | cegcc*) 47051477040fSmrg # When not using gcc, we currently assume that we are using 47061477040fSmrg # Microsoft Visual C++. 47071477040fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 47081477040fSmrg # no search path for DLLs. 47091477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 47101477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47111477040fSmrg # Tell ltmain to make .lib files, not .a files. 47121477040fSmrg libext=lib 47131477040fSmrg # Tell ltmain to make .dll files, not .so files. 47141477040fSmrg shrext_cmds=".dll" 47151477040fSmrg # FIXME: Setting linknames here is a bad hack. 47161477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 47171477040fSmrg # The linker will automatically build a .lib file if we build a DLL. 47181477040fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 47191477040fSmrg # FIXME: Should let the user specify the lib program. 47201477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 47211477040fSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 47221477040fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47232ae83157Smrg ;; 47241477040fSmrg 47251477040fSmrg darwin* | rhapsody*) 47261477040fSmrg _LT_DARWIN_LINKER_FEATURES($1) 47271477040fSmrg ;; 47281477040fSmrg 47291477040fSmrg dgux*) 47301477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 47311477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47321477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47331477040fSmrg ;; 47341477040fSmrg 47351477040fSmrg freebsd1*) 47361477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47371477040fSmrg ;; 47381477040fSmrg 47391477040fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 47401477040fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 47411477040fSmrg # does not break anything, and helps significantly (at the cost of a little 47421477040fSmrg # extra space). 47431477040fSmrg freebsd2.2*) 47441477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 47451477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47461477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47471477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47481477040fSmrg ;; 47491477040fSmrg 47501477040fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 47511477040fSmrg freebsd2*) 47521477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 47531477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47541477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47551477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47561477040fSmrg ;; 47571477040fSmrg 47581477040fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 47591477040fSmrg freebsd* | dragonfly*) 47601477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 47611477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47621477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47631477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47641477040fSmrg ;; 47651477040fSmrg 47661477040fSmrg hpux9*) 47671477040fSmrg if test "$GCC" = yes; then 47681477040fSmrg _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' 47692ae83157Smrg else 47701477040fSmrg _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' 47712ae83157Smrg fi 47721477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47731477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47741477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4775444c061aSmrg 47761477040fSmrg # hardcode_minus_L: Not really in the search PATH, 47771477040fSmrg # but as the default location of the library. 47781477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47791477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47802ae83157Smrg ;; 47811477040fSmrg 47821477040fSmrg hpux10*) 47831477040fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47841477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 47851477040fSmrg else 47861477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 47871477040fSmrg fi 47881477040fSmrg if test "$with_gnu_ld" = no; then 47891477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47901477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 47911477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47921477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47931477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 47941477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47951477040fSmrg # hardcode_minus_L: Not really in the search PATH, 47961477040fSmrg # but as the default location of the library. 47971477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47981477040fSmrg fi 47992ae83157Smrg ;; 4800444c061aSmrg 48011477040fSmrg hpux11*) 48021477040fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 48032ae83157Smrg case $host_cpu in 48042ae83157Smrg hppa*64*) 48051477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 48062ae83157Smrg ;; 48072ae83157Smrg ia64*) 48081477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 48092ae83157Smrg ;; 48102ae83157Smrg *) 48111477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48122ae83157Smrg ;; 48132ae83157Smrg esac 48141477040fSmrg else 48151477040fSmrg case $host_cpu in 48161477040fSmrg hppa*64*) 48171477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 48182ae83157Smrg ;; 48191477040fSmrg ia64*) 48201477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 48212265a131Smrg ;; 48221477040fSmrg *) 48231477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48242ae83157Smrg ;; 48252ae83157Smrg esac 48262ae83157Smrg fi 48271477040fSmrg if test "$with_gnu_ld" = no; then 48281477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 48291477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4830444c061aSmrg 48311477040fSmrg case $host_cpu in 48321477040fSmrg hppa*64*|ia64*) 48331477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 48341477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48351477040fSmrg ;; 48361477040fSmrg *) 48371477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48381477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48391477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4840444c061aSmrg 48411477040fSmrg # hardcode_minus_L: Not really in the search PATH, 48421477040fSmrg # but as the default location of the library. 48431477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 48441477040fSmrg ;; 48451477040fSmrg esac 48461477040fSmrg fi 48471477040fSmrg ;; 4848444c061aSmrg 48491477040fSmrg irix5* | irix6* | nonstopux*) 48501477040fSmrg if test "$GCC" = yes; then 48511477040fSmrg _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' 48521477040fSmrg # Try to use the -exported_symbol ld option, if it does not 48531477040fSmrg # work, assume that -exports_file does not work either and 48541477040fSmrg # implicitly export all symbols. 48551477040fSmrg save_LDFLAGS="$LDFLAGS" 48561477040fSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 48571477040fSmrg AC_LINK_IFELSE(int foo(void) {}, 48581477040fSmrg _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' 48591477040fSmrg ) 48601477040fSmrg LDFLAGS="$save_LDFLAGS" 48611477040fSmrg else 48621477040fSmrg _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' 48631477040fSmrg _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' 48641477040fSmrg fi 48651477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 48661477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48671477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48681477040fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 48691477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 48701477040fSmrg ;; 4871444c061aSmrg 48721477040fSmrg netbsd*) 48731477040fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48741477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 48751477040fSmrg else 48761477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 48771477040fSmrg fi 48781477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48791477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48801477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48811477040fSmrg ;; 4882444c061aSmrg 48831477040fSmrg newsos6) 48841477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 48851477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48861477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48871477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48881477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48891477040fSmrg ;; 4890444c061aSmrg 48911477040fSmrg *nto* | *qnx*) 48921477040fSmrg ;; 4893444c061aSmrg 48941477040fSmrg openbsd*) 48951477040fSmrg if test -f /usr/libexec/ld.so; then 48961477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48971477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48981477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48991477040fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 49001477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 49011477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 49021477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 49031477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 49042ae83157Smrg else 49051477040fSmrg case $host_os in 49061477040fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 49071477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49081477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 49091477040fSmrg ;; 49101477040fSmrg *) 49111477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 49121477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 49131477040fSmrg ;; 49141477040fSmrg esac 49152ae83157Smrg fi 49161477040fSmrg else 49171477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49181477040fSmrg fi 49191477040fSmrg ;; 49201477040fSmrg 49211477040fSmrg os2*) 49221477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 49231477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49241477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49251477040fSmrg _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' 49261477040fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 49271477040fSmrg ;; 49281477040fSmrg 49291477040fSmrg osf3*) 49301477040fSmrg if test "$GCC" = yes; then 49311477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49321477040fSmrg _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' 49331477040fSmrg else 49341477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49351477040fSmrg _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' 49361477040fSmrg fi 49371477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49381477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49391477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49401477040fSmrg ;; 4941444c061aSmrg 49421477040fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 49431477040fSmrg if test "$GCC" = yes; then 49441477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49451477040fSmrg _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' 49461477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49471477040fSmrg else 49481477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49491477040fSmrg _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' 49501477040fSmrg _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~ 49511477040fSmrg $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' 4952444c061aSmrg 49531477040fSmrg # Both c and cxx compiler support -rpath directly 49541477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 49551477040fSmrg fi 49561477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49571477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49581477040fSmrg ;; 4959444c061aSmrg 49601477040fSmrg solaris*) 49611477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 49621477040fSmrg if test "$GCC" = yes; then 49631477040fSmrg wlarc='${wl}' 49641477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 49651477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49661477040fSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49671477040fSmrg else 49681477040fSmrg case `$CC -V 2>&1` in 49691477040fSmrg *"Compilers 5.0"*) 49701477040fSmrg wlarc='' 49711477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 49721477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49731477040fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 49741477040fSmrg ;; 49751477040fSmrg *) 49761477040fSmrg wlarc='${wl}' 49771477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 49781477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49791477040fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49801477040fSmrg ;; 49811477040fSmrg esac 49821477040fSmrg fi 49831477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 49841477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49851477040fSmrg case $host_os in 49861477040fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 49871477040fSmrg *) 49881477040fSmrg # The compiler driver will combine and reorder linker options, 49891477040fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 49901477040fSmrg # but is careful enough not to reorder. 49911477040fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 49921477040fSmrg if test "$GCC" = yes; then 49931477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 49942ae83157Smrg else 49951477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 49962ae83157Smrg fi 49972265a131Smrg ;; 49981477040fSmrg esac 49991477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50001477040fSmrg ;; 5001444c061aSmrg 50021477040fSmrg sunos4*) 50031477040fSmrg if test "x$host_vendor" = xsequent; then 50041477040fSmrg # Use $CC to link under sequent, because it throws in some extra .o 50051477040fSmrg # files that make .init and .fini sections work. 50061477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 50071477040fSmrg else 50081477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 50091477040fSmrg fi 50101477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50111477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 50121477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50131477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50141477040fSmrg ;; 5015444c061aSmrg 50161477040fSmrg sysv4) 50171477040fSmrg case $host_vendor in 50181477040fSmrg sni) 50191477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50201477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 50212265a131Smrg ;; 50221477040fSmrg siemens) 50231477040fSmrg ## LD is ld it makes a PLAMLIB 50241477040fSmrg ## CC just makes a GrossModule. 50251477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 50261477040fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 50271477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 50281477040fSmrg ;; 50291477040fSmrg motorola) 50301477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50311477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 50322265a131Smrg ;; 50331477040fSmrg esac 50341477040fSmrg runpath_var='LD_RUN_PATH' 50351477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50361477040fSmrg ;; 5037444c061aSmrg 50381477040fSmrg sysv4.3*) 50391477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50401477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50411477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 50421477040fSmrg ;; 5043444c061aSmrg 50441477040fSmrg sysv4*MP*) 50451477040fSmrg if test -d /usr/nec; then 50461477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50471477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50481477040fSmrg runpath_var=LD_RUN_PATH 50491477040fSmrg hardcode_runpath_var=yes 50501477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 50511477040fSmrg fi 50521477040fSmrg ;; 5053444c061aSmrg 50541477040fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 50551477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50561477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50571477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50581477040fSmrg runpath_var='LD_RUN_PATH' 5059444c061aSmrg 50601477040fSmrg if test "$GCC" = yes; then 50611477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50621477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50631477040fSmrg else 50641477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50651477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50661477040fSmrg fi 50671477040fSmrg ;; 5068444c061aSmrg 50691477040fSmrg sysv5* | sco3.2v5* | sco5v6*) 50701477040fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 50711477040fSmrg # link with -lc, and that would cause any symbols used from libc to 50721477040fSmrg # always be unresolved, which means just about no library would 50731477040fSmrg # ever link correctly. If we're not using GNU ld we use -z text 50741477040fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 50751477040fSmrg # as -z defs. 50761477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50771477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 50781477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50791477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50801477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 50811477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50821477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50831477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 50841477040fSmrg runpath_var='LD_RUN_PATH' 5085444c061aSmrg 50861477040fSmrg if test "$GCC" = yes; then 50871477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50881477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50891477040fSmrg else 50901477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50911477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50921477040fSmrg fi 50931477040fSmrg ;; 5094444c061aSmrg 50951477040fSmrg uts4*) 50961477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50971477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50981477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50991477040fSmrg ;; 5100444c061aSmrg 51011477040fSmrg *) 51021477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51031477040fSmrg ;; 51042265a131Smrg esac 5105444c061aSmrg 51061477040fSmrg if test x$host_vendor = xsni; then 51071477040fSmrg case $host in 51081477040fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 51091477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 51101477040fSmrg ;; 51111477040fSmrg esac 51121477040fSmrg fi 51131477040fSmrg fi 51141477040fSmrg]) 51151477040fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 51161477040fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5117444c061aSmrg 51181477040fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 51192ae83157Smrg 51201477040fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 51211477040fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 51221477040fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 51231477040fSmrg [The commands to extract the exported symbol list from a shared archive]) 5124444c061aSmrg 51251477040fSmrg# 51261477040fSmrg# Do we need to explicitly link libc? 51271477040fSmrg# 51281477040fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 51291477040fSmrgx|xyes) 51301477040fSmrg # Assume -lc should be added 51311477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5132444c061aSmrg 51331477040fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 51341477040fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 51351477040fSmrg *'~'*) 51361477040fSmrg # FIXME: we may have to deal with multi-command sequences. 51372265a131Smrg ;; 51381477040fSmrg '$CC '*) 51391477040fSmrg # Test whether the compiler implicitly links with -lc since on some 51401477040fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 51411477040fSmrg # to ld, don't add -lc before -lgcc. 51421477040fSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 51431477040fSmrg $RM conftest* 51441477040fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5145444c061aSmrg 51461477040fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 51471477040fSmrg soname=conftest 51481477040fSmrg lib=conftest 51491477040fSmrg libobjs=conftest.$ac_objext 51501477040fSmrg deplibs= 51511477040fSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 51521477040fSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 51531477040fSmrg compiler_flags=-v 51541477040fSmrg linker_flags=-v 51551477040fSmrg verstring= 51561477040fSmrg output_objdir=. 51571477040fSmrg libname=conftest 51581477040fSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 51591477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 51601477040fSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 51611477040fSmrg then 51621477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 51631477040fSmrg else 51641477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51651477040fSmrg fi 51661477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 51671477040fSmrg else 51681477040fSmrg cat conftest.err 1>&5 51691477040fSmrg fi 51701477040fSmrg $RM conftest* 51711477040fSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 51722265a131Smrg ;; 51732265a131Smrg esac 51741477040fSmrg fi 51752265a131Smrg ;; 51762265a131Smrgesac 5177444c061aSmrg 51781477040fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 51791477040fSmrg [Whether or not to add -lc for building shared libraries]) 51801477040fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 51811477040fSmrg [enable_shared_with_static_runtimes], [0], 51821477040fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 51831477040fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 51841477040fSmrg [Compiler flag to allow reflexive dlopens]) 51851477040fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 51861477040fSmrg [Compiler flag to generate shared objects directly from archives]) 51871477040fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 51881477040fSmrg [Whether the compiler copes with passing no objects directly]) 51891477040fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 51901477040fSmrg [Create an old-style archive from a shared archive]) 51911477040fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 51921477040fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 51931477040fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 51941477040fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 51951477040fSmrg_LT_TAGDECL([], [module_cmds], [2], 51961477040fSmrg [Commands used to build a loadable module if different from building 51971477040fSmrg a shared archive.]) 51981477040fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 51991477040fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 52001477040fSmrg [Whether we are building with GNU ld or not]) 52011477040fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 52021477040fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 52031477040fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 52041477040fSmrg [Flag that enforces no undefined symbols]) 52051477040fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 52061477040fSmrg [Flag to hardcode $libdir into a binary during linking. 52071477040fSmrg This must work even if $libdir does not exist]) 52081477040fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 52091477040fSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 52101477040fSmrg during linking. This must work even if $libdir does not exist]]) 52111477040fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 52121477040fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 52131477040fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 52141477040fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52151477040fSmrg DIR into the resulting binary]) 52161477040fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 52171477040fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52181477040fSmrg DIR into the resulting binary and the resulting library dependency is 52191477040fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 52201477040fSmrg library is relocated]) 52211477040fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 52221477040fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 52231477040fSmrg into the resulting binary]) 52241477040fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 52251477040fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 52261477040fSmrg into the resulting binary]) 52271477040fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 52281477040fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 52291477040fSmrg into the library and all subsequent libraries and executables linked 52301477040fSmrg against it]) 52311477040fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 52321477040fSmrg [Set to yes if linker adds runtime paths of dependent libraries 52331477040fSmrg to runtime path list]) 52341477040fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 52351477040fSmrg [Whether libtool must link a program against all its dependency libraries]) 52361477040fSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 52371477040fSmrg [Fix the shell variable $srcfile for the compiler]) 52381477040fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 52391477040fSmrg [Set to "yes" if exported symbols are required]) 52401477040fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 52411477040fSmrg [The commands to list exported symbols]) 52421477040fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 52431477040fSmrg [Symbols that should not be listed in the preloaded symbols]) 52441477040fSmrg_LT_TAGDECL([], [include_expsyms], [1], 52451477040fSmrg [Symbols that must always be exported]) 52461477040fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 52471477040fSmrg [Commands necessary for linking programs (against libraries) with templates]) 52481477040fSmrg_LT_TAGDECL([], [file_list_spec], [1], 52491477040fSmrg [Specify filename containing input files]) 52501477040fSmrgdnl FIXME: Not yet implemented 52511477040fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 52521477040fSmrgdnl [Compiler flag to generate thread safe objects]) 52531477040fSmrg])# _LT_LINKER_SHLIBS 52541477040fSmrg 52551477040fSmrg 52561477040fSmrg# _LT_LANG_C_CONFIG([TAG]) 52571477040fSmrg# ------------------------ 52581477040fSmrg# Ensure that the configuration variables for a C compiler are suitably 52591477040fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 52601477040fSmrg# the compiler configuration to `libtool'. 52611477040fSmrgm4_defun([_LT_LANG_C_CONFIG], 52621477040fSmrg[m4_require([_LT_DECL_EGREP])dnl 52631477040fSmrglt_save_CC="$CC" 52641477040fSmrgAC_LANG_PUSH(C) 5265444c061aSmrg 52661477040fSmrg# Source file extension for C test sources. 52671477040fSmrgac_ext=c 5268444c061aSmrg 52691477040fSmrg# Object file extension for compiled C test sources. 52702265a131Smrgobjext=o 52711477040fSmrg_LT_TAGVAR(objext, $1)=$objext 52722ae83157Smrg 52732ae83157Smrg# Code to be used in simple compile tests 52741477040fSmrglt_simple_compile_test_code="int some_variable = 0;" 5275444c061aSmrg 52762ae83157Smrg# Code to be used in simple link tests 52771477040fSmrglt_simple_link_test_code='int main(){return(0);}' 5278444c061aSmrg 52791477040fSmrg_LT_TAG_COMPILER 52801477040fSmrg# Save the default compiler, since it gets overwritten when the other 52811477040fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 52821477040fSmrgcompiler_DEFAULT=$CC 5283444c061aSmrg 52842ae83157Smrg# save warnings/boilerplate of simple test code 52852ae83157Smrg_LT_COMPILER_BOILERPLATE 52862ae83157Smrg_LT_LINKER_BOILERPLATE 5287444c061aSmrg 52881477040fSmrgif test -n "$compiler"; then 52891477040fSmrg _LT_COMPILER_NO_RTTI($1) 52901477040fSmrg _LT_COMPILER_PIC($1) 52911477040fSmrg _LT_COMPILER_C_O($1) 52921477040fSmrg _LT_COMPILER_FILE_LOCKS($1) 52931477040fSmrg _LT_LINKER_SHLIBS($1) 52941477040fSmrg _LT_SYS_DYNAMIC_LINKER($1) 52951477040fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 52961477040fSmrg LT_SYS_DLOPEN_SELF 52971477040fSmrg _LT_CMD_STRIPLIB 52981477040fSmrg 52991477040fSmrg # Report which library types will actually be built 53001477040fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 53011477040fSmrg AC_MSG_RESULT([$can_build_shared]) 53021477040fSmrg 53031477040fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 53041477040fSmrg test "$can_build_shared" = "no" && enable_shared=no 53051477040fSmrg 53061477040fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 53071477040fSmrg # are all built from PIC. 53081477040fSmrg case $host_os in 53091477040fSmrg aix3*) 53102ae83157Smrg test "$enable_shared" = yes && enable_static=no 53111477040fSmrg if test -n "$RANLIB"; then 53121477040fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 53131477040fSmrg postinstall_cmds='$RANLIB $lib' 53141477040fSmrg fi 53151477040fSmrg ;; 5316444c061aSmrg 53171477040fSmrg aix[[4-9]]*) 53181477040fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 53191477040fSmrg test "$enable_shared" = yes && enable_static=no 53201477040fSmrg fi 53211477040fSmrg ;; 53221477040fSmrg esac 53231477040fSmrg AC_MSG_RESULT([$enable_shared]) 5324444c061aSmrg 53251477040fSmrg AC_MSG_CHECKING([whether to build static libraries]) 53261477040fSmrg # Make sure either enable_shared or enable_static is yes. 53271477040fSmrg test "$enable_shared" = yes || enable_static=yes 53281477040fSmrg AC_MSG_RESULT([$enable_static]) 5329444c061aSmrg 53301477040fSmrg _LT_CONFIG($1) 53311477040fSmrgfi 53322265a131SmrgAC_LANG_POP 53332ae83157SmrgCC="$lt_save_CC" 53341477040fSmrg])# _LT_LANG_C_CONFIG 5335444c061aSmrg 5336444c061aSmrg 53371477040fSmrg# _LT_PROG_CXX 53381477040fSmrg# ------------ 53391477040fSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 53401477040fSmrg# compiler, we have our own version here. 53411477040fSmrgm4_defun([_LT_PROG_CXX], 53421477040fSmrg[ 53431477040fSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 53441477040fSmrgAC_PROG_CXX 53451477040fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 53461477040fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 53471477040fSmrg (test "X$CXX" != "Xg++"))) ; then 53481477040fSmrg AC_PROG_CXXCPP 53491477040fSmrgelse 53501477040fSmrg _lt_caught_CXX_error=yes 53511477040fSmrgfi 53521477040fSmrgpopdef([AC_MSG_ERROR]) 53531477040fSmrg])# _LT_PROG_CXX 5354444c061aSmrg 53551477040fSmrgdnl aclocal-1.4 backwards compatibility: 53561477040fSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 5357444c061aSmrg 5358444c061aSmrg 53591477040fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 53601477040fSmrg# -------------------------- 53611477040fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 53621477040fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 53631477040fSmrg# the compiler configuration to `libtool'. 53641477040fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 53651477040fSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 53661477040fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 53671477040fSmrgm4_require([_LT_DECL_EGREP])dnl 53681477040fSmrg 53691477040fSmrgAC_LANG_PUSH(C++) 53701477040fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 53711477040fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 53721477040fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 53731477040fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 53741477040fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 53751477040fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 53761477040fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 53771477040fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 53781477040fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53791477040fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 53801477040fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 53811477040fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 53821477040fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 53831477040fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 53841477040fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 53851477040fSmrg_LT_TAGVAR(module_cmds, $1)= 53861477040fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 53871477040fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 53881477040fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 53891477040fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 53901477040fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 53911477040fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5392444c061aSmrg 53931477040fSmrg# Source file extension for C++ test sources. 53941477040fSmrgac_ext=cpp 5395444c061aSmrg 53961477040fSmrg# Object file extension for compiled C++ test sources. 53971477040fSmrgobjext=o 53981477040fSmrg_LT_TAGVAR(objext, $1)=$objext 53991477040fSmrg 54001477040fSmrg# No sense in running all these tests if we already determined that 54011477040fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 54021477040fSmrg# are currently assumed to apply to all compilers on this platform, 54031477040fSmrg# and will be corrupted by setting them based on a non-working compiler. 54041477040fSmrgif test "$_lt_caught_CXX_error" != yes; then 54051477040fSmrg # Code to be used in simple compile tests 54061477040fSmrg lt_simple_compile_test_code="int some_variable = 0;" 54071477040fSmrg 54081477040fSmrg # Code to be used in simple link tests 54091477040fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 54101477040fSmrg 54111477040fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 54121477040fSmrg _LT_TAG_COMPILER 54131477040fSmrg 54141477040fSmrg # save warnings/boilerplate of simple test code 54151477040fSmrg _LT_COMPILER_BOILERPLATE 54161477040fSmrg _LT_LINKER_BOILERPLATE 54171477040fSmrg 54181477040fSmrg # Allow CC to be a program name with arguments. 54191477040fSmrg lt_save_CC=$CC 54201477040fSmrg lt_save_LD=$LD 54211477040fSmrg lt_save_GCC=$GCC 54221477040fSmrg GCC=$GXX 54231477040fSmrg lt_save_with_gnu_ld=$with_gnu_ld 54241477040fSmrg lt_save_path_LD=$lt_cv_path_LD 54251477040fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 54261477040fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 54271477040fSmrg else 54281477040fSmrg $as_unset lt_cv_prog_gnu_ld 54291477040fSmrg fi 54301477040fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 54311477040fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 54321477040fSmrg else 54331477040fSmrg $as_unset lt_cv_path_LD 54341477040fSmrg fi 54351477040fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 54361477040fSmrg CC=${CXX-"c++"} 54371477040fSmrg compiler=$CC 54381477040fSmrg _LT_TAGVAR(compiler, $1)=$CC 54391477040fSmrg _LT_CC_BASENAME([$compiler]) 5440444c061aSmrg 54411477040fSmrg if test -n "$compiler"; then 54421477040fSmrg # We don't want -fno-exception when compiling C++ code, so set the 54431477040fSmrg # no_builtin_flag separately 54441477040fSmrg if test "$GXX" = yes; then 54451477040fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 54461477040fSmrg else 54471477040fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 54481477040fSmrg fi 5449444c061aSmrg 54501477040fSmrg if test "$GXX" = yes; then 54511477040fSmrg # Set up default GNU C++ configuration 5452444c061aSmrg 54531477040fSmrg LT_PATH_LD 5454444c061aSmrg 54551477040fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 54561477040fSmrg # archiving commands below assume that GNU ld is being used. 54571477040fSmrg if test "$with_gnu_ld" = yes; then 54581477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 54591477040fSmrg _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' 5460444c061aSmrg 54611477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54621477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5463444c061aSmrg 54641477040fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 54651477040fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 54661477040fSmrg # investigate it a little bit more. (MM) 54671477040fSmrg wlarc='${wl}' 5468444c061aSmrg 54691477040fSmrg # ancient GNU ld didn't support --whole-archive et. al. 54701477040fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 54711477040fSmrg $GREP 'no-whole-archive' > /dev/null; then 54721477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 54731477040fSmrg else 54741477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 54751477040fSmrg fi 54761477040fSmrg else 54771477040fSmrg with_gnu_ld=no 54781477040fSmrg wlarc= 54791477040fSmrg 54801477040fSmrg # A generic and very simple default shared library creation 54811477040fSmrg # command for GNU C++ for the case where it uses the native 54821477040fSmrg # linker, instead of GNU ld. If possible, this setting should 54831477040fSmrg # overridden to take advantage of the native linker features on 54841477040fSmrg # the platform it is being used on. 54851477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 54861477040fSmrg fi 5487444c061aSmrg 54881477040fSmrg # Commands to make compiler produce verbose output that lists 54891477040fSmrg # what "hidden" libraries, object files and flags are used when 54901477040fSmrg # linking a shared library. 54911477040fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5492444c061aSmrg 54931477040fSmrg else 54941477040fSmrg GXX=no 54951477040fSmrg with_gnu_ld=no 54961477040fSmrg wlarc= 54971477040fSmrg fi 5498444c061aSmrg 54991477040fSmrg # PORTME: fill in a description of your system's C++ link characteristics 55001477040fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55011477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 55021477040fSmrg case $host_os in 55031477040fSmrg aix3*) 55041477040fSmrg # FIXME: insert proper C++ library support 55051477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 55061477040fSmrg ;; 55071477040fSmrg aix[[4-9]]*) 55081477040fSmrg if test "$host_cpu" = ia64; then 55091477040fSmrg # On IA64, the linker does run time linking by default, so we don't 55101477040fSmrg # have to do anything special. 55111477040fSmrg aix_use_runtimelinking=no 55121477040fSmrg exp_sym_flag='-Bexport' 55131477040fSmrg no_entry_flag="" 55141477040fSmrg else 55151477040fSmrg aix_use_runtimelinking=no 55161477040fSmrg 55171477040fSmrg # Test if we are trying to use run time linking or normal 55181477040fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 55191477040fSmrg # need to do runtime linking. 55201477040fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 55211477040fSmrg for ld_flag in $LDFLAGS; do 55221477040fSmrg case $ld_flag in 55231477040fSmrg *-brtl*) 55241477040fSmrg aix_use_runtimelinking=yes 55251477040fSmrg break 55261477040fSmrg ;; 55271477040fSmrg esac 55281477040fSmrg done 55291477040fSmrg ;; 55301477040fSmrg esac 5531444c061aSmrg 55321477040fSmrg exp_sym_flag='-bexport' 55331477040fSmrg no_entry_flag='-bnoentry' 55341477040fSmrg fi 5535444c061aSmrg 55361477040fSmrg # When large executables or shared objects are built, AIX ld can 55371477040fSmrg # have problems creating the table of contents. If linking a library 55381477040fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 55391477040fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 55401477040fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 55411477040fSmrg 55421477040fSmrg _LT_TAGVAR(archive_cmds, $1)='' 55431477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 55441477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 55451477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55461477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55471477040fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 55481477040fSmrg 55491477040fSmrg if test "$GXX" = yes; then 55501477040fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 55511477040fSmrg # We only want to do this on AIX 4.2 and lower, the check 55521477040fSmrg # below for broken collect2 doesn't work under 4.3+ 55531477040fSmrg collect2name=`${CC} -print-prog-name=collect2` 55541477040fSmrg if test -f "$collect2name" && 55551477040fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 55561477040fSmrg then 55571477040fSmrg # We have reworked collect2 55581477040fSmrg : 55591477040fSmrg else 55601477040fSmrg # We have old collect2 55611477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55621477040fSmrg # It fails to find uninstalled libraries when the uninstalled 55631477040fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 55641477040fSmrg # to unsupported forces relinking 55651477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55661477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55671477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55681477040fSmrg fi 55691477040fSmrg esac 55701477040fSmrg shared_flag='-shared' 55711477040fSmrg if test "$aix_use_runtimelinking" = yes; then 55721477040fSmrg shared_flag="$shared_flag "'${wl}-G' 55731477040fSmrg fi 55741477040fSmrg else 55751477040fSmrg # not using gcc 55761477040fSmrg if test "$host_cpu" = ia64; then 55771477040fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55781477040fSmrg # chokes on -Wl,-G. The following line is correct: 55791477040fSmrg shared_flag='-G' 55801477040fSmrg else 55811477040fSmrg if test "$aix_use_runtimelinking" = yes; then 55821477040fSmrg shared_flag='${wl}-G' 55831477040fSmrg else 55841477040fSmrg shared_flag='${wl}-bM:SRE' 55851477040fSmrg fi 55861477040fSmrg fi 55871477040fSmrg fi 5588444c061aSmrg 55891477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 55901477040fSmrg # It seems that -bexpall does not export symbols beginning with 55911477040fSmrg # underscore (_), so it is better to generate a list of symbols to 55921477040fSmrg # export. 55931477040fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 55941477040fSmrg if test "$aix_use_runtimelinking" = yes; then 55951477040fSmrg # Warning - without using the other runtime loading flags (-brtl), 55961477040fSmrg # -berok will link without error, but may produce a broken library. 55971477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55981477040fSmrg # Determine the default libpath from the value encoded in an empty 55991477040fSmrg # executable. 56001477040fSmrg _LT_SYS_MODULE_PATH_AIX 56011477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 56021477040fSmrg 56031477040fSmrg _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" 56041477040fSmrg else 56051477040fSmrg if test "$host_cpu" = ia64; then 56061477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 56071477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 56081477040fSmrg _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" 56091477040fSmrg else 56101477040fSmrg # Determine the default libpath from the value encoded in an 56111477040fSmrg # empty executable. 56121477040fSmrg _LT_SYS_MODULE_PATH_AIX 56131477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 56141477040fSmrg # Warning - without using the other run time loading flags, 56151477040fSmrg # -berok will link without error, but may produce a broken library. 56161477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 56171477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 56181477040fSmrg # Exported symbols can be pulled into shared objects from archives 56191477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 56201477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56211477040fSmrg # This is similar to how AIX traditionally builds its shared 56221477040fSmrg # libraries. 56231477040fSmrg _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' 56241477040fSmrg fi 56251477040fSmrg fi 56261477040fSmrg ;; 5627444c061aSmrg 56281477040fSmrg beos*) 56291477040fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 56301477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56311477040fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 56321477040fSmrg # support --undefined. This deserves some investigation. FIXME 56331477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 56341477040fSmrg else 56351477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56361477040fSmrg fi 56371477040fSmrg ;; 5638444c061aSmrg 56391477040fSmrg chorus*) 56401477040fSmrg case $cc_basename in 56411477040fSmrg *) 56421477040fSmrg # FIXME: insert proper C++ library support 56431477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56441477040fSmrg ;; 56451477040fSmrg esac 56461477040fSmrg ;; 5647444c061aSmrg 56481477040fSmrg cygwin* | mingw* | pw32* | cegcc*) 56491477040fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 56501477040fSmrg # as there is no search path for DLLs. 56511477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56521477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56531477040fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 56541477040fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56551477040fSmrg 56561477040fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 56571477040fSmrg _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' 56581477040fSmrg # If the export-symbols file already is a .def file (1st line 56591477040fSmrg # is EXPORTS), use it as is; otherwise, prepend... 56601477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 56611477040fSmrg cp $export_symbols $output_objdir/$soname.def; 56621477040fSmrg else 56631477040fSmrg echo EXPORTS > $output_objdir/$soname.def; 56641477040fSmrg cat $export_symbols >> $output_objdir/$soname.def; 56651477040fSmrg fi~ 56661477040fSmrg $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' 56671477040fSmrg else 56681477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56691477040fSmrg fi 56701477040fSmrg ;; 56711477040fSmrg darwin* | rhapsody*) 56721477040fSmrg _LT_DARWIN_LINKER_FEATURES($1) 56731477040fSmrg ;; 56742265a131Smrg 56751477040fSmrg dgux*) 56761477040fSmrg case $cc_basename in 56771477040fSmrg ec++*) 56781477040fSmrg # FIXME: insert proper C++ library support 56791477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56801477040fSmrg ;; 56811477040fSmrg ghcx*) 56821477040fSmrg # Green Hills C++ Compiler 56831477040fSmrg # FIXME: insert proper C++ library support 56841477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56851477040fSmrg ;; 56861477040fSmrg *) 56871477040fSmrg # FIXME: insert proper C++ library support 56881477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56891477040fSmrg ;; 56901477040fSmrg esac 56911477040fSmrg ;; 56922265a131Smrg 56931477040fSmrg freebsd[[12]]*) 56941477040fSmrg # C++ shared libraries reported to be fairly broken before 56951477040fSmrg # switch to ELF 56961477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56971477040fSmrg ;; 56982265a131Smrg 56991477040fSmrg freebsd-elf*) 57001477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 57011477040fSmrg ;; 57022265a131Smrg 57031477040fSmrg freebsd* | dragonfly*) 57041477040fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 57051477040fSmrg # conventions 57061477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 57071477040fSmrg ;; 57082265a131Smrg 57091477040fSmrg gnu*) 57101477040fSmrg ;; 57112265a131Smrg 57121477040fSmrg hpux9*) 57131477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57141477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57151477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57161477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57171477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57181477040fSmrg # but as the default 57191477040fSmrg # location of the library. 57201477040fSmrg 57211477040fSmrg case $cc_basename in 57221477040fSmrg CC*) 57231477040fSmrg # FIXME: insert proper C++ library support 57241477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57251477040fSmrg ;; 57261477040fSmrg aCC*) 57271477040fSmrg _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' 57281477040fSmrg # Commands to make compiler produce verbose output that lists 57291477040fSmrg # what "hidden" libraries, object files and flags are used when 57301477040fSmrg # linking a shared library. 57311477040fSmrg # 57321477040fSmrg # There doesn't appear to be a way to prevent this compiler from 57331477040fSmrg # explicitly linking system object files so we need to strip them 57341477040fSmrg # from the output so that they don't get included in the library 57351477040fSmrg # dependencies. 57361477040fSmrg 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' 57371477040fSmrg ;; 57381477040fSmrg *) 57391477040fSmrg if test "$GXX" = yes; then 57401477040fSmrg _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' 57411477040fSmrg else 57421477040fSmrg # FIXME: insert proper C++ library support 57431477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57441477040fSmrg fi 57451477040fSmrg ;; 57461477040fSmrg esac 57471477040fSmrg ;; 57482265a131Smrg 57491477040fSmrg hpux10*|hpux11*) 57501477040fSmrg if test $with_gnu_ld = no; then 57511477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57521477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57531477040fSmrg 57541477040fSmrg case $host_cpu in 57551477040fSmrg hppa*64*|ia64*) 57561477040fSmrg ;; 57571477040fSmrg *) 57581477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57591477040fSmrg ;; 57601477040fSmrg esac 57611477040fSmrg fi 57621477040fSmrg case $host_cpu in 57631477040fSmrg hppa*64*|ia64*) 57641477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57651477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57661477040fSmrg ;; 57671477040fSmrg *) 57681477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57691477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57701477040fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57711477040fSmrg # but as the default 57721477040fSmrg # location of the library. 57731477040fSmrg ;; 57741477040fSmrg esac 57751477040fSmrg 57761477040fSmrg case $cc_basename in 57771477040fSmrg CC*) 57781477040fSmrg # FIXME: insert proper C++ library support 57791477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57801477040fSmrg ;; 57811477040fSmrg aCC*) 57821477040fSmrg case $host_cpu in 57831477040fSmrg hppa*64*) 57841477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57851477040fSmrg ;; 57861477040fSmrg ia64*) 57871477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57881477040fSmrg ;; 57891477040fSmrg *) 57901477040fSmrg _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' 57911477040fSmrg ;; 57921477040fSmrg esac 57931477040fSmrg # Commands to make compiler produce verbose output that lists 57941477040fSmrg # what "hidden" libraries, object files and flags are used when 57951477040fSmrg # linking a shared library. 57961477040fSmrg # 57971477040fSmrg # There doesn't appear to be a way to prevent this compiler from 57981477040fSmrg # explicitly linking system object files so we need to strip them 57991477040fSmrg # from the output so that they don't get included in the library 58001477040fSmrg # dependencies. 58011477040fSmrg 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' 58021477040fSmrg ;; 58031477040fSmrg *) 58041477040fSmrg if test "$GXX" = yes; then 58051477040fSmrg if test $with_gnu_ld = no; then 58061477040fSmrg case $host_cpu in 58071477040fSmrg hppa*64*) 58081477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 58091477040fSmrg ;; 58101477040fSmrg ia64*) 58111477040fSmrg _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' 58121477040fSmrg ;; 58131477040fSmrg *) 58141477040fSmrg _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' 58151477040fSmrg ;; 58161477040fSmrg esac 58171477040fSmrg fi 58181477040fSmrg else 58191477040fSmrg # FIXME: insert proper C++ library support 58201477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58211477040fSmrg fi 58221477040fSmrg ;; 58231477040fSmrg esac 58241477040fSmrg ;; 58252265a131Smrg 58261477040fSmrg interix[[3-9]]*) 58271477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 58281477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58291477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58301477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58311477040fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58321477040fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58331477040fSmrg # default) and relocated if they conflict, which is a slow very memory 58341477040fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 58351477040fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58361477040fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58371477040fSmrg _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' 58381477040fSmrg _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' 58391477040fSmrg ;; 58401477040fSmrg irix5* | irix6*) 58411477040fSmrg case $cc_basename in 58421477040fSmrg CC*) 58431477040fSmrg # SGI C++ 58441477040fSmrg _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' 58451477040fSmrg 58461477040fSmrg # Archives containing C++ object files must be created using 58471477040fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 58481477040fSmrg # necessary to make sure instantiated templates are included 58491477040fSmrg # in the archive. 58501477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 58511477040fSmrg ;; 58521477040fSmrg *) 58531477040fSmrg if test "$GXX" = yes; then 58541477040fSmrg if test "$with_gnu_ld" = no; then 58551477040fSmrg _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' 58561477040fSmrg else 58571477040fSmrg _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' 58581477040fSmrg fi 58591477040fSmrg fi 58601477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58611477040fSmrg ;; 58621477040fSmrg esac 58631477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58641477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58651477040fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58661477040fSmrg ;; 58672265a131Smrg 58681477040fSmrg linux* | k*bsd*-gnu) 58691477040fSmrg case $cc_basename in 58701477040fSmrg KCC*) 58711477040fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 58721477040fSmrg 58731477040fSmrg # KCC will only create a shared library if the output file 58741477040fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 58751477040fSmrg # to its proper name (with version) after linking. 58761477040fSmrg _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' 58771477040fSmrg _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' 58781477040fSmrg # Commands to make compiler produce verbose output that lists 58791477040fSmrg # what "hidden" libraries, object files and flags are used when 58801477040fSmrg # linking a shared library. 58811477040fSmrg # 58821477040fSmrg # There doesn't appear to be a way to prevent this compiler from 58831477040fSmrg # explicitly linking system object files so we need to strip them 58841477040fSmrg # from the output so that they don't get included in the library 58851477040fSmrg # dependencies. 58861477040fSmrg 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' 58871477040fSmrg 58881477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58891477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58901477040fSmrg 58911477040fSmrg # Archives containing C++ object files must be created using 58921477040fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 58931477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 58941477040fSmrg ;; 58951477040fSmrg icpc* | ecpc* ) 58961477040fSmrg # Intel C++ 58971477040fSmrg with_gnu_ld=yes 58981477040fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 58991477040fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 59001477040fSmrg # earlier do not add the objects themselves. 59011477040fSmrg case `$CC -V 2>&1` in 59021477040fSmrg *"Version 7."*) 59031477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59041477040fSmrg _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' 59051477040fSmrg ;; 59061477040fSmrg *) # Version 8.0 or newer 59071477040fSmrg tmp_idyn= 59081477040fSmrg case $host_cpu in 59091477040fSmrg ia64*) tmp_idyn=' -i_dynamic';; 59101477040fSmrg esac 59111477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59121477040fSmrg _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' 59131477040fSmrg ;; 59141477040fSmrg esac 59151477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 59161477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59171477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59181477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 59191477040fSmrg ;; 59201477040fSmrg pgCC* | pgcpp*) 59211477040fSmrg # Portland Group C++ compiler 59221477040fSmrg case `$CC -V` in 59231477040fSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 59241477040fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 59251477040fSmrg rm -rf $tpldir~ 59261477040fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 59271477040fSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 59281477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 59291477040fSmrg rm -rf $tpldir~ 59301477040fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 59311477040fSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 59321477040fSmrg $RANLIB $oldlib' 59331477040fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 59341477040fSmrg rm -rf $tpldir~ 59351477040fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59361477040fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59371477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 59381477040fSmrg rm -rf $tpldir~ 59391477040fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59401477040fSmrg $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' 59411477040fSmrg ;; 59421477040fSmrg *) # Version 6 will use weak symbols 59431477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59441477040fSmrg _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' 59451477040fSmrg ;; 59461477040fSmrg esac 59472265a131Smrg 59481477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 59491477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59501477040fSmrg _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' 59511477040fSmrg ;; 59521477040fSmrg cxx*) 59531477040fSmrg # Compaq C++ 59541477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59551477040fSmrg _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' 59562265a131Smrg 59571477040fSmrg runpath_var=LD_RUN_PATH 59581477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59591477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59602265a131Smrg 59611477040fSmrg # Commands to make compiler produce verbose output that lists 59621477040fSmrg # what "hidden" libraries, object files and flags are used when 59631477040fSmrg # linking a shared library. 59641477040fSmrg # 59651477040fSmrg # There doesn't appear to be a way to prevent this compiler from 59661477040fSmrg # explicitly linking system object files so we need to strip them 59671477040fSmrg # from the output so that they don't get included in the library 59681477040fSmrg # dependencies. 59691477040fSmrg 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' 59701477040fSmrg ;; 59711477040fSmrg xl*) 59721477040fSmrg # IBM XL 8.0 on PPC, with GNU ld 59731477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59741477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59751477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59761477040fSmrg if test "x$supports_anon_versioning" = xyes; then 59771477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59781477040fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59791477040fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59801477040fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59811477040fSmrg fi 59821477040fSmrg ;; 59831477040fSmrg *) 59841477040fSmrg case `$CC -V 2>&1 | sed 5q` in 59851477040fSmrg *Sun\ C*) 59861477040fSmrg # Sun C++ 5.9 59871477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 59881477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 59891477040fSmrg _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' 59901477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59911477040fSmrg _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' 59921477040fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59931477040fSmrg 59941477040fSmrg # Not sure whether something based on 59951477040fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 59961477040fSmrg # would be better. 59971477040fSmrg output_verbose_link_cmd='echo' 59981477040fSmrg 59991477040fSmrg # Archives containing C++ object files must be created using 60001477040fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 60011477040fSmrg # necessary to make sure instantiated templates are included 60021477040fSmrg # in the archive. 60031477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 60041477040fSmrg ;; 60051477040fSmrg esac 60061477040fSmrg ;; 60071477040fSmrg esac 60081477040fSmrg ;; 60092265a131Smrg 60101477040fSmrg lynxos*) 60111477040fSmrg # FIXME: insert proper C++ library support 60121477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60131477040fSmrg ;; 6014444c061aSmrg 60151477040fSmrg m88k*) 60161477040fSmrg # FIXME: insert proper C++ library support 60171477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60181477040fSmrg ;; 6019444c061aSmrg 60201477040fSmrg mvs*) 60211477040fSmrg case $cc_basename in 60221477040fSmrg cxx*) 60231477040fSmrg # FIXME: insert proper C++ library support 60241477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60251477040fSmrg ;; 60261477040fSmrg *) 60271477040fSmrg # FIXME: insert proper C++ library support 60281477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60291477040fSmrg ;; 60301477040fSmrg esac 60311477040fSmrg ;; 60322265a131Smrg 60331477040fSmrg netbsd*) 60341477040fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60351477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 60361477040fSmrg wlarc= 60371477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 60381477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60391477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60401477040fSmrg fi 60411477040fSmrg # Workaround some broken pre-1.5 toolchains 60421477040fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 60431477040fSmrg ;; 60442265a131Smrg 60451477040fSmrg *nto* | *qnx*) 60461477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60471477040fSmrg ;; 60482265a131Smrg 60491477040fSmrg openbsd2*) 60501477040fSmrg # C++ shared libraries are fairly broken 60511477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60521477040fSmrg ;; 60532265a131Smrg 60541477040fSmrg openbsd*) 60551477040fSmrg if test -f /usr/libexec/ld.so; then 60561477040fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60571477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60581477040fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60591477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 60601477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60611477040fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 60621477040fSmrg _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' 60631477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 60641477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 60651477040fSmrg fi 60661477040fSmrg output_verbose_link_cmd=echo 60671477040fSmrg else 60681477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60691477040fSmrg fi 60701477040fSmrg ;; 60712265a131Smrg 60721477040fSmrg osf3* | osf4* | osf5*) 60731477040fSmrg case $cc_basename in 60741477040fSmrg KCC*) 60751477040fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 60761477040fSmrg 60771477040fSmrg # KCC will only create a shared library if the output file 60781477040fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 60791477040fSmrg # to its proper name (with version) after linking. 60801477040fSmrg _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' 60811477040fSmrg 60821477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60831477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 60841477040fSmrg 60851477040fSmrg # Archives containing C++ object files must be created using 60861477040fSmrg # the KAI C++ compiler. 60871477040fSmrg case $host in 60881477040fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 60891477040fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 60901477040fSmrg esac 60911477040fSmrg ;; 60921477040fSmrg RCC*) 60931477040fSmrg # Rational C++ 2.4.1 60941477040fSmrg # FIXME: insert proper C++ library support 60951477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60961477040fSmrg ;; 60971477040fSmrg cxx*) 60981477040fSmrg case $host in 60991477040fSmrg osf3*) 61001477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 61011477040fSmrg _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' 61021477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 61031477040fSmrg ;; 61041477040fSmrg *) 61051477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 61061477040fSmrg _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' 61071477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 61081477040fSmrg echo "-hidden">> $lib.exp~ 61091477040fSmrg $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~ 61101477040fSmrg $RM $lib.exp' 61111477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 61121477040fSmrg ;; 61131477040fSmrg esac 61142265a131Smrg 61151477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 61162265a131Smrg 61171477040fSmrg # Commands to make compiler produce verbose output that lists 61181477040fSmrg # what "hidden" libraries, object files and flags are used when 61191477040fSmrg # linking a shared library. 61201477040fSmrg # 61211477040fSmrg # There doesn't appear to be a way to prevent this compiler from 61221477040fSmrg # explicitly linking system object files so we need to strip them 61231477040fSmrg # from the output so that they don't get included in the library 61241477040fSmrg # dependencies. 61251477040fSmrg 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' 61261477040fSmrg ;; 61271477040fSmrg *) 61281477040fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 61291477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 61301477040fSmrg case $host in 61311477040fSmrg osf3*) 61321477040fSmrg _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' 61331477040fSmrg ;; 61341477040fSmrg *) 61351477040fSmrg _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' 61361477040fSmrg ;; 61371477040fSmrg esac 61381477040fSmrg 61391477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 61401477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 61411477040fSmrg 61421477040fSmrg # Commands to make compiler produce verbose output that lists 61431477040fSmrg # what "hidden" libraries, object files and flags are used when 61441477040fSmrg # linking a shared library. 61451477040fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 61461477040fSmrg 61471477040fSmrg else 61481477040fSmrg # FIXME: insert proper C++ library support 61491477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61501477040fSmrg fi 61511477040fSmrg ;; 61521477040fSmrg esac 61531477040fSmrg ;; 61542265a131Smrg 61551477040fSmrg psos*) 61561477040fSmrg # FIXME: insert proper C++ library support 61571477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61581477040fSmrg ;; 61592265a131Smrg 61601477040fSmrg sunos4*) 61611477040fSmrg case $cc_basename in 61621477040fSmrg CC*) 61631477040fSmrg # Sun C++ 4.x 61641477040fSmrg # FIXME: insert proper C++ library support 61651477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61661477040fSmrg ;; 61671477040fSmrg lcc*) 61681477040fSmrg # Lucid 61691477040fSmrg # FIXME: insert proper C++ library support 61701477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61711477040fSmrg ;; 61721477040fSmrg *) 61731477040fSmrg # FIXME: insert proper C++ library support 61741477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61751477040fSmrg ;; 61761477040fSmrg esac 61771477040fSmrg ;; 61782265a131Smrg 61791477040fSmrg solaris*) 61801477040fSmrg case $cc_basename in 61811477040fSmrg CC*) 61821477040fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 61831477040fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 61841477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 61851477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 61861477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 61871477040fSmrg $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' 61881477040fSmrg 61891477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61901477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61911477040fSmrg case $host_os in 61921477040fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 61931477040fSmrg *) 61941477040fSmrg # The compiler driver will combine and reorder linker options, 61951477040fSmrg # but understands `-z linker_flag'. 61961477040fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 61971477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 61981477040fSmrg ;; 61991477040fSmrg esac 62001477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62012265a131Smrg 62021477040fSmrg output_verbose_link_cmd='echo' 62032265a131Smrg 62041477040fSmrg # Archives containing C++ object files must be created using 62051477040fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 62061477040fSmrg # necessary to make sure instantiated templates are included 62071477040fSmrg # in the archive. 62081477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 62091477040fSmrg ;; 62101477040fSmrg gcx*) 62111477040fSmrg # Green Hills C++ Compiler 62121477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62132265a131Smrg 62141477040fSmrg # The C++ compiler must be used to create the archive. 62151477040fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 62161477040fSmrg ;; 62171477040fSmrg *) 62181477040fSmrg # GNU C++ compiler with Solaris linker 62191477040fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 62201477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 62211477040fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 62221477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62231477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62241477040fSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62251477040fSmrg 62261477040fSmrg # Commands to make compiler produce verbose output that lists 62271477040fSmrg # what "hidden" libraries, object files and flags are used when 62281477040fSmrg # linking a shared library. 62291477040fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62301477040fSmrg else 62311477040fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 62321477040fSmrg # platform. 62331477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62341477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62351477040fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62361477040fSmrg 62371477040fSmrg # Commands to make compiler produce verbose output that lists 62381477040fSmrg # what "hidden" libraries, object files and flags are used when 62391477040fSmrg # linking a shared library. 62401477040fSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62411477040fSmrg fi 62421477040fSmrg 62431477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 62441477040fSmrg case $host_os in 62451477040fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 62461477040fSmrg *) 62471477040fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 62481477040fSmrg ;; 62491477040fSmrg esac 62501477040fSmrg fi 62511477040fSmrg ;; 62521477040fSmrg esac 62531477040fSmrg ;; 62542265a131Smrg 62551477040fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 62561477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62571477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62581477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62591477040fSmrg runpath_var='LD_RUN_PATH' 62602265a131Smrg 62611477040fSmrg case $cc_basename in 62621477040fSmrg CC*) 62631477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62641477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62651477040fSmrg ;; 62661477040fSmrg *) 62671477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62681477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62691477040fSmrg ;; 62701477040fSmrg esac 62711477040fSmrg ;; 62722265a131Smrg 62731477040fSmrg sysv5* | sco3.2v5* | sco5v6*) 62741477040fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 62751477040fSmrg # link with -lc, and that would cause any symbols used from libc to 62761477040fSmrg # always be unresolved, which means just about no library would 62771477040fSmrg # ever link correctly. If we're not using GNU ld we use -z text 62781477040fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 62791477040fSmrg # as -z defs. 62801477040fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62811477040fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 62821477040fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62831477040fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62841477040fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 62851477040fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 62861477040fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62871477040fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 62881477040fSmrg runpath_var='LD_RUN_PATH' 62892265a131Smrg 62901477040fSmrg case $cc_basename in 62911477040fSmrg CC*) 62921477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62931477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62941477040fSmrg ;; 62951477040fSmrg *) 62961477040fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62971477040fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62981477040fSmrg ;; 62991477040fSmrg esac 63001477040fSmrg ;; 63012265a131Smrg 63021477040fSmrg tandem*) 63031477040fSmrg case $cc_basename in 63041477040fSmrg NCC*) 63051477040fSmrg # NonStop-UX NCC 3.20 63061477040fSmrg # FIXME: insert proper C++ library support 63071477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63081477040fSmrg ;; 63091477040fSmrg *) 63101477040fSmrg # FIXME: insert proper C++ library support 63111477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63121477040fSmrg ;; 63131477040fSmrg esac 63141477040fSmrg ;; 63152265a131Smrg 63161477040fSmrg vxworks*) 63171477040fSmrg # FIXME: insert proper C++ library support 63181477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63191477040fSmrg ;; 63202265a131Smrg 63211477040fSmrg *) 63221477040fSmrg # FIXME: insert proper C++ library support 63231477040fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63241477040fSmrg ;; 63251477040fSmrg esac 63262265a131Smrg 63271477040fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 63281477040fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 63291477040fSmrg 63301477040fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 63311477040fSmrg _LT_TAGVAR(LD, $1)="$LD" 63321477040fSmrg 63331477040fSmrg ## CAVEAT EMPTOR: 63341477040fSmrg ## There is no encapsulation within the following macros, do not change 63351477040fSmrg ## the running order or otherwise move them around unless you know exactly 63361477040fSmrg ## what you are doing... 63371477040fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 63381477040fSmrg _LT_COMPILER_PIC($1) 63391477040fSmrg _LT_COMPILER_C_O($1) 63401477040fSmrg _LT_COMPILER_FILE_LOCKS($1) 63411477040fSmrg _LT_LINKER_SHLIBS($1) 63421477040fSmrg _LT_SYS_DYNAMIC_LINKER($1) 63431477040fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 63441477040fSmrg 63451477040fSmrg _LT_CONFIG($1) 63461477040fSmrg fi # test -n "$compiler" 63471477040fSmrg 63481477040fSmrg CC=$lt_save_CC 63491477040fSmrg LDCXX=$LD 63501477040fSmrg LD=$lt_save_LD 63511477040fSmrg GCC=$lt_save_GCC 63521477040fSmrg with_gnu_ld=$lt_save_with_gnu_ld 63531477040fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 63541477040fSmrg lt_cv_path_LD=$lt_save_path_LD 63551477040fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 63561477040fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 63571477040fSmrgfi # test "$_lt_caught_CXX_error" != yes 63582265a131Smrg 63591477040fSmrgAC_LANG_POP 63601477040fSmrg])# _LT_LANG_CXX_CONFIG 63612265a131Smrg 63622265a131Smrg 63631477040fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 63641477040fSmrg# --------------------------------- 63651477040fSmrg# Figure out "hidden" library dependencies from verbose 63661477040fSmrg# compiler output when linking a shared library. 63671477040fSmrg# Parse the compiler output and extract the necessary 63681477040fSmrg# objects, libraries and library flags. 63691477040fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 63701477040fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63711477040fSmrg# Dependencies to place before and after the object being linked: 63721477040fSmrg_LT_TAGVAR(predep_objects, $1)= 63731477040fSmrg_LT_TAGVAR(postdep_objects, $1)= 63741477040fSmrg_LT_TAGVAR(predeps, $1)= 63751477040fSmrg_LT_TAGVAR(postdeps, $1)= 63761477040fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 63772265a131Smrg 63781477040fSmrgdnl we can't use the lt_simple_compile_test_code here, 63791477040fSmrgdnl because it contains code intended for an executable, 63801477040fSmrgdnl not a library. It's possible we should let each 63811477040fSmrgdnl tag define a new lt_????_link_test_code variable, 63821477040fSmrgdnl but it's only used here... 63831477040fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 63841477040fSmrgint a; 63851477040fSmrgvoid foo (void) { a = 0; } 63861477040fSmrg_LT_EOF 63871477040fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 63881477040fSmrgclass Foo 63891477040fSmrg{ 63901477040fSmrgpublic: 63911477040fSmrg Foo (void) { a = 0; } 63921477040fSmrgprivate: 63931477040fSmrg int a; 63941477040fSmrg}; 63951477040fSmrg_LT_EOF 63961477040fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 63971477040fSmrg subroutine foo 63981477040fSmrg implicit none 63991477040fSmrg integer*4 a 64001477040fSmrg a=0 64011477040fSmrg return 64021477040fSmrg end 64031477040fSmrg_LT_EOF 64041477040fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 64051477040fSmrg subroutine foo 64061477040fSmrg implicit none 64071477040fSmrg integer a 64081477040fSmrg a=0 64091477040fSmrg return 64101477040fSmrg end 64111477040fSmrg_LT_EOF 64121477040fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 64131477040fSmrgpublic class foo { 64141477040fSmrg private int a; 64151477040fSmrg public void bar (void) { 64161477040fSmrg a = 0; 64171477040fSmrg } 64181477040fSmrg}; 64191477040fSmrg_LT_EOF 64201477040fSmrg]) 64211477040fSmrgdnl Parse the compiler output and extract the necessary 64221477040fSmrgdnl objects, libraries and library flags. 64231477040fSmrgif AC_TRY_EVAL(ac_compile); then 64241477040fSmrg # Parse the compiler output and extract the necessary 64251477040fSmrg # objects, libraries and library flags. 64262265a131Smrg 64271477040fSmrg # Sentinel used to keep track of whether or not we are before 64281477040fSmrg # the conftest object file. 64291477040fSmrg pre_test_object_deps_done=no 64302265a131Smrg 64311477040fSmrg for p in `eval "$output_verbose_link_cmd"`; do 64321477040fSmrg case $p in 64332265a131Smrg 64341477040fSmrg -L* | -R* | -l*) 64351477040fSmrg # Some compilers place space between "-{L,R}" and the path. 64361477040fSmrg # Remove the space. 64371477040fSmrg if test $p = "-L" || 64381477040fSmrg test $p = "-R"; then 64391477040fSmrg prev=$p 64401477040fSmrg continue 64411477040fSmrg else 64421477040fSmrg prev= 64431477040fSmrg fi 64442265a131Smrg 64451477040fSmrg if test "$pre_test_object_deps_done" = no; then 64461477040fSmrg case $p in 64471477040fSmrg -L* | -R*) 64481477040fSmrg # Internal compiler library paths should come after those 64491477040fSmrg # provided the user. The postdeps already come after the 64501477040fSmrg # user supplied libs so there is no need to process them. 64511477040fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 64521477040fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 64531477040fSmrg else 64541477040fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 64551477040fSmrg fi 64561477040fSmrg ;; 64571477040fSmrg # The "-l" case would never come before the object being 64581477040fSmrg # linked, so don't bother handling this case. 64591477040fSmrg esac 64601477040fSmrg else 64611477040fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 64621477040fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 64631477040fSmrg else 64641477040fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 64651477040fSmrg fi 64661477040fSmrg fi 64671477040fSmrg ;; 64682265a131Smrg 64691477040fSmrg *.$objext) 64701477040fSmrg # This assumes that the test object file only shows up 64711477040fSmrg # once in the compiler output. 64721477040fSmrg if test "$p" = "conftest.$objext"; then 64731477040fSmrg pre_test_object_deps_done=yes 64741477040fSmrg continue 64751477040fSmrg fi 64762265a131Smrg 64771477040fSmrg if test "$pre_test_object_deps_done" = no; then 64781477040fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 64791477040fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 64801477040fSmrg else 64811477040fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 64821477040fSmrg fi 64831477040fSmrg else 64841477040fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 64851477040fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 64861477040fSmrg else 64871477040fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 64881477040fSmrg fi 64891477040fSmrg fi 64901477040fSmrg ;; 64912265a131Smrg 64921477040fSmrg *) ;; # Ignore the rest. 64932265a131Smrg 64941477040fSmrg esac 64951477040fSmrg done 64962265a131Smrg 64971477040fSmrg # Clean up. 64981477040fSmrg rm -f a.out a.exe 64991477040fSmrgelse 65001477040fSmrg echo "libtool.m4: error: problem compiling $1 test program" 65011477040fSmrgfi 65022265a131Smrg 65031477040fSmrg$RM -f confest.$objext 65042265a131Smrg 65051477040fSmrg# PORTME: override above test on systems where it is broken 65061477040fSmrgm4_if([$1], [CXX], 65071477040fSmrg[case $host_os in 65081477040fSmrginterix[[3-9]]*) 65091477040fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 65101477040fSmrg # hack all around it, let's just trust "g++" to DTRT. 65111477040fSmrg _LT_TAGVAR(predep_objects,$1)= 65121477040fSmrg _LT_TAGVAR(postdep_objects,$1)= 65131477040fSmrg _LT_TAGVAR(postdeps,$1)= 65141477040fSmrg ;; 65152265a131Smrg 65161477040fSmrglinux*) 65171477040fSmrg case `$CC -V 2>&1 | sed 5q` in 65181477040fSmrg *Sun\ C*) 65191477040fSmrg # Sun C++ 5.9 65202265a131Smrg 65211477040fSmrg # The more standards-conforming stlport4 library is 65221477040fSmrg # incompatible with the Cstd library. Avoid specifying 65231477040fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 65241477040fSmrg # -library=stlport4 depends on it. 65251477040fSmrg case " $CXX $CXXFLAGS " in 65261477040fSmrg *" -library=stlport4 "*) 65271477040fSmrg solaris_use_stlport4=yes 65281477040fSmrg ;; 65291477040fSmrg esac 65302265a131Smrg 65311477040fSmrg if test "$solaris_use_stlport4" != yes; then 65321477040fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65331477040fSmrg fi 65341477040fSmrg ;; 65351477040fSmrg esac 65361477040fSmrg ;; 65372265a131Smrg 65381477040fSmrgsolaris*) 65391477040fSmrg case $cc_basename in 65401477040fSmrg CC*) 65411477040fSmrg # The more standards-conforming stlport4 library is 65421477040fSmrg # incompatible with the Cstd library. Avoid specifying 65431477040fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 65441477040fSmrg # -library=stlport4 depends on it. 65451477040fSmrg case " $CXX $CXXFLAGS " in 65461477040fSmrg *" -library=stlport4 "*) 65471477040fSmrg solaris_use_stlport4=yes 65481477040fSmrg ;; 65491477040fSmrg esac 65502265a131Smrg 65511477040fSmrg # Adding this requires a known-good setup of shared libraries for 65521477040fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 65531477040fSmrg # archive will be linked into the output, leading to subtle bugs. 65541477040fSmrg if test "$solaris_use_stlport4" != yes; then 65551477040fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65561477040fSmrg fi 65571477040fSmrg ;; 65581477040fSmrg esac 65591477040fSmrg ;; 65601477040fSmrgesac 65611477040fSmrg]) 65622265a131Smrg 65631477040fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 65641477040fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 65651477040fSmrgesac 65661477040fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 65671477040fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 65681477040fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 65691477040fSmrgfi 65701477040fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 65711477040fSmrg [The directories searched by this compiler when creating a shared library]) 65721477040fSmrg_LT_TAGDECL([], [predep_objects], [1], 65731477040fSmrg [Dependencies to place before and after the objects being linked to 65741477040fSmrg create a shared library]) 65751477040fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 65761477040fSmrg_LT_TAGDECL([], [predeps], [1]) 65771477040fSmrg_LT_TAGDECL([], [postdeps], [1]) 65781477040fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 65791477040fSmrg [The library search path used internally by the compiler when linking 65801477040fSmrg a shared library]) 65811477040fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 65821477040fSmrg 65831477040fSmrg 65841477040fSmrg# _LT_PROG_F77 65851477040fSmrg# ------------ 65861477040fSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 65871477040fSmrg# if there is no fortran compiler, we have our own version here. 65881477040fSmrgm4_defun([_LT_PROG_F77], 65891477040fSmrg[ 65901477040fSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 65911477040fSmrgAC_PROG_F77 65921477040fSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 65931477040fSmrg _lt_disable_F77=yes 65941477040fSmrgfi 65951477040fSmrgpopdef([AC_MSG_ERROR]) 65961477040fSmrg])# _LT_PROG_F77 65972265a131Smrg 65981477040fSmrgdnl aclocal-1.4 backwards compatibility: 65991477040fSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 66002265a131Smrg 66012265a131Smrg 66021477040fSmrg# _LT_LANG_F77_CONFIG([TAG]) 66031477040fSmrg# -------------------------- 66041477040fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 66051477040fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 66061477040fSmrg# to write the compiler configuration to `libtool'. 66071477040fSmrgm4_defun([_LT_LANG_F77_CONFIG], 66081477040fSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 66091477040fSmrgAC_LANG_PUSH(Fortran 77) 66102265a131Smrg 66111477040fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66121477040fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 66131477040fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 66141477040fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 66151477040fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 66161477040fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 66171477040fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 66181477040fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 66191477040fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 66201477040fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 66211477040fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 66221477040fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 66231477040fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 66241477040fSmrg_LT_TAGVAR(module_cmds, $1)= 66251477040fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 66261477040fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 66271477040fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 66281477040fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 66291477040fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 66301477040fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 66312265a131Smrg 66321477040fSmrg# Source file extension for f77 test sources. 66331477040fSmrgac_ext=f 66342265a131Smrg 66351477040fSmrg# Object file extension for compiled f77 test sources. 66361477040fSmrgobjext=o 66371477040fSmrg_LT_TAGVAR(objext, $1)=$objext 66381477040fSmrg 66391477040fSmrg# No sense in running all these tests if we already determined that 66401477040fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 66411477040fSmrg# are currently assumed to apply to all compilers on this platform, 66421477040fSmrg# and will be corrupted by setting them based on a non-working compiler. 66431477040fSmrgif test "$_lt_disable_F77" != yes; then 66441477040fSmrg # Code to be used in simple compile tests 66451477040fSmrg lt_simple_compile_test_code="\ 66461477040fSmrg subroutine t 66471477040fSmrg return 66481477040fSmrg end 66491477040fSmrg" 66502265a131Smrg 66511477040fSmrg # Code to be used in simple link tests 66521477040fSmrg lt_simple_link_test_code="\ 66531477040fSmrg program t 66541477040fSmrg end 66551477040fSmrg" 66562265a131Smrg 66571477040fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 66581477040fSmrg _LT_TAG_COMPILER 66592265a131Smrg 66601477040fSmrg # save warnings/boilerplate of simple test code 66611477040fSmrg _LT_COMPILER_BOILERPLATE 66621477040fSmrg _LT_LINKER_BOILERPLATE 66632265a131Smrg 66641477040fSmrg # Allow CC to be a program name with arguments. 66651477040fSmrg lt_save_CC="$CC" 66661477040fSmrg lt_save_GCC=$GCC 66671477040fSmrg CC=${F77-"f77"} 66681477040fSmrg compiler=$CC 66691477040fSmrg _LT_TAGVAR(compiler, $1)=$CC 66701477040fSmrg _LT_CC_BASENAME([$compiler]) 66711477040fSmrg GCC=$G77 66721477040fSmrg if test -n "$compiler"; then 66731477040fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 66741477040fSmrg AC_MSG_RESULT([$can_build_shared]) 66752265a131Smrg 66761477040fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 66771477040fSmrg test "$can_build_shared" = "no" && enable_shared=no 66782265a131Smrg 66791477040fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 66801477040fSmrg # are all built from PIC. 66811477040fSmrg case $host_os in 66821477040fSmrg aix3*) 66831477040fSmrg test "$enable_shared" = yes && enable_static=no 66841477040fSmrg if test -n "$RANLIB"; then 66851477040fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 66861477040fSmrg postinstall_cmds='$RANLIB $lib' 66871477040fSmrg fi 66881477040fSmrg ;; 66891477040fSmrg aix[[4-9]]*) 66901477040fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 66911477040fSmrg test "$enable_shared" = yes && enable_static=no 66921477040fSmrg fi 66931477040fSmrg ;; 66941477040fSmrg esac 66951477040fSmrg AC_MSG_RESULT([$enable_shared]) 66961477040fSmrg 66971477040fSmrg AC_MSG_CHECKING([whether to build static libraries]) 66981477040fSmrg # Make sure either enable_shared or enable_static is yes. 66991477040fSmrg test "$enable_shared" = yes || enable_static=yes 67001477040fSmrg AC_MSG_RESULT([$enable_static]) 67011477040fSmrg 67021477040fSmrg _LT_TAGVAR(GCC, $1)="$G77" 67031477040fSmrg _LT_TAGVAR(LD, $1)="$LD" 67041477040fSmrg 67051477040fSmrg ## CAVEAT EMPTOR: 67061477040fSmrg ## There is no encapsulation within the following macros, do not change 67071477040fSmrg ## the running order or otherwise move them around unless you know exactly 67081477040fSmrg ## what you are doing... 67091477040fSmrg _LT_COMPILER_PIC($1) 67101477040fSmrg _LT_COMPILER_C_O($1) 67111477040fSmrg _LT_COMPILER_FILE_LOCKS($1) 67121477040fSmrg _LT_LINKER_SHLIBS($1) 67131477040fSmrg _LT_SYS_DYNAMIC_LINKER($1) 67141477040fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 67151477040fSmrg 67161477040fSmrg _LT_CONFIG($1) 67171477040fSmrg fi # test -n "$compiler" 67181477040fSmrg 67191477040fSmrg GCC=$lt_save_GCC 67201477040fSmrg CC="$lt_save_CC" 67211477040fSmrgfi # test "$_lt_disable_F77" != yes 67222265a131Smrg 67231477040fSmrgAC_LANG_POP 67241477040fSmrg])# _LT_LANG_F77_CONFIG 67252265a131Smrg 67262265a131Smrg 67271477040fSmrg# _LT_PROG_FC 67281477040fSmrg# ----------- 67291477040fSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 67301477040fSmrg# if there is no fortran compiler, we have our own version here. 67311477040fSmrgm4_defun([_LT_PROG_FC], 67321477040fSmrg[ 67331477040fSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 67341477040fSmrgAC_PROG_FC 67351477040fSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 67361477040fSmrg _lt_disable_FC=yes 67371477040fSmrgfi 67381477040fSmrgpopdef([AC_MSG_ERROR]) 67391477040fSmrg])# _LT_PROG_FC 67402265a131Smrg 67411477040fSmrgdnl aclocal-1.4 backwards compatibility: 67421477040fSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 67432265a131Smrg 67442265a131Smrg 67451477040fSmrg# _LT_LANG_FC_CONFIG([TAG]) 67461477040fSmrg# ------------------------- 67471477040fSmrg# Ensure that the configuration variables for a Fortran compiler are 67481477040fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 67491477040fSmrg# to write the compiler configuration to `libtool'. 67501477040fSmrgm4_defun([_LT_LANG_FC_CONFIG], 67511477040fSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 67521477040fSmrgAC_LANG_PUSH(Fortran) 67531477040fSmrg 67541477040fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67551477040fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 67561477040fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 67571477040fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 67581477040fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 67591477040fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 67601477040fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 67611477040fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 67621477040fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 67631477040fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 67641477040fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 67651477040fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 67661477040fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 67671477040fSmrg_LT_TAGVAR(module_cmds, $1)= 67681477040fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 67691477040fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 67701477040fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 67711477040fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 67721477040fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 67731477040fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 67741477040fSmrg 67751477040fSmrg# Source file extension for fc test sources. 67761477040fSmrgac_ext=${ac_fc_srcext-f} 67771477040fSmrg 67781477040fSmrg# Object file extension for compiled fc test sources. 67791477040fSmrgobjext=o 67801477040fSmrg_LT_TAGVAR(objext, $1)=$objext 67811477040fSmrg 67821477040fSmrg# No sense in running all these tests if we already determined that 67831477040fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 67841477040fSmrg# are currently assumed to apply to all compilers on this platform, 67851477040fSmrg# and will be corrupted by setting them based on a non-working compiler. 67861477040fSmrgif test "$_lt_disable_FC" != yes; then 67871477040fSmrg # Code to be used in simple compile tests 67881477040fSmrg lt_simple_compile_test_code="\ 67891477040fSmrg subroutine t 67901477040fSmrg return 67911477040fSmrg end 67921477040fSmrg" 67932265a131Smrg 67941477040fSmrg # Code to be used in simple link tests 67951477040fSmrg lt_simple_link_test_code="\ 67961477040fSmrg program t 67971477040fSmrg end 67981477040fSmrg" 67992265a131Smrg 68001477040fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 68011477040fSmrg _LT_TAG_COMPILER 68022265a131Smrg 68031477040fSmrg # save warnings/boilerplate of simple test code 68041477040fSmrg _LT_COMPILER_BOILERPLATE 68051477040fSmrg _LT_LINKER_BOILERPLATE 68062265a131Smrg 68071477040fSmrg # Allow CC to be a program name with arguments. 68081477040fSmrg lt_save_CC="$CC" 68091477040fSmrg lt_save_GCC=$GCC 68101477040fSmrg CC=${FC-"f95"} 68111477040fSmrg compiler=$CC 68121477040fSmrg GCC=$ac_cv_fc_compiler_gnu 68132265a131Smrg 68141477040fSmrg _LT_TAGVAR(compiler, $1)=$CC 68151477040fSmrg _LT_CC_BASENAME([$compiler]) 68162265a131Smrg 68171477040fSmrg if test -n "$compiler"; then 68181477040fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68191477040fSmrg AC_MSG_RESULT([$can_build_shared]) 68202265a131Smrg 68211477040fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 68221477040fSmrg test "$can_build_shared" = "no" && enable_shared=no 68232265a131Smrg 68241477040fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 68251477040fSmrg # are all built from PIC. 68261477040fSmrg case $host_os in 68271477040fSmrg aix3*) 68281477040fSmrg test "$enable_shared" = yes && enable_static=no 68291477040fSmrg if test -n "$RANLIB"; then 68301477040fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68311477040fSmrg postinstall_cmds='$RANLIB $lib' 68321477040fSmrg fi 68331477040fSmrg ;; 68341477040fSmrg aix[[4-9]]*) 68351477040fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68361477040fSmrg test "$enable_shared" = yes && enable_static=no 68371477040fSmrg fi 68381477040fSmrg ;; 68391477040fSmrg esac 68401477040fSmrg AC_MSG_RESULT([$enable_shared]) 68411477040fSmrg 68421477040fSmrg AC_MSG_CHECKING([whether to build static libraries]) 68431477040fSmrg # Make sure either enable_shared or enable_static is yes. 68441477040fSmrg test "$enable_shared" = yes || enable_static=yes 68451477040fSmrg AC_MSG_RESULT([$enable_static]) 68461477040fSmrg 68471477040fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 68481477040fSmrg _LT_TAGVAR(LD, $1)="$LD" 68491477040fSmrg 68501477040fSmrg ## CAVEAT EMPTOR: 68511477040fSmrg ## There is no encapsulation within the following macros, do not change 68521477040fSmrg ## the running order or otherwise move them around unless you know exactly 68531477040fSmrg ## what you are doing... 68541477040fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 68551477040fSmrg _LT_COMPILER_PIC($1) 68561477040fSmrg _LT_COMPILER_C_O($1) 68571477040fSmrg _LT_COMPILER_FILE_LOCKS($1) 68581477040fSmrg _LT_LINKER_SHLIBS($1) 68591477040fSmrg _LT_SYS_DYNAMIC_LINKER($1) 68601477040fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 68611477040fSmrg 68621477040fSmrg _LT_CONFIG($1) 68631477040fSmrg fi # test -n "$compiler" 68641477040fSmrg 68651477040fSmrg GCC=$lt_save_GCC 68661477040fSmrg CC="$lt_save_CC" 68671477040fSmrgfi # test "$_lt_disable_FC" != yes 68682265a131Smrg 68691477040fSmrgAC_LANG_POP 68701477040fSmrg])# _LT_LANG_FC_CONFIG 68712265a131Smrg 68722265a131Smrg 68731477040fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 68741477040fSmrg# -------------------------- 68751477040fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 68761477040fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 68771477040fSmrg# to write the compiler configuration to `libtool'. 68781477040fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 68791477040fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 68801477040fSmrgAC_LANG_SAVE 68812265a131Smrg 68821477040fSmrg# Source file extension for Java test sources. 68831477040fSmrgac_ext=java 68842265a131Smrg 68851477040fSmrg# Object file extension for compiled Java test sources. 68861477040fSmrgobjext=o 68871477040fSmrg_LT_TAGVAR(objext, $1)=$objext 68882265a131Smrg 68891477040fSmrg# Code to be used in simple compile tests 68901477040fSmrglt_simple_compile_test_code="class foo {}" 68912265a131Smrg 68921477040fSmrg# Code to be used in simple link tests 68931477040fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 68942265a131Smrg 68951477040fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 68961477040fSmrg_LT_TAG_COMPILER 68972265a131Smrg 68981477040fSmrg# save warnings/boilerplate of simple test code 68991477040fSmrg_LT_COMPILER_BOILERPLATE 69001477040fSmrg_LT_LINKER_BOILERPLATE 69012265a131Smrg 69021477040fSmrg# Allow CC to be a program name with arguments. 69031477040fSmrglt_save_CC="$CC" 69041477040fSmrglt_save_GCC=$GCC 69051477040fSmrgGCC=yes 69061477040fSmrgCC=${GCJ-"gcj"} 69071477040fSmrgcompiler=$CC 69081477040fSmrg_LT_TAGVAR(compiler, $1)=$CC 69091477040fSmrg_LT_TAGVAR(LD, $1)="$LD" 69101477040fSmrg_LT_CC_BASENAME([$compiler]) 69112265a131Smrg 69121477040fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 69131477040fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69142265a131Smrg 69151477040fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69162265a131Smrg 69171477040fSmrgif test -n "$compiler"; then 69181477040fSmrg _LT_COMPILER_NO_RTTI($1) 69191477040fSmrg _LT_COMPILER_PIC($1) 69201477040fSmrg _LT_COMPILER_C_O($1) 69211477040fSmrg _LT_COMPILER_FILE_LOCKS($1) 69221477040fSmrg _LT_LINKER_SHLIBS($1) 69231477040fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 69242265a131Smrg 69251477040fSmrg _LT_CONFIG($1) 69261477040fSmrgfi 69272265a131Smrg 69281477040fSmrgAC_LANG_RESTORE 69292265a131Smrg 69301477040fSmrgGCC=$lt_save_GCC 69311477040fSmrgCC="$lt_save_CC" 69321477040fSmrg])# _LT_LANG_GCJ_CONFIG 69332265a131Smrg 69342265a131Smrg 69351477040fSmrg# _LT_LANG_RC_CONFIG([TAG]) 69361477040fSmrg# ------------------------- 69371477040fSmrg# Ensure that the configuration variables for the Windows resource compiler 69381477040fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 69391477040fSmrg# to write the compiler configuration to `libtool'. 69401477040fSmrgm4_defun([_LT_LANG_RC_CONFIG], 69411477040fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 69421477040fSmrgAC_LANG_SAVE 69432265a131Smrg 69441477040fSmrg# Source file extension for RC test sources. 69451477040fSmrgac_ext=rc 69462265a131Smrg 69471477040fSmrg# Object file extension for compiled RC test sources. 69481477040fSmrgobjext=o 69491477040fSmrg_LT_TAGVAR(objext, $1)=$objext 69502265a131Smrg 69511477040fSmrg# Code to be used in simple compile tests 69521477040fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 69532265a131Smrg 69541477040fSmrg# Code to be used in simple link tests 69551477040fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 69561477040fSmrg 69571477040fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 69581477040fSmrg_LT_TAG_COMPILER 69591477040fSmrg 69601477040fSmrg# save warnings/boilerplate of simple test code 69611477040fSmrg_LT_COMPILER_BOILERPLATE 69621477040fSmrg_LT_LINKER_BOILERPLATE 69631477040fSmrg 69641477040fSmrg# Allow CC to be a program name with arguments. 69651477040fSmrglt_save_CC="$CC" 69661477040fSmrglt_save_GCC=$GCC 69671477040fSmrgGCC= 69681477040fSmrgCC=${RC-"windres"} 69691477040fSmrgcompiler=$CC 69701477040fSmrg_LT_TAGVAR(compiler, $1)=$CC 69711477040fSmrg_LT_CC_BASENAME([$compiler]) 69721477040fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 69731477040fSmrg 69741477040fSmrgif test -n "$compiler"; then 69751477040fSmrg : 69761477040fSmrg _LT_CONFIG($1) 69772ae83157Smrgfi 69782265a131Smrg 69791477040fSmrgGCC=$lt_save_GCC 69801477040fSmrgAC_LANG_RESTORE 69811477040fSmrgCC="$lt_save_CC" 69821477040fSmrg])# _LT_LANG_RC_CONFIG 69832265a131Smrg 69841477040fSmrg 69851477040fSmrg# LT_PROG_GCJ 69861477040fSmrg# ----------- 69871477040fSmrgAC_DEFUN([LT_PROG_GCJ], 69881477040fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 69891477040fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 69901477040fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 69911477040fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 69921477040fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 69932ae83157Smrg]) 69942265a131Smrg 69951477040fSmrg# Old name: 69961477040fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 69971477040fSmrgdnl aclocal-1.4 backwards compatibility: 69981477040fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 69992265a131Smrg 70002265a131Smrg 70011477040fSmrg# LT_PROG_RC 70021477040fSmrg# ---------- 70031477040fSmrgAC_DEFUN([LT_PROG_RC], 70041477040fSmrg[AC_CHECK_TOOL(RC, windres,) 70051477040fSmrg]) 70062265a131Smrg 70071477040fSmrg# Old name: 70081477040fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 70091477040fSmrgdnl aclocal-1.4 backwards compatibility: 70101477040fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 70112265a131Smrg 70122265a131Smrg 70131477040fSmrg# _LT_DECL_EGREP 70141477040fSmrg# -------------- 70151477040fSmrg# If we don't have a new enough Autoconf to choose the best grep 70161477040fSmrg# available, choose the one first in the user's PATH. 70171477040fSmrgm4_defun([_LT_DECL_EGREP], 70181477040fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 70191477040fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 70201477040fSmrgtest -z "$GREP" && GREP=grep 70211477040fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 70221477040fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 70231477040fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 70241477040fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 70251477040fSmrgAC_SUBST([GREP]) 70261477040fSmrg]) 70272265a131Smrg 70282265a131Smrg 70291477040fSmrg# _LT_DECL_OBJDUMP 70301477040fSmrg# -------------- 70311477040fSmrg# If we don't have a new enough Autoconf to choose the best objdump 70321477040fSmrg# available, choose the one first in the user's PATH. 70331477040fSmrgm4_defun([_LT_DECL_OBJDUMP], 70341477040fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 70351477040fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 70361477040fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 70371477040fSmrgAC_SUBST([OBJDUMP]) 70381477040fSmrg]) 70392265a131Smrg 70402265a131Smrg 70411477040fSmrg# _LT_DECL_SED 70421477040fSmrg# ------------ 70431477040fSmrg# Check for a fully-functional sed program, that truncates 70441477040fSmrg# as few characters as possible. Prefer GNU sed if found. 70451477040fSmrgm4_defun([_LT_DECL_SED], 70461477040fSmrg[AC_PROG_SED 70471477040fSmrgtest -z "$SED" && SED=sed 70481477040fSmrgXsed="$SED -e 1s/^X//" 70491477040fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 70501477040fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 70511477040fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 70521477040fSmrg])# _LT_DECL_SED 70532265a131Smrg 70541477040fSmrgm4_ifndef([AC_PROG_SED], [ 70551477040fSmrg# NOTE: This macro has been submitted for inclusion into # 70561477040fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 70571477040fSmrg# a released version of Autoconf we should remove this # 70581477040fSmrg# macro and use it instead. # 70592265a131Smrg 70601477040fSmrgm4_defun([AC_PROG_SED], 70611477040fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 70621477040fSmrgAC_CACHE_VAL(lt_cv_path_SED, 70631477040fSmrg[# Loop through the user's path and test for sed and gsed. 70641477040fSmrg# Then use that list of sed's as ones to test for truncation. 70651477040fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 70661477040fSmrgfor as_dir in $PATH 70671477040fSmrgdo 70681477040fSmrg IFS=$as_save_IFS 70691477040fSmrg test -z "$as_dir" && as_dir=. 70701477040fSmrg for lt_ac_prog in sed gsed; do 70711477040fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 70721477040fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 70731477040fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 70741477040fSmrg fi 70751477040fSmrg done 70761477040fSmrg done 70771477040fSmrgdone 70781477040fSmrgIFS=$as_save_IFS 70791477040fSmrglt_ac_max=0 70801477040fSmrglt_ac_count=0 70811477040fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 70821477040fSmrg# along with /bin/sed that truncates output. 70831477040fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 70841477040fSmrg test ! -f $lt_ac_sed && continue 70851477040fSmrg cat /dev/null > conftest.in 70861477040fSmrg lt_ac_count=0 70871477040fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 70881477040fSmrg # Check for GNU sed and select it if it is found. 70891477040fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 70901477040fSmrg lt_cv_path_SED=$lt_ac_sed 70911477040fSmrg break 70922ae83157Smrg fi 70931477040fSmrg while true; do 70941477040fSmrg cat conftest.in conftest.in >conftest.tmp 70951477040fSmrg mv conftest.tmp conftest.in 70961477040fSmrg cp conftest.in conftest.nl 70971477040fSmrg echo >>conftest.nl 70981477040fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 70991477040fSmrg cmp -s conftest.out conftest.nl || break 71001477040fSmrg # 10000 chars as input seems more than enough 71011477040fSmrg test $lt_ac_count -gt 10 && break 71021477040fSmrg lt_ac_count=`expr $lt_ac_count + 1` 71031477040fSmrg if test $lt_ac_count -gt $lt_ac_max; then 71041477040fSmrg lt_ac_max=$lt_ac_count 71051477040fSmrg lt_cv_path_SED=$lt_ac_sed 71061477040fSmrg fi 71071477040fSmrg done 71081477040fSmrgdone 71091477040fSmrg]) 71101477040fSmrgSED=$lt_cv_path_SED 71111477040fSmrgAC_SUBST([SED]) 71121477040fSmrgAC_MSG_RESULT([$SED]) 71131477040fSmrg])#AC_PROG_SED 71141477040fSmrg])#m4_ifndef 71151477040fSmrg 71161477040fSmrg# Old name: 71171477040fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 71181477040fSmrgdnl aclocal-1.4 backwards compatibility: 71191477040fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 71201477040fSmrg 71211477040fSmrg 71221477040fSmrg# _LT_CHECK_SHELL_FEATURES 71231477040fSmrg# ------------------------ 71241477040fSmrg# Find out whether the shell is Bourne or XSI compatible, 71251477040fSmrg# or has some other useful features. 71261477040fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 71271477040fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 71281477040fSmrg# Try some XSI features 71291477040fSmrgxsi_shell=no 71301477040fSmrg( _lt_dummy="a/b/c" 71311477040fSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 71321477040fSmrg = c,a/b,, \ 71331477040fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 71341477040fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 71351477040fSmrg && xsi_shell=yes 71361477040fSmrgAC_MSG_RESULT([$xsi_shell]) 71371477040fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 71381477040fSmrg 71391477040fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 71401477040fSmrglt_shell_append=no 71411477040fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 71421477040fSmrg >/dev/null 2>&1 \ 71431477040fSmrg && lt_shell_append=yes 71441477040fSmrgAC_MSG_RESULT([$lt_shell_append]) 71451477040fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 71461477040fSmrg 71471477040fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 71481477040fSmrg lt_unset=unset 71491477040fSmrgelse 71501477040fSmrg lt_unset=false 71511477040fSmrgfi 71521477040fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 71531477040fSmrg 71541477040fSmrg# test EBCDIC or ASCII 71551477040fSmrgcase `echo X|tr X '\101'` in 71561477040fSmrg A) # ASCII based system 71571477040fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 71581477040fSmrg lt_SP2NL='tr \040 \012' 71591477040fSmrg lt_NL2SP='tr \015\012 \040\040' 71602ae83157Smrg ;; 71611477040fSmrg *) # EBCDIC based system 71621477040fSmrg lt_SP2NL='tr \100 \n' 71631477040fSmrg lt_NL2SP='tr \r\n \100\100' 71642ae83157Smrg ;; 71652ae83157Smrgesac 71661477040fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 71671477040fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 71681477040fSmrg])# _LT_CHECK_SHELL_FEATURES 71692265a131Smrg 71702265a131Smrg 71711477040fSmrg# _LT_PROG_XSI_SHELLFNS 71721477040fSmrg# --------------------- 71731477040fSmrg# Bourne and XSI compatible variants of some useful shell functions. 71741477040fSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 71751477040fSmrg[case $xsi_shell in 71761477040fSmrg yes) 71771477040fSmrg cat << \_LT_EOF >> "$cfgfile" 71781477040fSmrg 71791477040fSmrg# func_dirname file append nondir_replacement 71801477040fSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 71811477040fSmrg# otherwise set result to NONDIR_REPLACEMENT. 71821477040fSmrgfunc_dirname () 71831477040fSmrg{ 71841477040fSmrg case ${1} in 71851477040fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 71861477040fSmrg * ) func_dirname_result="${3}" ;; 71871477040fSmrg esac 71881477040fSmrg} 71892265a131Smrg 71901477040fSmrg# func_basename file 71911477040fSmrgfunc_basename () 71921477040fSmrg{ 71931477040fSmrg func_basename_result="${1##*/}" 71941477040fSmrg} 71952265a131Smrg 71961477040fSmrg# func_dirname_and_basename file append nondir_replacement 71971477040fSmrg# perform func_basename and func_dirname in a single function 71981477040fSmrg# call: 71991477040fSmrg# dirname: Compute the dirname of FILE. If nonempty, 72001477040fSmrg# add APPEND to the result, otherwise set result 72011477040fSmrg# to NONDIR_REPLACEMENT. 72021477040fSmrg# value returned in "$func_dirname_result" 72031477040fSmrg# basename: Compute filename of FILE. 72041477040fSmrg# value retuned in "$func_basename_result" 72051477040fSmrg# Implementation must be kept synchronized with func_dirname 72061477040fSmrg# and func_basename. For efficiency, we do not delegate to 72071477040fSmrg# those functions but instead duplicate the functionality here. 72081477040fSmrgfunc_dirname_and_basename () 72091477040fSmrg{ 72101477040fSmrg case ${1} in 72111477040fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 72121477040fSmrg * ) func_dirname_result="${3}" ;; 72131477040fSmrg esac 72141477040fSmrg func_basename_result="${1##*/}" 72151477040fSmrg} 72162265a131Smrg 72171477040fSmrg# func_stripname prefix suffix name 72181477040fSmrg# strip PREFIX and SUFFIX off of NAME. 72191477040fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 72201477040fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72211477040fSmrg# dot (in which case that matches only a dot). 72221477040fSmrgfunc_stripname () 72231477040fSmrg{ 72241477040fSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 72251477040fSmrg # positional parameters, so assign one to ordinary parameter first. 72261477040fSmrg func_stripname_result=${3} 72271477040fSmrg func_stripname_result=${func_stripname_result#"${1}"} 72281477040fSmrg func_stripname_result=${func_stripname_result%"${2}"} 72291477040fSmrg} 72302265a131Smrg 72311477040fSmrg# func_opt_split 72321477040fSmrgfunc_opt_split () 72331477040fSmrg{ 72341477040fSmrg func_opt_split_opt=${1%%=*} 72351477040fSmrg func_opt_split_arg=${1#*=} 72361477040fSmrg} 72372265a131Smrg 72381477040fSmrg# func_lo2o object 72391477040fSmrgfunc_lo2o () 72401477040fSmrg{ 72411477040fSmrg case ${1} in 72421477040fSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 72431477040fSmrg *) func_lo2o_result=${1} ;; 72441477040fSmrg esac 72452ae83157Smrg} 72462265a131Smrg 72471477040fSmrg# func_xform libobj-or-source 72481477040fSmrgfunc_xform () 72491477040fSmrg{ 72501477040fSmrg func_xform_result=${1%.*}.lo 72511477040fSmrg} 72522265a131Smrg 72531477040fSmrg# func_arith arithmetic-term... 72541477040fSmrgfunc_arith () 72551477040fSmrg{ 72561477040fSmrg func_arith_result=$(( $[*] )) 72571477040fSmrg} 72582265a131Smrg 72591477040fSmrg# func_len string 72601477040fSmrg# STRING may not start with a hyphen. 72611477040fSmrgfunc_len () 72621477040fSmrg{ 72631477040fSmrg func_len_result=${#1} 72641477040fSmrg} 72652265a131Smrg 72661477040fSmrg_LT_EOF 72671477040fSmrg ;; 72681477040fSmrg *) # Bourne compatible functions. 72691477040fSmrg cat << \_LT_EOF >> "$cfgfile" 72702265a131Smrg 72711477040fSmrg# func_dirname file append nondir_replacement 72721477040fSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 72731477040fSmrg# otherwise set result to NONDIR_REPLACEMENT. 72741477040fSmrgfunc_dirname () 72751477040fSmrg{ 72761477040fSmrg # Extract subdirectory from the argument. 72771477040fSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 72781477040fSmrg if test "X$func_dirname_result" = "X${1}"; then 72791477040fSmrg func_dirname_result="${3}" 72801477040fSmrg else 72811477040fSmrg func_dirname_result="$func_dirname_result${2}" 72821477040fSmrg fi 72832ae83157Smrg} 72841477040fSmrg 72851477040fSmrg# func_basename file 72861477040fSmrgfunc_basename () 72872ae83157Smrg{ 72881477040fSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 72891477040fSmrg} 72902265a131Smrg 72911477040fSmrgdnl func_dirname_and_basename 72921477040fSmrgdnl A portable version of this function is already defined in general.m4sh 72931477040fSmrgdnl so there is no need for it here. 72941477040fSmrg 72951477040fSmrg# func_stripname prefix suffix name 72961477040fSmrg# strip PREFIX and SUFFIX off of NAME. 72971477040fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 72981477040fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72991477040fSmrg# dot (in which case that matches only a dot). 73001477040fSmrg# func_strip_suffix prefix name 73011477040fSmrgfunc_stripname () 73021477040fSmrg{ 73031477040fSmrg case ${2} in 73041477040fSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 73051477040fSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 73061477040fSmrg *) func_stripname_result=`$ECHO "X${3}" \ 73071477040fSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 73081477040fSmrg esac 73092ae83157Smrg} 73102265a131Smrg 73111477040fSmrg# sed scripts: 73121477040fSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 73131477040fSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 73141477040fSmrg 73151477040fSmrg# func_opt_split 73161477040fSmrgfunc_opt_split () 73171477040fSmrg{ 73181477040fSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 73191477040fSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 73201477040fSmrg} 73211477040fSmrg 73221477040fSmrg# func_lo2o object 73231477040fSmrgfunc_lo2o () 73241477040fSmrg{ 73251477040fSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 73261477040fSmrg} 73271477040fSmrg 73281477040fSmrg# func_xform libobj-or-source 73291477040fSmrgfunc_xform () 73301477040fSmrg{ 73311477040fSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 73321477040fSmrg} 73331477040fSmrg 73341477040fSmrg# func_arith arithmetic-term... 73351477040fSmrgfunc_arith () 73361477040fSmrg{ 73371477040fSmrg func_arith_result=`expr "$[@]"` 73381477040fSmrg} 73391477040fSmrg 73401477040fSmrg# func_len string 73411477040fSmrg# STRING may not start with a hyphen. 73421477040fSmrgfunc_len () 73431477040fSmrg{ 73441477040fSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 73451477040fSmrg} 73461477040fSmrg 73471477040fSmrg_LT_EOF 73481477040fSmrgesac 73491477040fSmrg 73501477040fSmrgcase $lt_shell_append in 73511477040fSmrg yes) 73521477040fSmrg cat << \_LT_EOF >> "$cfgfile" 73531477040fSmrg 73541477040fSmrg# func_append var value 73551477040fSmrg# Append VALUE to the end of shell variable VAR. 73561477040fSmrgfunc_append () 73571477040fSmrg{ 73581477040fSmrg eval "$[1]+=\$[2]" 73591477040fSmrg} 73601477040fSmrg_LT_EOF 73611477040fSmrg ;; 73621477040fSmrg *) 73631477040fSmrg cat << \_LT_EOF >> "$cfgfile" 73641477040fSmrg 73651477040fSmrg# func_append var value 73661477040fSmrg# Append VALUE to the end of shell variable VAR. 73671477040fSmrgfunc_append () 73681477040fSmrg{ 73691477040fSmrg eval "$[1]=\$$[1]\$[2]" 73701477040fSmrg} 73711477040fSmrg 73721477040fSmrg_LT_EOF 73731477040fSmrg ;; 73741477040fSmrg esac 73752ae83157Smrg]) 73762265a131Smrg 73771477040fSmrg# Helper functions for option handling. -*- Autoconf -*- 73781477040fSmrg# 73791477040fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 73801477040fSmrg# Written by Gary V. Vaughan, 2004 73811477040fSmrg# 73821477040fSmrg# This file is free software; the Free Software Foundation gives 73831477040fSmrg# unlimited permission to copy and/or distribute it, with or without 73841477040fSmrg# modifications, as long as this notice is preserved. 73851477040fSmrg 73861477040fSmrg# serial 6 ltoptions.m4 73871477040fSmrg 73881477040fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 73891477040fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 73901477040fSmrg 73911477040fSmrg 73921477040fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 73931477040fSmrg# ------------------------------------------ 73941477040fSmrgm4_define([_LT_MANGLE_OPTION], 73951477040fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 73962265a131Smrg 73971477040fSmrg 73981477040fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 73992ae83157Smrg# --------------------------------------- 74001477040fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 74011477040fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 74021477040fSmrg# saved as a flag. 74031477040fSmrgm4_define([_LT_SET_OPTION], 74041477040fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 74051477040fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 74061477040fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 74071477040fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 74081477040fSmrg]) 74092265a131Smrg 7410444c061aSmrg 74111477040fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 74121477040fSmrg# ------------------------------------------------------------ 74131477040fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 74141477040fSmrgm4_define([_LT_IF_OPTION], 74151477040fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 74161477040fSmrg 74171477040fSmrg 74181477040fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 74191477040fSmrg# ------------------------------------------------------- 74201477040fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 74211477040fSmrg# are set. 74221477040fSmrgm4_define([_LT_UNLESS_OPTIONS], 74231477040fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74241477040fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 74251477040fSmrg [m4_define([$0_found])])])[]dnl 74261477040fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 74271477040fSmrg])[]dnl 74281477040fSmrg]) 74291477040fSmrg 74301477040fSmrg 74311477040fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 74321477040fSmrg# ---------------------------------------- 74331477040fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 74341477040fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 74351477040fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 74361477040fSmrg# the unknown option and exit. 74371477040fSmrgm4_defun([_LT_SET_OPTIONS], 74381477040fSmrg[# Set options 74391477040fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74401477040fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 74411477040fSmrg 74421477040fSmrgm4_if([$1],[LT_INIT],[ 74431477040fSmrg dnl 74441477040fSmrg dnl Simply set some default values (i.e off) if boolean options were not 74451477040fSmrg dnl specified: 74461477040fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 74471477040fSmrg ]) 74481477040fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 74491477040fSmrg ]) 74501477040fSmrg dnl 74511477040fSmrg dnl If no reference was made to various pairs of opposing options, then 74521477040fSmrg dnl we run the default mode handler for the pair. For example, if neither 74531477040fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 74541477040fSmrg dnl archives by default: 74551477040fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 74561477040fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 74571477040fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 74581477040fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 74591477040fSmrg [_LT_ENABLE_FAST_INSTALL]) 74601477040fSmrg ]) 74611477040fSmrg])# _LT_SET_OPTIONS 74621477040fSmrg 74631477040fSmrg 74641477040fSmrg 74651477040fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 74661477040fSmrg# ----------------------------------------- 74671477040fSmrgm4_define([_LT_MANGLE_DEFUN], 74681477040fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 74691477040fSmrg 74701477040fSmrg 74711477040fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 74721477040fSmrg# ----------------------------------------------- 74731477040fSmrgm4_define([LT_OPTION_DEFINE], 74741477040fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 74751477040fSmrg])# LT_OPTION_DEFINE 74761477040fSmrg 74771477040fSmrg 74781477040fSmrg# dlopen 74791477040fSmrg# ------ 74801477040fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 74811477040fSmrg]) 74821477040fSmrg 74831477040fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 74841477040fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 74851477040fSmrgAC_DIAGNOSE([obsolete], 74861477040fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 74871477040fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 74881477040fSmrg]) 74891477040fSmrg 74901477040fSmrgdnl aclocal-1.4 backwards compatibility: 74911477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 74921477040fSmrg 74931477040fSmrg 74941477040fSmrg# win32-dll 74951477040fSmrg# --------- 74961477040fSmrg# Declare package support for building win32 dll's. 74971477040fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 74981477040fSmrg[enable_win32_dll=yes 74991477040fSmrg 75001477040fSmrgcase $host in 75011477040fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 75021477040fSmrg AC_CHECK_TOOL(AS, as, false) 75031477040fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 75041477040fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 75051477040fSmrg ;; 75061477040fSmrgesac 75071477040fSmrg 75081477040fSmrgtest -z "$AS" && AS=as 75091477040fSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 75101477040fSmrg 75111477040fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 75121477040fSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 75131477040fSmrg 75141477040fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 75151477040fSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 75161477040fSmrg])# win32-dll 75171477040fSmrg 75181477040fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 75191477040fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 75201477040fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 75211477040fSmrgAC_DIAGNOSE([obsolete], 75221477040fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 75231477040fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 75241477040fSmrg]) 75251477040fSmrg 75261477040fSmrgdnl aclocal-1.4 backwards compatibility: 75271477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 75281477040fSmrg 75291477040fSmrg 75301477040fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 75311477040fSmrg# ---------------------------- 75321477040fSmrg# implement the --enable-shared flag, and supports the `shared' and 75331477040fSmrg# `disable-shared' LT_INIT options. 75341477040fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75351477040fSmrgm4_define([_LT_ENABLE_SHARED], 75361477040fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 75371477040fSmrgAC_ARG_ENABLE([shared], 75381477040fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 75391477040fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 75401477040fSmrg [p=${PACKAGE-default} 75411477040fSmrg case $enableval in 75421477040fSmrg yes) enable_shared=yes ;; 75431477040fSmrg no) enable_shared=no ;; 75442ae83157Smrg *) 75451477040fSmrg enable_shared=no 75461477040fSmrg # Look at the argument we got. We use all the common list separators. 75471477040fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75481477040fSmrg for pkg in $enableval; do 75491477040fSmrg IFS="$lt_save_ifs" 75501477040fSmrg if test "X$pkg" = "X$p"; then 75511477040fSmrg enable_shared=yes 75521477040fSmrg fi 75531477040fSmrg done 75541477040fSmrg IFS="$lt_save_ifs" 75552ae83157Smrg ;; 75561477040fSmrg esac], 75571477040fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 75581477040fSmrg 75591477040fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 75601477040fSmrg [Whether or not to build shared libraries]) 75611477040fSmrg])# _LT_ENABLE_SHARED 75621477040fSmrg 75631477040fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 75641477040fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 75651477040fSmrg 75661477040fSmrg# Old names: 75671477040fSmrgAC_DEFUN([AC_ENABLE_SHARED], 75681477040fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 75691477040fSmrg]) 75701477040fSmrg 75711477040fSmrgAC_DEFUN([AC_DISABLE_SHARED], 75721477040fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 75731477040fSmrg]) 75741477040fSmrg 75751477040fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 75761477040fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 75771477040fSmrg 75781477040fSmrgdnl aclocal-1.4 backwards compatibility: 75791477040fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 75801477040fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 75811477040fSmrg 75821477040fSmrg 75831477040fSmrg 75841477040fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 75851477040fSmrg# ---------------------------- 75861477040fSmrg# implement the --enable-static flag, and support the `static' and 75871477040fSmrg# `disable-static' LT_INIT options. 75881477040fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75891477040fSmrgm4_define([_LT_ENABLE_STATIC], 75901477040fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 75911477040fSmrgAC_ARG_ENABLE([static], 75921477040fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 75931477040fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 75941477040fSmrg [p=${PACKAGE-default} 75951477040fSmrg case $enableval in 75961477040fSmrg yes) enable_static=yes ;; 75971477040fSmrg no) enable_static=no ;; 75981477040fSmrg *) 75991477040fSmrg enable_static=no 76001477040fSmrg # Look at the argument we got. We use all the common list separators. 76011477040fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 76021477040fSmrg for pkg in $enableval; do 76031477040fSmrg IFS="$lt_save_ifs" 76041477040fSmrg if test "X$pkg" = "X$p"; then 76051477040fSmrg enable_static=yes 76062ae83157Smrg fi 76071477040fSmrg done 76081477040fSmrg IFS="$lt_save_ifs" 76091477040fSmrg ;; 76101477040fSmrg esac], 76111477040fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 76121477040fSmrg 76131477040fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 76141477040fSmrg [Whether or not to build static libraries]) 76151477040fSmrg])# _LT_ENABLE_STATIC 76161477040fSmrg 76171477040fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 76181477040fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 76191477040fSmrg 76201477040fSmrg# Old names: 76211477040fSmrgAC_DEFUN([AC_ENABLE_STATIC], 76221477040fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 76231477040fSmrg]) 76241477040fSmrg 76251477040fSmrgAC_DEFUN([AC_DISABLE_STATIC], 76261477040fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 76271477040fSmrg]) 76281477040fSmrg 76291477040fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 76301477040fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 76311477040fSmrg 76321477040fSmrgdnl aclocal-1.4 backwards compatibility: 76331477040fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 76341477040fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 76351477040fSmrg 76361477040fSmrg 76371477040fSmrg 76381477040fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 76391477040fSmrg# ---------------------------------- 76401477040fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 76411477040fSmrg# and `disable-fast-install' LT_INIT options. 76421477040fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 76431477040fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 76441477040fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 76451477040fSmrgAC_ARG_ENABLE([fast-install], 76461477040fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 76471477040fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 76481477040fSmrg [p=${PACKAGE-default} 76491477040fSmrg case $enableval in 76501477040fSmrg yes) enable_fast_install=yes ;; 76511477040fSmrg no) enable_fast_install=no ;; 76521477040fSmrg *) 76531477040fSmrg enable_fast_install=no 76541477040fSmrg # Look at the argument we got. We use all the common list separators. 76551477040fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 76561477040fSmrg for pkg in $enableval; do 76571477040fSmrg IFS="$lt_save_ifs" 76581477040fSmrg if test "X$pkg" = "X$p"; then 76591477040fSmrg enable_fast_install=yes 76601477040fSmrg fi 76611477040fSmrg done 76621477040fSmrg IFS="$lt_save_ifs" 76631477040fSmrg ;; 76641477040fSmrg esac], 76651477040fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 76661477040fSmrg 76671477040fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 76681477040fSmrg [Whether or not to optimize for fast installation])dnl 76691477040fSmrg])# _LT_ENABLE_FAST_INSTALL 76701477040fSmrg 76711477040fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 76721477040fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 76731477040fSmrg 76741477040fSmrg# Old names: 76751477040fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 76761477040fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 76771477040fSmrgAC_DIAGNOSE([obsolete], 76781477040fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76791477040fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 76801477040fSmrg]) 76811477040fSmrg 76821477040fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 76831477040fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 76841477040fSmrgAC_DIAGNOSE([obsolete], 76851477040fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76861477040fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 76871477040fSmrg]) 76881477040fSmrg 76891477040fSmrgdnl aclocal-1.4 backwards compatibility: 76901477040fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 76911477040fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 76921477040fSmrg 76931477040fSmrg 76941477040fSmrg# _LT_WITH_PIC([MODE]) 76951477040fSmrg# -------------------- 76961477040fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 76971477040fSmrg# LT_INIT options. 76981477040fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 76991477040fSmrgm4_define([_LT_WITH_PIC], 77001477040fSmrg[AC_ARG_WITH([pic], 77011477040fSmrg [AS_HELP_STRING([--with-pic], 77021477040fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 77031477040fSmrg [pic_mode="$withval"], 77041477040fSmrg [pic_mode=default]) 77051477040fSmrg 77061477040fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 77071477040fSmrg 77081477040fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 77091477040fSmrg])# _LT_WITH_PIC 77101477040fSmrg 77111477040fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 77121477040fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 77131477040fSmrg 77141477040fSmrg# Old name: 77151477040fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 77161477040fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 77171477040fSmrgAC_DIAGNOSE([obsolete], 77181477040fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 77191477040fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 77201477040fSmrg]) 77211477040fSmrg 77221477040fSmrgdnl aclocal-1.4 backwards compatibility: 77231477040fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 77241477040fSmrg 77251477040fSmrg 77261477040fSmrgm4_define([_LTDL_MODE], []) 77271477040fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 77281477040fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 77291477040fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 77301477040fSmrg [m4_define([_LTDL_MODE], [recursive])]) 77311477040fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 77321477040fSmrg [m4_define([_LTDL_MODE], [subproject])]) 77331477040fSmrg 77341477040fSmrgm4_define([_LTDL_TYPE], []) 77351477040fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 77361477040fSmrg [m4_define([_LTDL_TYPE], [installable])]) 77371477040fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 77381477040fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 77391477040fSmrg 77401477040fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 77411477040fSmrg# 77421477040fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 77431477040fSmrg# Written by Gary V. Vaughan, 2004 77441477040fSmrg# 77451477040fSmrg# This file is free software; the Free Software Foundation gives 77461477040fSmrg# unlimited permission to copy and/or distribute it, with or without 77471477040fSmrg# modifications, as long as this notice is preserved. 77481477040fSmrg 77491477040fSmrg# serial 6 ltsugar.m4 77501477040fSmrg 77511477040fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 77521477040fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 77531477040fSmrg 77541477040fSmrg 77551477040fSmrg# lt_join(SEP, ARG1, [ARG2...]) 77561477040fSmrg# ----------------------------- 77571477040fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 77581477040fSmrg# associated separator. 77591477040fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 77601477040fSmrg# versions in m4sugar had bugs. 77611477040fSmrgm4_define([lt_join], 77621477040fSmrg[m4_if([$#], [1], [], 77631477040fSmrg [$#], [2], [[$2]], 77641477040fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 77651477040fSmrgm4_define([_lt_join], 77661477040fSmrg[m4_if([$#$2], [2], [], 77671477040fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 77681477040fSmrg 77691477040fSmrg 77701477040fSmrg# lt_car(LIST) 77711477040fSmrg# lt_cdr(LIST) 77721477040fSmrg# ------------ 77731477040fSmrg# Manipulate m4 lists. 77741477040fSmrg# These macros are necessary as long as will still need to support 77751477040fSmrg# Autoconf-2.59 which quotes differently. 77761477040fSmrgm4_define([lt_car], [[$1]]) 77771477040fSmrgm4_define([lt_cdr], 77781477040fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 77791477040fSmrg [$#], 1, [], 77801477040fSmrg [m4_dquote(m4_shift($@))])]) 77811477040fSmrgm4_define([lt_unquote], $1) 77821477040fSmrg 77831477040fSmrg 77841477040fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 77851477040fSmrg# ------------------------------------------ 77861477040fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 77871477040fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 77881477040fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 77891477040fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 77901477040fSmrg# than defined and empty). 77911477040fSmrg# 77921477040fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 77931477040fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 77941477040fSmrgm4_define([lt_append], 77951477040fSmrg[m4_define([$1], 77961477040fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 77971477040fSmrg 77981477040fSmrg 77991477040fSmrg 78001477040fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 78011477040fSmrg# ---------------------------------------------------------- 78021477040fSmrg# Produce a SEP delimited list of all paired combinations of elements of 78031477040fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 78041477040fSmrg# has the form PREFIXmINFIXSUFFIXn. 78051477040fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 78061477040fSmrgm4_define([lt_combine], 78071477040fSmrg[m4_if(m4_eval([$# > 3]), [1], 78081477040fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 78091477040fSmrg[[m4_foreach([_Lt_prefix], [$2], 78101477040fSmrg [m4_foreach([_Lt_suffix], 78111477040fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 78121477040fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 78131477040fSmrg 78141477040fSmrg 78151477040fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 78161477040fSmrg# ----------------------------------------------------------------------- 78171477040fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 78181477040fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 78191477040fSmrgm4_define([lt_if_append_uniq], 78201477040fSmrg[m4_ifdef([$1], 78211477040fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 78221477040fSmrg [lt_append([$1], [$2], [$3])$4], 78231477040fSmrg [$5])], 78241477040fSmrg [lt_append([$1], [$2], [$3])$4])]) 78251477040fSmrg 78261477040fSmrg 78271477040fSmrg# lt_dict_add(DICT, KEY, VALUE) 78281477040fSmrg# ----------------------------- 78291477040fSmrgm4_define([lt_dict_add], 78301477040fSmrg[m4_define([$1($2)], [$3])]) 78311477040fSmrg 78321477040fSmrg 78331477040fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 78341477040fSmrg# -------------------------------------------- 78351477040fSmrgm4_define([lt_dict_add_subkey], 78361477040fSmrg[m4_define([$1($2:$3)], [$4])]) 78371477040fSmrg 78381477040fSmrg 78391477040fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 78401477040fSmrg# ---------------------------------- 78411477040fSmrgm4_define([lt_dict_fetch], 78421477040fSmrg[m4_ifval([$3], 78431477040fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 78441477040fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 78451477040fSmrg 78461477040fSmrg 78471477040fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 78481477040fSmrg# ----------------------------------------------------------------- 78491477040fSmrgm4_define([lt_if_dict_fetch], 78501477040fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 78511477040fSmrg [$5], 78521477040fSmrg [$6])]) 78531477040fSmrg 78541477040fSmrg 78551477040fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 78561477040fSmrg# -------------------------------------------------------------- 78571477040fSmrgm4_define([lt_dict_filter], 78581477040fSmrg[m4_if([$5], [], [], 78591477040fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 78601477040fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 78611477040fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 78621477040fSmrg]) 78631477040fSmrg 78641477040fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 78651477040fSmrg# 78661477040fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 78671477040fSmrg# Written by Scott James Remnant, 2004 78681477040fSmrg# 78691477040fSmrg# This file is free software; the Free Software Foundation gives 78701477040fSmrg# unlimited permission to copy and/or distribute it, with or without 78711477040fSmrg# modifications, as long as this notice is preserved. 78721477040fSmrg 78731477040fSmrg# Generated from ltversion.in. 78741477040fSmrg 78751477040fSmrg# serial 3017 ltversion.m4 78761477040fSmrg# This file is part of GNU Libtool 78771477040fSmrg 78781477040fSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6b]) 78791477040fSmrgm4_define([LT_PACKAGE_REVISION], [1.3017]) 78801477040fSmrg 78811477040fSmrgAC_DEFUN([LTVERSION_VERSION], 78821477040fSmrg[macro_version='2.2.6b' 78831477040fSmrgmacro_revision='1.3017' 78841477040fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 78851477040fSmrg_LT_DECL(, macro_revision, 0) 78861477040fSmrg]) 78871477040fSmrg 78881477040fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 78891477040fSmrg# 78901477040fSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 78911477040fSmrg# Written by Scott James Remnant, 2004. 78921477040fSmrg# 78931477040fSmrg# This file is free software; the Free Software Foundation gives 78941477040fSmrg# unlimited permission to copy and/or distribute it, with or without 78951477040fSmrg# modifications, as long as this notice is preserved. 78961477040fSmrg 78971477040fSmrg# serial 4 lt~obsolete.m4 78981477040fSmrg 78991477040fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 79001477040fSmrg# 79011477040fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 79021477040fSmrg# which have later been changed to m4_define as they aren't part of the 79031477040fSmrg# exported API, or moved to Autoconf or Automake where they belong. 79041477040fSmrg# 79051477040fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 79061477040fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 79071477040fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 79081477040fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 79091477040fSmrg# and doesn't know about Autoconf macros at all.) 79101477040fSmrg# 79111477040fSmrg# So we provide this file, which has a silly filename so it's always 79121477040fSmrg# included after everything else. This provides aclocal with the 79131477040fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 79141477040fSmrg# because those macros already exist, or will be overwritten later. 79151477040fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 79161477040fSmrg# 79171477040fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 79181477040fSmrg# Yes, that means every name once taken will need to remain here until 79191477040fSmrg# we give up compatibility with versions before 1.7, at which point 79201477040fSmrg# we need to keep only those names which we still refer to. 79211477040fSmrg 79221477040fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 79231477040fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 79241477040fSmrg 79251477040fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 79261477040fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 79271477040fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 79281477040fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 79291477040fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 79301477040fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 79311477040fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 79321477040fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 79331477040fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 79341477040fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 79351477040fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 79361477040fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 79371477040fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 79381477040fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 79391477040fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 79401477040fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 79411477040fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 79421477040fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 79431477040fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 79441477040fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 79451477040fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 79461477040fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 79471477040fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 79481477040fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 79491477040fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 79501477040fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 79511477040fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 79521477040fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 79531477040fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 79541477040fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 79551477040fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 79561477040fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 79571477040fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 79581477040fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 79591477040fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 79601477040fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 79611477040fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 79621477040fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 79631477040fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 79641477040fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 79651477040fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 79661477040fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 79671477040fSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 79681477040fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 79691477040fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 79701477040fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 79711477040fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 79721477040fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 79731477040fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 79741477040fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 79751477040fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 79761477040fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 79771477040fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 79781477040fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 79791477040fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 79801477040fSmrg 79811477040fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 79821477040fSmrg# 79831477040fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 79841477040fSmrg# 79851477040fSmrg# This program is free software; you can redistribute it and/or modify 79861477040fSmrg# it under the terms of the GNU General Public License as published by 79871477040fSmrg# the Free Software Foundation; either version 2 of the License, or 79881477040fSmrg# (at your option) any later version. 79891477040fSmrg# 79901477040fSmrg# This program is distributed in the hope that it will be useful, but 79911477040fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 79921477040fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 79931477040fSmrg# General Public License for more details. 79941477040fSmrg# 79951477040fSmrg# You should have received a copy of the GNU General Public License 79961477040fSmrg# along with this program; if not, write to the Free Software 79971477040fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 79981477040fSmrg# 79991477040fSmrg# As a special exception to the GNU General Public License, if you 80001477040fSmrg# distribute this file as part of a program that contains a 80011477040fSmrg# configuration script generated by Autoconf, you may include it under 80021477040fSmrg# the same distribution terms that you use for the rest of that program. 80031477040fSmrg 80041477040fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 80051477040fSmrg# ---------------------------------- 80061477040fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 80071477040fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 80081477040fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 80091477040fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 80101477040fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 80111477040fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 80121477040fSmrgfi 80131477040fSmrgif test -n "$PKG_CONFIG"; then 80141477040fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 80151477040fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 80161477040fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 80171477040fSmrg AC_MSG_RESULT([yes]) 80181477040fSmrg else 80191477040fSmrg AC_MSG_RESULT([no]) 80201477040fSmrg PKG_CONFIG="" 80211477040fSmrg fi 80221477040fSmrg 80231477040fSmrgfi[]dnl 80241477040fSmrg])# PKG_PROG_PKG_CONFIG 80251477040fSmrg 80261477040fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 80271477040fSmrg# 80281477040fSmrg# Check to see whether a particular set of modules exists. Similar 80291477040fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 80301477040fSmrg# 80311477040fSmrg# 80321477040fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 80331477040fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 80341477040fSmrg# PKG_CHECK_EXISTS manually 80351477040fSmrg# -------------------------------------------------------------- 80361477040fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 80371477040fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 80381477040fSmrgif test -n "$PKG_CONFIG" && \ 80391477040fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 80401477040fSmrg m4_ifval([$2], [$2], [:]) 80411477040fSmrgm4_ifvaln([$3], [else 80421477040fSmrg $3])dnl 80431477040fSmrgfi]) 80441477040fSmrg 80451477040fSmrg 80461477040fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 80471477040fSmrg# --------------------------------------------- 80481477040fSmrgm4_define([_PKG_CONFIG], 80491477040fSmrg[if test -n "$$1"; then 80501477040fSmrg pkg_cv_[]$1="$$1" 80511477040fSmrg elif test -n "$PKG_CONFIG"; then 80521477040fSmrg PKG_CHECK_EXISTS([$3], 80531477040fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 80541477040fSmrg [pkg_failed=yes]) 80551477040fSmrg else 80561477040fSmrg pkg_failed=untried 80571477040fSmrgfi[]dnl 80581477040fSmrg])# _PKG_CONFIG 80591477040fSmrg 80601477040fSmrg# _PKG_SHORT_ERRORS_SUPPORTED 80611477040fSmrg# ----------------------------- 80621477040fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 80631477040fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 80641477040fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 80651477040fSmrg _pkg_short_errors_supported=yes 80661477040fSmrgelse 80671477040fSmrg _pkg_short_errors_supported=no 80681477040fSmrgfi[]dnl 80691477040fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 80701477040fSmrg 80711477040fSmrg 80721477040fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 80731477040fSmrg# [ACTION-IF-NOT-FOUND]) 80741477040fSmrg# 80751477040fSmrg# 80761477040fSmrg# Note that if there is a possibility the first call to 80771477040fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 80781477040fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 80791477040fSmrg# 80801477040fSmrg# 80811477040fSmrg# -------------------------------------------------------------- 80821477040fSmrgAC_DEFUN([PKG_CHECK_MODULES], 80831477040fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 80841477040fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 80851477040fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 80861477040fSmrg 80871477040fSmrgpkg_failed=no 80881477040fSmrgAC_MSG_CHECKING([for $1]) 80891477040fSmrg 80901477040fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 80911477040fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 80921477040fSmrg 80931477040fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 80941477040fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 80951477040fSmrgSee the pkg-config man page for more details.]) 80961477040fSmrg 80971477040fSmrgif test $pkg_failed = yes; then 80981477040fSmrg _PKG_SHORT_ERRORS_SUPPORTED 80991477040fSmrg if test $_pkg_short_errors_supported = yes; then 81001477040fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 81011477040fSmrg else 81021477040fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 81031477040fSmrg fi 81041477040fSmrg # Put the nasty error message in config.log where it belongs 81051477040fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 81061477040fSmrg 81071477040fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 81081477040fSmrg[Package requirements ($2) were not met: 81091477040fSmrg 81101477040fSmrg$$1_PKG_ERRORS 81111477040fSmrg 81121477040fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 81131477040fSmrginstalled software in a non-standard prefix. 81141477040fSmrg 81151477040fSmrg_PKG_TEXT 81161477040fSmrg])], 81171477040fSmrg [AC_MSG_RESULT([no]) 81181477040fSmrg $4]) 81191477040fSmrgelif test $pkg_failed = untried; then 81201477040fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 81211477040fSmrg[The pkg-config script could not be found or is too old. Make sure it 81221477040fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 81231477040fSmrgpath to pkg-config. 81241477040fSmrg 81251477040fSmrg_PKG_TEXT 81261477040fSmrg 81271477040fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 81281477040fSmrg [$4]) 81291477040fSmrgelse 81301477040fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 81311477040fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 81321477040fSmrg AC_MSG_RESULT([yes]) 81331477040fSmrg ifelse([$3], , :, [$3]) 81341477040fSmrgfi[]dnl 81351477040fSmrg])# PKG_CHECK_MODULES 81361477040fSmrg 81371477040fSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 81381477040fSmrgdnl 81391477040fSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 81401477040fSmrgdnl 81411477040fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 81421477040fSmrgdnl copy of this software and associated documentation files (the "Software"), 81431477040fSmrgdnl to deal in the Software without restriction, including without limitation 81441477040fSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 81451477040fSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 81461477040fSmrgdnl Software is furnished to do so, subject to the following conditions: 81471477040fSmrgdnl 81481477040fSmrgdnl The above copyright notice and this permission notice (including the next 81491477040fSmrgdnl paragraph) shall be included in all copies or substantial portions of the 81501477040fSmrgdnl Software. 81511477040fSmrgdnl 81521477040fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 81531477040fSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 81541477040fSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 81551477040fSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 81561477040fSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 81571477040fSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 81581477040fSmrgdnl DEALINGS IN THE SOFTWARE. 81591477040fSmrg 81601477040fSmrg# XORG_MACROS_VERSION(required-version) 81611477040fSmrg# ------------------------------------- 81621477040fSmrg# Minimum version: 1.1.0 81631477040fSmrg# 81641477040fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 81651477040fSmrg# your configure.ac with the minimum required version, such as: 81661477040fSmrg# XORG_MACROS_VERSION(1.1) 81671477040fSmrg# 81681477040fSmrg# To ensure that this macro is defined, also add: 81691477040fSmrg# m4_ifndef([XORG_MACROS_VERSION], 81701477040fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 81711477040fSmrg# 81721477040fSmrg# 81731477040fSmrg# See the "minimum version" comment for each macro you use to see what 81741477040fSmrg# version you require. 81751477040fSmrgm4_defun([XORG_MACROS_VERSION],[ 81761477040fSmrgm4_define([vers_have], [1.6.0]) 81771477040fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 81781477040fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 81791477040fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 81801477040fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 81811477040fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 81821477040fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 81831477040fSmrgm4_undefine([vers_have]) 81841477040fSmrgm4_undefine([maj_have]) 81851477040fSmrgm4_undefine([maj_needed]) 81861477040fSmrg]) # XORG_MACROS_VERSION 81871477040fSmrg 81881477040fSmrg# XORG_PROG_RAWCPP() 81891477040fSmrg# ------------------ 81901477040fSmrg# Minimum version: 1.0.0 81911477040fSmrg# 81921477040fSmrg# Find cpp program and necessary flags for use in pre-processing text files 81931477040fSmrg# such as man pages and config files 81941477040fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 81951477040fSmrgAC_REQUIRE([AC_PROG_CPP]) 81961477040fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 81971477040fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 81981477040fSmrg 81991477040fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 82001477040fSmrg# which is not the best choice for supporting other OS'es, but covers most 82011477040fSmrg# of the ones we need for now. 82021477040fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 82031477040fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 82041477040fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82051477040fSmrg AC_MSG_RESULT([no]) 82061477040fSmrgelse 82071477040fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82081477040fSmrg RAWCPPFLAGS=-undef 82091477040fSmrg AC_MSG_RESULT([yes]) 82101477040fSmrg # under Cygwin unix is still defined even with -undef 82111477040fSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 82121477040fSmrg RAWCPPFLAGS="-undef -ansi" 82131477040fSmrg AC_MSG_RESULT([yes, with -ansi]) 82141477040fSmrg else 82151477040fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 82161477040fSmrg fi 82171477040fSmrgfi 82181477040fSmrgrm -f conftest.$ac_ext 82191477040fSmrg 82201477040fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 82211477040fSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 82221477040fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 82231477040fSmrg AC_MSG_RESULT([no]) 82241477040fSmrgelse 82251477040fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 82261477040fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 82271477040fSmrg AC_MSG_RESULT([yes]) 82281477040fSmrg else 82291477040fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 82301477040fSmrg fi 82311477040fSmrgfi 82321477040fSmrgrm -f conftest.$ac_ext 82331477040fSmrgAC_SUBST(RAWCPPFLAGS) 82341477040fSmrg]) # XORG_PROG_RAWCPP 82351477040fSmrg 82361477040fSmrg# XORG_MANPAGE_SECTIONS() 82371477040fSmrg# ----------------------- 82381477040fSmrg# Minimum version: 1.0.0 82391477040fSmrg# 82401477040fSmrg# Determine which sections man pages go in for the different man page types 82411477040fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 82421477040fSmrg# Not sure if there's any better way than just hardcoding by OS name. 82431477040fSmrg# Override default settings by setting environment variables 82441477040fSmrg 82451477040fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 82461477040fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 82471477040fSmrg 82481477040fSmrgif test x$APP_MAN_SUFFIX = x ; then 82491477040fSmrg APP_MAN_SUFFIX=1 82501477040fSmrgfi 82511477040fSmrgif test x$APP_MAN_DIR = x ; then 82521477040fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 82531477040fSmrgfi 82541477040fSmrg 82551477040fSmrgif test x$LIB_MAN_SUFFIX = x ; then 82561477040fSmrg LIB_MAN_SUFFIX=3 82571477040fSmrgfi 82581477040fSmrgif test x$LIB_MAN_DIR = x ; then 82591477040fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 82601477040fSmrgfi 82611477040fSmrg 82621477040fSmrgif test x$FILE_MAN_SUFFIX = x ; then 82631477040fSmrg case $host_os in 82641477040fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 82651477040fSmrg *) FILE_MAN_SUFFIX=5 ;; 82662265a131Smrg esac 82671477040fSmrgfi 82681477040fSmrgif test x$FILE_MAN_DIR = x ; then 82691477040fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 82701477040fSmrgfi 82712265a131Smrg 82721477040fSmrgif test x$MISC_MAN_SUFFIX = x ; then 82732ae83157Smrg case $host_os in 82741477040fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 82751477040fSmrg *) MISC_MAN_SUFFIX=7 ;; 82761477040fSmrg esac 82771477040fSmrgfi 82781477040fSmrgif test x$MISC_MAN_DIR = x ; then 82791477040fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 82801477040fSmrgfi 82812265a131Smrg 82821477040fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 82831477040fSmrg case $host_os in 82841477040fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 82851477040fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 82861477040fSmrg esac 82871477040fSmrgfi 82881477040fSmrgif test x$DRIVER_MAN_DIR = x ; then 82891477040fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 82901477040fSmrgfi 82912265a131Smrg 82921477040fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 82931477040fSmrg case $host_os in 82941477040fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 82951477040fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 82961477040fSmrg esac 82971477040fSmrgfi 82981477040fSmrgif test x$ADMIN_MAN_DIR = x ; then 82991477040fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 83001477040fSmrgfi 83012265a131Smrg 83022265a131Smrg 83031477040fSmrgAC_SUBST([APP_MAN_SUFFIX]) 83041477040fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 83051477040fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 83061477040fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 83071477040fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 83081477040fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 83091477040fSmrgAC_SUBST([APP_MAN_DIR]) 83101477040fSmrgAC_SUBST([LIB_MAN_DIR]) 83111477040fSmrgAC_SUBST([FILE_MAN_DIR]) 83121477040fSmrgAC_SUBST([MISC_MAN_DIR]) 83131477040fSmrgAC_SUBST([DRIVER_MAN_DIR]) 83141477040fSmrgAC_SUBST([ADMIN_MAN_DIR]) 83151477040fSmrg]) # XORG_MANPAGE_SECTIONS 83162265a131Smrg 83171477040fSmrg# XORG_CHECK_LINUXDOC 83181477040fSmrg# ------------------- 83191477040fSmrg# Minimum version: 1.0.0 83201477040fSmrg# 83211477040fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 83221477040fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 83231477040fSmrg# Whether or not the necessary tools and files are found can be checked 83241477040fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 83251477040fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 83261477040fSmrgif test x$XORG_SGML_PATH = x ; then 83271477040fSmrg XORG_SGML_PATH=$prefix/share/sgml 83281477040fSmrgfi 83291477040fSmrgHAVE_DEFS_ENT= 83301477040fSmrg 83311477040fSmrgif test x"$cross_compiling" = x"yes" ; then 83321477040fSmrg HAVE_DEFS_ENT=no 83331477040fSmrgelse 83341477040fSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 83351477040fSmrgfi 83361477040fSmrg 83371477040fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 83381477040fSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 83391477040fSmrg 83401477040fSmrgAC_MSG_CHECKING([Whether to build documentation]) 83411477040fSmrg 83421477040fSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 83431477040fSmrg BUILDDOC=yes 83441477040fSmrgelse 83451477040fSmrg BUILDDOC=no 83461477040fSmrgfi 83471477040fSmrg 83481477040fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 83491477040fSmrg 83501477040fSmrgAC_MSG_RESULT([$BUILDDOC]) 83511477040fSmrg 83521477040fSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 83531477040fSmrg 83541477040fSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 83551477040fSmrg BUILDPDFDOC=yes 83561477040fSmrgelse 83571477040fSmrg BUILDPDFDOC=no 83581477040fSmrgfi 83591477040fSmrg 83601477040fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 83611477040fSmrg 83621477040fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 83631477040fSmrg 83641477040fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 83651477040fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 83661477040fSmrgMAKE_PDF="$PS2PDF" 83671477040fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 83681477040fSmrg 83691477040fSmrgAC_SUBST(MAKE_TEXT) 83701477040fSmrgAC_SUBST(MAKE_PS) 83711477040fSmrgAC_SUBST(MAKE_PDF) 83721477040fSmrgAC_SUBST(MAKE_HTML) 83731477040fSmrg]) # XORG_CHECK_LINUXDOC 83741477040fSmrg 83751477040fSmrg# XORG_CHECK_DOCBOOK 83761477040fSmrg# ------------------- 83771477040fSmrg# Minimum version: 1.0.0 83781477040fSmrg# 83791477040fSmrg# Checks for the ability to build output formats from SGML DocBook source. 83801477040fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 83811477040fSmrg# indicates whether the necessary tools and files are found and, if set, 83821477040fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 83831477040fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 83841477040fSmrgif test x$XORG_SGML_PATH = x ; then 83851477040fSmrg XORG_SGML_PATH=$prefix/share/sgml 83861477040fSmrgfi 83871477040fSmrgHAVE_DEFS_ENT= 83881477040fSmrgBUILDTXTDOC=no 83891477040fSmrgBUILDPDFDOC=no 83901477040fSmrgBUILDPSDOC=no 83911477040fSmrgBUILDHTMLDOC=no 83921477040fSmrg 83931477040fSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 83941477040fSmrg 83951477040fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 83961477040fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 83971477040fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 83981477040fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 83991477040fSmrg 84001477040fSmrgAC_MSG_CHECKING([Whether to build text documentation]) 84011477040fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 84021477040fSmrg test x$BUILD_TXTDOC != xno; then 84031477040fSmrg BUILDTXTDOC=yes 84041477040fSmrgfi 84051477040fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 84061477040fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 84071477040fSmrg 84081477040fSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 84091477040fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 84101477040fSmrg test x$BUILD_PDFDOC != xno; then 84111477040fSmrg BUILDPDFDOC=yes 84121477040fSmrgfi 84131477040fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 84141477040fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 84151477040fSmrg 84161477040fSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 84171477040fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 84181477040fSmrg test x$BUILD_PSDOC != xno; then 84191477040fSmrg BUILDPSDOC=yes 84201477040fSmrgfi 84211477040fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 84221477040fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 84231477040fSmrg 84241477040fSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 84251477040fSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 84261477040fSmrg test x$BUILD_HTMLDOC != xno; then 84271477040fSmrg BUILDHTMLDOC=yes 84281477040fSmrgfi 84291477040fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 84301477040fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 84311477040fSmrg 84321477040fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 84331477040fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 84341477040fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 84351477040fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 84361477040fSmrg 84371477040fSmrgAC_SUBST(MAKE_TEXT) 84381477040fSmrgAC_SUBST(MAKE_PS) 84391477040fSmrgAC_SUBST(MAKE_PDF) 84401477040fSmrgAC_SUBST(MAKE_HTML) 84411477040fSmrg]) # XORG_CHECK_DOCBOOK 84421477040fSmrg 84431477040fSmrg# XORG_WITH_XMLTO 84441477040fSmrg# ---------------- 84451477040fSmrg# Minimum version: 1.5.0 84461477040fSmrg# 84471477040fSmrg# Documentation tools are not always available on all platforms and sometimes 84481477040fSmrg# not at the appropriate level. This macro enables a module to test for the 84491477040fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 84501477040fSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 84511477040fSmrg# as whether or not to use the xmlto package. 84521477040fSmrg# 84531477040fSmrg# Interface to module: 84541477040fSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 84551477040fSmrg# XMLTO: returns the path of the xmlto program found 84561477040fSmrg# returns the path set by the user in the environment 84571477040fSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 84581477040fSmrg# 'no' user instructs the module not to use xmlto 84591477040fSmrg# 84601477040fSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 84611477040fSmrg# 84621477040fSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 84631477040fSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 84641477040fSmrgAC_ARG_WITH(xmlto, 84651477040fSmrg AS_HELP_STRING([--with-xmlto], 84661477040fSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 84671477040fSmrg [use_xmlto=$withval], [use_xmlto=auto]) 84681477040fSmrg 84691477040fSmrgif test "x$use_xmlto" = x"auto"; then 84701477040fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 84711477040fSmrg if test "x$XMLTO" = "x"; then 84721477040fSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 84731477040fSmrg have_xmlto=no 84741477040fSmrg else 84751477040fSmrg have_xmlto=yes 84761477040fSmrg fi 84771477040fSmrgelif test "x$use_xmlto" = x"yes" ; then 84781477040fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 84791477040fSmrg if test "x$XMLTO" = "x"; then 84801477040fSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 84811477040fSmrg fi 84821477040fSmrg have_xmlto=yes 84831477040fSmrgelif test "x$use_xmlto" = x"no" ; then 84841477040fSmrg if test "x$XMLTO" != "x"; then 84851477040fSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 84861477040fSmrg fi 84871477040fSmrg have_xmlto=no 84881477040fSmrgelse 84891477040fSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 84901477040fSmrgfi 84911477040fSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 84921477040fSmrg]) # XORG_CHECK_XMLTO 84931477040fSmrg 84941477040fSmrg# XORG_WITH_ASCIIDOC 84951477040fSmrg# ---------------- 84961477040fSmrg# Minimum version: 1.5.0 84971477040fSmrg# 84981477040fSmrg# Documentation tools are not always available on all platforms and sometimes 84991477040fSmrg# not at the appropriate level. This macro enables a module to test for the 85001477040fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 85011477040fSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 85021477040fSmrg# as whether or not to use the asciidoc package. 85031477040fSmrg# 85041477040fSmrg# Interface to module: 85051477040fSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 85061477040fSmrg# ASCIIDOC: returns the path of the asciidoc program found 85071477040fSmrg# returns the path set by the user in the environment 85081477040fSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 85091477040fSmrg# 'no' user instructs the module not to use asciidoc 85101477040fSmrg# 85111477040fSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 85121477040fSmrg# 85131477040fSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 85141477040fSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 85151477040fSmrgAC_ARG_WITH(asciidoc, 85161477040fSmrg AS_HELP_STRING([--with-asciidoc], 85171477040fSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 85181477040fSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 85191477040fSmrg 85201477040fSmrgif test "x$use_asciidoc" = x"auto"; then 85211477040fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 85221477040fSmrg if test "x$ASCIIDOC" = "x"; then 85231477040fSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 85241477040fSmrg have_asciidoc=no 85251477040fSmrg else 85261477040fSmrg have_asciidoc=yes 85271477040fSmrg fi 85281477040fSmrgelif test "x$use_asciidoc" = x"yes" ; then 85291477040fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 85301477040fSmrg if test "x$ASCIIDOC" = "x"; then 85311477040fSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 85321477040fSmrg fi 85331477040fSmrg have_asciidoc=yes 85341477040fSmrgelif test "x$use_asciidoc" = x"no" ; then 85351477040fSmrg if test "x$ASCIIDOC" != "x"; then 85361477040fSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 85371477040fSmrg fi 85381477040fSmrg have_asciidoc=no 85391477040fSmrgelse 85401477040fSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 85411477040fSmrgfi 85421477040fSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 85431477040fSmrg]) # XORG_CHECK_ASCIIDOC 8544444c061aSmrg 85451477040fSmrg# XORG_WITH_DOXYGEN 85461477040fSmrg# ---------------- 85471477040fSmrg# Minimum version: 1.5.0 85481477040fSmrg# 85491477040fSmrg# Documentation tools are not always available on all platforms and sometimes 85501477040fSmrg# not at the appropriate level. This macro enables a module to test for the 85511477040fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 85521477040fSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 85531477040fSmrg# as whether or not to use the doxygen package. 85541477040fSmrg# 85551477040fSmrg# Interface to module: 85561477040fSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 85571477040fSmrg# DOXYGEN: returns the path of the doxygen program found 85581477040fSmrg# returns the path set by the user in the environment 85591477040fSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 85601477040fSmrg# 'no' user instructs the module not to use doxygen 85611477040fSmrg# 85621477040fSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 85631477040fSmrg# 85641477040fSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 85651477040fSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 85661477040fSmrgAC_ARG_WITH(doxygen, 85671477040fSmrg AS_HELP_STRING([--with-doxygen], 85681477040fSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 85691477040fSmrg [use_doxygen=$withval], [use_doxygen=auto]) 85701477040fSmrg 85711477040fSmrgif test "x$use_doxygen" = x"auto"; then 85721477040fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 85731477040fSmrg if test "x$DOXYGEN" = "x"; then 85741477040fSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 85751477040fSmrg have_doxygen=no 85761477040fSmrg else 85771477040fSmrg have_doxygen=yes 85781477040fSmrg fi 85791477040fSmrgelif test "x$use_doxygen" = x"yes" ; then 85801477040fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 85811477040fSmrg if test "x$DOXYGEN" = "x"; then 85821477040fSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 85831477040fSmrg fi 85841477040fSmrg have_doxygen=yes 85851477040fSmrgelif test "x$use_doxygen" = x"no" ; then 85861477040fSmrg if test "x$DOXYGEN" != "x"; then 85871477040fSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 85881477040fSmrg fi 85891477040fSmrg have_doxygen=no 85901477040fSmrgelse 85911477040fSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 85921477040fSmrgfi 85931477040fSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 85941477040fSmrg]) # XORG_CHECK_DOXYGEN 8595444c061aSmrg 85961477040fSmrg# XORG_WITH_GROFF 85971477040fSmrg# ---------------- 85981477040fSmrg# Minimum version: 1.6.0 85991477040fSmrg# 86001477040fSmrg# Documentation tools are not always available on all platforms and sometimes 86011477040fSmrg# not at the appropriate level. This macro enables a module to test for the 86021477040fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 86031477040fSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 86041477040fSmrg# as whether or not to use the groff package. 86051477040fSmrg# 86061477040fSmrg# Interface to module: 86071477040fSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 86081477040fSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 86091477040fSmrg# HAVE_GROFF_MS: the -ms macros package 86101477040fSmrg# GROFF: returns the path of the groff program found 86111477040fSmrg# returns the path set by the user in the environment 86121477040fSmrg# --with-groff: 'yes' user instructs the module to use groff 86131477040fSmrg# 'no' user instructs the module not to use groff 86141477040fSmrg# 86151477040fSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 86161477040fSmrg# 86171477040fSmrg# OS and distros often splits groff in a basic and full package, the former 86181477040fSmrg# having the groff program and the later having devices, fonts and macros 86191477040fSmrg# Checking for the groff executable is not enough. 86201477040fSmrg# 86211477040fSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 86221477040fSmrg# unset HAVE_GROFF or GROFF env variables. 86231477040fSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 86241477040fSmrg# 86251477040fSmrgAC_DEFUN([XORG_WITH_GROFF],[ 86261477040fSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 86271477040fSmrgAC_ARG_WITH(groff, 86281477040fSmrg AS_HELP_STRING([--with-groff], 86291477040fSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 86301477040fSmrg [use_groff=$withval], [use_groff=auto]) 86311477040fSmrg 86321477040fSmrgif test "x$use_groff" = x"auto"; then 86331477040fSmrg AC_PATH_PROG([GROFF], [groff]) 86341477040fSmrg if test "x$GROFF" = "x"; then 86351477040fSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 86361477040fSmrg have_groff=no 86371477040fSmrg else 86381477040fSmrg have_groff=yes 86391477040fSmrg fi 86401477040fSmrgelif test "x$use_groff" = x"yes" ; then 86411477040fSmrg AC_PATH_PROG([GROFF], [groff]) 86421477040fSmrg if test "x$GROFF" = "x"; then 86431477040fSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 86441477040fSmrg fi 86451477040fSmrg have_groff=yes 86461477040fSmrgelif test "x$use_groff" = x"no" ; then 86471477040fSmrg if test "x$GROFF" != "x"; then 86481477040fSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 86491477040fSmrg fi 86501477040fSmrg have_groff=no 86511477040fSmrgelse 86521477040fSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 86531477040fSmrgfi 86541477040fSmrg# We have groff, test for the presence of the macro packages 86551477040fSmrgif test "x$have_groff" = x"yes"; then 86561477040fSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 86571477040fSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 86581477040fSmrg groff_ms_works=yes 86591477040fSmrg else 86601477040fSmrg groff_ms_works=no 86611477040fSmrg fi 86621477040fSmrg AC_MSG_RESULT([$groff_ms_works]) 86631477040fSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 86641477040fSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 86651477040fSmrg groff_mm_works=yes 86661477040fSmrg else 86671477040fSmrg groff_mm_works=no 86681477040fSmrg fi 86691477040fSmrg AC_MSG_RESULT([$groff_mm_works]) 86701477040fSmrgfi 86711477040fSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 86721477040fSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 86731477040fSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 86741477040fSmrg]) # XORG_WITH_GROFF 8675444c061aSmrg 86761477040fSmrg# XORG_WITH_FOP 86771477040fSmrg# ---------------- 86781477040fSmrg# Minimum version: 1.6.0 86791477040fSmrg# 86801477040fSmrg# Documentation tools are not always available on all platforms and sometimes 86811477040fSmrg# not at the appropriate level. This macro enables a module to test for the 86821477040fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 86831477040fSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 86841477040fSmrg# as whether or not to use the fop package. 86851477040fSmrg# 86861477040fSmrg# Interface to module: 86871477040fSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 86881477040fSmrg# FOP: returns the path of the fop program found 86891477040fSmrg# returns the path set by the user in the environment 86901477040fSmrg# --with-fop: 'yes' user instructs the module to use fop 86911477040fSmrg# 'no' user instructs the module not to use fop 86921477040fSmrg# 86931477040fSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 86941477040fSmrg# 86951477040fSmrgAC_DEFUN([XORG_WITH_FOP],[ 86961477040fSmrgAC_ARG_VAR([FOP], [Path to fop command]) 86971477040fSmrgAC_ARG_WITH(fop, 86981477040fSmrg AS_HELP_STRING([--with-fop], 86991477040fSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 87001477040fSmrg [use_fop=$withval], [use_fop=auto]) 87011477040fSmrg 87021477040fSmrgif test "x$use_fop" = x"auto"; then 87031477040fSmrg AC_PATH_PROG([FOP], [fop]) 87041477040fSmrg if test "x$FOP" = "x"; then 87051477040fSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 87061477040fSmrg have_fop=no 87071477040fSmrg else 87081477040fSmrg have_fop=yes 87091477040fSmrg fi 87101477040fSmrgelif test "x$use_fop" = x"yes" ; then 87111477040fSmrg AC_PATH_PROG([FOP], [fop]) 87121477040fSmrg if test "x$FOP" = "x"; then 87131477040fSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 87141477040fSmrg fi 87151477040fSmrg have_fop=yes 87161477040fSmrgelif test "x$use_fop" = x"no" ; then 87171477040fSmrg if test "x$FOP" != "x"; then 87181477040fSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 87191477040fSmrg fi 87201477040fSmrg have_fop=no 87211477040fSmrgelse 87221477040fSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 87231477040fSmrgfi 87241477040fSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 87251477040fSmrg]) # XORG_WITH_FOP 8726444c061aSmrg 87271477040fSmrg# XORG_WITH_PS2PDF 87281477040fSmrg# ---------------- 87291477040fSmrg# Minimum version: 1.6.0 87301477040fSmrg# 87311477040fSmrg# Documentation tools are not always available on all platforms and sometimes 87321477040fSmrg# not at the appropriate level. This macro enables a module to test for the 87331477040fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 87341477040fSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 87351477040fSmrg# as whether or not to use the ps2pdf package. 87361477040fSmrg# 87371477040fSmrg# Interface to module: 87381477040fSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 87391477040fSmrg# PS2PDF: returns the path of the ps2pdf program found 87401477040fSmrg# returns the path set by the user in the environment 87411477040fSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 87421477040fSmrg# 'no' user instructs the module not to use ps2pdf 87431477040fSmrg# 87441477040fSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 87451477040fSmrg# 87461477040fSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 87471477040fSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 87481477040fSmrgAC_ARG_WITH(ps2pdf, 87491477040fSmrg AS_HELP_STRING([--with-ps2pdf], 87501477040fSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 87511477040fSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 87521477040fSmrg 87531477040fSmrgif test "x$use_ps2pdf" = x"auto"; then 87541477040fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 87551477040fSmrg if test "x$PS2PDF" = "x"; then 87561477040fSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 87571477040fSmrg have_ps2pdf=no 87581477040fSmrg else 87591477040fSmrg have_ps2pdf=yes 87601477040fSmrg fi 87611477040fSmrgelif test "x$use_ps2pdf" = x"yes" ; then 87621477040fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 87631477040fSmrg if test "x$PS2PDF" = "x"; then 87641477040fSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 87651477040fSmrg fi 87661477040fSmrg have_ps2pdf=yes 87671477040fSmrgelif test "x$use_ps2pdf" = x"no" ; then 87681477040fSmrg if test "x$PS2PDF" != "x"; then 87691477040fSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 87701477040fSmrg fi 87711477040fSmrg have_ps2pdf=no 87721477040fSmrgelse 87731477040fSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 87741477040fSmrgfi 87751477040fSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 87761477040fSmrg]) # XORG_WITH_PS2PDF 8777444c061aSmrg 87781477040fSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 87791477040fSmrg# ---------------- 87801477040fSmrg# Minimum version: 1.6.0 87811477040fSmrg# 87821477040fSmrg# Documentation tools are not always available on all platforms and sometimes 87831477040fSmrg# not at the appropriate level. This macro enables a builder to skip all 87841477040fSmrg# documentation targets except traditional man pages. 87851477040fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 87861477040fSmrg# maximum flexibilty in controlling documentation building. 87871477040fSmrg# Refer to: 87881477040fSmrg# XORG_WITH_XMLTO --with-xmlto 87891477040fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 87901477040fSmrg# XORG_WITH_DOXYGEN --with-doxygen 87911477040fSmrg# XORG_WITH_FOP --with-fop 87921477040fSmrg# XORG_WITH_GROFF --with-groff 87931477040fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 87941477040fSmrg# 87951477040fSmrg# Interface to module: 87961477040fSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 87971477040fSmrg# --enable-docs: 'yes' user instructs the module to generate docs 87981477040fSmrg# 'no' user instructs the module not to generate docs 87991477040fSmrg# parm1: specify the default value, yes or no. 88001477040fSmrg# 88011477040fSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 88021477040fSmrgdefault=$1 88031477040fSmrgif test "x$default" = x ; then 88041477040fSmrg default="yes" 88051477040fSmrgfi 88061477040fSmrgAC_ARG_ENABLE(docs, 88071477040fSmrg AS_HELP_STRING([--enable-docs], 88081477040fSmrg [Enable building the documentation (default: yes)]), 88091477040fSmrg [build_docs=$enableval], [build_docs=$default]) 88101477040fSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 88111477040fSmrgAC_MSG_CHECKING([whether to build documentation]) 88121477040fSmrgAC_MSG_RESULT([$build_docs]) 88131477040fSmrg]) # XORG_ENABLE_DOCS 88141477040fSmrg 88151477040fSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 88161477040fSmrg# ---------------- 88171477040fSmrg# Minimum version: 1.6.0 88181477040fSmrg# 88191477040fSmrg# This macro enables a builder to skip all developer documentation. 88201477040fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 88211477040fSmrg# maximum flexibilty in controlling documentation building. 88221477040fSmrg# Refer to: 88231477040fSmrg# XORG_WITH_XMLTO --with-xmlto 88241477040fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 88251477040fSmrg# XORG_WITH_DOXYGEN --with-doxygen 88261477040fSmrg# XORG_WITH_FOP --with-fop 88271477040fSmrg# XORG_WITH_GROFF --with-groff 88281477040fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 88291477040fSmrg# 88301477040fSmrg# Interface to module: 88311477040fSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 88321477040fSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 88331477040fSmrg# 'no' user instructs the module not to generate developer docs 88341477040fSmrg# parm1: specify the default value, yes or no. 88351477040fSmrg# 88361477040fSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 88371477040fSmrgdevel_default=$1 88381477040fSmrgif test "x$devel_default" = x ; then 88391477040fSmrg devel_default="yes" 88401477040fSmrgfi 88411477040fSmrgAC_ARG_ENABLE(devel-docs, 88421477040fSmrg AS_HELP_STRING([--enable-devel-docs], 88431477040fSmrg [Enable building the developer documentation (default: yes)]), 88441477040fSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 88451477040fSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 88461477040fSmrgAC_MSG_CHECKING([whether to build developer documentation]) 88471477040fSmrgAC_MSG_RESULT([$build_devel_docs]) 88481477040fSmrg]) # XORG_ENABLE_DEVEL_DOCS 88491477040fSmrg 88501477040fSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 88511477040fSmrg# ---------------- 88521477040fSmrg# Minimum version: 1.6.0 88531477040fSmrg# 88541477040fSmrg# This macro enables a builder to skip all functional specification targets. 88551477040fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 88561477040fSmrg# maximum flexibilty in controlling documentation building. 88571477040fSmrg# Refer to: 88581477040fSmrg# XORG_WITH_XMLTO --with-xmlto 88591477040fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 88601477040fSmrg# XORG_WITH_DOXYGEN --with-doxygen 88611477040fSmrg# XORG_WITH_FOP --with-fop 88621477040fSmrg# XORG_WITH_GROFF --with-groff 88631477040fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 88641477040fSmrg# 88651477040fSmrg# Interface to module: 88661477040fSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 88671477040fSmrg# --enable-specs: 'yes' user instructs the module to generate specs 88681477040fSmrg# 'no' user instructs the module not to generate specs 88691477040fSmrg# parm1: specify the default value, yes or no. 88701477040fSmrg# 88711477040fSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 88721477040fSmrgspec_default=$1 88731477040fSmrgif test "x$spec_default" = x ; then 88741477040fSmrg spec_default="yes" 88751477040fSmrgfi 88761477040fSmrgAC_ARG_ENABLE(specs, 88771477040fSmrg AS_HELP_STRING([--enable-specs], 88781477040fSmrg [Enable building the specs (default: yes)]), 88791477040fSmrg [build_specs=$enableval], [build_specs=$spec_default]) 88801477040fSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 88811477040fSmrgAC_MSG_CHECKING([whether to build functional specifications]) 88821477040fSmrgAC_MSG_RESULT([$build_specs]) 88831477040fSmrg]) # XORG_ENABLE_SPECS 8884444c061aSmrg 88851477040fSmrg# XORG_CHECK_MALLOC_ZERO 88861477040fSmrg# ---------------------- 88871477040fSmrg# Minimum version: 1.0.0 88881477040fSmrg# 88891477040fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 88901477040fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 88911477040fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 88921477040fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 88931477040fSmrgAC_ARG_ENABLE(malloc0returnsnull, 88941477040fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 88951477040fSmrg [malloc(0) returns NULL (default: auto)]), 88961477040fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 88971477040fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 8898444c061aSmrg 88991477040fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 89001477040fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 89011477040fSmrg AC_RUN_IFELSE([ 89021477040fSmrgchar *malloc(); 89031477040fSmrgchar *realloc(); 89041477040fSmrgchar *calloc(); 89051477040fSmrgmain() { 89061477040fSmrg char *m0, *r0, *c0, *p; 89071477040fSmrg m0 = malloc(0); 89081477040fSmrg p = malloc(10); 89091477040fSmrg r0 = realloc(p,0); 89101477040fSmrg c0 = calloc(0); 89111477040fSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 89121477040fSmrg}], 89131477040fSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 89141477040fSmrg [MALLOC_ZERO_RETURNS_NULL=no], 89151477040fSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 89161477040fSmrgfi 89171477040fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 8918444c061aSmrg 89191477040fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 89201477040fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 89211477040fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 89221477040fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 89231477040fSmrgelse 89241477040fSmrg MALLOC_ZERO_CFLAGS="" 89251477040fSmrg XMALLOC_ZERO_CFLAGS="" 89261477040fSmrg XTMALLOC_ZERO_CFLAGS="" 89271477040fSmrgfi 8928444c061aSmrg 89291477040fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 89301477040fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 89311477040fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 89321477040fSmrg]) # XORG_CHECK_MALLOC_ZERO 89332265a131Smrg 89341477040fSmrg# XORG_WITH_LINT() 89351477040fSmrg# ---------------- 89361477040fSmrg# Minimum version: 1.1.0 89371477040fSmrg# 89381477040fSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 89391477040fSmrg# is specified. (Use --with-lint=sparse for sparse.) 89401477040fSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 89411477040fSmrg# Sets $LINT_FLAGS to flags to pass to source checker 89421477040fSmrg# Sets LINT automake conditional if enabled (default: disabled) 89431477040fSmrg# 89441477040fSmrgAC_DEFUN([XORG_WITH_LINT],[ 8945444c061aSmrg 89461477040fSmrg# Allow checking code with lint, sparse, etc. 89471477040fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 89481477040fSmrg [Use a lint-style source code checker (default: disabled)])], 89491477040fSmrg [use_lint=$withval], [use_lint=no]) 89501477040fSmrgif test "x$use_lint" = "xyes" ; then 89511477040fSmrg LINT="lint" 89521477040fSmrgelse 89531477040fSmrg LINT="$use_lint" 89541477040fSmrgfi 89551477040fSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 89561477040fSmrg case $LINT in 89571477040fSmrg lint|*/lint) 89581477040fSmrg case $host_os in 89591477040fSmrg solaris*) 89601477040fSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 89611477040fSmrg ;; 89621477040fSmrg esac 89631477040fSmrg ;; 89641477040fSmrg esac 89651477040fSmrgfi 89662265a131Smrg 89671477040fSmrgAC_SUBST(LINT) 89681477040fSmrgAC_SUBST(LINT_FLAGS) 89691477040fSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 8970444c061aSmrg 89711477040fSmrg]) # XORG_WITH_LINT 8972444c061aSmrg 89731477040fSmrg# XORG_LINT_LIBRARY(LIBNAME) 89741477040fSmrg# -------------------------- 89751477040fSmrg# Minimum version: 1.1.0 89761477040fSmrg# 89771477040fSmrg# Sets up flags for building lint libraries for checking programs that call 89781477040fSmrg# functions in the library. 89791477040fSmrg# Disabled by default, enable with --enable-lint-library 89801477040fSmrg# Sets: 89811477040fSmrg# @LINTLIB@ - name of lint library file to make 89821477040fSmrg# MAKE_LINT_LIB - automake conditional 89831477040fSmrg# 8984444c061aSmrg 89851477040fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 89861477040fSmrgAC_REQUIRE([XORG_WITH_LINT]) 89871477040fSmrg# Build lint "library" for more indepth checks of programs calling this library 89881477040fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 89891477040fSmrg [Create lint library (default: disabled)])], 89901477040fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 89911477040fSmrgif test "x$make_lint_lib" != "xno" ; then 89921477040fSmrg if test "x$LINT" = "xno" ; then 89931477040fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 89941477040fSmrg fi 89951477040fSmrg if test "x$make_lint_lib" = "xyes" ; then 89961477040fSmrg LINTLIB=llib-l$1.ln 89971477040fSmrg else 89981477040fSmrg LINTLIB=$make_lint_lib 89991477040fSmrg fi 90001477040fSmrgfi 90011477040fSmrgAC_SUBST(LINTLIB) 90021477040fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 9003444c061aSmrg 90041477040fSmrg]) # XORG_LINT_LIBRARY 9005444c061aSmrg 90061477040fSmrg# XORG_CWARNFLAGS 90071477040fSmrg# --------------- 90081477040fSmrg# Minimum version: 1.2.0 90091477040fSmrg# 90101477040fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 90111477040fSmrg# 90121477040fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 90131477040fSmrgAC_REQUIRE([AC_PROG_CC]) 90141477040fSmrgif test "x$GCC" = xyes ; then 90151477040fSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 90161477040fSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 90171477040fSmrg-Wbad-function-cast -Wformat=2" 90181477040fSmrg case `$CC -dumpversion` in 90191477040fSmrg 3.4.* | 4.*) 90201477040fSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 90211477040fSmrg ;; 90221477040fSmrg esac 90231477040fSmrgelse 90241477040fSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 90251477040fSmrg if test "x$SUNCC" = "xyes"; then 90261477040fSmrg CWARNFLAGS="-v" 90271477040fSmrg fi 90281477040fSmrgfi 90291477040fSmrgAC_SUBST(CWARNFLAGS) 90301477040fSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 90311477040fSmrg]) # XORG_CWARNFLAGS 9032444c061aSmrg 90331477040fSmrg# XORG_STRICT_OPTION 90341477040fSmrg# ----------------------- 90351477040fSmrg# Minimum version: 1.3.0 90361477040fSmrg# 90371477040fSmrg# Add configure option to enable strict compilation 90381477040fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 90391477040fSmrgAC_REQUIRE([AC_PROG_CC]) 90401477040fSmrgAC_REQUIRE([AC_PROG_CC_C99]) 90411477040fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 9042444c061aSmrg 90431477040fSmrgAC_ARG_ENABLE(strict-compilation, 90441477040fSmrg AS_HELP_STRING([--enable-strict-compilation], 90451477040fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 90461477040fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 90471477040fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 90481477040fSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 90491477040fSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 90501477040fSmrg if test "x$GCC" = xyes ; then 90511477040fSmrg STRICT_CFLAGS="-pedantic -Werror" 90521477040fSmrg elif test "x$SUNCC" = "xyes"; then 90531477040fSmrg STRICT_CFLAGS="-errwarn" 90541477040fSmrg elif test "x$INTELCC" = "xyes"; then 90551477040fSmrg STRICT_CFLAGS="-Werror" 90561477040fSmrg fi 90571477040fSmrgfi 90581477040fSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 90591477040fSmrgAC_SUBST([CWARNFLAGS]) 90601477040fSmrg]) # XORG_STRICT_OPTION 9061444c061aSmrg 90621477040fSmrg# XORG_DEFAULT_OPTIONS 90631477040fSmrg# -------------------- 90641477040fSmrg# Minimum version: 1.3.0 90652ae83157Smrg# 90661477040fSmrg# Defines default options for X.Org modules. 90672ae83157Smrg# 90681477040fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 90691477040fSmrgXORG_CWARNFLAGS 90701477040fSmrgXORG_STRICT_OPTION 90711477040fSmrgXORG_RELEASE_VERSION 90721477040fSmrgXORG_CHANGELOG 90731477040fSmrgXORG_INSTALL 90741477040fSmrgXORG_MANPAGE_SECTIONS 90751477040fSmrg]) # XORG_DEFAULT_OPTIONS 9076444c061aSmrg 90771477040fSmrg# XORG_INSTALL() 90781477040fSmrg# ---------------- 90791477040fSmrg# Minimum version: 1.4.0 90802265a131Smrg# 90811477040fSmrg# Defines the variable INSTALL_CMD as the command to copy 90821477040fSmrg# INSTALL from $prefix/share/util-macros. 90832ae83157Smrg# 90841477040fSmrgAC_DEFUN([XORG_INSTALL], [ 90851477040fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 90861477040fSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 90871477040fSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 90881477040fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 90891477040fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 90901477040fSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 90911477040fSmrgAC_SUBST([INSTALL_CMD]) 90921477040fSmrg]) # XORG_INSTALL 90931477040fSmrgdnl Copyright 2005 Red Hat, Inc 90941477040fSmrgdnl 90951477040fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 90961477040fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 90971477040fSmrgdnl the above copyright notice appear in all copies and that both that 90981477040fSmrgdnl copyright notice and this permission notice appear in supporting 90991477040fSmrgdnl documentation. 91001477040fSmrgdnl 91011477040fSmrgdnl The above copyright notice and this permission notice shall be included 91021477040fSmrgdnl in all copies or substantial portions of the Software. 91031477040fSmrgdnl 91041477040fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 91051477040fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 91061477040fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 91071477040fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 91081477040fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 91091477040fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 91101477040fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 91111477040fSmrgdnl 91121477040fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 91131477040fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 91141477040fSmrgdnl other dealings in this Software without prior written authorization 91151477040fSmrgdnl from the copyright holders. 91161477040fSmrgdnl 91171477040fSmrg 91181477040fSmrg# XORG_RELEASE_VERSION 91191477040fSmrg# -------------------- 91201477040fSmrg# Adds --with/without-release-string and changes the PACKAGE and 91211477040fSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 91221477040fSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 91231477040fSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 91241477040fSmrg 91251477040fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 91261477040fSmrg AC_ARG_WITH(release-version, 91271477040fSmrg AS_HELP_STRING([--with-release-version=STRING], 91281477040fSmrg [Use release version string in package name]), 91291477040fSmrg [RELEASE_VERSION="$withval"], 91301477040fSmrg [RELEASE_VERSION=""]) 91311477040fSmrg if test "x$RELEASE_VERSION" != "x"; then 91321477040fSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 91331477040fSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 91341477040fSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 91351477040fSmrg fi 91361477040fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 91371477040fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 91381477040fSmrg [Major version of this package]) 91391477040fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 91401477040fSmrg if test "x$PVM" = "x"; then 91411477040fSmrg PVM="0" 91421477040fSmrg fi 91431477040fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 91441477040fSmrg [$PVM], 91451477040fSmrg [Minor version of this package]) 91461477040fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 91471477040fSmrg if test "x$PVP" = "x"; then 91481477040fSmrg PVP="0" 91491477040fSmrg fi 91501477040fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 91511477040fSmrg [$PVP], 91521477040fSmrg [Patch version of this package]) 91532ae83157Smrg]) 9154444c061aSmrg 91551477040fSmrg# XORG_CHANGELOG() 91561477040fSmrg# ---------------- 91571477040fSmrg# Minimum version: 1.2.0 91581477040fSmrg# 91591477040fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 91601477040fSmrg# ChangeLog from git. 91611477040fSmrg# 91621477040fSmrg# 91631477040fSmrgAC_DEFUN([XORG_CHANGELOG], [ 91641477040fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 91651477040fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 91661477040fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 91671477040fSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 91681477040fSmrgAC_SUBST([CHANGELOG_CMD]) 91691477040fSmrg]) # XORG_CHANGELOG 9170444c061aSmrg 91711477040fSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 91721477040fSmrg# 91731477040fSmrg# This file is free software; the Free Software Foundation 91741477040fSmrg# gives unlimited permission to copy and/or distribute it, 91751477040fSmrg# with or without modifications, as long as this notice is preserved. 9176444c061aSmrg 91771477040fSmrg# AM_AUTOMAKE_VERSION(VERSION) 91781477040fSmrg# ---------------------------- 91791477040fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 91801477040fSmrg# generated from the m4 files accompanying Automake X.Y. 91811477040fSmrg# (This private macro should not be called outside this file.) 91821477040fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 91831477040fSmrg[am__api_version='1.11' 91841477040fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 91851477040fSmrgdnl require some minimum version. Point them to the right macro. 91861477040fSmrgm4_if([$1], [1.11.1], [], 91871477040fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 91881477040fSmrg]) 9189444c061aSmrg 91901477040fSmrg# _AM_AUTOCONF_VERSION(VERSION) 91911477040fSmrg# ----------------------------- 91921477040fSmrg# aclocal traces this macro to find the Autoconf version. 91931477040fSmrg# This is a private macro too. Using m4_define simplifies 91941477040fSmrg# the logic in aclocal, which can simply ignore this definition. 91951477040fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 9196444c061aSmrg 91971477040fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 91981477040fSmrg# ------------------------------- 91991477040fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 92001477040fSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 92011477040fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 92021477040fSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 92031477040fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 92041477040fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 92051477040fSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 9206444c061aSmrg 92071477040fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 9208444c061aSmrg 92091477040fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 92101477040fSmrg# 92111477040fSmrg# This file is free software; the Free Software Foundation 92121477040fSmrg# gives unlimited permission to copy and/or distribute it, 92131477040fSmrg# with or without modifications, as long as this notice is preserved. 9214444c061aSmrg 92151477040fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 92161477040fSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 92171477040fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 92181477040fSmrg# 92191477040fSmrg# Of course, Automake must honor this variable whenever it calls a 92201477040fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 92211477040fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 92221477040fSmrg# depending on how configure is run. This is pretty annoying, since 92231477040fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 92241477040fSmrg# source directory, any form will work fine, but in subdirectories a 92251477040fSmrg# relative path needs to be adjusted first. 92261477040fSmrg# 92271477040fSmrg# $ac_aux_dir/missing 92281477040fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 92291477040fSmrg# $top_srcdir/$ac_aux_dir/missing 92301477040fSmrg# fails if $ac_aux_dir is absolute, 92311477040fSmrg# fails when called from a subdirectory in a VPATH build with 92321477040fSmrg# a relative $ac_aux_dir 92331477040fSmrg# 92341477040fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 92351477040fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 92361477040fSmrg# harmless because $srcdir is `.', but things will broke when you 92371477040fSmrg# start a VPATH build or use an absolute $srcdir. 92381477040fSmrg# 92391477040fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92401477040fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92411477040fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 92421477040fSmrg# and then we would define $MISSING as 92431477040fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 92441477040fSmrg# This will work as long as MISSING is not called from configure, because 92451477040fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 92461477040fSmrg# However there are other variables, like CC, which are often used in 92471477040fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 92481477040fSmrg# 92491477040fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 92501477040fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 92511477040fSmrg# configured tree to be moved without reconfiguration. 9252444c061aSmrg 92531477040fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 92541477040fSmrg[dnl Rely on autoconf to set up CDPATH properly. 92551477040fSmrgAC_PREREQ([2.50])dnl 92561477040fSmrg# expand $ac_aux_dir to an absolute path 92571477040fSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 92581477040fSmrg]) 9259444c061aSmrg 92601477040fSmrg# AM_CONDITIONAL -*- Autoconf -*- 9261444c061aSmrg 92621477040fSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 92631477040fSmrg# Free Software Foundation, Inc. 92641477040fSmrg# 92651477040fSmrg# This file is free software; the Free Software Foundation 92661477040fSmrg# gives unlimited permission to copy and/or distribute it, 92671477040fSmrg# with or without modifications, as long as this notice is preserved. 92682ae83157Smrg 92691477040fSmrg# serial 9 92702ae83157Smrg 92711477040fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 92721477040fSmrg# ------------------------------------- 92731477040fSmrg# Define a conditional. 92741477040fSmrgAC_DEFUN([AM_CONDITIONAL], 92751477040fSmrg[AC_PREREQ(2.52)dnl 92761477040fSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 92771477040fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 92781477040fSmrgAC_SUBST([$1_TRUE])dnl 92791477040fSmrgAC_SUBST([$1_FALSE])dnl 92801477040fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 92811477040fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 92821477040fSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 92831477040fSmrgif $2; then 92841477040fSmrg $1_TRUE= 92851477040fSmrg $1_FALSE='#' 92861477040fSmrgelse 92871477040fSmrg $1_TRUE='#' 92881477040fSmrg $1_FALSE= 92891477040fSmrgfi 92901477040fSmrgAC_CONFIG_COMMANDS_PRE( 92911477040fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 92921477040fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 92931477040fSmrgUsually this means the macro was only invoked conditionally.]]) 92941477040fSmrgfi])]) 92952ae83157Smrg 92961477040fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 92971477040fSmrg# Free Software Foundation, Inc. 92981477040fSmrg# 92991477040fSmrg# This file is free software; the Free Software Foundation 93001477040fSmrg# gives unlimited permission to copy and/or distribute it, 93011477040fSmrg# with or without modifications, as long as this notice is preserved. 9302444c061aSmrg 93031477040fSmrg# serial 10 9304444c061aSmrg 93051477040fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 93061477040fSmrg# written in clear, in which case automake, when reading aclocal.m4, 93071477040fSmrg# will think it sees a *use*, and therefore will trigger all it's 93081477040fSmrg# C support machinery. Also note that it means that autoscan, seeing 93091477040fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9310444c061aSmrg 9311444c061aSmrg 93121477040fSmrg# _AM_DEPENDENCIES(NAME) 93131477040fSmrg# ---------------------- 93141477040fSmrg# See how the compiler implements dependency checking. 93151477040fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 93161477040fSmrg# We try a few techniques and use that to set a single cache variable. 93171477040fSmrg# 93181477040fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 93191477040fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 93201477040fSmrg# dependency, and given that the user is not expected to run this macro, 93211477040fSmrg# just rely on AC_PROG_CC. 93221477040fSmrgAC_DEFUN([_AM_DEPENDENCIES], 93231477040fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 93241477040fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 93251477040fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 93261477040fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 9327444c061aSmrg 93281477040fSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 93291477040fSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 93301477040fSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 93311477040fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 93321477040fSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 93331477040fSmrg [depcc="$$1" am_compiler_list=]) 9334444c061aSmrg 93351477040fSmrgAC_CACHE_CHECK([dependency style of $depcc], 93361477040fSmrg [am_cv_$1_dependencies_compiler_type], 93371477040fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 93381477040fSmrg # We make a subdir and do the tests there. Otherwise we can end up 93391477040fSmrg # making bogus files that we don't know about and never remove. For 93401477040fSmrg # instance it was reported that on HP-UX the gcc test will end up 93411477040fSmrg # making a dummy file named `D' -- because `-MD' means `put the output 93421477040fSmrg # in D'. 93431477040fSmrg mkdir conftest.dir 93441477040fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 93451477040fSmrg # using a relative directory. 93461477040fSmrg cp "$am_depcomp" conftest.dir 93471477040fSmrg cd conftest.dir 93481477040fSmrg # We will build objects and dependencies in a subdirectory because 93491477040fSmrg # it helps to detect inapplicable dependency modes. For instance 93501477040fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 93511477040fSmrg # side effect of compilation, but ICC will put the dependencies in 93521477040fSmrg # the current directory while Tru64 will put them in the object 93531477040fSmrg # directory. 93541477040fSmrg mkdir sub 93551477040fSmrg 93561477040fSmrg am_cv_$1_dependencies_compiler_type=none 93571477040fSmrg if test "$am_compiler_list" = ""; then 93581477040fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 93591477040fSmrg fi 93601477040fSmrg am__universal=false 93611477040fSmrg m4_case([$1], [CC], 93621477040fSmrg [case " $depcc " in #( 93631477040fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 93641477040fSmrg esac], 93651477040fSmrg [CXX], 93661477040fSmrg [case " $depcc " in #( 93671477040fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 93681477040fSmrg esac]) 9369444c061aSmrg 93701477040fSmrg for depmode in $am_compiler_list; do 93711477040fSmrg # Setup a source with many dependencies, because some compilers 93721477040fSmrg # like to wrap large dependency lists on column 80 (with \), and 93731477040fSmrg # we should not choose a depcomp mode which is confused by this. 93741477040fSmrg # 93751477040fSmrg # We need to recreate these files for each test, as the compiler may 93761477040fSmrg # overwrite some of them when testing with obscure command lines. 93771477040fSmrg # This happens at least with the AIX C compiler. 93781477040fSmrg : > sub/conftest.c 93791477040fSmrg for i in 1 2 3 4 5 6; do 93801477040fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 93811477040fSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 93821477040fSmrg # Solaris 8's {/usr,}/bin/sh. 93831477040fSmrg touch sub/conftst$i.h 93841477040fSmrg done 93851477040fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 9386444c061aSmrg 93871477040fSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 93881477040fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 93891477040fSmrg # handle `-M -o', and we need to detect this. Also, some Intel 93901477040fSmrg # versions had trouble with output in subdirs 93911477040fSmrg am__obj=sub/conftest.${OBJEXT-o} 93921477040fSmrg am__minus_obj="-o $am__obj" 93931477040fSmrg case $depmode in 93941477040fSmrg gcc) 93951477040fSmrg # This depmode causes a compiler race in universal mode. 93961477040fSmrg test "$am__universal" = false || continue 93971477040fSmrg ;; 93981477040fSmrg nosideeffect) 93991477040fSmrg # after this tag, mechanisms are not by side-effect, so they'll 94001477040fSmrg # only be used when explicitly requested 94011477040fSmrg if test "x$enable_dependency_tracking" = xyes; then 94021477040fSmrg continue 94032ae83157Smrg else 94041477040fSmrg break 94052ae83157Smrg fi 94062ae83157Smrg ;; 94071477040fSmrg msvisualcpp | msvcmsys) 94081477040fSmrg # This compiler won't grok `-c -o', but also, the minuso test has 94091477040fSmrg # not run yet. These depmodes are late enough in the game, and 94101477040fSmrg # so weak that their functioning should not be impacted. 94111477040fSmrg am__obj=conftest.${OBJEXT-o} 94121477040fSmrg am__minus_obj= 94131477040fSmrg ;; 94141477040fSmrg none) break ;; 94152ae83157Smrg esac 94161477040fSmrg if depmode=$depmode \ 94171477040fSmrg source=sub/conftest.c object=$am__obj \ 94181477040fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 94191477040fSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 94201477040fSmrg >/dev/null 2>conftest.err && 94211477040fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 94221477040fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 94231477040fSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 94241477040fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 94251477040fSmrg # icc doesn't choke on unknown options, it will just issue warnings 94261477040fSmrg # or remarks (even with -Werror). So we grep stderr for any message 94271477040fSmrg # that says an option was ignored or not supported. 94281477040fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 94291477040fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 94301477040fSmrg # The diagnosis changed in icc 8.0: 94311477040fSmrg # icc: Command line remark: option '-MP' not supported 94321477040fSmrg if (grep 'ignoring option' conftest.err || 94331477040fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 94341477040fSmrg am_cv_$1_dependencies_compiler_type=$depmode 94351477040fSmrg break 94362ae83157Smrg fi 94371477040fSmrg fi 94381477040fSmrg done 9439444c061aSmrg 94401477040fSmrg cd .. 94411477040fSmrg rm -rf conftest.dir 94421477040fSmrgelse 94431477040fSmrg am_cv_$1_dependencies_compiler_type=none 94441477040fSmrgfi 94451477040fSmrg]) 94461477040fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 94471477040fSmrgAM_CONDITIONAL([am__fastdep$1], [ 94481477040fSmrg test "x$enable_dependency_tracking" != xno \ 94491477040fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 94501477040fSmrg]) 9451444c061aSmrg 9452444c061aSmrg 94531477040fSmrg# AM_SET_DEPDIR 94541477040fSmrg# ------------- 94551477040fSmrg# Choose a directory name for dependency files. 94561477040fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 94571477040fSmrgAC_DEFUN([AM_SET_DEPDIR], 94581477040fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 94591477040fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 94601477040fSmrg]) 9461444c061aSmrg 9462444c061aSmrg 94631477040fSmrg# AM_DEP_TRACK 94641477040fSmrg# ------------ 94651477040fSmrgAC_DEFUN([AM_DEP_TRACK], 94661477040fSmrg[AC_ARG_ENABLE(dependency-tracking, 94671477040fSmrg[ --disable-dependency-tracking speeds up one-time build 94681477040fSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 94691477040fSmrgif test "x$enable_dependency_tracking" != xno; then 94701477040fSmrg am_depcomp="$ac_aux_dir/depcomp" 94711477040fSmrg AMDEPBACKSLASH='\' 94721477040fSmrgfi 94731477040fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 94741477040fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 94751477040fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 94761477040fSmrg]) 9477444c061aSmrg 94781477040fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 9479444c061aSmrg 94801477040fSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 94811477040fSmrg# Free Software Foundation, Inc. 94821477040fSmrg# 94831477040fSmrg# This file is free software; the Free Software Foundation 94841477040fSmrg# gives unlimited permission to copy and/or distribute it, 94851477040fSmrg# with or without modifications, as long as this notice is preserved. 94861477040fSmrg 94871477040fSmrg#serial 5 94881477040fSmrg 94891477040fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 94901477040fSmrg# ------------------------------ 94911477040fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 94921477040fSmrg[{ 94931477040fSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 94941477040fSmrg # are listed without --file. Let's play safe and only enable the eval 94951477040fSmrg # if we detect the quoting. 94961477040fSmrg case $CONFIG_FILES in 94971477040fSmrg *\'*) eval set x "$CONFIG_FILES" ;; 94981477040fSmrg *) set x $CONFIG_FILES ;; 94991477040fSmrg esac 95001477040fSmrg shift 95011477040fSmrg for mf 95021477040fSmrg do 95031477040fSmrg # Strip MF so we end up with the name of the file. 95041477040fSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 95051477040fSmrg # Check whether this is an Automake generated Makefile or not. 95061477040fSmrg # We used to match only the files named `Makefile.in', but 95071477040fSmrg # some people rename them; so instead we look at the file content. 95081477040fSmrg # Grep'ing the first line is not enough: some people post-process 95091477040fSmrg # each Makefile.in and add a new line on top of each file to say so. 95101477040fSmrg # Grep'ing the whole file is not good either: AIX grep has a line 95111477040fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 95121477040fSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 95131477040fSmrg dirpart=`AS_DIRNAME("$mf")` 95141477040fSmrg else 95151477040fSmrg continue 95161477040fSmrg fi 95171477040fSmrg # Extract the definition of DEPDIR, am__include, and am__quote 95181477040fSmrg # from the Makefile without running `make'. 95191477040fSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 95201477040fSmrg test -z "$DEPDIR" && continue 95211477040fSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 95221477040fSmrg test -z "am__include" && continue 95231477040fSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 95241477040fSmrg # When using ansi2knr, U may be empty or an underscore; expand it 95251477040fSmrg U=`sed -n 's/^U = //p' < "$mf"` 95261477040fSmrg # Find all dependency output files, they are included files with 95271477040fSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 95281477040fSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 95291477040fSmrg # expansion. 95301477040fSmrg for file in `sed -n " 95311477040fSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 95321477040fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 95331477040fSmrg # Make sure the directory exists. 95341477040fSmrg test -f "$dirpart/$file" && continue 95351477040fSmrg fdir=`AS_DIRNAME(["$file"])` 95361477040fSmrg AS_MKDIR_P([$dirpart/$fdir]) 95371477040fSmrg # echo "creating $dirpart/$file" 95381477040fSmrg echo '# dummy' > "$dirpart/$file" 95391477040fSmrg done 95401477040fSmrg done 95411477040fSmrg} 95421477040fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 95431477040fSmrg 95441477040fSmrg 95451477040fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 95461477040fSmrg# ----------------------------- 95471477040fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 95481477040fSmrg# 95491477040fSmrg# This code is only required when automatic dependency tracking 95501477040fSmrg# is enabled. FIXME. This creates each `.P' file that we will 95511477040fSmrg# need in order to bootstrap the dependency handling code. 95521477040fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 95531477040fSmrg[AC_CONFIG_COMMANDS([depfiles], 95541477040fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 95551477040fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 95561477040fSmrg]) 9557444c061aSmrg 95581477040fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 95591477040fSmrg# Free Software Foundation, Inc. 95601477040fSmrg# 95611477040fSmrg# This file is free software; the Free Software Foundation 95621477040fSmrg# gives unlimited permission to copy and/or distribute it, 95631477040fSmrg# with or without modifications, as long as this notice is preserved. 9564444c061aSmrg 95651477040fSmrg# serial 8 9566444c061aSmrg 95671477040fSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 95681477040fSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 9569444c061aSmrg 95701477040fSmrg# Do all the work for Automake. -*- Autoconf -*- 9571444c061aSmrg 95721477040fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 95731477040fSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 95741477040fSmrg# 95751477040fSmrg# This file is free software; the Free Software Foundation 95761477040fSmrg# gives unlimited permission to copy and/or distribute it, 95771477040fSmrg# with or without modifications, as long as this notice is preserved. 9578444c061aSmrg 95791477040fSmrg# serial 16 9580444c061aSmrg 95811477040fSmrg# This macro actually does too much. Some checks are only needed if 95821477040fSmrg# your package does certain things. But this isn't really a big deal. 95832ae83157Smrg 95841477040fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 95851477040fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 95861477040fSmrg# ----------------------------------------------- 95871477040fSmrg# The call with PACKAGE and VERSION arguments is the old style 95881477040fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 95891477040fSmrg# and VERSION should now be passed to AC_INIT and removed from 95901477040fSmrg# the call to AM_INIT_AUTOMAKE. 95911477040fSmrg# We support both call styles for the transition. After 95921477040fSmrg# the next Automake release, Autoconf can make the AC_INIT 95931477040fSmrg# arguments mandatory, and then we can depend on a new Autoconf 95941477040fSmrg# release and drop the old call support. 95951477040fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 95961477040fSmrg[AC_PREREQ([2.62])dnl 95971477040fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 95981477040fSmrgdnl the ones we care about. 95991477040fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 96001477040fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 96011477040fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 96021477040fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 96031477040fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 96041477040fSmrg # is not polluted with repeated "-I." 96051477040fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 96061477040fSmrg # test to see if srcdir already configured 96071477040fSmrg if test -f $srcdir/config.status; then 96081477040fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 96091477040fSmrg fi 96101477040fSmrgfi 96112ae83157Smrg 96121477040fSmrg# test whether we have cygpath 96131477040fSmrgif test -z "$CYGPATH_W"; then 96141477040fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 96151477040fSmrg CYGPATH_W='cygpath -w' 96161477040fSmrg else 96171477040fSmrg CYGPATH_W=echo 96181477040fSmrg fi 96191477040fSmrgfi 96201477040fSmrgAC_SUBST([CYGPATH_W]) 9621444c061aSmrg 96221477040fSmrg# Define the identity of the package. 96231477040fSmrgdnl Distinguish between old-style and new-style calls. 96241477040fSmrgm4_ifval([$2], 96251477040fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 96261477040fSmrg AC_SUBST([PACKAGE], [$1])dnl 96271477040fSmrg AC_SUBST([VERSION], [$2])], 96281477040fSmrg[_AM_SET_OPTIONS([$1])dnl 96291477040fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 96301477040fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 96311477040fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 96321477040fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 96331477040fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9634444c061aSmrg 96351477040fSmrg_AM_IF_OPTION([no-define],, 96361477040fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 96371477040fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 9638444c061aSmrg 96391477040fSmrg# Some tools Automake needs. 96401477040fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 96411477040fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 96421477040fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 96431477040fSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 96441477040fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 96451477040fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 96461477040fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 96471477040fSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 96481477040fSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 96491477040fSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 96501477040fSmrg# We need awk for the "check" target. The system "awk" is bad on 96511477040fSmrg# some platforms. 96521477040fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 96531477040fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 96541477040fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 96551477040fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 96561477040fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 96571477040fSmrg [_AM_PROG_TAR([v7])])]) 96581477040fSmrg_AM_IF_OPTION([no-dependencies],, 96591477040fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 96601477040fSmrg [_AM_DEPENDENCIES(CC)], 96611477040fSmrg [define([AC_PROG_CC], 96621477040fSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 96631477040fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 96641477040fSmrg [_AM_DEPENDENCIES(CXX)], 96651477040fSmrg [define([AC_PROG_CXX], 96661477040fSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 96671477040fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 96681477040fSmrg [_AM_DEPENDENCIES(OBJC)], 96691477040fSmrg [define([AC_PROG_OBJC], 96701477040fSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 96711477040fSmrg]) 96721477040fSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 96731477040fSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 96741477040fSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 96751477040fSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 96761477040fSmrgAC_CONFIG_COMMANDS_PRE(dnl 96771477040fSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 96781477040fSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 96791477040fSmrg]) 9680444c061aSmrg 96811477040fSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 96821477040fSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 96831477040fSmrgdnl mangled by Autoconf and run in a shell conditional statement. 96841477040fSmrgm4_define([_AC_COMPILER_EXEEXT], 96851477040fSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9686444c061aSmrg 9687444c061aSmrg 96881477040fSmrg# When config.status generates a header, we must update the stamp-h file. 96891477040fSmrg# This file resides in the same directory as the config header 96901477040fSmrg# that is generated. The stamp files are numbered to have different names. 9691444c061aSmrg 96921477040fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 96931477040fSmrg# loop where config.status creates the headers, so we can generate 96941477040fSmrg# our stamp files there. 96951477040fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 96961477040fSmrg[# Compute $1's index in $config_headers. 96971477040fSmrg_am_arg=$1 96981477040fSmrg_am_stamp_count=1 96991477040fSmrgfor _am_header in $config_headers :; do 97001477040fSmrg case $_am_header in 97011477040fSmrg $_am_arg | $_am_arg:* ) 97021477040fSmrg break ;; 97031477040fSmrg * ) 97041477040fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 97051477040fSmrg esac 97061477040fSmrgdone 97071477040fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9708444c061aSmrg 97091477040fSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 97101477040fSmrg# 97111477040fSmrg# This file is free software; the Free Software Foundation 97121477040fSmrg# gives unlimited permission to copy and/or distribute it, 97131477040fSmrg# with or without modifications, as long as this notice is preserved. 9714444c061aSmrg 97151477040fSmrg# AM_PROG_INSTALL_SH 97161477040fSmrg# ------------------ 97171477040fSmrg# Define $install_sh. 97181477040fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 97191477040fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 97201477040fSmrgif test x"${install_sh}" != xset; then 97211477040fSmrg case $am_aux_dir in 97221477040fSmrg *\ * | *\ *) 97231477040fSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 97241477040fSmrg *) 97251477040fSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 97261477040fSmrg esac 97271477040fSmrgfi 97281477040fSmrgAC_SUBST(install_sh)]) 97291477040fSmrg 97301477040fSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 97311477040fSmrg# 97321477040fSmrg# This file is free software; the Free Software Foundation 97331477040fSmrg# gives unlimited permission to copy and/or distribute it, 97341477040fSmrg# with or without modifications, as long as this notice is preserved. 9735444c061aSmrg 97361477040fSmrg# serial 2 9737444c061aSmrg 97381477040fSmrg# Check whether the underlying file-system supports filenames 97391477040fSmrg# with a leading dot. For instance MS-DOS doesn't. 97401477040fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 97411477040fSmrg[rm -rf .tst 2>/dev/null 97421477040fSmrgmkdir .tst 2>/dev/null 97431477040fSmrgif test -d .tst; then 97441477040fSmrg am__leading_dot=. 97451477040fSmrgelse 97461477040fSmrg am__leading_dot=_ 97471477040fSmrgfi 97481477040fSmrgrmdir .tst 2>/dev/null 97491477040fSmrgAC_SUBST([am__leading_dot])]) 9750444c061aSmrg 97511477040fSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 97521477040fSmrg# From Jim Meyering 9753444c061aSmrg 97541477040fSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 97551477040fSmrg# Free Software Foundation, Inc. 97561477040fSmrg# 97571477040fSmrg# This file is free software; the Free Software Foundation 97581477040fSmrg# gives unlimited permission to copy and/or distribute it, 97591477040fSmrg# with or without modifications, as long as this notice is preserved. 9760444c061aSmrg 97611477040fSmrg# serial 5 9762444c061aSmrg 97631477040fSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 97641477040fSmrg# ---------------------------------- 97651477040fSmrg# Control maintainer-specific portions of Makefiles. 97661477040fSmrg# Default is to disable them, unless `enable' is passed literally. 97671477040fSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 97681477040fSmrg# can override the default with the --enable/--disable switch. 97691477040fSmrgAC_DEFUN([AM_MAINTAINER_MODE], 97701477040fSmrg[m4_case(m4_default([$1], [disable]), 97711477040fSmrg [enable], [m4_define([am_maintainer_other], [disable])], 97721477040fSmrg [disable], [m4_define([am_maintainer_other], [enable])], 97731477040fSmrg [m4_define([am_maintainer_other], [enable]) 97741477040fSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 97751477040fSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 97761477040fSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 97771477040fSmrg AC_ARG_ENABLE([maintainer-mode], 97781477040fSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 97791477040fSmrg (and sometimes confusing) to the casual installer], 97801477040fSmrg [USE_MAINTAINER_MODE=$enableval], 97811477040fSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 97821477040fSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 97831477040fSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 97841477040fSmrg MAINT=$MAINTAINER_MODE_TRUE 97851477040fSmrg AC_SUBST([MAINT])dnl 97861477040fSmrg] 97871477040fSmrg) 9788444c061aSmrg 97891477040fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9790444c061aSmrg 97911477040fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9792444c061aSmrg 97931477040fSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 97941477040fSmrg# 97951477040fSmrg# This file is free software; the Free Software Foundation 97961477040fSmrg# gives unlimited permission to copy and/or distribute it, 97971477040fSmrg# with or without modifications, as long as this notice is preserved. 9798444c061aSmrg 97991477040fSmrg# serial 4 9800444c061aSmrg 98011477040fSmrg# AM_MAKE_INCLUDE() 98021477040fSmrg# ----------------- 98031477040fSmrg# Check to see how make treats includes. 98041477040fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 98051477040fSmrg[am_make=${MAKE-make} 98061477040fSmrgcat > confinc << 'END' 98071477040fSmrgam__doit: 98081477040fSmrg @echo this is the am__doit target 98091477040fSmrg.PHONY: am__doit 98101477040fSmrgEND 98111477040fSmrg# If we don't find an include directive, just comment out the code. 98121477040fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 98131477040fSmrgam__include="#" 98141477040fSmrgam__quote= 98151477040fSmrg_am_result=none 98161477040fSmrg# First try GNU make style include. 98171477040fSmrgecho "include confinc" > confmf 98181477040fSmrg# Ignore all kinds of additional output from `make'. 98191477040fSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 98201477040fSmrg*the\ am__doit\ target*) 98211477040fSmrg am__include=include 98221477040fSmrg am__quote= 98231477040fSmrg _am_result=GNU 98241477040fSmrg ;; 98251477040fSmrgesac 98261477040fSmrg# Now try BSD make style include. 98271477040fSmrgif test "$am__include" = "#"; then 98281477040fSmrg echo '.include "confinc"' > confmf 98291477040fSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 98301477040fSmrg *the\ am__doit\ target*) 98311477040fSmrg am__include=.include 98321477040fSmrg am__quote="\"" 98331477040fSmrg _am_result=BSD 98341477040fSmrg ;; 98351477040fSmrg esac 98361477040fSmrgfi 98371477040fSmrgAC_SUBST([am__include]) 98381477040fSmrgAC_SUBST([am__quote]) 98391477040fSmrgAC_MSG_RESULT([$_am_result]) 98401477040fSmrgrm -f confinc confmf 98411477040fSmrg]) 98422ae83157Smrg 98431477040fSmrg# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 98441477040fSmrg# Free Software Foundation, Inc. 98451477040fSmrg# 98461477040fSmrg# This file is free software; the Free Software Foundation 98471477040fSmrg# gives unlimited permission to copy and/or distribute it, 98481477040fSmrg# with or without modifications, as long as this notice is preserved. 9849444c061aSmrg 98501477040fSmrg# serial 6 9851444c061aSmrg 98521477040fSmrg# AM_PROG_CC_C_O 98531477040fSmrg# -------------- 98541477040fSmrg# Like AC_PROG_CC_C_O, but changed for automake. 98551477040fSmrgAC_DEFUN([AM_PROG_CC_C_O], 98561477040fSmrg[AC_REQUIRE([AC_PROG_CC_C_O])dnl 98571477040fSmrgAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 98581477040fSmrgAC_REQUIRE_AUX_FILE([compile])dnl 98591477040fSmrg# FIXME: we rely on the cache variable name because 98601477040fSmrg# there is no other way. 98611477040fSmrgset dummy $CC 98621477040fSmrgam_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` 98631477040fSmrgeval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 98641477040fSmrgif test "$am_t" != yes; then 98651477040fSmrg # Losing compiler, so override with the script. 98661477040fSmrg # FIXME: It is wrong to rewrite CC. 98671477040fSmrg # But if we don't then we get into trouble of one sort or another. 98681477040fSmrg # A longer-term fix would be to have automake use am__CC in this case, 98691477040fSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 98701477040fSmrg CC="$am_aux_dir/compile $CC" 98711477040fSmrgfi 98721477040fSmrgdnl Make sure AC_PROG_CC is never called again, or it will override our 98731477040fSmrgdnl setting of CC. 98741477040fSmrgm4_define([AC_PROG_CC], 98751477040fSmrg [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) 98761477040fSmrg]) 9877444c061aSmrg 98781477040fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9879444c061aSmrg 98801477040fSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 98811477040fSmrg# Free Software Foundation, Inc. 98821477040fSmrg# 98831477040fSmrg# This file is free software; the Free Software Foundation 98841477040fSmrg# gives unlimited permission to copy and/or distribute it, 98851477040fSmrg# with or without modifications, as long as this notice is preserved. 9886444c061aSmrg 98871477040fSmrg# serial 6 9888444c061aSmrg 98891477040fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 98901477040fSmrg# ------------------------------ 98911477040fSmrgAC_DEFUN([AM_MISSING_PROG], 98921477040fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 98931477040fSmrg$1=${$1-"${am_missing_run}$2"} 98941477040fSmrgAC_SUBST($1)]) 98951477040fSmrg 98961477040fSmrg 98971477040fSmrg# AM_MISSING_HAS_RUN 98981477040fSmrg# ------------------ 98991477040fSmrg# Define MISSING if not defined so far and test if it supports --run. 99001477040fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 99011477040fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 99021477040fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 99031477040fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 99041477040fSmrgif test x"${MISSING+set}" != xset; then 99051477040fSmrg case $am_aux_dir in 99061477040fSmrg *\ * | *\ *) 99071477040fSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 99081477040fSmrg *) 99091477040fSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 99101477040fSmrg esac 99111477040fSmrgfi 99121477040fSmrg# Use eval to expand $SHELL 99131477040fSmrgif eval "$MISSING --run true"; then 99141477040fSmrg am_missing_run="$MISSING --run " 99151477040fSmrgelse 99161477040fSmrg am_missing_run= 99171477040fSmrg AC_MSG_WARN([`missing' script is too old or missing]) 99181477040fSmrgfi 9919444c061aSmrg]) 9920444c061aSmrg 99211477040fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 99222265a131Smrg# 99231477040fSmrg# This file is free software; the Free Software Foundation 99241477040fSmrg# gives unlimited permission to copy and/or distribute it, 99251477040fSmrg# with or without modifications, as long as this notice is preserved. 99262ae83157Smrg 99271477040fSmrg# AM_PROG_MKDIR_P 99281477040fSmrg# --------------- 99291477040fSmrg# Check for `mkdir -p'. 99301477040fSmrgAC_DEFUN([AM_PROG_MKDIR_P], 99311477040fSmrg[AC_PREREQ([2.60])dnl 99321477040fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 99331477040fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 99341477040fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 99351477040fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 99361477040fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 99371477040fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 99381477040fSmrgdnl adjustment using top_builddir (which is defined more often than 99391477040fSmrgdnl MKDIR_P). 99401477040fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 99411477040fSmrgcase $mkdir_p in 99421477040fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 99431477040fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 99442265a131Smrgesac 99451477040fSmrg]) 9946444c061aSmrg 99471477040fSmrg# Helper functions for option handling. -*- Autoconf -*- 99482265a131Smrg 99491477040fSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 99502ae83157Smrg# 99511477040fSmrg# This file is free software; the Free Software Foundation 99521477040fSmrg# gives unlimited permission to copy and/or distribute it, 99531477040fSmrg# with or without modifications, as long as this notice is preserved. 99542265a131Smrg 99551477040fSmrg# serial 4 9956444c061aSmrg 99571477040fSmrg# _AM_MANGLE_OPTION(NAME) 99581477040fSmrg# ----------------------- 99591477040fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 99601477040fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9961444c061aSmrg 99621477040fSmrg# _AM_SET_OPTION(NAME) 99631477040fSmrg# ------------------------------ 99641477040fSmrg# Set option NAME. Presently that only means defining a flag for this option. 99651477040fSmrgAC_DEFUN([_AM_SET_OPTION], 99661477040fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 99672265a131Smrg 99681477040fSmrg# _AM_SET_OPTIONS(OPTIONS) 99691477040fSmrg# ---------------------------------- 99701477040fSmrg# OPTIONS is a space-separated list of Automake options. 99711477040fSmrgAC_DEFUN([_AM_SET_OPTIONS], 99721477040fSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 99732265a131Smrg 99741477040fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 99751477040fSmrg# ------------------------------------------- 99761477040fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 99771477040fSmrgAC_DEFUN([_AM_IF_OPTION], 99781477040fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 99792ae83157Smrg 99801477040fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 99812ae83157Smrg 99821477040fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 99831477040fSmrg# Free Software Foundation, Inc. 99841477040fSmrg# 99851477040fSmrg# This file is free software; the Free Software Foundation 99861477040fSmrg# gives unlimited permission to copy and/or distribute it, 99871477040fSmrg# with or without modifications, as long as this notice is preserved. 99882ae83157Smrg 99891477040fSmrg# serial 5 99902ae83157Smrg 99911477040fSmrg# AM_SANITY_CHECK 99922ae83157Smrg# --------------- 99931477040fSmrgAC_DEFUN([AM_SANITY_CHECK], 99941477040fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 99951477040fSmrg# Just in case 99961477040fSmrgsleep 1 99971477040fSmrgecho timestamp > conftest.file 99981477040fSmrg# Reject unsafe characters in $srcdir or the absolute working directory 99991477040fSmrg# name. Accept space and tab only in the latter. 100001477040fSmrgam_lf=' 100011477040fSmrg' 100021477040fSmrgcase `pwd` in 100031477040fSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 100041477040fSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 100051477040fSmrgesac 100061477040fSmrgcase $srcdir in 100071477040fSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 100081477040fSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 100091477040fSmrgesac 100102ae83157Smrg 100111477040fSmrg# Do `set' in a subshell so we don't clobber the current shell's 100121477040fSmrg# arguments. Must try -L first in case configure is actually a 100131477040fSmrg# symlink; some systems play weird games with the mod time of symlinks 100141477040fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 100151477040fSmrg# directory). 100161477040fSmrgif ( 100171477040fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 100181477040fSmrg if test "$[*]" = "X"; then 100191477040fSmrg # -L didn't work. 100201477040fSmrg set X `ls -t "$srcdir/configure" conftest.file` 100211477040fSmrg fi 100221477040fSmrg rm -f conftest.file 100231477040fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 100241477040fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 100252ae83157Smrg 100261477040fSmrg # If neither matched, then we have a broken ls. This can happen 100271477040fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 100281477040fSmrg # broken ls alias from the environment. This has actually 100291477040fSmrg # happened. Such a system could not be considered "sane". 100301477040fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 100311477040fSmrgalias in your environment]) 100321477040fSmrg fi 10033444c061aSmrg 100341477040fSmrg test "$[2]" = conftest.file 100351477040fSmrg ) 100361477040fSmrgthen 100371477040fSmrg # Ok. 100381477040fSmrg : 100391477040fSmrgelse 100401477040fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 100411477040fSmrgCheck your system clock]) 100421477040fSmrgfi 100431477040fSmrgAC_MSG_RESULT(yes)]) 100441477040fSmrg 100451477040fSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 100462ae83157Smrg# 100471477040fSmrg# This file is free software; the Free Software Foundation 100481477040fSmrg# gives unlimited permission to copy and/or distribute it, 100491477040fSmrg# with or without modifications, as long as this notice is preserved. 10050444c061aSmrg 100511477040fSmrg# serial 1 100522265a131Smrg 100531477040fSmrg# AM_SILENT_RULES([DEFAULT]) 100541477040fSmrg# -------------------------- 100551477040fSmrg# Enable less verbose build rules; with the default set to DEFAULT 100561477040fSmrg# (`yes' being less verbose, `no' or empty being verbose). 100571477040fSmrgAC_DEFUN([AM_SILENT_RULES], 100581477040fSmrg[AC_ARG_ENABLE([silent-rules], 100591477040fSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 100601477040fSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 100611477040fSmrgcase $enable_silent_rules in 100621477040fSmrgyes) AM_DEFAULT_VERBOSITY=0;; 100631477040fSmrgno) AM_DEFAULT_VERBOSITY=1;; 100641477040fSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 100651477040fSmrgesac 100661477040fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 100671477040fSmrgAM_BACKSLASH='\' 100681477040fSmrgAC_SUBST([AM_BACKSLASH])dnl 100691477040fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 100701477040fSmrg]) 100712265a131Smrg 100721477040fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 100731477040fSmrg# 100741477040fSmrg# This file is free software; the Free Software Foundation 100751477040fSmrg# gives unlimited permission to copy and/or distribute it, 100761477040fSmrg# with or without modifications, as long as this notice is preserved. 10077444c061aSmrg 100781477040fSmrg# AM_PROG_INSTALL_STRIP 100791477040fSmrg# --------------------- 100801477040fSmrg# One issue with vendor `install' (even GNU) is that you can't 100811477040fSmrg# specify the program used to strip binaries. This is especially 100821477040fSmrg# annoying in cross-compiling environments, where the build's strip 100831477040fSmrg# is unlikely to handle the host's binaries. 100841477040fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 100851477040fSmrg# always use install-sh in `make install-strip', and initialize 100861477040fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 100871477040fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 100881477040fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 100891477040fSmrg# Installed binaries are usually stripped using `strip' when the user 100901477040fSmrg# run `make install-strip'. However `strip' might not be the right 100911477040fSmrg# tool to use in cross-compilation environments, therefore Automake 100921477040fSmrg# will honor the `STRIP' environment variable to overrule this program. 100931477040fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 100941477040fSmrgif test "$cross_compiling" != no; then 100951477040fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 100961477040fSmrgfi 100971477040fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 100981477040fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 100992ae83157Smrg 101001477040fSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 101012ae83157Smrg# 101021477040fSmrg# This file is free software; the Free Software Foundation 101031477040fSmrg# gives unlimited permission to copy and/or distribute it, 101041477040fSmrg# with or without modifications, as long as this notice is preserved. 101052265a131Smrg 101061477040fSmrg# serial 2 101072265a131Smrg 101081477040fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 101091477040fSmrg# --------------------------- 101101477040fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 101111477040fSmrg# This macro is traced by Automake. 101121477040fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10113444c061aSmrg 101141477040fSmrg# AM_SUBST_NOTMAKE(VARIABLE) 101151477040fSmrg# --------------------------- 101161477040fSmrg# Public sister of _AM_SUBST_NOTMAKE. 101171477040fSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10118444c061aSmrg 101191477040fSmrg# Check how to create a tarball. -*- Autoconf -*- 10120444c061aSmrg 101211477040fSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 101221477040fSmrg# 101231477040fSmrg# This file is free software; the Free Software Foundation 101241477040fSmrg# gives unlimited permission to copy and/or distribute it, 101251477040fSmrg# with or without modifications, as long as this notice is preserved. 10126444c061aSmrg 101271477040fSmrg# serial 2 10128444c061aSmrg 101291477040fSmrg# _AM_PROG_TAR(FORMAT) 101301477040fSmrg# -------------------- 101311477040fSmrg# Check how to create a tarball in format FORMAT. 101321477040fSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 101331477040fSmrg# 101341477040fSmrg# Substitute a variable $(am__tar) that is a command 101351477040fSmrg# writing to stdout a FORMAT-tarball containing the directory 101361477040fSmrg# $tardir. 101371477040fSmrg# tardir=directory && $(am__tar) > result.tar 101381477040fSmrg# 101391477040fSmrg# Substitute a variable $(am__untar) that extract such 101401477040fSmrg# a tarball read from stdin. 101411477040fSmrg# $(am__untar) < result.tar 101421477040fSmrgAC_DEFUN([_AM_PROG_TAR], 101431477040fSmrg[# Always define AMTAR for backward compatibility. 101441477040fSmrgAM_MISSING_PROG([AMTAR], [tar]) 101451477040fSmrgm4_if([$1], [v7], 101461477040fSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 101471477040fSmrg [m4_case([$1], [ustar],, [pax],, 101481477040fSmrg [m4_fatal([Unknown tar format])]) 101491477040fSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 101501477040fSmrg# Loop over all known methods to create a tar archive until one works. 101511477040fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 101521477040fSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 101531477040fSmrg# Do not fold the above two line into one, because Tru64 sh and 101541477040fSmrg# Solaris sh will not grok spaces in the rhs of `-'. 101551477040fSmrgfor _am_tool in $_am_tools 101561477040fSmrgdo 101571477040fSmrg case $_am_tool in 101581477040fSmrg gnutar) 101591477040fSmrg for _am_tar in tar gnutar gtar; 101601477040fSmrg do 101611477040fSmrg AM_RUN_LOG([$_am_tar --version]) && break 101621477040fSmrg done 101631477040fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 101641477040fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 101651477040fSmrg am__untar="$_am_tar -xf -" 101661477040fSmrg ;; 101671477040fSmrg plaintar) 101681477040fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 101691477040fSmrg # ustar tarball either. 101701477040fSmrg (tar --version) >/dev/null 2>&1 && continue 101711477040fSmrg am__tar='tar chf - "$$tardir"' 101721477040fSmrg am__tar_='tar chf - "$tardir"' 101731477040fSmrg am__untar='tar xf -' 101741477040fSmrg ;; 101751477040fSmrg pax) 101761477040fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 101771477040fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 101781477040fSmrg am__untar='pax -r' 101791477040fSmrg ;; 101801477040fSmrg cpio) 101811477040fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 101821477040fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 101831477040fSmrg am__untar='cpio -i -H $1 -d' 101841477040fSmrg ;; 101851477040fSmrg none) 101861477040fSmrg am__tar=false 101871477040fSmrg am__tar_=false 101881477040fSmrg am__untar=false 101891477040fSmrg ;; 101901477040fSmrg esac 10191444c061aSmrg 101921477040fSmrg # If the value was cached, stop now. We just wanted to have am__tar 101931477040fSmrg # and am__untar set. 101941477040fSmrg test -n "${am_cv_prog_tar_$1}" && break 10195444c061aSmrg 101961477040fSmrg # tar/untar a dummy directory, and stop if the command works 101971477040fSmrg rm -rf conftest.dir 101981477040fSmrg mkdir conftest.dir 101991477040fSmrg echo GrepMe > conftest.dir/file 102001477040fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 102011477040fSmrg rm -rf conftest.dir 102021477040fSmrg if test -s conftest.tar; then 102031477040fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 102041477040fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102051477040fSmrg fi 102061477040fSmrgdone 102071477040fSmrgrm -rf conftest.dir 102082265a131Smrg 102091477040fSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102101477040fSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102111477040fSmrgAC_SUBST([am__tar]) 102121477040fSmrgAC_SUBST([am__untar]) 102131477040fSmrg]) # _AM_PROG_TAR 10214444c061aSmrg 10215444c061aSmrgm4_include([acinclude.m4]) 10216